/* ===== MochiRoll v3 - Premium Anime Platform ===== */
:root {
  --bg: #000000;
  --bg-elevated: #0a0a0a;
  --bg-card: #111113;
  --bg-card-hover: #1a1a1d;
  --bg-surface: #1c1c1f;
  --bg-overlay: rgba(0,0,0,0.92);
  --primary: #f47521;
  --primary-hover: #ff8c3a;
  --primary-dim: rgba(244,117,33,0.12);
  --primary-glow: rgba(244,117,33,0.25);
  --text: #ffffff;
  --text-secondary: #b0b0b0;
  --text-muted: #5a5a5a;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.12);
  --success: #00d67e;
  --warning: #ffb800;
  --danger: #ff4b4b;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Plus Jakarta Sans', sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.6);
  --shadow-xl: 0 16px 64px rgba(0,0,0,0.8);
  --navbar-h: 60px;
  --transition: 0.2s ease;
  --transition-slow: 0.35s cubic-bezier(0.4,0,0.2,1);
}

*,*::before,*::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }
input { font-family: inherit; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 3px; }

/* ===== NAVBAR ===== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--navbar-h);
  z-index: 1000;
  background: linear-gradient(180deg, rgba(0,0,0,0.95), rgba(0,0,0,0.7));
  backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}
.navbar.scrolled { background: rgba(0,0,0,0.98); border-bottom-color: var(--border); }
.navbar-inner {
  max-width: 1440px; margin: 0 auto; height: 100%;
  padding: 0 2rem; display: flex; align-items: center; justify-content: space-between;
}
.navbar-left { display: flex; align-items: center; gap: 2.5rem; }
.navbar-brand { display: flex; align-items: center; gap: 0.5rem; }
.brand-icon { font-size: 1.5rem; }
.brand-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; }
.navbar-links { display: flex; gap: 0.15rem; }
.nav-item {
  padding: 0.5rem 0.9rem; font-size: 0.88rem; font-weight: 500;
  color: var(--text-secondary); border-radius: var(--radius-md);
  transition: var(--transition); display: flex; align-items: center;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-item.active { color: var(--text); font-weight: 600; }
.navbar-right { display: flex; align-items: center; gap: 0.75rem; }

/* Search */
.search-wrapper { position: relative; }
.search-toggle {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: var(--transition);
}
.search-toggle:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.search-expand {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 0; opacity: 0; overflow: hidden;
  transition: var(--transition-slow);
  display: flex; align-items: center; gap: 0.5rem;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 24px;
}
.search-expand.open { width: 360px; opacity: 1; padding: 0.5rem 1rem; }
.search-expand input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 0.9rem; padding: 0.35rem 0;
}
.search-expand input::placeholder { color: var(--text-muted); }
.search-close {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: var(--transition);
}
.search-close:hover { color: var(--text); background: rgba(255,255,255,0.1); }

/* Search Suggestions */
.search-suggestions {
  position: absolute; top: calc(100% + 0.5rem); right: 0;
  width: 360px; max-height: 400px; overflow-y: auto;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); display: none;
  box-shadow: var(--shadow-xl);
}
.search-suggestions.open { display: block; }
.suggestion-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.6rem 1rem; cursor: pointer; transition: var(--transition);
}
.suggestion-item:hover { background: rgba(255,255,255,0.05); }
.suggestion-img {
  width: 40px; height: 56px; border-radius: var(--radius-sm);
  object-fit: cover; background: var(--bg-card);
}
.suggestion-info { flex: 1; }
.suggestion-title { font-size: 0.85rem; font-weight: 500; }
.suggestion-meta { font-size: 0.72rem; color: var(--text-muted); }

/* ===== MAIN ===== */
.main-content { min-height: 100vh; padding-top: var(--navbar-h); }

/* ===== HERO ===== */
.hero { position: relative; height: 75vh; min-height: 500px; max-height: 750px; overflow: hidden; }
.hero-slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 1s ease, transform 8s linear;
  transform: scale(1);
}
.hero-slide.active { opacity: 1; transform: scale(1.03); }
.hero-image { width: 100%; height: 100%; object-fit: cover; }
.hero-gradient {
  position: absolute; inset: 0;
  background:
    linear-gradient(0deg, var(--bg) 0%, rgba(0,0,0,0.3) 40%, transparent 70%),
    linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 35%, transparent 60%);
}
.hero-content {
  position: absolute; bottom: 5rem; left: 0;
  padding: 0 4rem; max-width: 580px; z-index: 2;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.7rem; background: var(--primary);
  border-radius: var(--radius-sm); font-size: 0.68rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}
.hero-title {
  font-family: var(--font-display); font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800; line-height: 1.08; margin-bottom: 0.6rem;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}
.hero-desc {
  font-size: 0.9rem; color: var(--text-secondary); line-height: 1.6;
  margin-bottom: 1.5rem; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.hero-meta { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; font-size: 0.8rem; color: var(--text-muted); }
.hero-actions { display: flex; gap: 0.6rem; align-items: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1.4rem; border-radius: var(--radius-md);
  font-size: 0.88rem; font-weight: 600; transition: var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: 0 4px 16px var(--primary-glow); }
.btn-ghost { background: rgba(255,255,255,0.08); color: white; border: 1px solid rgba(255,255,255,0.15); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.25); }
.btn-icon-round {
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  transition: var(--transition);
}
.btn-icon-round:hover { background: rgba(255,255,255,0.15); }
.btn-icon-round.favorited { background: var(--danger); border-color: var(--danger); }

.hero-dots { position: absolute; bottom: 2rem; right: 4rem; display: flex; gap: 0.4rem; z-index: 3; }
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.25); cursor: pointer; transition: var(--transition); }
.hero-dot.active { background: var(--primary); width: 28px; border-radius: 4px; }

/* ===== SECTIONS ===== */
.section { padding: 2.5rem 4rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.section-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; }
.section-link { font-size: 0.82rem; color: var(--primary); font-weight: 600; transition: var(--transition); }
.section-link:hover { color: var(--primary-hover); }

/* ===== ANIME ROW (Horizontal Scroll) ===== */
.anime-row-wrapper { position: relative; }
.anime-row {
  display: flex; gap: 0.75rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 0.5rem 0; scrollbar-width: none;
}
.anime-row::-webkit-scrollbar { display: none; }
.row-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,0.8); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: white; z-index: 5; transition: var(--transition);
  backdrop-filter: blur(8px);
}
.row-arrow:hover { background: var(--primary); border-color: var(--primary); }
.row-arrow-left { left: -0.5rem; }
.row-arrow-right { right: -0.5rem; }

/* ===== ANIME CARD ===== */
.anime-card {
  flex: 0 0 175px; scroll-snap-align: start;
  cursor: pointer; position: relative; border-radius: var(--radius-lg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.anime-card:hover { transform: scale(1.08) translateY(-4px); z-index: 10; }
.anime-card-poster {
  position: relative; aspect-ratio: 2/3;
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-card);
}
.anime-card-poster img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.anime-card-type {
  position: absolute; top: 0.4rem; left: 0.4rem;
  padding: 0.15rem 0.45rem; background: rgba(0,0,0,0.75);
  border-radius: var(--radius-sm); font-size: 0.6rem; font-weight: 600;
  text-transform: uppercase; backdrop-filter: blur(4px);
}
.anime-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, transparent 60%);
  opacity: 0; transition: var(--transition);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 0.75rem;
}
.anime-card:hover .anime-card-overlay { opacity: 1; }
.anime-card-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(0.7);
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: var(--transition);
  box-shadow: 0 4px 20px var(--primary-glow);
}
.anime-card:hover .anime-card-play { opacity: 1; transform: translate(-50%,-50%) scale(1); }
.anime-card-fav {
  position: absolute; top: 0.4rem; right: 0.4rem;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: var(--transition); color: white;
}
.anime-card:hover .anime-card-fav { opacity: 1; }
.anime-card-fav.active { opacity: 1; color: var(--danger); background: rgba(255,75,75,0.2); }
.anime-card-info { padding: 0.5rem 0.15rem; }
.anime-card-title { font-size: 0.82rem; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.anime-card-meta { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.15rem; }

/* Grid layout */
.anime-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 1rem;
}
.anime-grid .anime-card { flex: none; }

/* ===== SKELETON LOADING ===== */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-surface) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-lg);
}
.skeleton-hero { height: 75vh; min-height: 500px; }
.skeleton-card { aspect-ratio: 2/3; border-radius: var(--radius-lg); }
.skeleton-row { display: flex; gap: 0.75rem; padding: 0.5rem 0; }
.skeleton-text { height: 14px; border-radius: 4px; margin-top: 0.5rem; }
.skeleton-text-sm { width: 60%; }
.skeleton-section { padding: 2.5rem 4rem; }
.skeleton-title { height: 22px; width: 150px; border-radius: 4px; margin-bottom: 1rem; }

/* ===== RECENTLY VIEWED ===== */
.recent-banner {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem; background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); cursor: pointer; transition: var(--transition);
}
.recent-banner:hover { border-color: var(--primary); background: var(--bg-card-hover); }
.recent-banner-img { width: 50px; height: 70px; border-radius: var(--radius-sm); object-fit: cover; }
.recent-banner-info { flex: 1; }
.recent-banner-title { font-size: 0.88rem; font-weight: 600; }
.recent-banner-ep { font-size: 0.75rem; color: var(--text-muted); }
.recent-banner-btn {
  padding: 0.5rem 1rem; background: var(--primary); border-radius: var(--radius-md);
  font-size: 0.8rem; font-weight: 600; color: white;
}

/* ===== DETAIL OVERLAY ===== */
.detail-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: var(--bg); overflow-y: auto;
  transform: translateY(100%); transition: transform 0.4s cubic-bezier(0.32,0.72,0,1);
}
.detail-overlay.open { transform: translateY(0); }
.detail-back {
  position: fixed; top: 1rem; left: 1.5rem; z-index: 2001;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.detail-back:hover { background: var(--primary); }
.detail-hero { position: relative; height: 45vh; min-height: 320px; }
.detail-hero-img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(0deg, var(--bg) 0%, transparent 50%), linear-gradient(90deg, rgba(0,0,0,0.5) 0%, transparent 50%);
}
.detail-body { max-width: 1100px; margin: -7rem auto 0; padding: 0 3rem 4rem; position: relative; }
.detail-top { display: flex; gap: 2rem; margin-bottom: 2rem; }
.detail-poster { width: 190px; min-width: 190px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xl); }
.detail-poster img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.detail-info { flex: 1; padding-top: 1rem; }
.detail-title { font-family: var(--font-display); font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.meta-badge { padding: 0.25rem 0.6rem; background: var(--bg-surface); border-radius: var(--radius-sm); font-size: 0.78rem; font-weight: 500; color: var(--text-secondary); }
.detail-desc { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 1.25rem; }
.detail-genres { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1.5rem; }
.genre-tag { padding: 0.25rem 0.65rem; background: var(--primary-dim); color: var(--primary); border-radius: var(--radius-md); font-size: 0.75rem; font-weight: 600; }
.detail-actions { display: flex; gap: 0.6rem; align-items: center; }

/* Episodes */
.episodes-section { margin-top: 2.5rem; }
.episodes-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.episodes-title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }
.episodes-count { font-size: 0.8rem; color: var(--text-muted); }
.episodes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 0.4rem; }
.ep-btn {
  padding: 0.55rem 0.4rem; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); font-size: 0.82rem; font-weight: 600;
  text-align: center; transition: var(--transition);
}
.ep-btn:hover { background: var(--primary); border-color: var(--primary); color: white; }
.ep-btn.watched { background: var(--primary-dim); border-color: rgba(244,117,33,0.3); color: var(--primary); }

/* ===== PLAYER OVERLAY ===== */
.player-overlay {
  position: fixed; inset: 0; z-index: 3000;
  background: var(--bg); display: none; flex-direction: column;
}
.player-overlay.open { display: flex; }
.player-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.5rem; background: var(--bg-elevated); border-bottom: 1px solid var(--border);
  min-height: 52px;
}
.player-header-left { display: flex; align-items: center; gap: 1rem; }
.player-title { font-weight: 600; font-size: 0.9rem; }
.player-ep-nav { display: flex; gap: 0.4rem; }
.player-ep-nav button {
  padding: 0.35rem 0.7rem; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 0.75rem; font-weight: 500; transition: var(--transition);
}
.player-ep-nav button:hover { border-color: var(--primary); color: var(--primary); }
.player-ep-nav button:disabled { opacity: 0.3; cursor: not-allowed; }
.player-close {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06); transition: var(--transition);
}
.player-close:hover { background: var(--danger); }
.player-body { flex: 1; display: flex; flex-direction: column; overflow-y: auto; }

/* Iframe Player */
.player-iframe-wrapper {
  width: 100%; aspect-ratio: 16/9; max-height: 65vh;
  background: #000; position: relative;
}
.player-iframe-wrapper iframe {
  width: 100%; height: 100%; border: none;
}
.player-iframe-placeholder {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem;
  color: var(--text-muted); background: var(--bg-elevated);
}

/* Server selection */
.player-servers { padding: 1.25rem 1.5rem; }
.player-servers h3 { font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 0.6rem; }
.servers-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.server-btn {
  padding: 0.5rem 1rem; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); font-size: 0.8rem; font-weight: 500; transition: var(--transition);
}
.server-btn:hover { border-color: var(--primary); color: var(--primary); }
.server-btn.active { background: var(--primary); border-color: var(--primary); color: white; }

/* ===== GENRES PAGE ===== */
.page-header { padding: 5rem 4rem 1.5rem; }
.page-header h1 { font-family: var(--font-display); font-size: 2rem; font-weight: 800; }
.page-header p { color: var(--text-muted); margin-top: 0.25rem; font-size: 0.9rem; }
.genres-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.6rem; padding: 0.5rem 4rem 4rem; }
.genre-card {
  padding: 1.25rem 0.75rem; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); text-align: center; font-weight: 600; font-size: 0.85rem;
  cursor: pointer; transition: var(--transition); position: relative; overflow: hidden;
}
.genre-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--primary-dim) 0%, transparent 80%);
  opacity: 0; transition: var(--transition);
}
.genre-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.genre-card:hover::before { opacity: 1; }

/* ===== FAVORITES ===== */
.favorites-empty {
  text-align: center; padding: 6rem 2rem;
}
.favorites-empty-icon { font-size: 3.5rem; margin-bottom: 1rem; opacity: 0.5; }
.favorites-empty h3 { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--text-secondary); }
.favorites-empty p { color: var(--text-muted); font-size: 0.9rem; }

/* ===== FOOTER ===== */
.footer { border-top: 1px solid var(--border); padding: 3rem 4rem; margin-top: 3rem; }
.footer-inner { max-width: 1440px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-display); font-weight: 700; }
.footer-text { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.25rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 0.85rem; color: var(--text-muted); transition: var(--transition); }
.footer-links a:hover { color: var(--primary); }

/* ===== MOBILE NAV ===== */
.mobile-nav {
  position: fixed; bottom: 0; left: 0; right: 0; height: 60px;
  background: var(--bg-elevated); border-top: 1px solid var(--border);
  display: none; align-items: center; justify-content: space-around; z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
  font-size: 0.62rem; font-weight: 500; color: var(--text-muted); transition: var(--transition);
  padding: 0.4rem;
}
.mobile-nav-item.active { color: var(--primary); }
.mobile-nav-item svg { width: 22px; height: 22px; }

/* ===== TOAST ===== */
.toast-container { position: fixed; bottom: 2rem; right: 2rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  padding: 0.7rem 1.2rem; background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); font-size: 0.82rem; box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s ease; max-width: 300px;
}
.toast.error { border-left: 3px solid var(--danger); }
.toast.success { border-left: 3px solid var(--success); }
@keyframes toast-in { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ===== LOADING ===== */
.loading-center { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 5rem; gap: 1rem; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: var(--text-muted); font-size: 0.85rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .section { padding: 2rem 2rem; }
  .hero-content { padding: 0 2rem; }
  .hero-dots { right: 2rem; }
  .detail-body { padding: 0 2rem 3rem; }
  .genres-grid { padding: 0.5rem 2rem 3rem; }
  .page-header { padding: 5rem 2rem 1.5rem; }
  .footer { padding: 2.5rem 2rem; }
}

@media (max-width: 768px) {
  .navbar-links { display: none; }
  .navbar-inner { padding: 0 1rem; }
  .mobile-nav { display: flex; }
  .main-content { padding-bottom: 60px; }
  .section { padding: 1.5rem 1rem; }
  .hero { height: 60vh; min-height: 380px; }
  .hero-content { padding: 0 1.5rem; max-width: 100%; bottom: 3rem; }
  .hero-title { font-size: 1.5rem; }
  .hero-desc { display: none; }
  .hero-dots { display: none; }
  .anime-card { flex: 0 0 135px; }
  .anime-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.6rem; }
  .detail-top { flex-direction: column; align-items: center; text-align: center; }
  .detail-poster { width: 140px; min-width: 140px; }
  .detail-body { padding: 0 1.25rem 3rem; }
  .detail-actions { justify-content: center; }
  .detail-genres { justify-content: center; }
  .page-header { padding: 4.5rem 1.5rem 1rem; }
  .genres-grid { padding: 0.5rem 1rem 3rem; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  .search-expand.open { width: 260px; }
  .search-suggestions { width: 280px; right: -1rem; }
  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
  .player-header { padding: 0.75rem 1rem; }
  .player-servers { padding: 1rem; }
  .toast-container { bottom: 5rem; right: 1rem; left: 1rem; }
  .toast { max-width: 100%; }
  .row-arrow { display: none; }
}
