/* ════════════════════════════════════════════════════
   AudioVerse — Main Stylesheet
   Dark cinematic theme: black + crimson
═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&family=DM+Mono:wght@400;500&display=swap');

/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:         #080808;
  --bg2:        #0f0f0f;
  --bg3:        #161616;
  --bg4:        #1e1e1e;
  --bg5:        #252525;

  --red:        #e63946;
  --red-light:  #ff6b6b;
  --red-dark:   #b5202d;
  --red-dim:    rgba(230,57,70,0.12);
  --red-glow:   rgba(230,57,70,0.25);

  --text:       #f2f2f2;
  --text2:      #a0a0a0;
  --text3:      #555;
  --text4:      #333;

  --border:     rgba(255,255,255,0.06);
  --border2:    rgba(255,255,255,0.1);
  --border3:    rgba(255,255,255,0.15);

  --card:       #111111;
  --card2:      #181818;

  --font:       'DM Sans', sans-serif;
  --font-title: 'Bebas Neue', sans-serif;
  --font-mono:  'DM Mono', monospace;

  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   16px;
  --r-xl:   22px;
  --r-full: 9999px;

  --ease:   cubic-bezier(0.4, 0, 0.2, 1);
  --t:      0.2s var(--ease);
  --t-slow: 0.4s var(--ease);

  --nav-h:  64px;
  --player-h: 90px;
}

html { scroll-behavior: smooth; font-size: 15px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { display: block; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; color: inherit; font: inherit; }
input, textarea, select { font: inherit; color: inherit; background: none; border: none; outline: none; }
ul { list-style: none; }

/* ── Scrollbar ──────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg5); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ── Utility ────────────────────────────────────── */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* ── Animations ─────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.animate-in { animation: slideUp 0.4s var(--ease) both; }
.fade-in    { animation: fadeIn 0.3s var(--ease) both; }

/* ── Skeleton Loading ───────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg3) 25%, var(--bg4) 50%, var(--bg3) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r-md);
}

/* ══════════════════════════════════════════════════
   NAVIGATION
══════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 2.5rem;
  gap: 1.5rem;
  background: linear-gradient(to bottom, rgba(8,8,8,0.98) 0%, rgba(8,8,8,0.6) 100%);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--t);
}

.nav-logo {
  font-family: var(--font-title);
  font-size: 1.85rem;
  letter-spacing: 2px;
  color: var(--red);
  flex-shrink: 0;
  cursor: pointer;
  transition: var(--t);
}
.nav-logo span { color: var(--text2); font-size: 1rem; letter-spacing: 3px; vertical-align: middle; margin-left: 4px; }
.nav-logo:hover { color: var(--red-light); }

.nav-links {
  display: flex;
  gap: 0.15rem;
  flex: 1;
}

.nav-link {
  padding: 0.4rem 0.85rem;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: var(--t);
  letter-spacing: 0.2px;
}
.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--text); }
.nav-link.active::after {
  content: '';
  display: block;
  height: 2px;
  background: var(--red);
  border-radius: 99px;
  margin-top: 2px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-full);
  padding: 0.4rem 1rem;
  transition: var(--t);
  width: 200px;
}
.search-wrap:focus-within {
  border-color: var(--red);
  background: var(--bg4);
  box-shadow: 0 0 0 3px var(--red-dim);
  width: 260px;
}
.search-wrap input { width: 100%; font-size: 13.5px; color: var(--text); }
.search-wrap input::placeholder { color: var(--text3); }
.search-wrap svg { color: var(--text3); flex-shrink: 0; width: 14px; height: 14px; }

.btn { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 500; border-radius: var(--r-md); transition: var(--t); cursor: pointer; font-size: 14px; letter-spacing: 0.2px; padding: 0.45rem 1.1rem; }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-light); transform: translateY(-1px); box-shadow: 0 4px 20px var(--red-glow); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: rgba(255,255,255,0.08); color: var(--text); border: 1px solid var(--border2); }
.btn-ghost:hover { background: rgba(255,255,255,0.14); }
.btn-sm { padding: 0.3rem 0.75rem; font-size: 12.5px; }
.btn-icon { padding: 0.45rem; border-radius: var(--r-md); background: var(--bg4); border: 1px solid var(--border); color: var(--text2); }
.btn-icon:hover { color: var(--text); border-color: var(--border2); background: var(--bg5); }

/* ══════════════════════════════════════════════════
   PAGE LAYOUT
══════════════════════════════════════════════════ */
.page {
  display: none;
  min-height: 100vh;
  padding-top: var(--nav-h);
  padding-bottom: calc(var(--player-h) + 2rem);
  animation: fadeIn 0.3s ease;
}
.page.active { display: block; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 2.5rem; }
.section { padding: 2.5rem 0 0; }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 1.5rem; }
.section-title { font-family: var(--font-title); font-size: 1.6rem; letter-spacing: 1px; color: var(--text); }
.section-subtitle { font-size: 13px; color: var(--text2); margin-top: 2px; }
.see-all { font-size: 13px; color: var(--red); font-weight: 500; cursor: pointer; transition: var(--t); display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.see-all:hover { color: var(--red-light); }

/* ══════════════════════════════════════════════════
   HERO
══════════════════════════════════════════════════ */
.hero {
  position: relative;
  height: 70vh;
  min-height: 480px;
  max-height: 680px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-top: calc(-1 * var(--nav-h));
  padding-top: var(--nav-h);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  filter: brightness(0.3) saturate(1.2);
  transition: var(--t-slow);
  transform: scale(1.05);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--bg) 0%, rgba(8,8,8,0.7) 50%, transparent 100%),
    linear-gradient(to right, var(--bg) 0%, rgba(8,8,8,0.4) 60%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3rem 2.5rem 3.5rem;
  max-width: 600px;
  animation: slideUp 0.6s var(--ease) both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: var(--r-sm);
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-title);
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  letter-spacing: 1px;
  line-height: 0.95;
  margin-bottom: 0.9rem;
  color: var(--text);
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  font-size: 13px;
  color: var(--text2);
}
.hero-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text3); }
.hero-meta .tag {
  background: var(--bg4);
  border: 1px solid var(--border2);
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 12px;
}

.hero-desc {
  font-size: 14px;
  color: #bbb;
  line-height: 1.75;
  margin-bottom: 1.75rem;
  max-width: 460px;
}

.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero-actions .btn { padding: 0.65rem 1.5rem; font-size: 15px; }

.hero-dots {
  position: absolute;
  bottom: 2rem;
  right: 2.5rem;
  display: flex;
  gap: 8px;
  z-index: 3;
}
.hero-dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--text3);
  cursor: pointer;
  transition: var(--t);
}
.hero-dot.active { width: 24px; background: var(--red); }

/* ══════════════════════════════════════════════════
   HORIZONTAL SCROLL ROW
══════════════════════════════════════════════════ */
.scroll-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.scroll-row::-webkit-scrollbar { display: none; }

/* ══════════════════════════════════════════════════
   SERIES CARD
══════════════════════════════════════════════════ */
.series-card {
  flex-shrink: 0;
  width: 175px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--card2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: var(--t);
  position: relative;
}
.series-card:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: rgba(230,57,70,0.4);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(230,57,70,0.2);
}

.card-img {
  width: 100%;
  height: 175px;
  background: var(--bg3);
  position: relative;
  overflow: hidden;
}
.card-img img { transition: transform 0.5s var(--ease); width: 100%; height: 100%; object-fit: cover; }
.series-card:hover .card-img img { transform: scale(1.08); }

.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
  opacity: 0;
  transition: var(--t);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 10px;
}
.series-card:hover .card-overlay { opacity: 1; }
.card-play {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.8);
  transition: var(--t);
}
.series-card:hover .card-play { transform: scale(1); }

.card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--r-sm);
}

.card-body { padding: 0.75rem; }
.card-category { font-size: 11px; color: var(--red); font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 3px; }
.card-title { font-size: 13.5px; font-weight: 600; line-height: 1.3; color: var(--text); margin-bottom: 4px; }
.card-meta { font-size: 11.5px; color: var(--text3); display: flex; align-items: center; gap: 6px; }

/* Wide card for recently played */
.ep-card {
  flex-shrink: 0;
  width: 260px;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--t);
  display: flex;
  flex-direction: column;
}
.ep-card:hover { border-color: var(--border2); transform: translateY(-3px); }
.ep-card-img { height: 140px; position: relative; background: var(--bg3); }
.ep-card-img img { width: 100%; height: 100%; object-fit: cover; }
.ep-card-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,0.15);
}
.ep-card-progress-fill { height: 100%; background: var(--red); border-radius: 0 99px 99px 0; }
.ep-card-body { padding: 0.75rem; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.ep-card-series { font-size: 11px; color: var(--red); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.ep-card-title { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.4; }
.ep-card-meta { font-size: 11px; color: var(--text3); margin-top: auto; padding-top: 4px; }

/* ══════════════════════════════════════════════════
   CATEGORY PILLS
══════════════════════════════════════════════════ */
.category-pills {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.pill {
  padding: 0.4rem 1.1rem;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 500;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text2);
  cursor: pointer;
  transition: var(--t);
  white-space: nowrap;
}
.pill:hover { color: var(--text); border-color: var(--border3); }
.pill.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ══════════════════════════════════════════════════
   GRID LAYOUT
══════════════════════════════════════════════════ */
.series-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 1.25rem;
}
.series-grid .series-card { width: 100%; }
.series-grid .card-img { height: 170px; }

/* ══════════════════════════════════════════════════
   SERIES DETAIL PAGE
══════════════════════════════════════════════════ */
.detail-hero {
  position: relative;
  min-height: 360px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin-top: calc(-1 * var(--nav-h));
  padding-top: var(--nav-h);
}
.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  filter: brightness(0.25) saturate(1.1);
}
.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg) 0%, rgba(8,8,8,0.5) 60%, transparent 100%);
}
.detail-hero-content {
  position: relative;
  z-index: 2;
  padding: 2.5rem;
  display: flex;
  gap: 2rem;
  align-items: flex-end;
  width: 100%;
}
.detail-cover {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.12);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.detail-info { flex: 1; }
.detail-category { font-size: 12px; color: var(--red); font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 0.5rem; }
.detail-title { font-family: var(--font-title); font-size: clamp(2rem, 4vw, 3rem); letter-spacing: 1px; line-height: 1; margin-bottom: 0.75rem; }
.detail-author { font-size: 14px; color: var(--text2); margin-bottom: 0.5rem; }
.detail-desc { font-size: 14px; color: var(--text2); line-height: 1.7; max-width: 540px; margin-bottom: 1rem; }
.detail-stats { display: flex; gap: 1.5rem; font-size: 13px; color: var(--text3); margin-bottom: 1.25rem; }
.detail-stat strong { color: var(--text); }
.detail-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

.episodes-list { padding: 2rem 2.5rem; }
.episodes-title { font-family: var(--font-title); font-size: 1.4rem; letter-spacing: 1px; margin-bottom: 1.25rem; }

.ep-list-item {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: var(--t);
  border: 1px solid transparent;
  margin-bottom: 0.5rem;
}
.ep-list-item:hover { background: var(--bg3); border-color: var(--border); }
.ep-list-item.playing { background: var(--red-dim); border-color: rgba(230,57,70,0.3); }

.ep-num {
  width: 28px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text3);
  flex-shrink: 0;
}
.ep-list-item.playing .ep-num { color: var(--red); }

.ep-thumb {
  width: 60px;
  height: 60px;
  border-radius: var(--r-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg3);
}
.ep-thumb img { width: 100%; height: 100%; object-fit: cover; }

.ep-info { flex: 1; min-width: 0; }
.ep-title { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 3px; }
.ep-list-item.playing .ep-title { color: var(--red-light); }
.ep-desc { font-size: 12.5px; color: var(--text2); }
.ep-dur { font-size: 12px; color: var(--text3); font-family: var(--font-mono); white-space: nowrap; }

/* ══════════════════════════════════════════════════
   AUDIO PLAYER
══════════════════════════════════════════════════ */
.player {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 950;
  height: var(--player-h);
  background: rgba(12,12,12,0.96);
  backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  display: none;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1.5rem;
}
.player.visible { display: flex; }

.player-track {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 260px;
  flex-shrink: 0;
}
.player-thumb {
  width: 54px;
  height: 54px;
  border-radius: var(--r-md);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg3);
  border: 1px solid var(--border);
}
.player-track-info { min-width: 0; }
.player-track-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-track-series { font-size: 11.5px; color: var(--text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.player-center { flex: 1; display: flex; flex-direction: column; gap: 0.6rem; align-items: center; }
.player-controls { display: flex; align-items: center; gap: 0.75rem; }
.player-btn { color: var(--text2); transition: var(--t); padding: 4px; border-radius: 4px; }
.player-btn:hover { color: var(--text); }
.player-btn.main {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--t);
}
.player-btn.main:hover { background: var(--red-light); transform: scale(1.05); }
.player-btn.main:active { transform: scale(0.96); }

.player-progress { display: flex; align-items: center; gap: 0.75rem; width: 100%; max-width: 540px; }
.player-time { font-family: var(--font-mono); font-size: 11px; color: var(--text3); white-space: nowrap; }

input[type="range"].seek-bar,
input[type="range"].vol-bar {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: var(--bg5);
  outline: none;
  cursor: pointer;
  position: relative;
}
input[type="range"].seek-bar::-webkit-slider-thumb,
input[type="range"].vol-bar::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
  transition: var(--t);
}
input[type="range"].seek-bar:hover::-webkit-slider-thumb { background: var(--red-light); transform: scale(1.3); }

.player-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 200px;
  justify-content: flex-end;
  flex-shrink: 0;
}
.speed-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text2);
  background: var(--bg4);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: var(--t);
}
.speed-btn:hover { color: var(--text); border-color: var(--border2); }
.speed-btn.active { background: var(--red-dim); border-color: rgba(230,57,70,0.4); color: var(--red-light); }

.vol-wrap { display: flex; align-items: center; gap: 6px; }
.vol-wrap input { width: 70px; }

/* ══════════════════════════════════════════════════
   SEARCH PAGE
══════════════════════════════════════════════════ */
.search-hero {
  padding: 3rem 2.5rem 2rem;
  border-bottom: 1px solid var(--border);
}
.search-hero-input {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 1rem 1.5rem;
  max-width: 640px;
  transition: var(--t);
}
.search-hero-input:focus-within { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-dim); }
.search-hero-input input { flex: 1; font-size: 16px; background: none; }
.search-hero-input svg { color: var(--text3); width: 20px; height: 20px; flex-shrink: 0; }
.search-results { padding: 2rem 2.5rem; }
.search-results-title { font-size: 13px; color: var(--text2); margin-bottom: 1.25rem; }

/* ══════════════════════════════════════════════════
   ADMIN PANEL
══════════════════════════════════════════════════ */
.admin-layout {
  display: flex;
  min-height: 100vh;
  padding-top: var(--nav-h);
}

.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
}
.admin-sidebar-title { font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--text3); padding: 0.75rem 1.5rem 0.4rem; }
.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1.5rem;
  font-size: 14px;
  color: var(--text2);
  cursor: pointer;
  transition: var(--t);
  border-left: 2px solid transparent;
}
.admin-nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.admin-nav-item.active { color: var(--text); background: var(--red-dim); border-left-color: var(--red); }
.admin-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }

.admin-main { flex: 1; padding: 2rem 2.5rem; overflow-x: hidden; }
.admin-section { display: none; }
.admin-section.active { display: block; }

.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.admin-title { font-family: var(--font-title); font-size: 1.8rem; letter-spacing: 1px; }

/* Form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }
.form-group.full { grid-column: 1 / -1; }
.form-label { font-size: 12.5px; font-weight: 600; color: var(--text2); letter-spacing: 0.3px; text-transform: uppercase; }
.form-input {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: 0.6rem 0.9rem;
  font-size: 14px;
  color: var(--text);
  transition: var(--t);
  width: 100%;
}
.form-input:focus { border-color: var(--red); outline: none; box-shadow: 0 0 0 3px var(--red-dim); }
.form-input::placeholder { color: var(--text3); }
textarea.form-input { resize: vertical; min-height: 90px; }
select.form-input { cursor: pointer; }
.form-hint { font-size: 11.5px; color: var(--text3); margin-top: 2px; }

/* Table */
.admin-table-wrap { overflow-x: auto; border-radius: var(--r-lg); border: 1px solid var(--border); }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text3);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table td {
  padding: 0.75rem 1rem;
  font-size: 13.5px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr { background: var(--bg2); transition: var(--t); }
.admin-table tbody tr:hover { background: var(--bg3); }
.admin-table .thumb { width: 44px; height: 44px; border-radius: var(--r-sm); overflow: hidden; flex-shrink: 0; background: var(--bg4); }
.admin-table .thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Stats cards */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.25rem 1.5rem; }
.stat-num { font-family: var(--font-title); font-size: 2.5rem; color: var(--text); letter-spacing: 1px; }
.stat-label { font-size: 12.5px; color: var(--text2); margin-top: 2px; }
.stat-card:first-child .stat-num { color: var(--red); }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }
.modal {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 2rem;
  width: 90%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s var(--ease);
}
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.modal-title { font-family: var(--font-title); font-size: 1.5rem; letter-spacing: 1px; }
.modal-close { color: var(--text2); padding: 0.3rem; border-radius: var(--r-sm); transition: var(--t); }
.modal-close:hover { color: var(--text); background: var(--bg4); }
.modal-footer { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }

/* Login page */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 2rem;
}
.login-box {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: var(--r-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 380px;
  text-align: center;
  animation: slideUp 0.4s var(--ease);
}
.login-logo { font-family: var(--font-title); font-size: 2.5rem; color: var(--red); letter-spacing: 2px; margin-bottom: 0.25rem; }
.login-sub { font-size: 13px; color: var(--text2); margin-bottom: 2rem; }
.login-form { display: flex; flex-direction: column; gap: 1rem; text-align: left; }
.login-err { color: var(--red-light); font-size: 13px; text-align: center; }

/* Toast */
.toast {
  position: fixed;
  bottom: calc(var(--player-h) + 1rem);
  right: 1.5rem;
  z-index: 2000;
  background: var(--bg4);
  border: 1px solid var(--border2);
  border-radius: var(--r-md);
  padding: 0.75rem 1.25rem;
  font-size: 13.5px;
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: slideUp 0.3s var(--ease);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 320px;
  pointer-events: none;
}
.toast.success { border-color: rgba(34,197,94,0.4); }
.toast.error { border-color: rgba(230,57,70,0.4); }
.toast.hidden { display: none; }

/* Bookmarks / Favorites page */
.favorites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text3);
}
.empty-state svg { margin: 0 auto 1rem; opacity: 0.3; }
.empty-state p { font-size: 15px; }
.empty-state small { font-size: 13px; }

/* Loading spinner */
.spinner {
  width: 32px; height: 32px;
  border: 2px solid var(--border2);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 3rem auto;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .nav { padding: 0 1.25rem; }
  .nav-links { display: none; }
  .hero-content { padding: 2rem 1.25rem 3rem; }
  .container { padding: 0 1.25rem; }
  .section { padding: 1.75rem 0 0; }
  .episodes-list { padding: 1.5rem 1.25rem; }
  .detail-hero-content { padding: 1.5rem 1.25rem; flex-direction: column; gap: 1rem; align-items: flex-start; }
  .detail-cover { width: 120px; height: 120px; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; display: flex; overflow-x: auto; padding: 0.5rem; gap: 0.25rem; border-right: none; border-bottom: 1px solid var(--border); }
  .admin-sidebar-title { display: none; }
  .admin-nav-item { white-space: nowrap; border-left: none; border-bottom: 2px solid transparent; border-radius: var(--r-md); }
  .admin-nav-item.active { border-left-color: transparent; border-bottom-color: var(--red); }
  .player { gap: 0.75rem; padding: 0 1rem; }
  .player-right { display: none; }
  .player-track { width: 140px; }
  .search-wrap { display: none; }
}

@media (max-width: 600px) {
  .hero { height: 85vw; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .series-grid { grid-template-columns: repeat(2, 1fr); }
  .series-card { width: 100%; }
  .card-img { height: 150px; }
  .series-grid .card-img { height: 150px; }
  .modal { padding: 1.5rem; }
  .player-center { max-width: 100%; }
  .search-hero { padding: 2rem 1.25rem 1.5rem; }
  .search-results { padding: 1.5rem 1.25rem; }
}

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #111;
  color: #fff;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
  border-left: 4px solid #e50914;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-left-color: #22c55e;
}

.toast.error {
  border-left-color: #ef4444;
}

.toast-icon {
  font-size: 16px;
}