
:root {
  --bg: #050816;
  --bg2: #0b1220;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --muted-2: #94a3b8;
  --accent: #f97316;
  --accent-2: #fb7185;
  --accent-3: #f59e0b;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
  --radius: 24px;
  --radius-sm: 18px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(249, 115, 22, 0.18), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(251, 113, 133, 0.12), transparent 20%),
    radial-gradient(circle at 70% 92%, rgba(245, 158, 11, 0.08), transparent 22%),
    linear-gradient(180deg, #030712 0%, #060b18 52%, #0b1020 100%);
  color: var(--text);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 90%);
  opacity: 0.15;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.site {
  position: relative;
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 54px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(6, 11, 24, 0.72);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  position: sticky;
  top: 10px;
  z-index: 20;
}

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

.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.3);
}

.brand__text {
  min-width: 0;
}

.brand__text strong {
  display: block;
  font-size: 1.02rem;
  line-height: 1.1;
}

.brand__text span {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 0.78rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: 180ms ease;
  border: 1px solid transparent;
}

.nav a:hover,
.nav a.active {
  color: #fff;
  border-color: rgba(249, 115, 22, 0.35);
  background: rgba(249, 115, 22, 0.12);
}

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(12, 17, 34, 0.84)),
    radial-gradient(circle at 15% 15%, rgba(249, 115, 22, 0.22), transparent 24%),
    radial-gradient(circle at 85% 10%, rgba(251, 113, 133, 0.18), transparent 18%);
  box-shadow: var(--shadow);
  padding: 30px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -40% auto;
  width: 42%;
  height: 80%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.3), transparent 68%);
  filter: blur(40px);
  pointer-events: none;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 24px;
  align-items: center;
}

.kicker {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(249, 115, 22, 0.14);
  border: 1px solid rgba(249, 115, 22, 0.28);
  font-size: 0.84rem;
  margin-bottom: 18px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero p.lead {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.8;
  max-width: 66ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: 180ms ease;
  cursor: pointer;
  background: transparent;
  color: #fff;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 30px rgba(249, 115, 22, 0.24);
}

.btn--ghost {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
}

.btn:hover {
  transform: translateY(-1px);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 22px;
}

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

.stat strong {
  display: block;
  font-size: 1.4rem;
}

.stat span {
  color: var(--muted-2);
  font-size: 0.82rem;
}

.searchbar {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.searchbar input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(2, 6, 23, 0.56);
  color: #fff;
  border-radius: 999px;
  padding: 14px 18px;
  outline: none;
}

.searchbar input::placeholder {
  color: #94a3b8;
}

.searchbar button {
  flex: 0 0 auto;
}

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

.hero-tile {
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  box-shadow: 0 16px 36px rgba(0,0,0,0.3);
  transition: 180ms ease;
}

.hero-tile:hover {
  transform: translateY(-3px);
  border-color: rgba(249,115,22,0.28);
}

.hero-tile .poster--hero {
  min-height: 188px;
}

.hero-tile__copy {
  padding: 14px 16px 16px;
}

.hero-tile__copy strong {
  display: block;
  font-size: 1rem;
  line-height: 1.4;
}

.hero-tile__copy span {
  display: block;
  margin-top: 5px;
  color: var(--muted-2);
  font-size: 0.84rem;
}

.section {
  margin-top: 24px;
  padding: 0 2px;
}

.section__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 0 14px;
}

.section__head h2 {
  margin: 0;
  font-size: 1.45rem;
}

.section__head p {
  margin: 0;
  color: var(--muted-2);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid--cards {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.grid--wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--compact {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.card {
  display: block;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(10, 15, 28, 0.74);
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
  transition: 180ms ease;
  min-width: 0;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(249, 115, 22, 0.32);
  box-shadow: 0 18px 36px rgba(0,0,0,0.28);
}

.card--compact {
  border-radius: 20px;
}

.card--wide {
  display: grid;
  grid-template-columns: 150px 1fr;
}

.poster {
  position: relative;
  isolation: isolate;
  min-height: 250px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18), transparent 28%),
    linear-gradient(135deg, var(--c1), var(--c2) 56%, var(--c3));
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.02) 0%, rgba(2, 6, 23, 0.48) 70%, rgba(2, 6, 23, 0.90) 100%),
    radial-gradient(circle at 85% 15%, rgba(255,255,255,0.18), transparent 24%);
  z-index: -1;
}

.poster__glow {
  position: absolute;
  inset: auto 10% 8% 12%;
  height: 32%;
  background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 62%);
  filter: blur(18px);
}

.poster__id {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.poster__title {
  font-size: 1.25rem;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 8px 24px rgba(0,0,0,0.34);
}

.poster__meta {
  margin-top: 10px;
  color: rgba(255,255,255,0.86);
  font-size: 0.85rem;
}

.card__body {
  padding: 16px;
}

.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card__head h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.year-pill,
.badge,
.chip,
.chip--soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 0.72rem;
  border: 1px solid rgba(255,255,255,0.10);
}

.year-pill {
  background: rgba(249, 115, 22, 0.12);
  color: #fff;
}

.meta-line,
.excerpt,
.detail__meta p,
.muted {
  color: var(--muted-2);
}

.meta-line {
  margin-top: 10px;
  font-size: 0.84rem;
  line-height: 1.5;
}

.excerpt {
  margin: 10px 0 0;
  line-height: 1.65;
  font-size: 0.92rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.chip {
  background: rgba(255,255,255,0.05);
  color: #e2e8f0;
}

.chip--soft {
  background: rgba(249, 115, 22, 0.12);
  border-color: rgba(249, 115, 22, 0.18);
}

.panel {
  border-radius: 28px;
  border: 1px solid var(--line);
  background: rgba(7, 12, 24, 0.78);
  box-shadow: var(--shadow);
  padding: 22px;
}

.detail {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
}

.detail__poster {
  border-radius: 30px;
  overflow: hidden;
  min-height: 520px;
}

.detail__poster .poster {
  min-height: 520px;
}

.detail__body h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1;
}

.detail__meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.detail__meta .kv {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.detail__meta .kv strong {
  display: block;
  margin-bottom: 4px;
  color: #fff;
}

.detail__copy {
  margin-top: 18px;
  line-height: 1.85;
  color: #e2e8f0;
}

.detail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.player {
  margin-top: 26px;
  display: grid;
  gap: 16px;
}

.player__box {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.09);
  background: #020617;
  box-shadow: var(--shadow);
}

.player__screen {
  aspect-ratio: 16 / 9;
  width: 100%;
  background:
    linear-gradient(135deg, rgba(15,23,42,1), rgba(3,7,18,1));
  position: relative;
}

.player__screen video,
.player__screen canvas {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #000;
}

.player__screen .overlay {
  position: absolute;
  inset: auto 20px 20px 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(2,6,23,0.12), rgba(2,6,23,0.72));
  border: 1px solid rgba(255,255,255,0.08);
}

.player__screen .overlay input {
  flex: 1;
  min-width: 220px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(15,23,42,0.88);
  color: #fff;
}

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

.toolbar-note {
  color: var(--muted-2);
  font-size: 0.88rem;
  line-height: 1.6;
}

.list {
  display: grid;
  gap: 12px;
}

.list__row {
  display: grid;
  grid-template-columns: 66px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}

.list__rank {
  width: 66px;
  height: 66px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  font-weight: 800;
  background: linear-gradient(135deg, rgba(249,115,22,0.22), rgba(251,113,133,0.18));
  border: 1px solid rgba(249,115,22,0.16);
}

.list__title {
  margin: 0;
  font-size: 1rem;
}

.list__meta {
  color: var(--muted-2);
  font-size: 0.88rem;
  margin-top: 4px;
}

.footer {
  margin-top: 24px;
  padding: 22px 4px 0;
  color: var(--muted-2);
  line-height: 1.8;
  font-size: 0.9rem;
}

.footer__panel {
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--muted);
}

.category-nav a.active,
.category-nav a:hover {
  color: #fff;
  border-color: rgba(249,115,22,0.28);
  background: rgba(249,115,22,0.12);
}

.search-results {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.search-results a {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.hidden { display: none !important; }

@media (max-width: 1180px) {
  .hero__grid,
  .detail {
    grid-template-columns: 1fr;
  }
  .grid--cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .grid--wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .site {
    width: min(100% - 18px, 100%);
    padding-top: 10px;
  }
  .topbar {
    border-radius: 24px;
    padding: 12px 14px;
    position: static;
  }
  .nav {
    justify-content: flex-start;
  }
  .hero {
    padding: 20px;
    border-radius: 24px;
  }
  .hero__cards {
    grid-template-columns: 1fr;
  }
  .stats,
  .detail__meta,
  .grid--cards,
  .grid--wide,
  .grid--compact {
    grid-template-columns: 1fr 1fr;
  }
  .detail__poster,
  .detail__poster .poster {
    min-height: 360px;
  }
  .list__row {
    grid-template-columns: 56px 1fr;
  }
  .list__row .btn { grid-column: 1 / -1; }
  .searchbar,
  .detail__actions,
  .player__toolbar,
  .section__head {
    flex-direction: column;
    align-items: stretch;
  }
  .searchbar input,
  .player__screen .overlay input {
    min-width: 0;
    width: 100%;
  }
}
