:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  --bg: #10100f;
  --panel: #191816;
  --panel-2: #221f1b;
  --ink: #fff7ea;
  --muted: #b9ad9c;
  --line: #39332b;
  --red: #dd5b43;
  --gold: #d8a850;
  --green: #50866d;
  --blue: #4b7f9f;
  --shadow: 0 22px 48px rgba(0,0,0,.36);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 12%, rgba(221,91,67,.18), transparent 28%),
    radial-gradient(circle at 84% 4%, rgba(216,168,80,.13), transparent 24%),
    linear-gradient(180deg, #181512 0, var(--bg) 460px);
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
h1,h2,h3,p { margin-top: 0; }
button,input,select { font: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  width: min(1440px, calc(100% - 32px));
  margin: 16px auto 0;
  min-height: 66px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 999px;
  background: rgba(18,17,15,.78);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 1.18rem;
  font-weight: 950;
  white-space: nowrap;
}
.brand::before {
  content: "";
  width: 24px;
  height: 24px;
  border-radius: 50% 50% 8px 8px;
  background: linear-gradient(135deg, var(--red), var(--gold));
}
.nav {
  display: flex;
  justify-content: center;
  gap: 7px;
  overflow-x: auto;
  white-space: nowrap;
}
.nav a,.header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 900;
}
.nav a.active,.nav a:hover {
  color: #fff;
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.07);
}
.header-action {
  color: #17110d;
  background: var(--gold);
}

main {
  display: grid;
  gap: 16px;
  width: min(1440px, calc(100% - 32px));
  margin: 16px auto 0;
}
.cinema-wall {
  display: grid;
  grid-template-columns: minmax(280px, .72fr) minmax(360px, 1.25fr) minmax(270px, .62fr);
  gap: 14px;
  min-height: 520px;
}
.wall-copy,.wall-feature,.wall-rank,.channel-strip,.night-row,.fresh-card,.library-card,.collection,.page-title,.filters,.detail,.footer {
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015)), var(--panel);
  box-shadow: var(--shadow);
}
.wall-copy {
  display: grid;
  align-content: center;
  padding: clamp(20px, 4vw, 34px);
}
.label {
  margin-bottom: 10px;
  color: var(--gold);
  font-weight: 950;
}
.wall-copy h1 {
  margin-bottom: 14px;
  max-width: 8em;
  font-size: clamp(2.4rem, 5vw, 5.4rem);
  line-height: .9;
  letter-spacing: 0;
}
.wall-copy p,.section-head p,.tile-copy p,.page-title p,.detail-copy p,.footer p {
  color: var(--muted);
  line-height: 1.62;
}
.home-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 22px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.04);
}
.home-search input,.home-search button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}
.home-search input {
  min-width: 0;
  padding: 0 14px;
  color: #fff;
  background: transparent;
}
.home-search button {
  padding: 0 18px;
  color: #17110d;
  background: var(--gold);
}

.wall-feature {
  overflow: hidden;
}
.wall-feature a {
  position: relative;
  display: block;
  height: 100%;
}
.wall-feature a::after,.cover::after,.detail-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(0,0,0,.88));
  pointer-events: none;
}
.hero-copy {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
}
.hero-copy p {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-weight: 950;
}
.hero-copy h1 {
  margin-bottom: 9px;
  color: #fff;
  font-size: clamp(2.2rem, 5vw, 5.2rem);
  line-height: .96;
}
.hero-copy span {
  color: rgba(255,255,255,.92);
  font-weight: 950;
}
.wall-rank,.channel-strip,.night-row,.fresh-card,.library-card,.collection,.page-title,.filters,.detail,.footer {
  padding: 18px;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.section-head h2 {
  margin-bottom: 3px;
  font-size: 1.18rem;
}
.section-head a,#resultCount {
  color: var(--gold);
  font-weight: 950;
}
.text-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 38px;
  border-top: 1px solid var(--line);
}
.text-link span { color: var(--red); font-weight: 950; }
.text-link b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-link em { color: var(--gold); font-style: normal; font-weight: 950; }

.channel-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.channel {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  min-height: 104px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel-2);
}
.channel img {
  height: 88px;
  border-radius: 12px;
}
.channel b,.channel small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.channel b { margin-bottom: 5px; white-space: nowrap; }
.channel small { color: var(--muted); font-size: .76rem; line-height: 1.4; }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.strip-card {
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-2);
}
.strip-card {
  display: block;
}
.strip-art {
  aspect-ratio: 3 / 3.95;
  overflow: hidden;
  background: #2a251f;
}
.strip-copy {
  padding: 10px;
}
.strip-copy b,.strip-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}
.strip-copy b {
  min-height: 2.5em;
  margin-bottom: 5px;
  font-size: .9rem;
  line-height: 1.25;
}
.strip-copy small {
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.4;
}

.content-deck {
  display: grid;
  grid-template-columns: minmax(280px, .7fr) minmax(0, 1.3fr);
  gap: 16px;
}
.collection.accent {
  background: linear-gradient(135deg, rgba(216,168,80,.08), rgba(80,134,109,.08)), var(--panel);
}
.collection-grid,.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}
.tile {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-2);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.tile:hover {
  transform: translateY(-4px);
  border-color: rgba(216,168,80,.38);
  box-shadow: 0 18px 30px rgba(0,0,0,.28);
}
.cover {
  position: relative;
  aspect-ratio: 3 / 4.08;
  overflow: hidden;
  background: #2a251f;
}
.cover span {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(18,17,15,.76);
  font-size: .72rem;
  font-weight: 950;
}
.tile-copy { padding: 10px; }
.tile-copy h3 {
  margin-bottom: 5px;
  min-height: 2.42em;
  font-size: .92rem;
  line-height: 1.25;
}
.tile-copy p {
  margin-bottom: 7px;
  font-size: .75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile-copy div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: .73rem;
}
.tile-copy b { color: var(--gold); }
.tile-copy em { font-style: normal; }

.page-title h1 {
  margin-bottom: 10px;
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1;
}
.filters {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}
.search-form { display: flex; gap: 8px; }
.search-form input,.search-form button,.filter-buttons button,.filters select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: #fff;
  font-weight: 900;
}
.search-form input { width: 100%; padding: 0 14px; }
.search-form button,.filter-buttons button,.filters select { padding: 0 14px; }
.filter-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.search-form button,.filter-buttons button:hover {
  color: #17110d;
  background: var(--gold);
}

.detail {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0,1fr);
  gap: 16px;
}
.detail-cover {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border-radius: 14px;
  background: #2a251f;
}
.detail-copy { padding: 10px 6px 10px 0; }
.detail-copy h1 {
  margin-bottom: 10px;
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 1;
}
.origin { font-weight: 950; color: var(--gold); }
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.badges span {
  padding: 7px 10px;
  border-radius: 999px;
  color: #17110d;
  background: var(--gold);
  font-weight: 950;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 999px;
  color: #17110d;
  background: var(--gold);
  font-weight: 950;
}

.footer {
  display: grid;
  grid-template-columns: minmax(260px, 1.3fr) repeat(4, minmax(130px, .72fr));
  gap: 18px;
  margin-bottom: 28px;
}
.footer strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
  font-size: 1.18rem;
}
.footer h3 { margin-bottom: 9px; font-size: .95rem; }
.footer a {
  display: block;
  margin: 7px 0;
  color: var(--muted);
}
.footer a:hover { color: #fff; }
.footer-copy {
  padding: 14px;
  border: 1px solid rgba(221,91,67,.30);
  border-left: 5px solid var(--red);
  border-radius: 14px;
  background: rgba(221,91,67,.08);
}
.footer-copy h3 { color: #fff; }
.footer-copy p {
  margin-bottom: 6px;
  color: #eaded0;
  font-weight: 850;
}
.footer-copy p:first-of-type { font-weight: 950; }
.image-missing { outline: 2px solid var(--red); }

@media (max-width: 1240px) {
  .cinema-wall,.content-deck,.detail { grid-template-columns: 1fr; }
  .wall-feature { min-height: 420px; }
  .channel-rail,.collection-grid,.mosaic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters { grid-template-columns: 1fr; }
  .footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 8px;
    width: calc(100% - 24px);
    padding: 12px 14px;
    border-radius: 18px;
  }
  .nav { justify-content: start; }
  main { width: calc(100% - 24px); }
  .home-search,.channel-rail,.quick-grid,.collection-grid,.mosaic-grid,.footer { grid-template-columns: 1fr; }
  .tile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wall-feature { min-height: 360px; }
  .detail-cover { min-height: auto; aspect-ratio: 2 / 2.8; }
}
