/* ============================================================
   IWSMania — Global Stylesheet
   style.css · v1.1
   Fonts: Syncopate 700 | DM Sans 300/400/500/700 | Space Grotesk 300/400/500/600/700
   Accent: #00d4ff (cyan) | BG: #07090e
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Syncopate:wght@700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,700;1,9..40,300&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');


/* ============================================================
   1. TOKENS & RESET
   ============================================================ */

:root {
  /* Backgrounds */
  --bg:           #07090e;
  --surface:      #0d1018;
  --surface2:     #111520;
  --surface3:     #161c28;

  /* Borders */
  --border:       #181d28;
  --border2:      #222a3a;

  /* Text */
  --text:         #e8eaf2;
  --text2:        #8a95b0;
  --muted:        #71819e; /* was #44506a — ~2.5:1 contrast on dark backgrounds,
                               below WCAG AA's 4.5:1 minimum. This lighter value
                               lands around 5:1 while staying the dimmest of the
                               three text tiers. */

  /* Accent — cyan */
  --cyan:         #00d4ff;
  --cyan-dim:     rgba(0, 212, 255, 0.07);
  --cyan-border:  rgba(0, 212, 255, 0.18);
  --cyan-glow:    rgba(0, 212, 255, 0.10);

  /* Accent — amber (secondary accent, used for the "Updated" badge so it
     reads distinctly from the cyan "New" badge at a glance) */
  --amber:        #ffb020;

  /* Danger */
  --red:          #e84545;

  /* Layout */
  --max-width:    1400px;
  --page-gutter:  28px;
  --header-h:     70px;

  /* Radius */
  --radius-sm:    6px;
  --radius-md:    9px;
  --radius-lg:    12px;
  --radius-xl:    16px;

  /* Transitions */
  --t-fast:       0.15s ease;
  --t-base:       0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button {
  cursor: pointer;
  font-family: inherit;
  /* Native <button> elements render OS-level widget chrome by default,
     which on several browsers overrides a custom background-color even
     when one is explicitly set — appearance:none stops that, letting
     every button's own class styling actually take effect. */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* Scrollbar */
::-webkit-scrollbar { width: 5px; background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }


/* ============================================================
   2. TYPOGRAPHY UTILITIES
   ============================================================ */

.font-display { font-family: 'Syncopate', sans-serif; font-weight: 700; }
.font-body    { font-family: 'DM Sans', sans-serif; }
.font-ui      { font-family: 'Space Grotesk', sans-serif; }

.text-cyan    { color: var(--cyan); }
.text-muted   { color: var(--muted); }
.text-2       { color: var(--text2); }

/* Gradient text — use on inline element */
.grad-text {
  background: linear-gradient(90deg, #ffffff 0%, #00d4ff 55%, #0092b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section label (small caps above headings) */
.sec-eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cyan);
}


/* ============================================================
   3. LAYOUT HELPERS
   ============================================================ */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px var(--page-gutter);
}

.divider {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
}

.divider hr {
  border: none;
  border-top: 1px solid var(--border);
}


/* ============================================================
   4. SECTION HEADER
   ============================================================ */

.section-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  gap: 16px;
}

.section-title-group {
  display: flex;
  align-items: center;
  gap: 14px;
}

.sec-bar {
  width: 3px;
  height: 30px;
  background: var(--cyan);
  border-radius: 3px;
  flex-shrink: 0;
}

.sec-title {
  font-family: 'Syncopate', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.sec-sub {
  font-size: 0.73rem;
  color: var(--muted);
  margin-top: 3px;
  font-weight: 400;
}


/* ============================================================
   5. BUTTONS
   ============================================================ */

/* Primary — filled cyan */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  background: var(--cyan);
  color: #07090e;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-md);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity var(--t-fast), transform var(--t-fast);
}

.btn-primary:hover  { opacity: 0.85; transform: translateY(-2px); }
.btn-primary:active { transform: translateY(0); opacity: 1; }

/* Ghost — outline cyan */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 15px;
  background: var(--cyan-dim);
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--cyan-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--t-fast);
}

.btn-ghost:hover { background: rgba(0, 212, 255, 0.13); }

/* Icon button (header actions) */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text2);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
  flex-shrink: 0;
}

.icon-btn:hover {
  color: var(--cyan);
  border-color: var(--cyan-border);
  background: var(--cyan-dim);
}


/* ============================================================
   6. FORMS / INPUTS
   ============================================================ */

.input {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.875rem;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.input:focus {
  border-color: var(--cyan-border);
  box-shadow: 0 0 0 3px var(--cyan-glow);
}

.input::placeholder { color: var(--muted); }

/* Search with icon inset */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrap .search-icon {
  position: absolute;
  left: 13px;
  color: var(--muted);
  pointer-events: none;
  display: flex;
}

.search-wrap .input {
  padding-left: 40px;
}


/* ============================================================
   7. BADGES & TAGS
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 4px;
}

.badge-cyan  { background: var(--cyan);    color: #07090e; }
.badge-ghost { background: var(--surface2); color: var(--text2); border: 1px solid var(--border2); }
.badge-new   { background: var(--cyan);    color: #07090e; }
.badge-updated { background: var(--amber); color: #07090e; }


/* ============================================================
   8. CARDS — POSTER
   ============================================================ */

.poster-grid {
  display: grid;
  /*
   * auto-fill + minmax keeps every card identical in size at every
   * viewport width. 190px matches the native poster width; the browser
   * calculates how many columns fit and each card gets an equal share.
   * No fixed breakpoints = no orphan-row size jumps.
   */
  grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr));
  gap: 20px;
}

.poster-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  /* Without this, a grid item's default min-width is based on its content's
     natural size — and since .poster-name is white-space:nowrap, that's the
     FULL untruncated title. That forces whichever column has the longer
     title to grow past its equal share, pushing the grid wider than the
     screen (horizontal scroll) and making same-row posters render at
     different sizes. min-width:0 lets the ellipsis on .poster-name actually
     do its job within the column's real (equal) width. */
  min-width: 0;
}

.poster-frame {
  position: relative;
  width: 100%;
  padding-bottom: 147.4%; /* 190 × 280 aspect ratio */
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}

.poster-card:hover .poster-frame {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 212, 255, 0.22);
  border-color: rgba(0, 212, 255, 0.22);
}

.poster-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.poster-face img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster-abbr {
  font-family: 'Syncopate', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.12);
  letter-spacing: 0.03em;
  user-select: none;
}

.poster-new-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}

.poster-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0) 50%);
  opacity: 0;
  transition: opacity var(--t-base);
  display: flex;
  align-items: flex-end;
  padding: 14px;
  z-index: 3;
}

.poster-card:hover .poster-overlay { opacity: 1; }

.play-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #07090e;
  flex-shrink: 0;
}

.poster-info   { padding: 10px 3px 4px; }

.poster-name {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poster-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.71rem;
  color: var(--muted);
}

.meta-dot {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}

/* Poster grid — responsive columns handled by auto-fill minmax above down
   to tablet width. Below 600px, auto-fill's 190px minimum can collapse to a
   single column on many large phones (e.g. a 412px-wide screen) — the
   poster then stretches to the full row width and looks blurry/pixelated
   since the source images aren't that large. Force two columns instead. */
@media (max-width: 600px) {
  .poster-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}


/* ============================================================
   9. CTA BOX
   ============================================================ */

.cta-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta-box::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--cyan);
  border-radius: 3px 0 0 3px;
}

.cta-text h3 {
  font-family: 'Syncopate', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cta-text p {
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--text2);
  max-width: 420px;
  font-family: 'DM Sans', sans-serif;
}

@media (max-width: 680px) {
  .cta-box { flex-direction: column; text-align: center; padding: 36px 28px; }
  .cta-text p { max-width: 100%; margin: 0 auto; }
}


/* ============================================================
   10. HEADER
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: rgba(7, 9, 14, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

/* Logo */
.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo            { width: 190px; height: auto; }
.site-logo-footer     { width: 150px; height: auto; }

@media (max-width: 1024px) { .site-logo { width: 170px; } }
@media (max-width: 768px)  { .site-logo { width: 140px; } }

/* Header search */
.header-search {
  flex: 1;
  max-width: 460px;
}

/* Header nav */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text2);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  white-space: nowrap;
  transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}

.nav-link:hover,
.nav-link.active {
  color: var(--cyan);
  background: var(--cyan-dim);
  border-color: var(--cyan-border);
}

/* Mobile icon buttons — hidden on desktop */
.header-mobile-icons {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

@media (max-width: 768px) {
  .header-search      { display: none; }
  .header-mobile-icons { display: flex; }
}

@media (max-width: 560px) {
  .nav-links          { display: none; }
}


/* ============================================================
   11. SIDEBAR DRAWER
   ============================================================ */

/* Backdrop */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.sidebar-backdrop.is-open {
  display: block;
}

.sidebar-backdrop.is-visible {
  opacity: 1;
}

/* Drawer panel */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 400;
  width: 300px;
  max-width: 82vw;
  background: var(--surface);
  border-right: 1px solid var(--border2);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}

.sidebar.is-open {
  transform: translateX(0);
}

/* Sidebar header row */
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid var(--border2);
  border-radius: var(--radius-md);
  color: var(--text2);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
  flex-shrink: 0;
}

.sidebar-close:hover {
  color: var(--cyan);
  border-color: var(--cyan-border);
  background: var(--cyan-dim);
}

/* Sidebar search */
.sidebar-search {
  padding: 20px 20px 0;
  flex-shrink: 0;
}

.sidebar-search-label {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

/* Sidebar nav */
.sidebar-nav {
  padding: 24px 12px 12px;
  flex: 1;
}

.sidebar-nav-label {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 8px;
  margin-bottom: 10px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text2);
  border-radius: var(--radius-md);
  transition: color var(--t-fast), background var(--t-fast);
  text-decoration: none;
}

.sidebar-link:hover,
.sidebar-link.active {
  color: var(--cyan);
  background: var(--cyan-dim);
}

.sidebar-link svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-link:hover svg,
.sidebar-link.active svg {
  opacity: 1;
}

/* Sidebar footer */
.sidebar-foot {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-foot-text {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.5;
}

.sidebar-foot-text span {
  color: var(--cyan);
}


/* ============================================================
   12. FOOTER
   ============================================================ */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px var(--page-gutter) 0;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 40px;
}

.footer-brand { display: flex; flex-direction: column; gap: 12px; }

.footer-tagline {
  font-size: 0.78rem;
  font-weight: 300;
  font-family: 'DM Sans', sans-serif;
  color: var(--muted);
  max-width: 220px;
  line-height: 1.65;
}

.footer-nav    { display: flex; flex-direction: column; gap: 10px; }

.footer-nav-label {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 4px;
}

.footer-link {
  font-size: 0.82rem;
  color: var(--text2);
  transition: color var(--t-fast);
}

.footer-link:hover { color: var(--cyan); }

.footer-copy {
  max-width: var(--max-width);
  margin: 0 auto;
  border-top: 1px solid var(--border);
  padding: 20px 0;
  font-size: 0.74rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}


/* ============================================================
   13. HERO
   ============================================================ */

.hero {
  position: relative;
  padding: 90px var(--page-gutter) 80px;
  text-align: center;
  overflow: hidden;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.022) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.hero-glow {
  position: absolute;
  bottom: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(0, 212, 255, 0.07) 0%, transparent 65%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 16px;
  border: 1px solid var(--cyan-border);
  border-radius: 20px;
  background: var(--cyan-dim);
  font-size: 0.67rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 28px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: blink 2.2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.65); }
}

.hero h1 {
  font-family: 'Syncopate', sans-serif;
  font-size: clamp(1.7rem, 4.5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 18px;
}

.hero-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 300;
  color: var(--text2);
  margin-bottom: 40px;
  line-height: 1.78;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* Big hero search */
.hero-search {
  display: flex;
  max-width: 560px;
  margin: 0 auto 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.hero-search:focus-within {
  border-color: var(--cyan-border);
  box-shadow: 0 0 0 4px var(--cyan-glow);
}

.hero-search input {
  flex: 1;
  padding: 15px 20px;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.92rem;
  outline: none;
  min-width: 0;
}

.hero-search input::placeholder { color: var(--muted); }

.hero-search-btn {
  padding: 0 26px;
  background: var(--cyan);
  color: #07090e;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity var(--t-fast);
}

.hero-search-btn:hover { opacity: 0.85; }

/* Hero stats */
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; align-items: center; gap: 3px; }

.stat-num {
  font-family: 'Syncopate', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1;
}

.stat-label {
  font-size: 0.67rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-pipe {
  width: 1px;
  height: 38px;
  background: var(--border);
}


/* ============================================================
   14. UTILITY CLASSES
   ============================================================ */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.d-flex   { display: flex; }
.d-none   { display: none; }
.gap-sm   { gap: 8px; }
.gap-md   { gap: 16px; }
.gap-lg   { gap: 24px; }
.mt-1     { margin-top: 8px; }
.mt-2     { margin-top: 16px; }
.mt-3     { margin-top: 24px; }
.mb-1     { margin-bottom: 8px; }
.mb-2     { margin-bottom: 16px; }
.mb-3     { margin-bottom: 24px; }
.text-center { text-align: center; }


/* ============================================================
   15. PAGE-LEVEL RESPONSIVENESS
   ============================================================ */

@media (max-width: 640px) {
  :root { --page-gutter: 16px; }
  .section { padding: 44px var(--page-gutter); }
  .hero { padding: 60px var(--page-gutter) 52px; }
  .hero-stats { gap: 22px; }
  .stat-pipe  { height: 28px; }
  .stat-num   { font-size: 1.2rem; }
}

/* ============================================================
   16. PAGE HEADER (inner pages — updates, list, search, etc.)
   ============================================================ */

.page-header {
  padding: 48px var(--page-gutter) 0;
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-header-inner {
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.page-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.page-breadcrumb a {
  color: var(--muted);
  transition: color var(--t-fast);
}

.page-breadcrumb a:hover { color: var(--cyan); }

.page-breadcrumb svg { flex-shrink: 0; }

.page-breadcrumb-sep { color: var(--muted); }

.page-h1 {
  font-family: 'Syncopate', sans-serif;
  font-size: clamp(1.25rem, 3vw, 1.9rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 10px;
}

.page-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text2);
  line-height: 1.7;
  max-width: 520px;
}


/* ============================================================
   17. FILTER / SORT BAR
   ============================================================ */

.filter-bar-wrap {
  position: sticky;
  top: var(--header-h);
  z-index: 100;
  background: rgba(7, 9, 14, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.filter-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 52px;
}

/* Count label */
.filter-count {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  flex-shrink: 0;
  white-space: nowrap;
}

.filter-count strong {
  color: var(--text2);
  font-weight: 600;
}

/* Sort group */
.filter-sort {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.filter-sort-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

/* Sort buttons (pill toggles) */
.sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text2);
  background: none;
  border: 1px solid var(--border2);
  border-radius: 20px;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
  white-space: nowrap;
}

.sort-btn:hover {
  color: var(--cyan);
  border-color: var(--cyan-border);
  background: var(--cyan-dim);
}

.sort-btn.is-active {
  color: var(--cyan);
  border-color: var(--cyan-border);
  background: var(--cyan-dim);
}

/* Sort icon — rotates for direction */
.sort-btn .sort-icon {
  display: inline-flex;
  transition: transform var(--t-fast);
}

/* Mobile: collapse sort label at small sizes */
@media (max-width: 560px) {
  .filter-sort-label { display: none; }
  .filter-bar { height: 48px; }
}

/* Below this width, keep both the "Showing X–Y of Z" count and the sort
   labels visible, by stacking them onto two lines instead of cramming
   both into one row — count on its own line, sort buttons on the next. */
@media (max-width: 480px) {
  .filter-bar {
    flex-wrap: wrap;
    height: auto;
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 8px;
  }
  .filter-count { width: 100%; }
  .filter-sort  { gap: 4px; }
  .sort-btn     { padding: 5px 10px; gap: 4px; }
}


/* ============================================================
   18. EMPTY STATE
   ============================================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px var(--page-gutter);
  gap: 16px;
}

.empty-state-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.empty-state h3 {
  font-family: 'Syncopate', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text2);
}

.empty-state p {
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 320px;
  line-height: 1.65;
}


/* ============================================================
   19. SERIES HERO
   ============================================================ */

.series-hero {
  position: relative;
  overflow: hidden;
  padding: 52px var(--page-gutter) 56px;
  /* Subtle top border to separate from sticky header */
  border-bottom: 1px solid var(--border);
}

/* Blurred poster backdrop — picks up poster colours for atmosphere */
.series-hero-bg {
  position: absolute;
  inset: -10%;            /* overshoot to hide blur fringe */
  background-size: cover;
  background-position: center top;
  filter: blur(72px) saturate(0.5);
  opacity: 0.13;
  pointer-events: none;
  z-index: 0;
}

/* Dark vignette over the backdrop so text stays readable */
.series-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(7,9,14,0.55) 0%,
    rgba(7,9,14,0.20) 50%,
    rgba(7,9,14,0.55) 100%
  );
}

/* Inner: poster + info side by side */
.series-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 44px;
}

/* ── Poster ── */
.series-poster-wrap {
  flex-shrink: 0;
  width: 190px;
}

.series-poster {
  width: 190px;
  height: 280px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border2);
  box-shadow: 0 24px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,212,255,0.10);
  display: block;
}

/* Fallback tile when poster image is missing */
.series-poster-fallback {
  width: 190px;
  height: 280px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border2);
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syncopate', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: rgba(255,255,255,0.10);
  letter-spacing: 0.05em;
  user-select: none;
  flex-shrink: 0;
}

/* ── Info panel ── */
.series-info {
  flex: 1;
  min-width: 0;
  padding-top: 4px;
}

.series-title {
  font-family: 'Syncopate', sans-serif;
  font-size: clamp(1.4rem, 3.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 18px;
  /* Allow long titles to wrap */
  word-break: break-word;
}

/* ── Meta pills row ── */
.meta-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text2);
  white-space: nowrap;
}

.meta-pill svg {
  flex-shrink: 0;
  opacity: 0.6;
}

.meta-pill-views {
  border-color: var(--cyan-border);
  background: var(--cyan-dim);
  color: var(--cyan);
}

/* ── Description ── */
.series-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text2);
  line-height: 1.78;
  margin-bottom: 28px;
  max-width: 620px;
  /* Clamp to 4 lines with "show more" handled by JS if needed */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Expanded state toggled by JS */
.series-desc.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
}

.desc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  padding: 0;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--cyan);
  cursor: pointer;
  margin-bottom: 28px;
  transition: opacity var(--t-fast);
  letter-spacing: 0.04em;
}

.desc-toggle:hover { opacity: 0.75; }

/* ── Quick stats ── */
.series-stats {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: fit-content;
}

.series-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 14px 28px;
}

.series-stat + .series-stat {
  border-left: 1px solid var(--border2);
}

.ss-num {
  font-family: 'Syncopate', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cyan);
  line-height: 1;
}

.ss-label {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Responsive: stack on tablet/mobile ── */
@media (max-width: 720px) {
  .series-hero { padding: 36px var(--page-gutter) 44px; }

  .series-hero-inner {
    flex-direction: column;
    align-items: center;
    gap: 28px;
    text-align: center;
  }

  .series-poster-wrap { width: auto; }

  .meta-pills { justify-content: center; }

  .series-desc { max-width: 100%; }

  .series-stats { margin: 0 auto; }
}

@media (max-width: 460px) {
  .series-poster { width: 160px; height: 236px; }
  .series-poster-fallback { width: 160px; height: 236px; font-size: 2rem; }
  .series-stat { padding: 12px 18px; }
  .ss-num { font-size: 1rem; }
}


/* ============================================================
   20. SEASON ROW CARDS
   ============================================================ */

.seasons-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.season-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base), background var(--t-base);
  position: relative;
  overflow: hidden;
}

/* Left cyan accent line — hidden until hover */
.season-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--cyan);
  border-radius: 3px 0 0 3px;
  transform: scaleY(0);
  transition: transform var(--t-base);
}

.season-row:hover {
  transform: translateX(4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
  border-color: var(--cyan-border);
  background: var(--surface2);
}

.season-row:hover::before {
  transform: scaleY(1);
}

/* Season number badge */
.season-num {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--surface3);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syncopate', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: background var(--t-base), border-color var(--t-base), color var(--t-base);
}

.season-row:hover .season-num {
  background: var(--cyan-dim);
  border-color: var(--cyan-border);
  color: var(--cyan);
}

/* Season name + meta */
.season-details { flex: 1; min-width: 0; }

.season-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--t-fast);
}

.season-row:hover .season-name { color: var(--cyan); }

.season-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--muted);
}

/* Episode count pill */
.season-ep-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--surface3);
  border: 1px solid var(--border2);
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text2);
  flex-shrink: 0;
  white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}

.season-row:hover .season-ep-count {
  background: var(--cyan-dim);
  border-color: var(--cyan-border);
  color: var(--cyan);
}

/* Views */
.season-views {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Arrow chevron */
.season-arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}

.season-row:hover .season-arrow {
  color: var(--cyan);
  border-color: var(--cyan-border);
  background: var(--cyan-dim);
  transform: translateX(2px);
}

/* Responsive: hide views on small screens */
@media (max-width: 560px) {
  .season-views  { display: none; }
  .season-row    { gap: 14px; padding: 14px 16px; }
  .season-num    { width: 38px; height: 38px; }
}

@media (max-width: 400px) {
  .season-ep-count { display: none; }
}


/* ============================================================
   21. EPISODE ROW CARDS
   ============================================================ */

.episodes-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.ep-total-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.ep-total-label strong {
  color: var(--text2);
  font-weight: 600;
}

.episodes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Episode row */
.ep-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 15px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text);
  transition: transform var(--t-base), box-shadow var(--t-base),
              border-color var(--t-base), background var(--t-base);
  position: relative;
  overflow: hidden;
}

/* Left cyan accent — same pattern as season rows */
.ep-row::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--cyan);
  border-radius: 3px 0 0 3px;
  transform: scaleY(0);
  transition: transform var(--t-base);
}

.ep-row:hover {
  transform: translateX(4px);
  box-shadow: 0 6px 22px rgba(0,0,0,0.3);
  border-color: var(--cyan-border);
  background: var(--surface2);
}

.ep-row:hover::before { transform: scaleY(1); }

/* Episode number badge */
.ep-num {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--surface3);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syncopate', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.03em;
  transition: background var(--t-base), border-color var(--t-base), color var(--t-base);
  flex-shrink: 0;
}

.ep-row:hover .ep-num {
  background: var(--cyan-dim);
  border-color: var(--cyan-border);
  color: var(--cyan);
}

/* Episode name + meta */
.ep-details { flex: 1; min-width: 0; }

.ep-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--t-fast);
}

.ep-row:hover .ep-name { color: var(--cyan); }

.ep-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--muted);
}

/* Views badge */
.ep-views {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  color: var(--muted);
  white-space: nowrap;
}

/* Download / arrow button */
.ep-arrow {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color var(--t-fast), border-color var(--t-fast),
              background var(--t-fast), transform var(--t-fast);
}

.ep-row:hover .ep-arrow {
  color: var(--cyan);
  border-color: var(--cyan-border);
  background: var(--cyan-dim);
  transform: translateX(2px);
}

/* Responsive */
@media (max-width: 560px) {
  .ep-views  { display: none; }
  .ep-row    { gap: 12px; padding: 12px 14px; }
  .ep-num    { width: 34px; height: 34px; font-size: 0.58rem; }
}


/* ============================================================
   22. DOWNLOAD CARD
   ============================================================ */

.download-section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--page-gutter) 0;
}

.download-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  padding: 40px 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
}

/* Ambient cyan glow top-right */
.download-card::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(0,212,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* Left cyan stripe */
.download-card::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--cyan);
  border-radius: 3px 0 0 3px;
}

.download-card-info { flex: 1; min-width: 0; }

.download-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 8px;
}

.download-ep-name {
  font-family: 'Syncopate', sans-serif;
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 12px;
  word-break: break-word;
}

.download-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.download-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--muted);
}

.download-meta-item svg { opacity: 0.55; flex-shrink: 0; }

.download-meta-sep {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--border2);
  flex-shrink: 0;
}

/* The big download button */
.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 36px;
  background: var(--cyan);
  color: #07090e;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius-lg);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity var(--t-fast), transform var(--t-fast),
              box-shadow var(--t-fast);
  box-shadow: 0 0 0 0 rgba(0,212,255,0);
}

.download-btn:hover {
  opacity: 0.88;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,212,255,0.28);
}

.download-btn:active {
  transform: translateY(0);
  opacity: 1;
}

.download-btn svg { flex-shrink: 0; }

/* Reassurance line below button */
.download-note {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.68rem;
  color: var(--muted);
}

.download-note svg { opacity: 0.5; flex-shrink: 0; }

/* Stacked layout on mobile */
@media (max-width: 680px) {
  .download-card {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 32px 24px;
    gap: 24px;
  }

  .download-btn {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
  }

  .download-meta { justify-content: center; }
  .download-note { justify-content: center; }
}


/* ============================================================
   23. EPISODE NAVIGATION (Prev / Next)
   ============================================================ */

.ep-nav {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.ep-nav-btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--text);
  transition: transform var(--t-base), box-shadow var(--t-base),
              border-color var(--t-base), background var(--t-base);
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.ep-nav-btn:hover {
  box-shadow: 0 8px 28px rgba(0,0,0,0.35);
  border-color: var(--cyan-border);
  background: var(--surface2);
}

.ep-nav-btn.is-prev { flex-direction: row; }
.ep-nav-btn.is-next { flex-direction: row-reverse; text-align: right; }

.ep-nav-btn.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.ep-nav-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.ep-nav-btn:hover .ep-nav-icon {
  color: var(--cyan);
  border-color: var(--cyan-border);
  background: var(--cyan-dim);
}

.ep-nav-info { min-width: 0; }

.ep-nav-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}

.ep-nav-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--t-fast);
}

.ep-nav-btn:hover .ep-nav-name { color: var(--cyan); }

@media (max-width: 560px) {
  .ep-nav { flex-direction: column; }
  .ep-nav-btn.is-next { flex-direction: row; text-align: left; }
}


/* ============================================================
   24. ACTIVE EPISODE (current ep highlighted in season list)
   ============================================================ */

.ep-row.is-current {
  border-color: var(--cyan-border);
  background: var(--surface2);
  pointer-events: none; /* can't click yourself */
}

.ep-row.is-current::before {
  transform: scaleY(1);
}

.ep-row.is-current .ep-num {
  background: var(--cyan-dim);
  border-color: var(--cyan-border);
  color: var(--cyan);
}

.ep-row.is-current .ep-name {
  color: var(--cyan);
}

/* "Now playing" badge on active row */
.ep-now-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: var(--cyan-dim);
  border: 1px solid var(--cyan-border);
  border-radius: 20px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--cyan);
  flex-shrink: 0;
  white-space: nowrap;
}

.ep-now-badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  animation: blink 2.2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes blink {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.3; transform:scale(.65); }
}


/* ============================================================
   25. DOWNLOAD / VERIFY PAGE
   ============================================================ */

/* Narrow centred column for focused action pages */
.verify-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px var(--page-gutter) 80px;
}

/* ── Context strip ─────────────────────────── */
/* Compact horizontal card: small poster + episode info */
.context-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

/* Subtle left accent colour using webseries poster */
.context-card-bg {
  position: absolute;
  inset: -20%;
  background-size: cover;
  background-position: center;
  filter: blur(40px) saturate(0.4);
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}

.context-card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
}

/* Small poster thumbnail */
.context-poster {
  flex-shrink: 0;
  width: 64px;
  height: 94px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border2);
  object-fit: cover;
  display: block;
}

.context-poster-fallback {
  flex-shrink: 0;
  width: 64px;
  height: 94px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border2);
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syncopate', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255,255,255,0.12);
  user-select: none;
}

.context-info { flex: 1; min-width: 0; }

.context-series {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 5px;
}

.context-ep-name {
  font-family: 'Syncopate', sans-serif;
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.context-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.context-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text2);
  white-space: nowrap;
}

.context-pill svg { opacity: 0.55; flex-shrink: 0; }

@media (max-width: 480px) {
  .context-card { padding: 16px 18px; }
  .context-card-inner { gap: 16px; }
  .context-poster, .context-poster-fallback { width: 52px; height: 76px; }
}


/* ── Verify card ───────────────────────────── */
.verify-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  padding: 40px 44px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

/* Top cyan glow */
.verify-card::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 400px;
  height: 280px;
  background: radial-gradient(ellipse, rgba(0,212,255,0.07) 0%, transparent 70%);
  pointer-events: none;
}

.verify-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--muted);
  position: relative;
  z-index: 1;
  transition: border-color var(--t-base), background var(--t-base), color var(--t-base);
}

/* Icon turns cyan when verified */
.verify-icon.is-verified {
  border-color: var(--cyan-border);
  background: var(--cyan-dim);
  color: var(--cyan);
}

.verify-title {
  font-family: 'Syncopate', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.verify-subtitle {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

/* Turnstile widget wrapper */
.turnstile-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
  min-height: 65px; /* prevent layout jump while loading */
}

/* Status message shown after CAPTCHA */
.verify-status {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 24px;
  position: relative;
  z-index: 1;
}

.verify-status.is-success {
  display: flex;
  background: rgba(0,212,255,0.07);
  border: 1px solid var(--cyan-border);
  color: var(--cyan);
}

.verify-status.is-error {
  display: flex;
  background: rgba(232,69,69,0.08);
  border: 1px solid rgba(232,69,69,0.35);
  color: var(--red);
}

/* ── The locked download button ── */
.dl-btn-locked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 17px 28px;
  background: var(--surface2);
  color: var(--muted);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  cursor: not-allowed;
  user-select: none;
  margin-bottom: 14px;
  transition: background var(--t-base), color var(--t-base),
              border-color var(--t-base), box-shadow var(--t-base);
  position: relative;
  z-index: 1;
}

/* Active state — triggered by JS after CAPTCHA passes */
.dl-btn-locked.is-active {
  background: var(--cyan);
  color: #07090e;
  border-color: var(--cyan);
  cursor: pointer;
  animation: btn-pulse 0.5s ease;
  box-shadow: 0 0 28px rgba(0,212,255,0.30);
}

.dl-btn-locked.is-active:hover {
  opacity: 0.88;
  box-shadow: 0 8px 32px rgba(0,212,255,0.35);
  transform: translateY(-2px);
}

@keyframes btn-pulse {
  0%   { transform: scale(0.97); }
  60%  { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.dl-btn-locked.is-active:active {
  transform: translateY(0);
  opacity: 1;
}

/* Lock icon inside button */
.dl-lock-icon { flex-shrink: 0; transition: opacity var(--t-fast); }
.dl-btn-locked.is-active .dl-lock-icon { display: none; }
.dl-dl-icon { display: none; flex-shrink: 0; }
.dl-btn-locked.is-active .dl-dl-icon { display: block; }

/* Reassurance note */
.verify-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--muted);
  position: relative;
  z-index: 1;
}

.verify-note svg { opacity: 0.45; flex-shrink: 0; }

/* Divider inside card */
.verify-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
  position: relative;
  z-index: 1;
}

/* Info rows below the button */
.verify-info-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  position: relative;
  z-index: 1;
}

.verify-info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text2);
  line-height: 1.55;
}

.verify-info-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  margin-top: 1px;
}

@media (max-width: 560px) {
  .verify-card { padding: 32px 22px; }
  .verify-page { padding-top: 36px; }
}


/* ============================================================
   26. PAGINATION
   ============================================================ */

.pagination-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 12px 0 64px;
}

.pagination-info {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.pagination-info strong {
  color: var(--text2);
  font-weight: 600;
}

/* Pagination row of buttons */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Shared styles for page buttons + prev/next */
.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--t-fast), border-color var(--t-fast),
              background var(--t-fast), transform var(--t-fast);
  user-select: none;
}

.pg-btn:hover {
  color: var(--cyan);
  border-color: var(--cyan-border);
  background: var(--cyan-dim);
}

/* Active / current page */
.pg-btn.is-active {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #07090e;
  font-weight: 700;
  cursor: default;
  pointer-events: none;
}

/* Disabled (no prev on page 1, no next on last page) */
.pg-btn.is-disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

/* Prev / Next — slightly wider */
.pg-btn-nav {
  gap: 6px;
  padding: 0 14px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Ellipsis — not clickable */
.pg-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  font-size: 0.8rem;
  color: var(--muted);
  user-select: none;
  letter-spacing: 0.1em;
}

@media (max-width: 480px) {
  /* On very small screens hide middle page numbers, keep prev/next + active */
  .pg-btn.pg-hide-mobile { display: none; }
  .pg-btn-nav { padding: 0 12px; font-size: 0.7rem; }
}


/* ============================================================
   27. 404 PAGE
   ============================================================ */

.error-code {
  font-family: 'Syncopate', sans-serif;
  font-size: clamp(3.5rem, 12vw, 7rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.error-page-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 80px var(--page-gutter) 100px;
  text-align: center;
}

.error-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .error-page-wrap { padding: 56px var(--page-gutter) 72px; }
}


/* ============================================================
   28. SEARCH PAGE
   ============================================================ */

.search-page-form {
  max-width: 560px;
  margin: 0 auto 32px;
}

.search-page-form .input {
  padding: 16px 16px 16px 44px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
}

.search-page-form .search-icon {
  left: 16px;
}

.search-status {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 24px 0;
}

.search-results-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
}

.search-result-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text);
  transition: transform var(--t-fast), border-color var(--t-fast), background var(--t-fast);
}

.search-result-row:hover {
  border-color: var(--cyan-border);
  background: var(--surface2);
  transform: translateX(4px);
}

.search-result-thumb {
  flex-shrink: 0;
  width: 42px;
  height: 62px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface2);
  border: 1px solid var(--border2);
}

.search-result-abbr {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syncopate', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.15);
}

.search-result-name {
  flex: 1;
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  transition: color var(--t-fast);
}

.search-result-row:hover .search-result-name {
  color: var(--cyan);
}

.search-result-arrow {
  flex-shrink: 0;
  color: var(--muted);
  transition: color var(--t-fast), transform var(--t-fast);
}

.search-result-row:hover .search-result-arrow {
  color: var(--cyan);
  transform: translateX(2px);
}

@media (max-width: 480px) {
  .search-result-row  { padding: 10px 12px; gap: 12px; }
  .search-result-thumb { width: 36px; height: 53px; }
}


/* ============================================================
   29. SITE NOTICE BANNER
   Site-wide news / notice / update bar, rendered by header.php
   whenever SITE_NOTICE is set in config.php. Contents are plain
   text plus <a> links (and <strong> for emphasis).
   Default is cyan; add SITE_NOTICE_TYPE = 'alert' in config.php
   for the amber variant (use for important/urgent notices).
   ============================================================ */

.site-notice {
  background:
    linear-gradient(90deg, rgba(0, 212, 255, 0.06) 0%, rgba(0, 212, 255, 0.17) 50%, rgba(0, 212, 255, 0.06) 100%),
    var(--surface);
  border-bottom: 1px solid var(--cyan-border);
}

.site-notice-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 10px var(--page-gutter);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.site-notice-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  flex-shrink: 0;
  animation: blink 2.2s ease-in-out infinite;
}

.site-notice-text {
  min-width: 0;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  color: var(--text);
  overflow-wrap: anywhere;
}

.site-notice-text a {
  color: var(--cyan);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--cyan-border);
  text-underline-offset: 3px;
  transition: text-decoration-color var(--t-fast);
}

.site-notice-text a:hover { text-decoration-color: var(--cyan); }

.site-notice-text strong { color: var(--cyan); font-weight: 700; }

/* Alert variant — amber, for important/urgent notices */
.site-notice--alert {
  background:
    linear-gradient(90deg, rgba(255, 176, 32, 0.07) 0%, rgba(255, 176, 32, 0.19) 50%, rgba(255, 176, 32, 0.07) 100%),
    var(--surface);
  border-bottom-color: rgba(255, 176, 32, 0.4);
}

.site-notice--alert .site-notice-dot {
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}

.site-notice--alert .site-notice-text a,
.site-notice--alert .site-notice-text strong { color: var(--amber); }

.site-notice--alert .site-notice-text a { text-decoration-color: rgba(255, 176, 32, 0.4); }
.site-notice--alert .site-notice-text a:hover { text-decoration-color: var(--amber); }

@media (max-width: 640px) {
  .site-notice-inner { padding: 9px var(--page-gutter); gap: 10px; }
  .site-notice-text  { font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .site-notice-dot { animation: none; }
}
