:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  --bg: #07110f;
  --panel: #0d1b18;
  --panel-2: #122520;
  --paper: #f2eadb;
  --ink: #f8f3e8;
  --muted: #aebdb6;
  --line: rgba(242,234,219,.14);
  --red: #e14d3f;
  --gold: #e8bd69;
  --green: #3fbf9f;
  --blue: #75a7ff;
  --shadow: 0 28px 80px rgba(0,0,0,.46);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(242,234,219,.035) 1px, transparent 1px 56px),
    linear-gradient(0deg, rgba(242,234,219,.025) 1px, transparent 1px 56px),
    radial-gradient(circle at 12% 8%, rgba(225,77,63,.18), transparent 28%),
    radial-gradient(circle at 84% 10%, rgba(63,191,159,.14), transparent 24%),
    linear-gradient(145deg, #07110f 0%, #0d1917 48%, #050908 100%);
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; }
h1, h2, h3, p, figure { margin-top: 0; }
button, select { font: inherit; }

.topline {
  width: min(1700px, calc(100% - 28px));
  margin: 16px auto 0;
  min-height: 76px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  background: rgba(7,17,15,.88);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: sticky;
  top: 12px;
  z-index: 10;
  backdrop-filter: blur(16px);
}
.brand {
  display: grid;
  gap: 2px;
  padding: 10px 16px;
  color: #180b08;
  background: var(--gold);
  border-left: 6px solid var(--red);
}
.brand strong {
  font-size: 1.52rem;
  line-height: 1;
}
.brand span {
  font-size: .74rem;
  font-weight: 950;
  text-transform: uppercase;
}
.topline nav {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.topline nav a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  color: var(--muted);
  border: 1px solid transparent;
  white-space: nowrap;
  font-weight: 900;
}
.topline nav a.active,
.topline nav a:hover {
  color: var(--paper);
  border-color: rgba(225,77,63,.45);
  background: rgba(225,77,63,.16);
}

.page {
  width: min(1700px, 100%);
  margin: 0 auto;
  padding: clamp(16px, 2vw, 32px);
  display: grid;
  gap: clamp(18px, 2vw, 30px);
}
.hero {
  display: grid;
  grid-template-columns: minmax(360px, .95fr) minmax(480px, 1.15fr);
  gap: 16px;
  align-items: stretch;
}
.hero-copy,
.hero-feature,
.section,
.library-hero,
.filter-bar,
.detail-stage,
.footer {
  background: linear-gradient(145deg, rgba(18,37,32,.96), rgba(8,18,16,.96));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero-copy {
  min-height: 520px;
  padding: clamp(28px, 5vw, 78px);
  display: grid;
  align-content: center;
  position: relative;
  overflow: hidden;
}
.hero-copy::after {
  content: "JAPAN FILM";
  position: absolute;
  left: 24px;
  bottom: 12px;
  color: rgba(242,234,219,.055);
  font-size: clamp(3.2rem, 9vw, 9rem);
  font-weight: 950;
  line-height: .8;
}
.eyebrow {
  margin-bottom: 10px;
  color: var(--gold);
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}
h1 {
  max-width: 920px;
  margin-bottom: 14px;
  font-size: clamp(2.55rem, 6vw, 6.4rem);
  line-height: .94;
}
h2 {
  margin-bottom: 0;
  font-size: clamp(1.3rem, 2vw, 2.2rem);
  line-height: 1.12;
}
h3 { line-height: 1.18; }
.hero-copy p,
.hero-feature p,
.section p,
.library-hero p,
.detail-copy p,
.footer p,
.rank-row small {
  color: var(--muted);
  line-height: 1.72;
}
.hero-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.action,
.ghost {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  font-weight: 950;
  border: 1px solid var(--line);
}
.action {
  color: #180b08;
  background: var(--gold);
  border-color: var(--gold);
}
.ghost {
  color: var(--paper);
  background: rgba(242,234,219,.06);
}

.hero-feature {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(240px, .62fr) minmax(0, .78fr);
  gap: 0;
}
.hero-feature > div a {
  position: relative;
  display: block;
  height: 100%;
}
.hero-feature img {
  height: 100%;
  object-fit: cover;
}
.hero-feature > div span {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 10px 12px;
  color: #180b08;
  background: var(--gold);
  font-weight: 950;
}
.hero-feature article {
  padding: clamp(22px, 3vw, 48px);
  display: grid;
  align-content: center;
}

.channel-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.channel-rail a {
  min-height: 118px;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 12px;
  align-items: center;
  background: rgba(242,234,219,.075);
  border: 1px solid var(--line);
}
.channel-rail strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.08rem;
}
.channel-rail span {
  color: var(--muted);
  font-size: .86rem;
}
.channel-rail img {
  width: 64px;
  height: 86px;
  object-fit: cover;
}

.layout-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
}
.section {
  padding: clamp(16px, 2vw, 24px);
}
.section-head {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}
.section-head a {
  color: var(--gold);
  font-weight: 950;
}
.poster-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.mixed-grid {
  grid-template-columns: repeat(8, minmax(0, 1fr));
}
.poster-card,
.strip-card {
  background: rgba(242,234,219,.06);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.poster-card:hover,
.strip-card:hover {
  transform: translateY(-3px);
  border-color: rgba(232,189,105,.5);
  box-shadow: 0 18px 38px rgba(0,0,0,.2);
}
.poster-card a { display: grid; }
.poster-card figure,
.strip-card figure {
  position: relative;
  margin: 0;
  background: #07110f;
}
.poster-card img {
  aspect-ratio: 3 / 4.25;
  object-fit: cover;
}
.poster-card figcaption,
.strip-card figcaption {
  position: absolute;
  right: 8px;
  top: 8px;
  padding: 4px 7px;
  color: #180b08;
  background: var(--gold);
  font-size: .8rem;
  font-weight: 950;
}
.poster-card div {
  min-height: 120px;
  padding: 10px;
}
.poster-card span,
.strip-card span {
  color: var(--green);
  font-size: .76rem;
  font-weight: 950;
}
.poster-card h3,
.strip-card h3 {
  margin: 5px 0;
  font-size: .98rem;
}
.poster-card p,
.strip-card p {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: .82rem;
}
.poster-card em,
.strip-card em {
  color: var(--gold);
  font-size: .8rem;
  font-style: normal;
  font-weight: 950;
}

.rank-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.rank-row b {
  color: var(--red);
  font-size: .82rem;
}
.rank-row span {
  min-width: 0;
  display: grid;
  gap: 2px;
  font-weight: 950;
}
.rank-row small {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-row i {
  justify-self: end;
  color: var(--gold);
  font-style: normal;
  font-weight: 950;
}
.strip-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.strip-card a {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
}
.strip-card img {
  height: 126px;
  object-fit: cover;
}
.strip-card div { padding: 10px; }

.library-hero {
  min-height: 330px;
  padding: clamp(26px, 5vw, 70px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 24px;
  align-items: end;
}
.library-hero h1 {
  font-size: clamp(2.35rem, 5.4vw, 5.8rem);
}
.library-hero strong {
  align-self: end;
  padding: 18px;
  color: #180b08;
  background: var(--gold);
  font-size: 1.7rem;
}
.filter-bar {
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  align-items: center;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.filters button,
.filter-bar select {
  min-height: 38px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(242,234,219,.08);
  border: 1px solid var(--line);
  font-weight: 950;
}
.filters button.active {
  color: #180b08;
  background: var(--gold);
  border-color: var(--gold);
}
.filter-bar label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 950;
}
.library-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.library-grid .strip-card {
  grid-column: span 2;
}

.detail-stage {
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(300px, .55fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 48px);
  padding: clamp(16px, 2vw, 26px);
}
.detail-poster {
  margin: 0;
  background: #07110f;
}
.detail-poster img {
  height: 100%;
  min-height: 590px;
  object-fit: cover;
}
.detail-copy {
  padding: clamp(24px, 5vw, 66px);
  display: grid;
  align-content: center;
}
.detail-copy h1 {
  font-size: clamp(2.4rem, 5.4vw, 5.8rem);
}
.sub {
  color: var(--gold) !important;
  font-size: 1.08rem;
  font-weight: 950;
}
.facts {
  margin: 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.facts span {
  padding: 8px 10px;
  color: #180b08;
  background: var(--gold);
  font-weight: 950;
}
.related-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.footer {
  width: min(1700px, calc(100% - 28px));
  margin: 0 auto 28px;
  padding: 22px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 18px;
}
.footer strong { font-size: 1.4rem; }
.footer h3 {
  margin-bottom: 8px;
  color: var(--gold);
}
.footer a {
  display: block;
  margin: 5px 0;
  color: var(--muted);
  font-weight: 900;
}

@media (max-width: 1280px) {
  .hero,
  .hero-feature,
  .layout-two,
  .library-hero,
  .detail-stage {
    grid-template-columns: 1fr;
  }
  .poster-grid,
  .mixed-grid,
  .library-grid,
  .related-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .channel-rail,
  .strip-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .topline {
    grid-template-columns: 1fr;
  }
  .topline nav {
    justify-content: flex-start;
  }
  .filter-bar {
    grid-template-columns: 1fr;
  }
  .poster-grid,
  .mixed-grid,
  .library-grid,
  .related-grid,
  .channel-rail,
  .strip-grid,
  .footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  h1 { font-size: 2.65rem; }
}

@media (max-width: 520px) {
  .page { padding-inline: 10px; }
  .poster-grid,
  .mixed-grid,
  .library-grid,
  .related-grid,
  .channel-rail,
  .strip-grid,
  .footer {
    grid-template-columns: 1fr;
  }
  .hero-copy,
  .library-hero,
  .detail-copy {
    padding: 22px;
  }
  .detail-poster img { min-height: 420px; }
}
