:root {
  --bg: #05070d;
  --bg-2: #090d16;
  --panel: rgba(18, 22, 34, .86);
  --panel-2: rgba(23, 28, 43, .78);
  --line: rgba(165, 132, 255, .22);
  --line-strong: rgba(168, 92, 255, .55);
  --text: #f6f3ff;
  --muted: #a8a9ba;
  --accent: #8b3dff;
  --accent-2: #c756ff;
  --cyan: #39c8ff;
  --gold: #ffc84b;
  --danger: #ff5c83;
  --shadow: 0 18px 48px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(126, 61, 255, .18), transparent 28rem),
    linear-gradient(180deg, #04050a 0%, var(--bg) 40%, #070b13 100%);
  color: var(--text);
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(320px, 1fr) minmax(220px, 390px) auto;
  align-items: center;
  gap: 28px;
  min-height: 78px;
  padding: 0 clamp(18px, 4vw, 56px);
  background: rgba(5, 7, 13, .86);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  font-size: clamp(24px, 2vw, 34px);
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}
.brand b { color: var(--accent-2); }

.top-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 34px);
  font-weight: 700;
}
.top-nav a {
  position: relative;
  color: #d9d8e6;
  padding: 28px 0 25px;
}
.top-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 17px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transform: scaleX(.45);
  transition: .22s ease;
}
.top-nav a:hover, .top-nav .is-active { color: #fff; }
.top-nav a:hover::after, .top-nav .is-active::after { opacity: 1; transform: scaleX(1); }

.quick-search, .search-large {
  display: grid;
  grid-template-columns: 1fr 48px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  background: rgba(18, 22, 34, .92);
  overflow: hidden;
}
.quick-search input, .search-large input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 0 16px;
}
.quick-search button, .search-large button {
  border: 0;
  color: var(--text);
  background: rgba(255, 255, 255, .04);
  cursor: pointer;
  font-size: 24px;
}

.avatar-button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: linear-gradient(145deg, #2f2550, #111827);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.avatar-button span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff, #9b7cff);
  box-shadow: 0 10px 20px rgba(139, 61, 255, .28);
}

.page-shell {
  width: min(100% - 48px, 1800px);
  margin: 0 auto;
  padding: 24px 0 34px;
}

.hero-slider {
  position: relative;
  min-height: clamp(330px, 34vw, 520px);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #090c15;
}
.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  padding: clamp(28px, 5vw, 86px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
  background:
    linear-gradient(90deg, rgba(5, 7, 13, .96) 0%, rgba(5, 7, 13, .72) 38%, rgba(5, 7, 13, .18) 100%),
    var(--hero-image) center / cover no-repeat;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-copy { width: min(610px, 100%); }
.pill, .episode-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(139, 61, 255, .78);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}
.hero-copy h1, .detail-copy h1, .listing-head h1, .search-head h1, .genre-hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(36px, 5vw, 70px);
  line-height: 1.02;
  letter-spacing: 0;
}
.hero-copy p, .detail-copy p, .watch-info p, .about-panel p { color: #dbd8e8; line-height: 1.7; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 9px; color: var(--muted); font-weight: 650; }
.hero-meta span { color: #716e82; }

.action-row, .filter-row, .tab-row, .tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.btn, .filter-row a, .tab-row a, .tag-row a, .pagination a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 8px;
  padding: 0 18px;
  color: #fff;
  background: rgba(255, 255, 255, .05);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.btn.primary, .filter-row .is-active, .tab-row .is-active, .pagination .is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 28px rgba(139, 61, 255, .3);
}
.btn:hover, .filter-row a:hover, .tab-row a:hover, .tag-row a:hover, .pagination a:hover { transform: translateY(-2px); border-color: var(--line-strong); }

.slider-arrow {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: #fff;
  background: rgba(64, 45, 107, .55);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 32px;
}
.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }
.slider-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}
.slider-dots button {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, .25);
}
.slider-dots .is-active { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

.content-section { margin-top: 28px; }
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.section-title h2 {
  margin: 0;
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: 0;
}
.section-title a, .section-title span { color: var(--accent-2); font-weight: 800; }

.film-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}
.compact-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.rank-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.film-card {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 8px;
  background: var(--panel-2);
  overflow: hidden;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.film-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.film-poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #10131e;
}
.film-card:not(.rank-card) .film-poster { aspect-ratio: 3 / 4.15; }
.film-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.film-card:hover img { transform: scale(1.05); }
.score, .episode-badge, .rank-badge {
  position: absolute;
  z-index: 1;
  font-size: 12px;
  font-weight: 850;
}
.score {
  right: 8px;
  bottom: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  color: #fff;
  background: rgba(0, 0, 0, .7);
}
.episode-badge { top: 8px; left: 8px; }
.rank-badge {
  top: 8px;
  left: 8px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #1d142a;
  background: linear-gradient(145deg, #ffdd6c, #ffb536);
}
.film-info { padding: 12px; }
.film-info h3 {
  min-height: 44px;
  margin: 0 0 5px;
  font-size: 15px;
  line-height: 1.35;
}
.film-info p, .muted { margin: 0; color: var(--muted); font-size: 13px; }
.film-info p { display: flex; gap: 6px; flex-wrap: wrap; }

.feature-strip {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 8px;
  background: rgba(18, 22, 34, .62);
}
.feature-strip div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 4px 12px;
  padding: 18px 24px;
  border-right: 1px solid rgba(255, 255, 255, .08);
}
.feature-strip div:last-child { border-right: 0; }
.feature-strip strong {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.feature-strip span { font-weight: 850; }
.feature-strip small { color: var(--muted); }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  margin: 4px 0 18px;
}
.breadcrumb a:last-child { color: #fff; }

.detail-hero, .genre-hero, .about-panel {
  position: relative;
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(7, 10, 18, .94), rgba(7, 10, 18, .72)),
    var(--hero-image) center / cover no-repeat;
  box-shadow: var(--shadow);
}
.detail-hero {
  grid-template-columns: 250px 1fr 170px;
  gap: 28px;
  align-items: center;
  padding: clamp(22px, 4vw, 48px);
}
.detail-poster img { aspect-ratio: 3 / 4.2; width: 100%; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.rating-panel {
  align-self: center;
  min-height: 150px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(16, 20, 32, .72);
}
.rating-panel strong { color: var(--accent-2); font-size: 44px; }
.rating-panel small { color: var(--muted); }

.detail-grid, .info-layout, .search-layout, .watch-layout {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}
.detail-grid { grid-template-columns: minmax(0, 1fr) 360px; }
.glass-panel, .episode-panel, .search-filter {
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  background: var(--panel);
  padding: 20px;
}
.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
  gap: 10px;
}
.episode-grid a {
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 6px;
  background: rgba(255, 255, 255, .04);
}
.episode-grid .is-active, .episode-grid a:hover { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.info-list { display: grid; grid-template-columns: 110px 1fr; gap: 12px; margin: 0; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; }

.watch-layout { grid-template-columns: minmax(0, 1fr) 420px; align-items: start; }
.player-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  background: #02030a;
  box-shadow: var(--shadow);
}
.player-box video, .player-box iframe, .player-empty { width: 100%; height: 100%; }
.player-box iframe {
  display: block;
  border: 0;
  background: #000;
}
.player-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background: radial-gradient(circle at center, rgba(139, 61, 255, .24), transparent 26rem);
}
.player-empty strong { color: #fff; font-size: clamp(22px, 3vw, 34px); }
.watch-info { padding: 22px 0; }
.watch-info h1 { margin: 0 0 12px; font-size: clamp(26px, 3vw, 42px); }

.genre-hero {
  min-height: 250px;
  justify-content: start;
  align-content: center;
  padding: clamp(28px, 5vw, 58px);
}
.genre-hero h1 { margin: 0; }
.genre-hero p, .listing-head p, .search-head p { color: var(--muted); }
.filter-row, .tab-row { margin-top: 18px; }
.genre-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}
.genre-card {
  min-height: 142px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(30, 24, 54, .72), rgba(18, 22, 34, .72));
  transition: .22s ease;
}
.genre-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.genre-card strong { color: var(--accent-2); font-size: 34px; text-shadow: 0 0 22px rgba(199, 86, 255, .6); }
.genre-card span { font-weight: 850; font-size: 18px; }
.genre-card small { color: var(--muted); }
.featured-genres, .policy-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.featured-genres a, .policy-grid a {
  min-height: 96px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 8px;
  padding: 14px;
  background: var(--panel-2);
}
.featured-genres b { color: var(--gold); font-size: 28px; }

.listing-head, .search-head {
  padding: 28px 0 18px;
}
.listing-head h1, .search-head h1 { margin: 0 0 8px; }
.filter-bar {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(140px, 1fr) minmax(160px, 1fr) auto;
  gap: 10px;
  margin: 0 0 18px;
}
.filter-bar input, .filter-bar select {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, .11);
  border-radius: 8px;
  color: var(--text);
  background: rgba(18, 22, 34, .85);
  padding: 0 12px;
}

.search-head { display: grid; gap: 14px; }
.search-large { width: min(100%, 980px); height: 66px; grid-template-columns: 1fr 70px; border-color: var(--line-strong); }
.search-layout { grid-template-columns: 330px 1fr; align-items: start; }
.search-filter .filter-bar { grid-template-columns: 1fr; margin: 0; }
.wide-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.wide-card {
  position: relative;
  display: grid;
  grid-template-columns: 180px 1fr 52px;
  gap: 16px;
  min-height: 170px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 12px;
}
.wide-thumb img { width: 100%; height: 146px; object-fit: cover; border-radius: 7px; }
.wide-card h3 { margin: 6px 0 6px; font-size: 20px; }
.wide-card p { color: #c8c6d4; line-height: 1.55; }
.wide-score { color: var(--gold); }

.info-layout { grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr); align-items: stretch; }
.info-layout.lower { grid-template-columns: .9fr 1.1fr; }
.about-panel {
  min-height: 390px;
  align-content: center;
  padding: clamp(28px, 5vw, 56px);
}
.about-panel h1 { margin: 0; font-size: clamp(42px, 5vw, 72px); }
.about-panel h1 b { color: var(--accent-2); }
.about-panel h2 { color: var(--accent-2); }
.mini-stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.mini-stats span {
  min-width: 124px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  padding: 12px;
  font-weight: 900;
}
.mini-stats small { display: block; color: var(--muted); font-weight: 500; }
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.highlight-grid article {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 170px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  background: var(--panel-2);
  padding: 18px;
  text-align: center;
}
.highlight-grid strong { color: var(--accent-2); font-size: 34px; }
details {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 14px 0;
}
summary { cursor: pointer; font-weight: 800; }
details p { color: var(--muted); }

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 24px 0 0;
}
.pagination a { min-width: 42px; padding: 0 12px; }

.site-footer {
  width: min(100% - 48px, 1800px);
  margin: 0 auto 20px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 22px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 24px 0 0;
  color: var(--muted);
}
.footer-brand { font-size: 24px; }
.site-footer p { max-width: 560px; line-height: 1.6; }
.footer-stats, .site-footer nav { display: flex; flex-wrap: wrap; gap: 14px; }
.site-footer nav a:hover { color: #fff; }
.bottom-nav { display: none; }

@media (max-width: 1180px) {
  .site-header { grid-template-columns: auto 1fr auto; }
  .top-nav { display: none; }
  .quick-search { max-width: 460px; justify-self: end; }
  .film-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rank-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .genre-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .detail-hero, .watch-layout, .detail-grid, .search-layout, .info-layout, .info-layout.lower { grid-template-columns: 1fr; }
  .detail-hero { align-items: start; }
  .detail-poster { width: 220px; }
  .wide-list { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .page-shell, .site-footer { width: min(100% - 28px, 1800px); }
  .site-header {
    grid-template-columns: 1fr auto;
    gap: 12px;
    min-height: 66px;
    padding: 0 14px;
  }
  .quick-search { grid-column: 1 / -1; width: 100%; max-width: none; height: 42px; margin-bottom: 10px; }
  .brand { font-size: 25px; }
  .hero-slider { min-height: 480px; }
  .hero-slide { align-items: end; padding: 24px 18px 58px; background: linear-gradient(0deg, rgba(5, 7, 13, .96), rgba(5, 7, 13, .28)), var(--hero-image) center / cover no-repeat; }
  .slider-arrow { display: none; }
  .film-grid, .rank-grid, .genre-grid, .highlight-grid, .featured-genres, .policy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .film-info h3 { font-size: 14px; min-height: 38px; }
  .feature-strip { grid-template-columns: 1fr; }
  .feature-strip div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
  .feature-strip div:last-child { border-bottom: 0; }
  .detail-hero { padding: 18px; }
  .detail-poster { width: 150px; }
  .rating-panel { min-height: 96px; }
  .episode-panel, .glass-panel, .search-filter { padding: 14px; }
  .filter-bar { grid-template-columns: 1fr; }
  .wide-card { grid-template-columns: 104px 1fr; }
  .wide-score { position: absolute; top: 12px; right: 12px; }
  .wide-thumb img { height: 132px; }
  .site-footer { grid-template-columns: 1fr; padding-bottom: 78px; }
  .bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(10, 13, 22, .94);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow);
  }
  .bottom-nav a {
    min-height: 58px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    color: var(--muted);
    font-size: 18px;
  }
  .bottom-nav span { font-size: 11px; }
}

@media (max-width: 420px) {
  .film-grid, .rank-grid, .genre-grid { gap: 10px; }
  .genre-card { min-height: 118px; }
  .hero-copy h1, .detail-copy h1, .listing-head h1, .search-head h1, .genre-hero h1 { font-size: 34px; }
  .btn { width: 100%; }
}

/* AnimeVN Ads: top banner, catfish, reload 1 IP/hour */
.av-ad {
  color: var(--text);
}
.av-ad-label {
  position: absolute;
  left: 10px;
  top: 8px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 999px;
  color: rgba(255, 255, 255, .78);
  background: rgba(0, 0, 0, .42);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  pointer-events: none;
}
.av-ad-link {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  background: rgba(18, 22, 34, .78);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .28);
}
.av-ad-link img,
.av-ad-custom img,
.av-ad-custom iframe {
  width: 100%;
  max-width: 100%;
  display: block;
}
.av-ad-top {
  position: relative;
  width: min(100% - 48px, 1200px);
  margin: 14px auto 0;
}
.av-ad-top-link {
  aspect-ratio: 10 / 1;
}
.av-ad-top-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.av-catfish {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 80;
  width: min(970px, calc(100% - 28px));
  transform: translateX(-50%);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.av-catfish.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(18px);
  pointer-events: none;
}
.av-ad-catfish-link {
  min-height: 70px;
  border-radius: 12px;
}
.av-ad-catfish-link img {
  width: 100%;
  height: 90px;
  object-fit: cover;
}
.av-ad-close {
  position: absolute;
  right: -10px;
  top: -12px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 50%;
  color: #fff;
  background: rgba(5, 7, 13, .92);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .38);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}
.av-reload-ad {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 3, 8, .76);
  backdrop-filter: blur(8px);
}
.av-reload-ad[hidden] {
  display: none !important;
}
.av-reload-card {
  position: relative;
  width: min(640px, 100%);
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 18px;
  background: rgba(9, 13, 22, .96);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .56);
}
.av-reload-card .av-ad-label {
  left: 22px;
  top: 20px;
}
.av-ad-reload-link {
  border-radius: 14px;
}
.av-ad-reload-link img {
  width: 100%;
  max-height: min(56vh, 420px);
  object-fit: cover;
}
.av-reload-skip {
  width: 100%;
  margin-top: 10px;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  cursor: pointer;
  font-weight: 800;
}
@media (max-width: 860px) {
  .av-ad-top {
    width: min(100% - 24px, 1200px);
    margin-top: 10px;
  }
  .av-ad-top-link {
    aspect-ratio: 6 / 1;
  }
  .av-catfish {
    bottom: 72px;
    width: min(100% - 16px, 970px);
  }
  .av-ad-catfish-link img {
    height: 64px;
  }
  .av-ad-close {
    right: 4px;
    top: -14px;
  }
  .av-reload-card {
    padding: 8px;
  }
}

/* Phase 1: gom danh sách tập theo từng server, tránh trộn tất cả tập vào một khối */
.episode-server-list {
  display: grid;
  gap: 16px;
}
.episode-server-block {
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  background: rgba(255, 255, 255, .025);
  padding: 12px;
}
.server-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.server-heading strong {
  color: var(--text);
  font-size: 15px;
}
.server-heading span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.server-heading.is-active strong {
  color: var(--accent-2);
}
.episode-empty {
  padding: 14px;
  border: 1px dashed rgba(255, 255, 255, .18);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}
@media (max-width: 720px) {
  .episode-server-block { padding: 10px; }
  .server-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .episode-panel .episode-grid { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
}

/* Phase 2+ SEO landing content */
.seo-landing-head p { max-width: 860px; }
.seo-copy, .seo-faq { margin: 18px 0; }
.seo-copy p { margin: 0 0 12px; color: #d9d5e9; line-height: 1.75; }
.seo-copy p:last-child { margin-bottom: 0; }
.seo-faq details { border-top: 1px solid rgba(255,255,255,.08); padding: 14px 0; }
.seo-faq details:first-of-type { border-top: 0; }
.seo-faq summary { cursor: pointer; font-weight: 800; }
.seo-faq p { color: var(--muted); line-height: 1.7; }

/* Phase 3-7 SEO production additions */
.seo-copy{margin:22px 0;padding:22px;border-radius:22px;line-height:1.75}
.seo-copy h2,.seo-faq h2{margin:0 0 12px;font-size:1.25rem}
.seo-copy p{margin:0 0 12px;color:var(--muted,#c9d1e3)}
.seo-copy p:last-child{margin-bottom:0}
.seo-faq{margin:22px 0;padding:20px;border-radius:22px}
.seo-faq details{border-top:1px solid rgba(255,255,255,.08);padding:13px 0}
.seo-faq details:first-of-type{border-top:0}
.seo-faq summary{cursor:pointer;font-weight:700;color:#fff}
.seo-faq p{margin:10px 0 0;color:var(--muted,#c9d1e3);line-height:1.65}
.episode-next-prev{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:18px 0;padding:14px;border-radius:18px}
.episode-next-prev .btn{min-width:120px;text-align:center}
.film-seo-copy,.watch-seo-copy{content-visibility:auto;contain-intrinsic-size:1px 320px}
@media(max-width:640px){.seo-copy,.seo-faq{padding:16px;border-radius:16px}.episode-next-prev{position:sticky;bottom:74px;z-index:20;background:rgba(13,18,31,.9);backdrop-filter:blur(14px)}}

/* Phase A-K runtime UX / internal links */
.runtime-link-hub { margin-top: 20px; }
.runtime-link-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.runtime-link-grid a { display: block; padding: 10px 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: rgba(255,255,255,.04); color: inherit; text-decoration: none; }
.runtime-link-grid a:hover { background: rgba(255,255,255,.08); }
body.lights-off::before { content: ""; position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.82); pointer-events: none; }
body.lights-off .site-header, body.lights-off .site-footer, body.lights-off .bottom-nav, body.lights-off .av-ad { opacity: .08; }
body.lights-off [data-player-box] { position: relative; z-index: 21; box-shadow: 0 0 0 9999px rgba(0,0,0,.82); }
body.lights-off .watch-info { position: relative; z-index: 21; }
