/* ==========================================================
   AniVexo — Design System
   Premium dark anime download theme (black + red)
   ========================================================== */

:root {
  --bg: #070707;
  --surface: #111111;
  --surface-2: #171717;
  --primary: #E50914;
  --primary-hover: #FF1A25;
  --text: #FFFFFF;
  --muted: #A1A1A1;
  --border: #252525;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;

  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.55);

  --font-display: 'Poppins', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  --header-h: 60px;
  --container-max: 1280px;
}

/* -------------------- Reset -------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; }

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

.section {
  margin: var(--space-6) 0;
}
.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
  padding: 0 var(--space-4);
}
.section__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.section__title .bar {
  width: 4px;
  height: 18px;
  background: var(--primary);
  border-radius: var(--radius-pill);
  display: inline-block;
}
.section__more {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.section__more:hover { color: var(--primary); }

/* -------------------- Header -------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
  background: rgba(7, 7, 7, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__left { display: flex; align-items: center; gap: var(--space-3); }
.icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; color: var(--text);
  cursor: pointer; border-radius: var(--radius-sm);
}
.icon-btn:hover { background: var(--surface); color: var(--primary); }
.icon-btn svg { width: 22px; height: 22px; }

.brand {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: 0.3px;
}
.brand__ani { color: var(--text); }
.brand__vexo { color: var(--primary); }

.site-header__right { display: flex; align-items: center; gap: var(--space-2); }

.desktop-nav { display: none; }
@media (min-width: 960px) {
  .desktop-nav {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    margin-left: var(--space-6);
  }
  .desktop-nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
  }
  .desktop-nav a:hover, .desktop-nav a.is-active { color: var(--text); }
  .site-header { padding: 0 var(--space-6); }
}

/* Mobile nav drawer */
.nav-drawer {
  position: fixed;
  top: 0; left: 0;
  width: 84%;
  max-width: 320px;
  height: 100%;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  overflow-y: auto;
  padding: var(--space-4);
}
.nav-drawer.is-open { transform: translateX(0); }
.nav-drawer__close { margin-bottom: var(--space-4); }
.nav-drawer a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 12px 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-sm);
}
.nav-drawer a:hover { background: var(--surface-2); color: var(--primary); }
.nav-drawer a svg { width: 18px; height: 18px; color: var(--muted); }
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 199; opacity: 0; pointer-events: none; transition: opacity 0.25s ease;
}
.drawer-overlay.is-open { opacity: 1; pointer-events: auto; }
body.drawer-locked { overflow: hidden; }

/* Search overlay */
.search-overlay {
  position: fixed; inset: 0; background: rgba(7,7,7,0.97);
  z-index: 300; display: flex; flex-direction: column;
  padding: var(--space-4);
  transform: translateY(-8px);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
}
.search-overlay.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
.search-overlay__bar {
  display: flex; align-items: center; gap: var(--space-2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 10px 16px;
}
.search-overlay__bar input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 15px;
}
.search-overlay__bar input::placeholder { color: var(--muted); }
.search-overlay__results { margin-top: var(--space-4); overflow-y: auto; flex: 1; }
.search-result-row {
  display: flex; gap: var(--space-3); align-items: center;
  padding: 10px 4px; border-bottom: 1px solid var(--border);
}
.search-result-row img { width: 44px; height: 60px; object-fit: cover; border-radius: 6px; }
.search-result-row .title { font-size: 14px; font-weight: 500; }
.search-hint { color: var(--muted); font-size: 13px; margin-top: var(--space-2); }

/* -------------------- Hero / Featured -------------------- */
.hero {
  position: relative;
  margin-top: var(--space-4);
}
.hero-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hero-slider::-webkit-scrollbar { display: none; }
.hero-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: flex-end;
  border-radius: 0;
  overflow: hidden;
}
.hero-slide__bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(0.55) blur(0px);
}
.hero-slide__bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,7,7,0) 0%, rgba(7,7,7,0.55) 55%, var(--bg) 100%),
              linear-gradient(90deg, rgba(7,7,7,0.75) 0%, rgba(7,7,7,0.15) 60%);
}
.hero-slide__content {
  position: relative;
  z-index: 2;
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-4);
  width: 100%;
  align-items: flex-end;
}
.hero-slide__poster {
  width: 100px;
  aspect-ratio: 2/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-pop);
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.hero-slide__poster img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide__info { flex: 1; min-width: 0; }
.hero-slide__title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--space-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-slide__meta {
  display: flex; flex-wrap: wrap; gap: var(--space-2);
  margin-bottom: var(--space-3);
  font-size: 12px; color: var(--muted);
}
.hero-slide__meta span {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(255,255,255,0.06);
  padding: 3px 9px; border-radius: var(--radius-pill);
}
.hero-slide__desc {
  font-size: 13px; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: var(--space-4);
  max-width: 560px;
}
.hero-slide__actions { display: flex; gap: var(--space-2); }

.dots {
  display: flex; justify-content: center; gap: 6px;
  margin-top: var(--space-3);
}
.dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--border); cursor: pointer; transition: all 0.2s ease;
}
.dot.is-active { width: 20px; background: var(--primary); border-radius: var(--radius-pill); }

@media (min-width: 960px) {
  .hero-slide { min-height: 480px; border-radius: var(--radius-lg); }
  .hero { padding: 0 var(--space-6); }
  .hero-slide__poster { width: 160px; }
  .hero-slide__title { font-size: 32px; }
  .hero-slide__content { padding: var(--space-6); }
}

/* -------------------- Buttons -------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 600;
  border: none; cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: rgba(255,255,255,0.08); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,0.14); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* -------------------- Quick links -------------------- */
.quick-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  padding: var(--space-4);
}
.quick-links .btn { padding: 13px 18px; }
.quick-links__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
@media (min-width: 700px) {
  .quick-links { grid-template-columns: repeat(4, 1fr); }
  .quick-links__row { display: contents; }
}

/* -------------------- Genre pills -------------------- */
.genre-pills {
  display: flex; gap: var(--space-2); overflow-x: auto;
  padding: 0 var(--space-4);
  scrollbar-width: none;
}
.genre-pills::-webkit-scrollbar { display: none; }
.genre-pill {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px; font-weight: 500; color: var(--muted);
}
.genre-pill:hover, .genre-pill.is-active {
  border-color: var(--primary); color: var(--text); background: rgba(229,9,20,0.12);
}

/* -------------------- Anime grid + card -------------------- */
.anime-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  padding: 0 var(--space-4);
}
@media (min-width: 560px) { .anime-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 760px) { .anime-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1000px) { .anime-grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-width: 1200px) { .anime-grid { grid-template-columns: repeat(6, 1fr); } }

.h-scroll {
  display: flex; gap: var(--space-3); overflow-x: auto;
  padding: 0 var(--space-4);
  scrollbar-width: none;
}
.h-scroll::-webkit-scrollbar { display: none; }
.h-scroll .anime-card { flex: 0 0 130px; }
@media (min-width: 960px) {
  .h-scroll { display: grid; grid-template-columns: repeat(6, 1fr); overflow: visible; }
  .h-scroll .anime-card { flex: none; }
}

.anime-card { display: block; }
.anime-card__poster {
  position: relative;
  aspect-ratio: 2/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}
.anime-card__poster img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.3s ease;
}
.anime-card:hover .anime-card__poster img { transform: scale(1.06); }
.anime-card:hover .anime-card__poster { border-color: var(--primary); }
.anime-card__badges {
  position: absolute; top: 6px; left: 6px; right: 6px;
  display: flex; justify-content: space-between; gap: 4px;
}
.badge {
  font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 5px;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.badge-primary { background: var(--primary); }
.anime-card__rating {
  position: absolute; bottom: 6px; left: 6px;
  display: flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 700;
  background: rgba(0,0,0,0.7);
  padding: 2px 7px; border-radius: 6px;
}
.anime-card__rating svg { width: 11px; height: 11px; color: #FFC107; }
.anime-card__title {
  margin-top: var(--space-2);
  font-size: 13px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.anime-card__meta {
  margin-top: 3px;
  font-size: 11px; color: var(--muted);
  display: flex; gap: 6px; flex-wrap: wrap;
}

/* -------------------- Pagination -------------------- */
.pagination {
  display: flex; justify-content: center; gap: 6px;
  padding: var(--space-5) var(--space-4);
  flex-wrap: wrap;
}
.pagination .page-numbers {
  min-width: 36px; height: 36px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); font-size: 13px; font-weight: 600;
}
.pagination .page-numbers.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .page-numbers:hover:not(.current) { border-color: var(--primary); color: var(--text); }

/* -------------------- Single anime page -------------------- */
.detail-hero { position: relative; }
.detail-hero__bg {
  height: 220px; background-size: cover; background-position: center;
  position: relative;
}
.detail-hero__bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,7,7,0.3) 0%, var(--bg) 100%);
}
.detail-main {
  padding: 0 var(--space-4);
  margin-top: -70px;
  position: relative;
  z-index: 2;
}
.detail-top { display: flex; gap: var(--space-4); }
.detail-poster {
  width: 120px; flex-shrink: 0;
  aspect-ratio: 2/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--border);
  box-shadow: var(--shadow-pop);
}
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-title { font-size: 20px; font-weight: 800; line-height: 1.25; margin-top: 60px; }
.detail-alt-title { font-size: 12px; color: var(--muted); margin-top: 4px; }
.detail-meta-row {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: var(--space-2);
}
.detail-actions {
  display: flex; gap: var(--space-2);
  margin-top: var(--space-4);
}
.detail-genres { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-3); }
.detail-desc {
  margin-top: var(--space-4);
  font-size: 13.5px; line-height: 1.7; color: var(--muted);
}
.detail-info-grid {
  margin-top: var(--space-4);
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}
.detail-info-grid div { font-size: 12.5px; }
.detail-info-grid b { color: var(--muted); font-weight: 500; display: block; font-size: 11px; margin-bottom: 2px; }

@media (min-width: 760px) {
  .detail-hero__bg { height: 340px; }
  .detail-main { padding: 0 var(--space-6); margin-top: -110px; }
  .detail-poster { width: 190px; }
  .detail-title { font-size: 30px; margin-top: 100px; }
  .detail-top { align-items: flex-end; }
}

/* Season selector + episodes */
.season-select {
  margin-top: var(--space-6);
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600;
  width: 100%;
  max-width: 260px;
}
.episode-panel { display: none; margin-top: var(--space-4); }
.episode-panel.is-active { display: block; }
.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 8px;
}
.episode-item summary {
  list-style: none;
  cursor: pointer;
  height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700;
}
.episode-item summary::-webkit-details-marker { display: none; }
.episode-item[open] summary { background: var(--primary); border-color: var(--primary); }
.episode-item {
  grid-column: span 1;
}
.episode-item[open] { grid-column: 1 / -1; }
.episode-drawer {
  margin-top: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}
.episode-drawer__title { font-size: 13px; font-weight: 600; margin-bottom: var(--space-2); }
.dl-options { display: flex; flex-direction: column; gap: 8px; }
.dl-option {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color 0.18s ease;
}
.dl-option:hover { border-color: rgba(229, 9, 20, 0.35); }
.dl-option__info { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dl-option__quality { font-size: 14px; font-weight: 800; }
.dl-option__meta { font-size: 11.5px; color: var(--muted); }
.dl-option__actions { display: flex; gap: 8px; }

@media (min-width: 480px) {
  .dl-option { flex-direction: row; align-items: center; justify-content: space-between; }
  .dl-option__actions { flex-shrink: 0; }
  .btn-watch, .btn-download { flex: 0 0 auto; }
}

.dl-quality-group { margin-bottom: 10px; }
.dl-quality-label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 6px; }

/* ==================== Episode accordion (premium expandable cards) ==================== */
.ep-accordion { display: flex; flex-direction: column; gap: 10px; }

.ep-card {
  background: linear-gradient(155deg, rgba(229, 9, 20, 0.10), var(--surface) 55%);
  border: 1px solid rgba(229, 9, 20, 0.22);
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.ep-card:hover { border-color: rgba(229, 9, 20, 0.4); }
.ep-card.is-open {
  border-color: var(--primary);
  box-shadow: 0 6px 22px rgba(229, 9, 20, 0.2);
}

.ep-card__toggle {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  background: transparent; border: none; cursor: pointer;
  text-align: left; color: var(--text);
  -webkit-tap-highlight-color: transparent;
}
.ep-card__toggle:active { background: rgba(255, 255, 255, 0.04); }
.ep-card__num {
  flex-shrink: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.4px;
  color: #fff; background: linear-gradient(135deg, var(--primary-hover), var(--primary));
  padding: 4px 9px; border-radius: 7px;
}
.ep-card__title {
  flex: 1; min-width: 0; font-size: 14px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ep-card__chevron { flex-shrink: 0; width: 18px; height: 18px; color: var(--muted); transition: transform 0.25s ease; }
.ep-card__toggle[aria-expanded="true"] .ep-card__chevron { transform: rotate(180deg); color: var(--primary); }

.ep-card__panel {
  max-height: 0; overflow: hidden;
  transition: max-height 0.32s ease;
}
.ep-card__panel-inner { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.ep-card__thumb { border-radius: 12px; overflow: hidden; aspect-ratio: 16/9; background: var(--surface-2); }
.ep-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ep-card__overview { font-size: 13px; color: var(--muted); line-height: 1.55; }
.ep-card__empty { font-size: 12.5px; color: var(--muted); margin: 0; }

/* Large single Watch/Download CTA (episodes with exactly one download option) */
.ep-cta { display: flex; gap: 10px; }
.ep-cta__btn { padding: 13px 16px; font-size: 14px; border-radius: 12px; }

/* Reusable "Available Qualities" nested accordion */
.dlq-heading { font-size: 11.5px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); }
.dlq-list { display: flex; flex-direction: column; gap: 8px; }
.dlq-item {
  border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--surface-2); overflow: hidden;
}
.dlq-item__toggle {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 11px 12px; background: transparent; border: none; cursor: pointer;
  text-align: left; color: var(--text); -webkit-tap-highlight-color: transparent;
}
.dlq-item__icon { font-size: 15px; flex-shrink: 0; }
.dlq-item__meta { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.dlq-item__quality { font-size: 13px; font-weight: 700; }
.dlq-item__lang { font-size: 11.5px; color: var(--muted); }
.dlq-item__chevron { flex-shrink: 0; width: 16px; height: 16px; color: var(--muted); transition: transform 0.22s ease; }
.dlq-item__toggle[aria-expanded="true"] .dlq-item__chevron { transform: rotate(180deg); color: var(--primary); }
.dlq-item__panel { max-height: 0; overflow: hidden; transition: max-height 0.28s ease; }
.dlq-item__panel-inner { padding: 4px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.dlq-server-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface);
}
.dlq-server-row__label { font-size: 12px; color: var(--muted); }
.dlq-server-row__actions { display: flex; gap: 8px; }

@media (min-width: 700px) {
  /* margin: 0 auto was missing, so on wide screens this got capped to
     760px but stayed pinned to the left edge instead of being centered
     — the episodes list, its "All Episodes" controls, and everything
     inside it looked like it was stuck on the left side of the page. */
  .episodes-section { max-width: 760px; margin-left: auto; margin-right: auto; }
}

#addToListBtn.is-active { border-color: var(--primary); color: var(--primary); }

/* Archive filter bar */
.filter-bar {
  display: flex; gap: 8px; overflow-x: auto; padding: 0 var(--space-4) var(--space-3);
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-select {
  flex-shrink: 0;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: var(--radius-sm); padding: 8px 10px; font-size: 12.5px;
}

/* -------------------- Premium Watch / Download buttons -------------------- */
/* Shared by the movie download-options grid and the episode modal rows. */
.btn-watch, .btn-download {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  flex: 1;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700;
  border: none; cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}
.btn-watch svg, .btn-download svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-watch:active, .btn-download:active { transform: scale(0.97); }

.btn-watch {
  background: linear-gradient(135deg, var(--primary-hover), var(--primary));
  color: #fff;
  box-shadow: 0 4px 14px rgba(229, 9, 20, 0.35);
}
.btn-watch:hover { filter: brightness(1.08); }

.btn-download {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-download:hover { border-color: var(--primary); color: var(--primary); background: rgba(229, 9, 20, 0.08); }

.btn-watch.btn-sm, .btn-download.btn-sm { flex: 0 0 auto; padding: 8px 14px; font-size: 12.5px; }

/* Movie download section */
.download-section {
  margin-top: var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.download-section__title {
  font-size: 12px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--muted); margin-bottom: var(--space-3);
}
.download-grid { display: flex; flex-direction: column; gap: 10px; }

/* -------------------- Search page -------------------- */
.search-header { padding: var(--space-5) var(--space-4) var(--space-3); }
.search-header h1 { font-size: 18px; }
.search-header .highlight { color: var(--primary); }

/* -------------------- Static pages -------------------- */
.static-page {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-6) var(--space-4);
}
.static-page h1 { font-size: 24px; margin-bottom: var(--space-4); }
.static-page p { color: var(--muted); line-height: 1.8; margin-bottom: var(--space-3); font-size: 14px; }
.static-page label { display: block; font-size: 13px; font-weight: 600; margin: var(--space-3) 0 6px; }
.static-page input, .static-page textarea {
  width: 100%; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 14px;
}

/* -------------------- Footer -------------------- */
.site-footer {
  margin-top: var(--space-7);
  border-top: 1px solid var(--border);
  padding: var(--space-6) var(--space-4);
}
.footer-links {
  display: flex; flex-wrap: wrap; gap: var(--space-4);
  justify-content: center;
  font-size: 13px; color: var(--muted);
  margin-bottom: var(--space-4);
}
.footer-links a:hover { color: var(--primary); }
.footer-social { display: flex; justify-content: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.footer-social a svg { width: 16px; height: 16px; color: var(--muted); }
.footer-social a:hover { border-color: var(--primary); }
.footer-social a:hover svg { color: var(--primary); }
.footer-copy { text-align: center; font-size: 12px; color: var(--muted); }

/* -------------------- Empty state -------------------- */
.empty-state { text-align: center; padding: var(--space-7) var(--space-4); color: var(--muted); }

/* -------------------- Utility -------------------- */
.no-overflow { overflow-x: hidden; }
