:root {
  color-scheme: dark;
  --bg: #08080a;
  --ink: #fff8ec;
  --muted: #c4b7a4;
  --panel: rgba(24, 21, 20, 0.82);
  --panel-2: rgba(255, 248, 236, 0.075);
  --line: rgba(255, 218, 160, 0.2);
  --brand: #f4c15d;
  --brand-2: #ef5a4e;
  --mint: #68d8c1;
  --hot: #ef5a4e;
  --gold: #ffe08a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(244, 193, 93, 0.11), transparent 420px),
    linear-gradient(120deg, rgba(239, 90, 78, 0.12), transparent 480px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.022) 0 1px, transparent 1px 96px),
    var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  line-height: 1.56;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
button, input, select { font: inherit; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(230px, 360px);
  gap: 20px;
  align-items: center;
  padding: 14px clamp(16px, 4vw, 58px);
  border-bottom: 1px solid var(--line);
  background: rgba(8, 8, 10, 0.84);
  backdrop-filter: blur(22px);
}
.brand, .footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #160d07;
  box-shadow: 0 0 0 7px rgba(244, 193, 93, 0.08), 0 16px 38px rgba(239, 90, 78, 0.24);
}
.main-nav {
  display: flex;
  gap: 7px;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
}
.main-nav a:hover, .main-nav a.active {
  border-color: var(--brand);
  color: var(--ink);
}
.search-box {
  display: flex;
  height: 43px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255,255,255,.07);
}
.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  padding: 0 14px;
}
.search-box button {
  width: 72px;
  border: 0;
  background: var(--brand);
  color: #170f09;
  cursor: pointer;
  font-weight: 900;
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(300px, 510px);
  gap: clamp(24px, 5vw, 80px);
  align-items: center;
  overflow: hidden;
  padding: clamp(64px, 9vw, 118px) clamp(16px, 5vw, 72px) clamp(44px, 5vw, 64px);
}
.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(8,8,10,.98) 0%, rgba(8,8,10,.72) 42%, rgba(8,8,10,.12) 100%),
    url("https://images.unsplash.com/photo-1524985069026-dd778a71c7b4?auto=format&fit=crop&w=1900&h=1060&q=84") center/cover;
  opacity: .95;
}
.hero-content, .hero-panel { position: relative; z-index: 1; }
.eyebrow, .section-kicker {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}
.hero h1, .page-title h1 {
  margin: 0;
  font-size: clamp(48px, 8vw, 104px);
  line-height: .92;
  letter-spacing: 0;
}
.hero h1::after {
  display: block;
  width: min(220px, 45vw);
  height: 5px;
  margin-top: 20px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2), transparent);
  content: "";
}
.hero-copy, .page-title p {
  max-width: 720px;
  margin: 18px 0 0;
  color: #eadfd1;
  font-size: clamp(16px, 2vw, 21px);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0 18px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-3px); }
.btn.primary {
  background: linear-gradient(135deg, var(--brand), #fff0bd);
  color: #160d07;
  box-shadow: 0 18px 42px rgba(244, 193, 93, .25);
}
.btn.ghost {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.08);
}
.hero-panel { align-self: stretch; display: grid; align-content: center; }
.spot-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 17, 16, .74);
  box-shadow: var(--shadow);
  transform: perspective(900px) rotateY(-6deg);
}
.spot-card .poster-media { aspect-ratio: 4 / 5; }
.spot-body { padding: 18px; }
.spot-body p { margin: 0 0 6px; color: var(--brand); font-weight: 900; }
.spot-body h2 { margin: 0 0 8px; font-size: 24px; }
.spot-body span { color: var(--muted); }

.section-wrap, .page-main, .detail-main, .play-main {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
}
.section-wrap { padding: 44px 0; }
.section-head {
  display: flex;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
}
.section-head h2 { margin: 0; font-size: clamp(24px, 3vw, 38px); }
.section-head a { color: var(--brand); font-weight: 900; }
.section-head.compact h2 { font-size: 25px; }
.poster-grid { display: grid; gap: 18px; }
.featured-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.compact-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.library-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.wide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.wide-card {
  position: relative;
  display: grid;
  min-height: 220px;
  align-content: end;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #111;
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}
.wide-card img {
  position: absolute;
  inset: 0;
  opacity: .62;
  transition: transform .45s ease, opacity .45s ease;
}
.wide-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(transparent, rgba(0,0,0,.86));
}
.wide-card span, .wide-card strong, .wide-card em { position: relative; z-index: 1; }
.wide-card span { color: var(--brand); font-size: 13px; font-weight: 900; }
.wide-card strong { font-size: 23px; }
.wide-card em { color: var(--muted); font-style: normal; }
.wide-card:hover {
  border-color: var(--brand);
  box-shadow: 0 24px 54px rgba(0,0,0,.36), 0 0 28px rgba(244,193,93,.14);
  transform: translateY(-8px);
}
.wide-card:hover img { opacity: .78; transform: scale(1.08); }
.poster-card { min-width: 0; }
.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease;
}
.poster-link:hover {
  border-color: rgba(244, 193, 93, .78);
  box-shadow: 0 26px 52px rgba(0,0,0,.36), 0 0 28px rgba(244,193,93,.18);
  transform: translateY(-10px) scale(1.015);
}
.poster-media {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #120e0c;
}
.poster-media img { transition: transform .45s ease, filter .45s ease; }
.poster-link:hover .poster-media img, .spot-card:hover .poster-media img {
  filter: brightness(1.08) saturate(1.12);
  transform: scale(1.08);
}
.poster-media::after {
  position: absolute;
  inset: auto 0 0;
  height: 52%;
  content: "";
  background: linear-gradient(transparent, rgba(0,0,0,.82));
}
.badge, .score {
  position: absolute;
  z-index: 1;
  top: 8px;
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 4px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
}
.badge { left: 8px; background: var(--hot); color: #fff; }
.score { right: 8px; background: rgba(0,0,0,.72); color: var(--gold); }
.score-text { color: var(--gold); font-weight: 900; }
.poster-info { padding: 12px; }
.poster-info h3 {
  overflow: hidden;
  margin: 0 0 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}
.meta-line, .card-meta { color: var(--muted); font-size: 13px; }
.card-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.split-layout { display: grid; grid-template-columns: minmax(0, 1fr) 390px; gap: 28px; }
.rank-panel, .filter-panel, .toolbar, .detail-panel, .player-card, .topic-card, .rank-column {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 46px rgba(0,0,0,.24);
}
.rank-panel, .rank-column, .filter-panel { padding: 18px; }
.rank-list, .mini-list, .update-list { display: grid; gap: 10px; }
.rank-item, .update-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 7px;
  background: var(--panel-2);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.rank-item:hover, .update-item:hover {
  background: rgba(244,193,93,.1);
  box-shadow: inset 3px 0 0 var(--brand);
  transform: translateX(6px);
}
.rank-index { color: var(--brand); font-size: 21px; font-weight: 900; }
.rank-item strong, .update-item strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page-main { padding: 44px 0 58px; }
.page-title { padding: 34px 0 30px; }
.library-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; }
.filter-panel { position: sticky; top: 92px; }
.filter-group + .filter-group { margin-top: 18px; }
.filter-group h2 { margin: 0 0 10px; color: #fff0c0; font-size: 16px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255,255,255,.055);
  color: var(--muted);
  padding: 0 10px;
}
.chip.active, .chip:hover { border-color: var(--brand); color: var(--ink); }
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px 16px;
}
.toolbar label { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); }
.toolbar select {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #15110f;
  color: var(--ink);
  padding: 0 10px;
}

.rank-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.rank-column h2 { margin: 0 0 14px; font-size: 21px; }
.update-item { grid-template-columns: 104px minmax(0, 1fr) auto; padding: 14px; }
.update-time { color: var(--brand); font-weight: 900; }
.topic-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.topic-card { overflow: hidden; transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease; }
.topic-card:hover { border-color: var(--brand); box-shadow: 0 24px 54px rgba(0,0,0,.36); transform: translateY(-8px); }
.topic-cover { aspect-ratio: 16 / 8; overflow: hidden; }
.topic-cover img { transition: transform .45s ease; }
.topic-card:hover .topic-cover img { transform: scale(1.08); }
.topic-body { padding: 16px; }
.topic-body h2 { margin: 0 0 10px; }
.topic-items { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.topic-items span { border-radius: 4px; background: rgba(255,255,255,.08); color: var(--muted); padding: 4px 8px; font-size: 12px; }

.detail-main { padding: 36px 0 58px; }
.detail-hero { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 30px; align-items: stretch; }
.detail-poster { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; aspect-ratio: 2 / 3; box-shadow: var(--shadow); }
.detail-panel { padding: clamp(22px, 4vw, 38px); }
.detail-panel h1 { margin: 0 0 12px; font-size: clamp(34px, 5vw, 62px); line-height: 1.05; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tag-row span { border-radius: 4px; background: rgba(255,255,255,.08); padding: 5px 10px; color: #fff3df; font-size: 13px; }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.info-grid div { border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.06); padding: 12px; }
.info-grid span { display: block; color: var(--muted); font-size: 12px; }
.episode-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; margin-top: 18px; }
.episode-grid a {
  display: grid;
  min-height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255,255,255,.08);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.episode-grid a:hover { background: rgba(244,193,93,.13); border-color: var(--brand); transform: translateY(-2px); }
.related-section { margin-top: 36px; }
.play-main { padding: 30px 0 58px; }
.player-card { overflow: hidden; }
.video-shell { background: #000; }
.video-shell video { display: block; width: 100%; max-height: 72vh; background: #000; }
.play-info { display: flex; gap: 18px; align-items: center; justify-content: space-between; padding: 18px; }
.play-info h1 { margin: 0; font-size: clamp(24px, 4vw, 40px); }

.site-footer {
  padding: 36px clamp(16px, 4vw, 66px);
  border-top: 1px solid var(--line);
  background: #060506;
}
.footer-top { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: 26px; }
.site-footer p { max-width: 780px; margin: 10px 0 0; color: var(--muted); }
.footer-columns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.footer-columns h2 { margin: 0 0 10px; color: var(--brand); font-size: 16px; }
.footer-columns a { display: block; margin: 7px 0; color: #fff0d3; }
.copyright { margin-top: 24px; font-size: 13px; }
.empty-state { grid-column: 1 / -1; padding: 30px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: var(--panel-2); }

@media (max-width: 1180px) {
  .site-header { grid-template-columns: 1fr; }
  .featured-grid, .library-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rank-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-top { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .hero, .split-layout, .library-layout, .detail-hero { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .filter-panel { position: static; }
  .compact-grid, .featured-grid, .library-grid, .topic-grid, .wide-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-poster { width: min(340px, 100%); }
  .footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .site-header { gap: 12px; padding: 12px; }
  .section-wrap, .page-main, .detail-main, .play-main { width: calc(100% - 24px); }
  .hero { padding: 52px 14px 32px; }
  .compact-grid, .featured-grid, .library-grid, .rank-board, .topic-grid, .wide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar, .play-info { align-items: flex-start; flex-direction: column; }
  .update-item { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .episode-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
