/* ============================================================
   CINEFLIXX — GLOBAL STYLESHEET
   ============================================================ */

/* ── Fonts ────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600;700&family=DM+Mono:wght@400;500&display=swap');

/* ── CSS Variables ───────────────────────────────────────── */
:root {
  --black:      #080808;
  --dark:       #0f0f0f;
  --dark2:      #161616;
  --dark3:      #1e1e1e;
  --surface:    #242424;
  --border:     rgba(255,255,255,0.07);
  --red:        #e50914;
  --red-dark:   #b0060f;
  --red-glow:   rgba(229,9,20,0.35);
  --text:       #f0f0f0;
  --text-muted: #888;
  --text-dim:   #555;
  --gold:       #f5c518;
  --green:      #46d369;

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

  --radius:     8px;
  --radius-lg:  14px;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-card: 0 4px 24px rgba(0,0,0,0.6);
  --shadow-hover: 0 12px 40px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.06);

  --nav-h: 60px;
  --card-w: 140px;
  --card-ratio: 1.5;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--black);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, select { font: inherit; }
ul, ol { list-style: none; }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--dark); }
::-webkit-scrollbar-thumb { background: var(--surface); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ── Utility ─────────────────────────────────────────────── */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 22px; border-radius: var(--radius);
  font-size: 14px; font-weight: 600; letter-spacing: 0.3px;
  transition: all var(--transition);
}
.btn--primary {
  background: var(--red); color: #fff;
}
.btn--primary:hover { background: var(--red-dark); transform: translateY(-1px); box-shadow: 0 6px 20px var(--red-glow); }
.btn--ghost {
  background: rgba(255,255,255,0.1); color: var(--text); backdrop-filter: blur(8px);
  border: 1px solid var(--border);
}
.btn--ghost:hover { background: rgba(255,255,255,0.18); }
.btn--icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; justify-content: center; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 0;
  padding: 0 24px;
  transition: background var(--transition), box-shadow var(--transition);
}
.nav--scrolled {
  background: rgba(8,8,8,0.95);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border);
}
.nav__logo {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 1px;
  color: var(--red);
  text-shadow: 0 0 20px var(--red-glow);
  margin-right: 32px;
  flex-shrink: 0;
}
.nav__logo span { color: var(--text); }
.nav__links {
  display: flex; align-items: center; gap: 4px;
  flex: 1;
}
.nav__link {
  padding: 6px 12px; border-radius: 6px;
  font-size: 14px; font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition);
}
.nav__link:hover,
.nav__link--active { color: var(--text); background: rgba(255,255,255,0.06); }
.nav__link--active { color: var(--red); }

.nav__right { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.nav__search-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all var(--transition);
  background: rgba(255,255,255,0.05);
}
.nav__search-btn:hover { color: var(--text); background: rgba(255,255,255,0.1); }
.nav__search-btn svg { width: 18px; height: 18px; }

/* Mobile menu toggle */
.nav__hamburger {
  display: none; flex-direction: column; gap: 5px;
  width: 36px; height: 36px; justify-content: center; align-items: center;
}
.nav__hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: all var(--transition);
}

/* Mobile nav drawer */
.nav__mobile {
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--dark); border-bottom: 1px solid var(--border);
  padding: 12px 24px 20px;
  display: flex; flex-direction: column; gap: 4px;
  transform: translateY(-110%); transition: transform var(--transition);
  z-index: 999;
}
.nav__mobile.open { transform: translateY(0); }
.nav__mobile .nav__link { display: block; padding: 10px 12px; }

/* ============================================================
   HERO BANNER
   ============================================================ */
.hero {
  position: relative; width: 100%;
  height: 85vh; min-height: 500px; max-height: 800px;
  overflow: hidden;
  margin-top: 0;
}
.hero__bg {
  position: absolute; inset: 0;
  background: var(--dark);
}
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.5;
  transition: opacity 0.8s;
}
.hero__gradients {
  position: absolute; inset: 0;
  background:
    linear-gradient(to right, rgba(8,8,8,0.95) 30%, transparent 70%),
    linear-gradient(to top, rgba(8,8,8,1) 0%, rgba(8,8,8,0.4) 40%, transparent 70%);
}
.hero__content {
  position: relative; z-index: 2;
  height: 100%; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 0 48px 60px;
  max-width: 620px;
}
.hero__badge {
  display: inline-block; margin-bottom: 12px;
  padding: 3px 10px; border-radius: 4px;
  background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1;
  letter-spacing: 1px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
  margin-bottom: 14px;
}
.hero__meta {
  display: flex; align-items: center; gap: 14px;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 14px;
}
.hero__meta span { display: flex; align-items: center; gap: 4px; }
.hero__rating { color: var(--gold); }
.hero__overview {
  font-size: 14px; color: rgba(240,240,240,0.75);
  line-height: 1.65; max-width: 440px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 22px;
}
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero indicators */
.hero__indicators {
  position: absolute; bottom: 20px; right: 48px;
  display: flex; gap: 6px; z-index: 3;
}
.hero__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,0.3); cursor: pointer; transition: all var(--transition);
}
.hero__dot--active { width: 22px; border-radius: 3px; background: var(--red); }

/* ============================================================
   CONTENT ROWS
   ============================================================ */
.rows-container { padding: 0 0 60px; }
.rows-container.has-hero { margin-top: -40px; position: relative; z-index: 2; }

.row { margin-bottom: 32px; }
.row__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; margin-bottom: 12px;
}
.row__title {
  font-size: 17px; font-weight: 700;
  letter-spacing: 0.2px;
}
.row__see-all {
  font-size: 12px; font-weight: 600; color: var(--red);
  letter-spacing: 0.5px; text-transform: uppercase;
  opacity: 0.8; transition: opacity var(--transition);
}
.row__see-all:hover { opacity: 1; }

.row__track {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 4px 24px 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.row__track::-webkit-scrollbar { display: none; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  flex: 0 0 var(--card-w);
  width: var(--card-w);
  scroll-snap-align: start;
  border-radius: var(--radius);
  overflow: visible;
  transition: transform var(--transition);
  position: relative;
}
.card:hover { transform: scale(1.06) translateY(-4px); z-index: 10; }
.card:hover .card__overlay { opacity: 1; }
.card:hover .card__poster img { filter: brightness(0.7); }

.card__poster {
  position: relative;
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--dark3);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition);
}
.card:hover .card__poster { box-shadow: var(--shadow-hover); }

.card__poster img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: filter var(--transition);
}
.card__overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--transition);
  border-radius: var(--radius);
}
.card__play {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(229,9,20,0.9);
  display: flex; align-items: center; justify-content: center;
  color: #fff; transition: transform var(--transition);
  box-shadow: 0 0 20px var(--red-glow);
}
.card__play:hover { transform: scale(1.1); }
.card__play svg { width: 20px; height: 20px; margin-left: 3px; }

.card__badge {
  position: absolute; top: 6px; left: 6px;
  padding: 2px 6px; border-radius: 3px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
}
.card__badge--movie { background: var(--red); color: #fff; }
.card__badge--tv { background: #1a6ef5; color: #fff; }

.card__rating {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(0,0,0,0.75);
  font-size: 10px; font-weight: 600;
  padding: 2px 6px; border-radius: 4px;
  backdrop-filter: blur(4px);
  color: var(--gold);
}

.card__info { padding: 6px 2px 0; }
.card__title {
  font-size: 12px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text);
  line-height: 1.3;
}
.card__meta { font-size: 11px; color: var(--text-dim); margin-top: 2px; }

/* Large card variant */
.card--large { --card-w: 220px; }
.card--large .card__title { font-size: 13px; }

/* ── Skeleton ─────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--dark3) 25%, var(--surface) 50%, var(--dark3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  border-radius: var(--radius);
}
.skeleton--text { height: 12px; margin: 4px 2px; border-radius: 4px; }
.skeleton--short { width: 60%; }
@keyframes shimmer { from { background-position: 200% 0 } to { background-position: -200% 0 } }

.card--skeleton .card__poster {
  aspect-ratio: 2/3;
  background: var(--dark3);
  animation: shimmer 1.6s infinite;
  background-size: 200% 100%;
  background-image: linear-gradient(90deg, var(--dark3) 25%, var(--surface) 50%, var(--dark3) 75%);
}
.card--skeleton .card__info { pointer-events: none; }

/* ============================================================
   GRID (browse pages)
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  padding: 0 24px;
}
.grid .card { width: 100%; flex: unset; }

/* ============================================================
   SECTION WRAPPER
   ============================================================ */
.section {
  padding: 32px 24px;
}
.section__title {
  font-family: var(--font-display);
  font-size: 26px; letter-spacing: 1px;
  margin-bottom: 20px;
}

/* ============================================================
   SEARCH
   ============================================================ */
.search-bar {
  display: flex; align-items: center; gap: 0;
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition);
}
.search-bar:focus-within { border-color: var(--red); }
.search-bar__icon { padding: 0 14px; color: var(--text-muted); }
.search-bar__icon svg { width: 18px; height: 18px; }
.search-bar input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); padding: 12px 0;
  font-size: 15px;
}
.search-bar input::placeholder { color: var(--text-dim); }
.search-bar__clear {
  padding: 0 14px; color: var(--text-muted);
  transition: color var(--transition);
}
.search-bar__clear:hover { color: var(--text); }

/* ============================================================
   TABS / GENRE FILTER
   ============================================================ */
.tabs {
  display: flex; gap: 6px; overflow-x: auto;
  padding: 0 24px 4px;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex-shrink: 0;
  padding: 6px 14px; border-radius: 99px;
  font-size: 13px; font-weight: 500;
  background: var(--dark3); color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.tab:hover { color: var(--text); border-color: rgba(255,255,255,0.15); }
.tab--active { background: var(--red); color: #fff; border-color: var(--red); }

/* ============================================================
   HERO / DETAIL PAGE
   ============================================================ */
.detail-hero {
  position: relative;
  padding-top: var(--nav-h);
  min-height: 70vh;
}
.detail-hero__bg {
  position: absolute; inset: 0;
  overflow: hidden; z-index: 0;
}
.detail-hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.25; }
.detail-hero__bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--black) 30%, rgba(8,8,8,0.6) 70%, rgba(8,8,8,0.3));
}
.detail-hero__content {
  position: relative; z-index: 1;
  display: flex; gap: 36px;
  padding: 48px 48px 40px;
  max-width: 1200px; margin: 0 auto;
}
.detail-hero__poster {
  flex-shrink: 0; width: 220px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}
.detail-hero__poster img { width: 100%; }
.detail-hero__info { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }
.detail-hero__title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 60px);
  line-height: 1; letter-spacing: 1px;
  margin-bottom: 12px;
}
.detail-hero__meta {
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 16px; align-items: center;
}
.detail-hero__rating {
  display: flex; align-items: center; gap: 5px;
  color: var(--gold); font-weight: 700; font-size: 15px;
}
.detail-hero__genres { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.genre-chip {
  padding: 3px 10px; border-radius: 4px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.5px;
  background: rgba(255,255,255,0.08); border: 1px solid var(--border);
  color: var(--text-muted);
}
.detail-hero__overview {
  font-size: 14px; color: rgba(240,240,240,0.75);
  line-height: 1.7; max-width: 600px; margin-bottom: 24px;
}
.detail-hero__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================
   PLAYER
   ============================================================ */
.player-section {
  background: #000;
  aspect-ratio: 16/9;
  width: 100%;
  position: relative;
}
.player-wrap {
  position: relative; width: 100%; height: 100%;
  background: #000;
}
.player-wrap iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none;
}
.player-loader {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: #000; gap: 16px;
  color: var(--text-muted); font-size: 14px;
}
.player-spinner {
  width: 44px; height: 44px;
  border: 3px solid var(--dark3);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.player-error {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: #000; gap: 12px; text-align: center;
}
.player-error__icon { font-size: 48px; }
.player-error h3 { font-size: 18px; }
.player-error p { color: var(--text-muted); font-size: 14px; }
.player-wrap--error { min-height: 300px; }

.player-source-bar {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 6;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  font-size: 12px; color: var(--text-muted);
}
.player-src-btn {
  padding: 4px 12px; border-radius: 4px;
  background: rgba(255,255,255,0.1);
  font-size: 12px; transition: background var(--transition);
}
.player-src-btn:hover { background: rgba(255,255,255,0.2); }

/* ============================================================
   EPISODE LIST
   ============================================================ */
.episode-list { padding: 0 24px; }
.season-selector {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
}
.season-btn {
  padding: 6px 16px; border-radius: 6px;
  font-size: 13px; font-weight: 600;
  background: var(--dark3); color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.season-btn:hover { border-color: rgba(255,255,255,0.2); color: var(--text); }
.season-btn--active { background: var(--red); color: #fff; border-color: var(--red); }

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.episode-card {
  display: flex; gap: 12px;
  background: var(--dark2); border-radius: var(--radius);
  padding: 10px; cursor: pointer;
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.episode-card:hover { border-color: var(--red); background: var(--dark3); }
.episode-card__thumb {
  flex-shrink: 0; width: 120px; aspect-ratio: 16/9;
  background: var(--dark3); border-radius: 5px; overflow: hidden;
  position: relative;
}
.episode-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.episode-card__thumb-play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.5);
  opacity: 0; transition: opacity var(--transition);
}
.episode-card:hover .episode-card__thumb-play { opacity: 1; }
.episode-card__info { flex: 1; min-width: 0; }
.episode-card__num { font-size: 11px; color: var(--text-dim); font-weight: 600; }
.episode-card__name { font-size: 13px; font-weight: 600; margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.episode-card__overview { font-size: 11px; color: var(--text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ============================================================
   CONTINUE WATCHING CARD
   ============================================================ */
.card--continue .card__poster::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  height: 3px; background: var(--red);
  width: var(--progress, 0%);
  transition: width 0.5s;
}
.card__remove {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,0.7); color: var(--text-muted);
  font-size: 12px; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: all var(--transition); z-index: 5;
}
.card:hover .card__remove { opacity: 1; }
.card__remove:hover { background: var(--red); color: #fff; }

/* ============================================================
   AD GATE
   ============================================================ */
.ad-gate {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: rgba(8,8,8,0.96); backdrop-filter: blur(20px);
  opacity: 0; transition: opacity 0.4s;
}
.ad-gate--visible { opacity: 1; }
.ad-gate__box {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 48px;
  max-width: 420px; width: 90%;
  text-align: center;
  box-shadow: 0 40px 100px rgba(0,0,0,0.8);
}
.ad-gate__logo {
  font-family: var(--font-display);
  font-size: 32px; color: var(--text);
  margin-bottom: 20px;
}
.ad-gate__c { color: var(--red); }
.ad-gate__title { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.ad-gate__sub { color: var(--text-muted); font-size: 14px; line-height: 1.6; margin-bottom: 28px; }
.ad-gate__btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 32px; border-radius: var(--radius);
  background: var(--red); color: #fff;
  font-size: 15px; font-weight: 700;
  width: 100%; justify-content: center;
  transition: all var(--transition);
  box-shadow: 0 6px 24px var(--red-glow);
}
.ad-gate__btn:hover { background: var(--red-dark); transform: translateY(-2px); box-shadow: 0 10px 30px var(--red-glow); }
.ad-gate__btn-icon { font-size: 18px; }
.ad-gate__note { font-size: 11px; color: var(--text-dim); margin-top: 14px; }

/* ============================================================
   TOAST
   ============================================================ */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  z-index: 9998; background: var(--surface);
  padding: 10px 20px; border-radius: var(--radius);
  font-size: 13px; font-weight: 600;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  opacity: 0; transition: all var(--transition);
  white-space: nowrap;
}
.toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--text-dim); font-size: 12px;
}
.footer__logo { font-family: var(--font-display); font-size: 24px; color: var(--red); margin-bottom: 12px; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-bottom: 16px; }
.footer__links a { color: var(--text-muted); font-size: 12px; transition: color var(--transition); }
.footer__links a:hover { color: var(--text); }

/* ============================================================
   PAGE WRAPPER
   ============================================================ */
.page { padding-top: var(--nav-h); min-height: 100vh; }

/* ============================================================
   SEARCH PAGE
   ============================================================ */
.search-header {
  padding: 32px 24px 20px;
}
.search-results-info {
  padding: 0 24px 16px;
  color: var(--text-muted); font-size: 14px;
}
.search-results-info strong { color: var(--text); }

/* ============================================================
   LOADING SPINNER (page level)
   ============================================================ */
.page-loader {
  display: flex; align-items: center; justify-content: center;
  height: 200px;
}
.page-loader__spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--dark3);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================================
   404
   ============================================================ */
.notfound {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh; text-align: center;
  padding: 40px;
}
.notfound__code {
  font-family: var(--font-display);
  font-size: clamp(80px, 20vw, 180px);
  color: var(--red); line-height: 1;
  text-shadow: 0 0 60px var(--red-glow);
}
.notfound h2 { font-size: 24px; margin-bottom: 12px; }
.notfound p { color: var(--text-muted); margin-bottom: 28px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  :root { --card-w: 120px; }
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
  .hero__content { padding: 0 24px 40px; }
  .detail-hero__content { flex-direction: column; padding: 24px; gap: 20px; }
  .detail-hero__poster { width: 160px; }
}

@media (max-width: 600px) {
  :root { --card-w: 110px; }
  .row__track { gap: 6px; padding: 4px 16px 12px; }
  .row__header { padding: 0 16px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); padding: 0 16px; gap: 8px; }
  .section { padding: 24px 16px; }
  .tabs { padding: 0 16px 4px; }
  .hero__content { padding: 0 16px 32px; }
  .hero__overview { display: none; }
  .detail-hero__poster { width: 130px; }
  .detail-hero__content { padding: 16px; }
  .ad-gate__box { padding: 32px 24px; }
  .episodes-grid { grid-template-columns: 1fr; }
}

@media (min-width: 1400px) {
  :root { --card-w: 160px; }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.animate-fadeup { animation: fadeUp 0.5s ease both; }
.animate-fadein { animation: fadeIn 0.4s ease both; }

/* Staggered children */
.stagger > * { animation: fadeUp 0.5s ease both; }
.stagger > *:nth-child(1)  { animation-delay: 0.05s; }
.stagger > *:nth-child(2)  { animation-delay: 0.10s; }
.stagger > *:nth-child(3)  { animation-delay: 0.15s; }
.stagger > *:nth-child(4)  { animation-delay: 0.20s; }
.stagger > *:nth-child(5)  { animation-delay: 0.25s; }
.stagger > *:nth-child(6)  { animation-delay: 0.30s; }
