:root {
  color-scheme: dark;
  --ink: #080806;
  --panel: #11100d;
  --cream: #eee5d1;
  --muted: #9b9486;
  --gold: #d4a64e;
  --gold-soft: #80652f;
  --line: rgba(212, 166, 78, .24);
  --success: #93b39a;
  --serif: "Songti SC", "Noto Serif CJK SC", STSong, Georgia, serif;
  --sans: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: radial-gradient(circle at 76% 8%, rgba(166,111,34,.11), transparent 30rem), var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  margin: 0;
  min-height: 100vh;
}
button, input, select { font: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.shell { margin: 0 auto; width: min(1480px, calc(100% - 48px)); }
.sr-only { clip: rect(0 0 0 0); position: absolute; }

.nav {
  align-items: center;
  display: grid;
  grid-template-columns: 270px 1fr auto;
  min-height: 88px;
}
.brand { align-items: center; color: var(--gold); display: inline-flex; gap: 12px; text-decoration: none; }
.brand-name { font-family: var(--serif); font-size: 24px; letter-spacing: .08em; }
.brand-mark { border: 1px solid var(--gold); border-radius: 50%; display: grid; height: 44px; place-items: center; width: 44px; }
.brand-mark span { background: var(--gold); height: 1px; transform: rotate(34deg); width: 53px; }
.nav-links { display: flex; gap: 42px; }
.nav-links a { color: #c5bcaa; font-family: var(--serif); padding: 33px 0 24px; text-decoration: none; }
.nav-links a.active { color: var(--cream); }
.search-open {
  background: var(--gold); border: 0; border-radius: 50%; color: #17120a;
  cursor: pointer; font-size: 26px; height: 46px; width: 46px;
}

.hero {
  background:
    linear-gradient(90deg, rgba(8,8,6,.98), rgba(8,8,6,.70) 45%, rgba(8,8,6,.35)),
    linear-gradient(0deg, #080806, transparent 45%),
    url("/assets/hero.webp") center / cover;
  border-bottom: 1px solid var(--line);
  min-height: 665px;
}
.hero-inner { min-height: 665px; padding: 64px 0 45px; position: relative; }
.eyebrow { color: var(--gold); font-family: var(--serif); letter-spacing: .18em; margin: 0 0 16px; }
h1 { font-family: var(--serif); font-size: clamp(54px, 6.4vw, 92px); font-weight: 500; line-height: 1.09; margin: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-stat { background: rgba(10,9,7,.68); border: 1px solid var(--line); border-radius: 999px; color: #c9c0ae; flex: 0 0 auto; padding: 10px 16px; }
.hero-stat strong { color: var(--gold); font-family: var(--serif); font-size: 18px; margin-right: 6px; }
.featured { border-top: 1px solid var(--line); bottom: 44px; max-width: 560px; padding-top: 18px; position: absolute; }
.feature-kicker { color: var(--gold); font-size: 11px; letter-spacing: .2em; }
.feature-title { font-family: var(--serif); font-size: 31px; margin: 8px 0; }
.feature-meta { color: var(--muted); line-height: 1.7; }

.section { padding: 78px 0; }
.section-head { align-items: end; display: flex; justify-content: space-between; margin-bottom: 26px; }
.section-title { font-family: var(--serif); font-size: clamp(34px, 4vw, 53px); font-weight: 500; margin: 0; }
.section-note { color: var(--muted); }
.update-stamp { color: var(--gold); font-size: 11px; letter-spacing: .16em; }
.controls {
  align-items: center; backdrop-filter: blur(14px); background: rgba(18,16,12,.84);
  border: 1px solid var(--line); border-radius: 12px; display: flex; flex-wrap: wrap;
  gap: 10px; margin-bottom: 28px; padding: 12px; position: sticky; top: 10px; z-index: 5;
}
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-btn { background: transparent; border: 1px solid transparent; border-radius: 999px; color: #a9a293; cursor: pointer; padding: 8px 13px; }
.filter-btn:hover, .filter-btn.active { border-color: var(--gold-soft); color: var(--gold); }
.control-sep { background: var(--line); height: 26px; width: 1px; }
.results-count { color: var(--muted); margin-left: auto; }
.sort-select { background: #0c0b09; border: 1px solid var(--line); border-radius: 999px; color: #c9c0ae; padding: 8px 13px; }
.status-panel { border: 1px dashed var(--line); color: var(--muted); padding: 50px 20px; text-align: center; }
.status-panel[hidden] { display: none; }
.movie-grid { display: grid; gap: 22px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.movie-card {
  background: linear-gradient(180deg, rgba(24,21,16,.92), rgba(12,11,9,.98));
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  transition: transform .25s ease, border-color .25s ease;
}
.movie-card:hover { border-color: rgba(212,166,78,.65); transform: translateY(-5px); }
.poster { aspect-ratio: 2 / 3; background: var(--fallback); overflow: hidden; position: relative; }
.poster img { height: 100%; object-fit: cover; width: 100%; }
.poster::after { background: linear-gradient(transparent 42%, rgba(8,8,6,.92)); content: ""; inset: 0; position: absolute; }
.poster-title { bottom: 18px; font-family: var(--serif); font-size: clamp(25px, 2.1vw, 36px); left: 18px; position: absolute; right: 18px; z-index: 1; }
.poster-type { background: rgba(8,8,6,.76); border: 1px solid var(--line); border-radius: 999px; left: 12px; padding: 6px 9px; position: absolute; top: 12px; z-index: 1; }
.card-body { padding: 19px; }
.card-meta { color: var(--muted); line-height: 1.65; }
.card-summary { color: #c0b8a8; font-family: var(--serif); line-height: 1.7; min-height: 72px; }
.metric-row { display: grid; gap: 7px; grid-template-columns: repeat(3, 1fr); margin-top: 15px; }
.metric { border-top: 1px solid var(--line); padding-top: 9px; }
.metric span { color: var(--muted); display: block; font-size: 10px; }
.metric b { color: var(--gold); font-family: var(--serif); font-size: 20px; }
.card-foot { align-items: center; display: flex; justify-content: space-between; margin-top: 18px; }
.reason { color: var(--success); font-size: 11px; }
.detail-btn { background: none; border: 0; color: var(--gold); cursor: pointer; }

footer { border-top: 1px solid var(--line); color: var(--muted); padding: 28px 0 45px; }
.footer-row { display: flex; justify-content: space-between; }
.search-panel { background: rgba(8,8,6,.98); display: none; inset: 0; padding: 34px; position: fixed; z-index: 30; }
.search-panel.open { display: grid; place-items: center; }
.search-box { max-width: 850px; width: 100%; }
.search-label { color: var(--gold); letter-spacing: .18em; }
.search-input { background: transparent; border: 0; border-bottom: 1px solid var(--gold-soft); color: var(--cream); font-family: var(--serif); font-size: clamp(34px, 6vw, 70px); margin-top: 16px; padding: 14px 0; width: 100%; }
.search-help { color: var(--muted); }
.search-close { background: none; border: 1px solid var(--line); border-radius: 50%; color: var(--cream); cursor: pointer; font-size: 24px; height: 44px; position: absolute; right: 34px; top: 30px; width: 44px; }
dialog { background: var(--panel); border: 1px solid var(--gold-soft); border-radius: 14px; color: var(--cream); max-width: 620px; padding: 0; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(0,0,0,.78); }
.dialog-inner { padding: 28px; }
.dialog-top { align-items: start; display: flex; justify-content: space-between; }
.dialog-title { font-family: var(--serif); font-size: 32px; margin: 8px 0; }
.dialog-close { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 25px; }
.dialog-copy { color: #bbb2a2; font-family: var(--serif); line-height: 1.85; }
.dialog-genres { color: var(--gold); }

@media (max-width: 900px) {
  .nav { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
  .movie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .shell { width: min(100% - 28px, 1480px); }
  .hero, .hero-inner { min-height: 610px; }
  .hero-actions { display: grid; grid-template-columns: max-content max-content; }
  .hero-stat:last-child { grid-column: 1 / -1; width: fit-content; }
  .section-head, .footer-row { align-items: start; flex-direction: column; gap: 14px; }
  .movie-grid { grid-template-columns: 1fr; }
  .results-count { margin-left: 0; }
}
