:root {
  color-scheme: dark;
  --bg: #07090d;
  --panel: #111722;
  --panel-2: #171f2e;
  --ink: #f6f0e8;
  --muted: #aab3c3;
  --line: rgba(255, 255, 255, 0.12);
  --gold: #f3c75d;
  --red: #e4464f;
  --cyan: #35c7d9;
  --green: #77c96b;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(228, 70, 79, 0.24), transparent 30rem),
    radial-gradient(circle at 92% 10%, rgba(53, 199, 217, 0.18), transparent 26rem),
    linear-gradient(180deg, #080a0f 0%, #0d111a 48%, #07090d 100%);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  letter-spacing: 0;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 16px clamp(18px, 4vw, 52px);
  background: rgba(7, 9, 13, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 162px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-weight: 900;
  font-size: 22px;
}

.brand b { display: block; font-size: 20px; }
.brand em { display: block; color: var(--muted); font-size: 11px; font-style: normal; margin-top: 2px; }

.main-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav a,
.header-cta,
.btn,
.filter-tabs button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border: 1px solid var(--line);
}

.main-nav a {
  padding: 0 14px;
  color: #d8dfeb;
  background: rgba(255, 255, 255, 0.035);
}

.main-nav a.active,
.main-nav a:hover {
  border-color: rgba(243, 199, 93, 0.72);
  color: #fff;
  background: rgba(243, 199, 93, 0.12);
}

.header-cta {
  padding: 0 16px;
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  font-weight: 700;
}

main { overflow: hidden; }

.cinema-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.52fr) minmax(260px, 0.42fr);
  gap: 22px;
  min-height: 660px;
  padding: clamp(28px, 5vw, 72px) clamp(18px, 4vw, 52px) 38px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.22;
  background-position: center;
  background-size: cover;
  filter: saturate(1.1);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #07090d 0%, rgba(7, 9, 13, 0.72) 45%, rgba(7, 9, 13, 0.94) 100%);
}

.hero-copy,
.hero-feature,
.hero-rank,
.showcase,
.split-board,
.catalog-hero,
.catalog-tools,
.catalog-layout,
.detail-root {
  position: relative;
  z-index: 1;
}

.hero-copy {
  align-self: center;
  max-width: 760px;
}

.label {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

h1, h2, h3, p { margin-top: 0; }

.hero-copy h1 {
  max-width: 720px;
  margin-bottom: 18px;
  font-size: clamp(38px, 6.3vw, 82px);
  line-height: 1.02;
}

.hero-text {
  max-width: 690px;
  color: #d2d8e2;
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0;
}

.btn {
  padding: 0 18px;
  font-weight: 800;
}

.btn-primary { background: var(--gold); border-color: var(--gold); color: #111; }
.btn-muted { background: rgba(255, 255, 255, 0.08); color: #fff; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(88px, 1fr));
  gap: 10px;
  max-width: 560px;
}

.stat {
  padding: 14px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
}

.stat b { display: block; font-size: 24px; color: #fff; }
.stat span { color: var(--muted); font-size: 12px; }

.hero-feature {
  align-self: end;
  min-height: 560px;
}

.feature-card {
  position: sticky;
  top: 92px;
  overflow: hidden;
  height: 560px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.feature-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feature-card .feature-copy {
  position: absolute;
  inset: auto 0 0;
  padding: 22px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.9));
}

.feature-copy small,
.card-copy small,
.rank-item small,
.wide-item small,
.doc-item small,
.detail-meta span {
  color: var(--muted);
}

.feature-copy h2 { margin-bottom: 8px; font-size: 28px; }
.feature-copy p { color: #d5dce7; line-height: 1.7; }

.hero-rank {
  align-self: end;
  padding: 18px;
  min-height: 560px;
  background: rgba(17, 23, 34, 0.82);
  border: 1px solid var(--line);
}

.panel-head,
.section-title,
.catalog-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.panel-head {
  align-items: center;
  margin-bottom: 14px;
}

.panel-head span { font-weight: 900; font-size: 20px; }
.panel-head a, .section-title a { color: var(--gold); font-weight: 800; }

.rank-item {
  display: grid;
  grid-template-columns: 30px 58px 1fr;
  gap: 10px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.rank-item .num { color: var(--gold); font-weight: 900; }
.rank-item img { width: 58px; height: 78px; object-fit: cover; }
.rank-item b { display: block; margin: 2px 0; }
.rank-item em { color: var(--red); font-style: normal; font-size: 12px; }

.keyword-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 0 clamp(18px, 4vw, 52px);
  border: 1px solid var(--line);
  background: var(--line);
}

.keyword-strip a {
  min-height: 116px;
  padding: 22px;
  background: #0d131d;
}

.keyword-strip b { display: block; margin-bottom: 8px; font-size: 20px; color: #fff; }
.keyword-strip span { color: var(--muted); line-height: 1.6; }

.showcase,
.split-board,
.catalog-hero,
.catalog-tools,
.catalog-layout,
.detail-root {
  width: min(1480px, calc(100% - 36px));
  margin: 34px auto;
}

.section-title {
  margin-bottom: 18px;
}

.section-title h2 { margin: 0; font-size: clamp(25px, 3.6vw, 44px); }
.section-title.compact h2 { font-size: 30px; }

.poster-mosaic,
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
}

.poster-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 14px;
}

.poster-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: transform .2s ease, border-color .2s ease;
}

.poster-card:hover {
  transform: translateY(-4px);
  border-color: rgba(243, 199, 93, 0.6);
}

.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  background: #111;
}

.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.poster span {
  position: absolute;
  left: 9px;
  top: 9px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 12px;
}

.card-copy {
  min-height: 126px;
  padding: 12px;
}

.card-copy h3 {
  margin: 6px 0;
  font-size: 17px;
  line-height: 1.32;
}

.card-copy p {
  min-height: 18px;
  margin-bottom: 10px;
  color: #ced6e3;
  font-size: 12px;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  color: var(--gold);
  font-weight: 800;
}

.split-board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.wide-list,
.episode-board,
.doc-grid {
  display: grid;
  gap: 12px;
}

.wide-item,
.episode-item,
.doc-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 136px;
  padding: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
}

.wide-item img,
.episode-item img,
.doc-item img {
  width: 96px;
  height: 128px;
  object-fit: cover;
}

.wide-item h3,
.episode-item h3,
.doc-item h3 {
  margin: 6px 0;
  font-size: 20px;
}

.wide-item p,
.episode-item p,
.doc-item p {
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 0;
}

.doc-grid {
  grid-template-columns: repeat(4, 1fr);
}

.doc-item {
  grid-template-columns: 86px 1fr;
}

.doc-item img {
  width: 86px;
  height: 114px;
}

.documentary {
  padding-bottom: 30px;
}

.catalog-hero {
  padding: clamp(36px, 6vw, 78px);
  border: 1px solid var(--line);
  background:
    linear-gradient(110deg, rgba(228, 70, 79, 0.28), transparent 45%),
    linear-gradient(135deg, #111722, #080a0f);
}

.catalog-hero h1 {
  margin-bottom: 14px;
  font-size: clamp(38px, 7vw, 76px);
}

.catalog-hero p {
  max-width: 760px;
  color: #d3dbe7;
  line-height: 1.75;
  font-size: 18px;
}

.catalog-tools {
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  background: rgba(17, 23, 34, 0.82);
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-tabs button {
  padding: 0 14px;
  color: #fff;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.055);
}

.filter-tabs button.active {
  color: #121212;
  background: var(--gold);
  border-color: var(--gold);
}

.sort-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.sort-box select {
  min-height: 40px;
  padding: 0 12px;
  color: #fff;
  background: #0b1018;
  border: 1px solid var(--line);
}

.catalog-layout {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 20px;
  align-items: start;
}

.catalog-aside {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
}

.aside-card,
.aside-links {
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.aside-card h2 { margin-bottom: 12px; }
.aside-card p { color: var(--muted); line-height: 1.7; }
.aside-card strong { display: block; color: var(--gold); font-size: 28px; }

.aside-links {
  display: grid;
  gap: 10px;
}

.aside-links a {
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.055);
  color: #e4e9f2;
}

.detail-root {
  display: grid;
  grid-template-columns: minmax(240px, 360px) 1fr;
  gap: clamp(22px, 4vw, 48px);
  align-items: end;
  min-height: 620px;
  padding: clamp(24px, 5vw, 58px);
  border: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(7, 9, 13, 0.92), rgba(7, 9, 13, 0.68)),
    var(--detail-bg, linear-gradient(135deg, #151b27, #090c12));
  background-size: cover;
  background-position: center;
}

.detail-poster {
  overflow: hidden;
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-copy h1 {
  margin-bottom: 12px;
  font-size: clamp(40px, 6vw, 82px);
  line-height: 1.04;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 8px 11px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.34);
}

.detail-copy p {
  max-width: 860px;
  color: #d9e0ea;
  font-size: 18px;
  line-height: 1.85;
}

.site-footer {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 26px;
  padding: 38px clamp(18px, 4vw, 52px);
  border-top: 1px solid var(--line);
  background: #05070a;
}

.site-footer b { font-size: 24px; }
.site-footer p { color: var(--muted); line-height: 1.75; }
.site-footer h3 { margin-bottom: 12px; color: var(--gold); }
.site-footer a { display: block; margin: 9px 0; color: #d8dfeb; }

.empty {
  padding: 30px;
  border: 1px solid var(--line);
  color: var(--muted);
}

@media (max-width: 1180px) {
  .site-header { grid-template-columns: 1fr auto; }
  .main-nav { grid-column: 1 / -1; justify-content: flex-start; }
  .cinema-hero { grid-template-columns: 1fr 330px; }
  .hero-rank { grid-column: 1 / -1; min-height: auto; }
  .poster-mosaic, .catalog-grid { grid-template-columns: repeat(4, 1fr); }
  .poster-row { grid-template-columns: repeat(5, 1fr); }
  .keyword-strip { grid-template-columns: repeat(2, 1fr); }
  .doc-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .site-header { gap: 12px; }
  .header-cta { display: none; }
  .cinema-hero,
  .split-board,
  .catalog-layout,
  .detail-root,
  .site-footer {
    grid-template-columns: 1fr;
  }
  .hero-feature,
  .feature-card { min-height: 420px; height: 420px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .poster-mosaic, .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .poster-row { grid-template-columns: repeat(2, 1fr); }
  .keyword-strip, .doc-grid { grid-template-columns: 1fr; }
  .catalog-aside { position: static; }
  .catalog-tools { align-items: stretch; flex-direction: column; }
}

@media (max-width: 520px) {
  .site-header { padding: 12px; }
  .brand-mark { width: 38px; height: 38px; }
  .main-nav a { padding: 0 11px; }
  .cinema-hero { padding-inline: 12px; }
  .showcase, .split-board, .catalog-hero, .catalog-tools, .catalog-layout, .detail-root { width: calc(100% - 24px); }
  .wide-item, .episode-item, .doc-item { grid-template-columns: 76px 1fr; }
  .wide-item img, .episode-item img, .doc-item img { width: 76px; height: 104px; }
}
