:root {
  --ink: #f6f4ee;
  --muted: #aab9b5;
  --bg: #031b18;
  --bg-soft: #072521;
  --panel: #0b2d28;
  --line: rgba(169, 218, 204, 0.16);
  --accent: #48d7ba;
  --accent-dark: #0a927c;
  --amber: #f5bf69;
  --danger: #ff6d5f;
  --max: 1180px;
  --radius: 22px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 82% 6%, rgba(72, 215, 186, 0.09), transparent 25rem),
    linear-gradient(180deg, #031713 0%, var(--bg) 34%, #021411 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .7rem 1rem; background: var(--accent); color: #021411; border-radius: 99px; }
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 23, 19, .9);
  backdrop-filter: blur(18px);
}

.header-inner, .page-shell, .site-footer__inner { width: min(calc(100% - 32px), var(--max)); margin-inline: auto; }
.header-inner { min-height: 76px; display: grid; grid-template-columns: auto minmax(240px, 560px) auto; gap: 26px; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 850; letter-spacing: -.03em; white-space: nowrap; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 13px; background: linear-gradient(145deg, var(--accent), #1ca28c); color: #04201b; box-shadow: 0 8px 22px rgba(36, 196, 168, .18); }
.brand-mark svg { width: 22px; }
.search { position: relative; }
.search svg { position: absolute; left: 15px; top: 50%; width: 20px; transform: translateY(-50%); color: #7b928c; pointer-events: none; }
.search input { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 15px; padding: 0 16px 0 45px; background: rgba(0, 14, 12, .72); color: var(--ink); outline: none; }
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(72, 215, 186, .12); }
.nav { display: flex; align-items: center; gap: 20px; }
.nav a { text-decoration: none; color: #d5dfdc; font-weight: 700; font-size: .93rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }
.menu-button { display: none; border: 0; background: transparent; color: var(--ink); padding: 8px; }

.page-shell { padding-block: 34px 76px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-weight: 850; font-size: .77rem; }
h1, h2, h3 { line-height: 1.14; letter-spacing: -.035em; }
h1 { font-size: clamp(2.35rem, 7vw, 5.5rem); margin: 0; }
h2 { font-size: clamp(1.55rem, 3vw, 2.3rem); margin: 0; }
h3 { font-size: 1.16rem; margin: 0; }
.muted { color: var(--muted); }

.hero { position: relative; min-height: 510px; overflow: hidden; border: 1px solid var(--line); border-radius: 30px; background: #071f1b; isolation: isolate; display: flex; align-items: flex-end; }
.hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 36%; opacity: .78; z-index: -2; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(1, 14, 12, .98) 0%, rgba(1, 14, 12, .8) 43%, rgba(1, 14, 12, .12) 80%), linear-gradient(0deg, rgba(1, 14, 12, .84), transparent 58%); }
.hero__content { width: min(680px, 92%); padding: clamp(28px, 6vw, 70px); }
.hero__content h1 { max-width: 11ch; }
.hero__content p:not(.eyebrow) { max-width: 60ch; color: #cad7d3; font-size: 1.05rem; }
.meta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 25px; }
.chip { display: inline-flex; align-items: center; min-height: 30px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; color: #d3e1dd; background: rgba(4, 30, 25, .55); font-size: .82rem; font-weight: 750; }
.chip--accent { border-color: transparent; background: var(--accent); color: #032019; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; gap: 8px; border: 1px solid var(--line); border-radius: 13px; padding: 0 18px; text-decoration: none; font-weight: 820; background: rgba(6, 35, 30, .75); }
.button:hover { border-color: rgba(72, 215, 186, .5); }
.button--primary { border-color: transparent; background: var(--accent); color: #032019; }
.button--primary:hover { background: #6ce2ca; }

.section { margin-top: 58px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-heading p { margin: 5px 0 0; color: var(--muted); }
.text-link { color: var(--accent); text-decoration: none; font-weight: 800; }
.film-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.film-card { min-width: 0; }
.film-card__poster { position: relative; aspect-ratio: 2 / 3; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.film-card__poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, filter .4s ease; }
.film-card:hover .film-card__poster img { transform: scale(1.035); filter: saturate(1.08); }
.film-card__poster .status { position: absolute; top: 14px; left: 14px; z-index: 2; padding: 5px 10px; border-radius: 9px; background: var(--danger); color: white; font-size: .76rem; font-weight: 900; letter-spacing: .04em; }
.film-card__body { padding: 15px 2px 0; }
.film-card__body a { text-decoration: none; }
.film-card__body p { margin: 6px 0 0; color: var(--muted); font-size: .91rem; }

.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: rgba(7, 37, 33, .55); }
.value { padding: 25px; border-right: 1px solid var(--line); }
.value:last-child { border-right: 0; }
.value strong { display: block; color: var(--amber); font-size: 1.7rem; }
.value span { color: var(--muted); }

.ad-slot { min-height: 100px; display: grid; place-items: center; margin-top: 44px; border: 1px dashed rgba(170, 185, 181, .28); border-radius: 16px; color: #82938f; background: rgba(0, 12, 10, .22); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; }

.watch-section { scroll-margin-top: 100px; }
.watch-section__head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 18px; }
.watch-section__head h2 { margin: 0; }
.video-player { width: min(100%, 1100px); margin-inline: auto; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: #000; box-shadow: 0 28px 80px rgba(0,0,0,.35); }
.video-player--wide { aspect-ratio: 16 / 9; }
.video-player--vertical { width: min(100%, 520px); aspect-ratio: 9 / 16; }
.video-player--square { width: min(100%, 720px); aspect-ratio: 1; }
.video-player iframe, .video-player video { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; }

.detail-hero { display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); gap: clamp(30px, 6vw, 76px); align-items: center; }
.detail-poster { aspect-ratio: 2 / 3; overflow: hidden; border-radius: 28px; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.detail-poster img { width: 100%; height: 100%; object-fit: cover; }
.detail-copy h1 { font-size: clamp(2.5rem, 6vw, 4.8rem); }
.lede { color: #cfdbd8; font-size: 1.08rem; max-width: 68ch; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; align-items: start; }
.prose { color: #d7e0de; }
.prose h2 { margin-top: 2.1rem; }
.prose p { max-width: 75ch; }
.script-box { margin-top: 20px; padding: 24px; border-left: 3px solid var(--accent); border-radius: 0 16px 16px 0; background: rgba(7, 37, 33, .75); }
.script-box p { margin: 0 0 12px; }
.script-box p:last-child { margin: 0; }
.episode-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.episode-list a, .episode-list .pending { display: flex; justify-content: space-between; gap: 14px; align-items: center; min-height: 52px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 13px; text-decoration: none; background: rgba(4, 28, 24, .7); }
.episode-list a:hover { border-color: var(--accent); }
.episode-list small { color: var(--muted); }
.sidebar-card { padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: rgba(7, 37, 33, .66); }
.sidebar-card + .sidebar-card { margin-top: 16px; }
.sidebar-card dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 16px 0 0; }
.sidebar-card dt { color: var(--muted); }
.sidebar-card dd { margin: 0; text-align: right; }

.content-page { max-width: 820px; margin-inline: auto; }
.content-page h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); margin-bottom: 22px; }
.content-page h2 { margin-top: 2.4rem; }
.content-page p, .content-page li { color: #cdd9d6; }
.notice { padding: 18px 20px; border: 1px solid rgba(245, 191, 105, .3); border-radius: 16px; background: rgba(245, 191, 105, .07); color: #efd8b1; }

.site-footer { border-top: 1px solid var(--line); background: #02120f; }
.site-footer__inner { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 44px; padding-block: 42px; }
.site-footer p { color: var(--muted); margin: 12px 0 0; max-width: 48ch; }
.footer-links { display: grid; gap: 8px; align-content: start; }
.footer-links strong { margin-bottom: 6px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.copyright { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--line); color: #7f928d; font-size: .84rem; }
.no-results { grid-column: 1 / -1; padding: 28px; border: 1px dashed var(--line); border-radius: 16px; color: var(--muted); text-align: center; }

@media (max-width: 900px) {
  .header-inner { grid-template-columns: auto 1fr auto; gap: 14px; }
  .nav { display: none; position: absolute; inset: 77px 16px auto; padding: 18px; flex-direction: column; align-items: stretch; border: 1px solid var(--line); border-radius: 16px; background: #05221d; box-shadow: 0 18px 55px rgba(0,0,0,.35); }
  .nav.is-open { display: flex; }
  .menu-button { display: inline-grid; place-items: center; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-layout aside { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .sidebar-card + .sidebar-card { margin-top: 0; }
}

@media (max-width: 700px) {
  .header-inner { min-height: 68px; grid-template-columns: auto auto; justify-content: space-between; }
  .brand span:last-child { display: none; }
  .search { grid-column: 1 / -1; grid-row: 2; padding-bottom: 12px; }
  .hero { min-height: 520px; border-radius: 22px; }
  .hero::after { background: linear-gradient(0deg, rgba(1,14,12,.98) 0%, rgba(1,14,12,.64) 65%, rgba(1,14,12,.18) 100%); }
  .hero__content { padding: 26px; }
  .film-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 13px; }
  .film-card__poster { border-radius: 16px; }
  .film-card__body p { font-size: .82rem; }
  .value-grid { grid-template-columns: 1fr; }
  .value { border-right: 0; border-bottom: 1px solid var(--line); }
  .value:last-child { border-bottom: 0; }
  .detail-hero { grid-template-columns: 110px minmax(0, 1fr); gap: 20px; align-items: start; }
  .detail-poster { border-radius: 15px; }
  .detail-copy h1 { font-size: clamp(2rem, 10vw, 3.2rem); }
  .detail-copy .lede { grid-column: 1 / -1; }
  .detail-layout aside { grid-template-columns: 1fr; }
  .site-footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .copyright { grid-column: auto; }
  .watch-section__head { align-items: flex-start; flex-direction: column; }
  .video-player { border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

.hero--empty { min-height: 380px; align-items: center; background: radial-gradient(circle at 75% 20%, rgba(72,215,186,.18), transparent 40%), var(--panel); }
.hero--empty::after { background: linear-gradient(90deg, rgba(1,14,12,.95), rgba(1,14,12,.18)); }
.poster-placeholder { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(145deg, #103b34, #051d19); color: rgba(246,244,238,.35); font-size: 3rem; }
.empty-state { padding: 40px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; color: var(--muted); background: rgba(7,37,33,.45); }
.content-section { margin-top: 34px; }
.content-section h2 { margin-bottom: 12px; }
.content-section .text-block { white-space: pre-line; color: #d7e0de; max-width: 78ch; }
.episode-summary { margin: 6px 0 0; color: var(--muted); font-size: .86rem; }
.episode-list a[aria-disabled="true"] { opacity: .7; pointer-events: none; }
.search-results-title { margin-bottom: 20px; }
