
:root {
  --bg: #020617;
  --bg-soft: #0b1020;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --accent: #f472b6;
  --accent-2: #fbbf24;
  --accent-3: #a855f7;
  --good: #34d399;
  --shadow: 0 20px 60px rgba(2, 6, 23, 0.42);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max: 1320px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(168, 85, 247, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(244, 114, 182, 0.16), transparent 24%),
    radial-gradient(circle at 20% 80%, rgba(251, 191, 36, 0.08), transparent 26%),
    linear-gradient(180deg, #020617 0%, #07111f 44%, #030712 100%);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(2, 6, 23, 0.68);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.95), rgba(255,255,255,.15) 20%, transparent 21%),
    linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: 0 10px 30px rgba(244, 114, 182, 0.35);
}

.logo-text {
  font-size: 1.1rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted-2);
  transition: 0.2s ease;
}

.nav a:hover,
.nav a.active {
  background: rgba(244, 114, 182, 0.14);
  color: #fff;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.search-box input {
  width: 100%;
  background: transparent;
  border: 0;
  outline: none;
  color: #fff;
}

.search-box input::placeholder {
  color: #64748b;
}

.filter-select {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  outline: none;
}

.hero {
  padding: 20px 0 8px;
}

.hero-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 34px;
  background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(15,23,42,.7));
  box-shadow: var(--shadow);
}

.hero-slider {
  position: relative;
  min-height: 560px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .6s ease, transform .8s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

.hero-slide-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2,6,23,.92) 0%, rgba(2,6,23,.62) 40%, rgba(2,6,23,.2) 70%, rgba(2,6,23,.82) 100%),
    linear-gradient(180deg, rgba(2,6,23,.08) 0%, rgba(2,6,23,.56) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 560px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 30px;
  align-items: center;
  padding: 40px;
}

.hero-copy h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4.5vw, 4.5rem);
  line-height: 1.05;
}

.hero-copy p,
.page-hero p {
  color: var(--muted-2);
  line-height: 1.7;
  font-size: 1.02rem;
}

.hero-badges,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.08);
  font-size: .9rem;
}

.badge.accent {
  background: linear-gradient(135deg, rgba(244,114,182,.22), rgba(251,191,36,.18));
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: .2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #0b1020;
  font-weight: 800;
  box-shadow: 0 14px 30px rgba(244, 114, 182, .2);
}

.btn-ghost {
  background: rgba(15,23,42,.62);
  color: #fff;
  border-color: rgba(255,255,255,.1);
}

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

.hero-poster {
  position: relative;
  align-self: stretch;
  min-height: 430px;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(15,23,42,.5);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}

.hero-poster .poster {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
}

.hero-poster .poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2,6,23,0.12), rgba(2,6,23,0.75));
}

.hero-info {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 1;
  padding: 18px;
  border-radius: 22px;
  background: rgba(2,6,23,.56);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(10px);
}

.hero-info .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted-2);
  font-size: .92rem;
}

.hero-info h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  line-height: 1.2;
}

.hero-info p {
  margin: 0;
  color: #dbeafe;
  line-height: 1.6;
}

.slider-controls {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 3;
  display: flex;
  gap: 10px;
}

.slider-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(15,23,42,.75);
  color: #fff;
  cursor: pointer;
}

.slider-dots {
  position: absolute;
  left: 40px;
  bottom: 34px;
  z-index: 3;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,.28);
  cursor: pointer;
}

.dot.active {
  width: 28px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.section {
  padding: 28px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-head h3 {
  margin: 0;
  font-size: 1.4rem;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

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

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

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

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

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

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

.card,
.topic-card,
.rank-card,
.info-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(15,23,42,.72));
  box-shadow: 0 12px 30px rgba(2, 6, 23, .22);
}

.card {
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(244, 114, 182, .35);
}

.card .poster {
  position: relative;
  aspect-ratio: 2 / 3;
  background-size: cover;
  background-position: center;
}

.card .poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2,6,23,.02), rgba(2,6,23,.66));
}

.card .body {
  padding: 14px;
}

.card h4 {
  margin: 0 0 8px;
  font-size: .98rem;
  line-height: 1.4;
}

.card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.4;
}

.card .desc {
  margin: 10px 0 0;
  color: #cbd5e1;
  font-size: .88rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card .chip-row,
.topic-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(148,163,184,.12);
  color: #e2e8f0;
  font-size: .76rem;
}

.topic-card {
  padding: 22px;
}

.topic-card h4 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.topic-card p {
  margin: 0 0 18px;
  color: var(--muted-2);
  line-height: 1.7;
}

.topic-card .count {
  color: var(--accent-2);
  font-weight: 700;
}

.topic-card .btn {
  padding-inline: 16px;
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(15,23,42,.68);
  border: 1px solid rgba(255,255,255,.06);
}

.rank-num {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #0b1020;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
}

.rank-item small {
  color: var(--muted);
}

.page-hero {
  padding: 28px 0 14px;
}

.page-hero .panel {
  border-radius: 32px;
  padding: 28px;
  border: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(15,23,42,.92), rgba(15,23,42,.76));
  box-shadow: var(--shadow);
}

.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.toolbar .search-box {
  flex: 1 1 320px;
}

.toolbar .filter-select {
  min-width: 140px;
}

.section-card {
  padding: 18px;
}

.note {
  color: var(--muted);
  line-height: 1.7;
}

.category-pill-row,
.bucket-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bucket-link {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(15,23,42,.7);
  color: #fff;
}

.bucket-link:hover,
.bucket-link.active {
  background: linear-gradient(135deg, rgba(244,114,182,.22), rgba(251,191,36,.16));
  border-color: rgba(244,114,182,.28);
}

.detail-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
}

.poster-frame {
  position: sticky;
  top: 96px;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(15,23,42,.84);
  box-shadow: var(--shadow);
}

.poster-frame .poster {
  aspect-ratio: 2 / 3;
  background-size: cover;
  background-position: center;
}

.poster-frame .poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2,6,23,0.08), rgba(2,6,23,0.72));
}

.poster-frame .poster {
  position: relative;
}

.poster-frame .caption {
  padding: 18px;
  display: grid;
  gap: 10px;
}

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

.stat {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(148,163,184,.12);
  color: #fff;
  font-size: .88rem;
}

.detail-main {
  display: grid;
  gap: 18px;
}

.detail-card {
  padding: 22px;
}

.detail-card h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1.12;
}

.detail-card .lead {
  color: #dbeafe;
  line-height: 1.8;
  font-size: 1.01rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: .92rem;
  margin-bottom: 14px;
}

.breadcrumb a {
  color: #fff;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
}

.player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: radial-gradient(circle at center, rgba(244,114,182,.12), rgba(2,6,23,0.96) 70%);
  cursor: pointer;
}

.player-stage .poster {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: .56;
  filter: saturate(1.02);
}

.player-stage .poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2,6,23,.18), rgba(2,6,23,.82));
}

.player-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: auto auto 22px 22px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  padding: 14px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #0b1020;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(244,114,182,.3);
}

.player-hint {
  position: absolute;
  right: 18px;
  bottom: 22px;
  z-index: 3;
  color: #fff;
  font-size: .9rem;
  background: rgba(2,6,23,.42);
  border: 1px solid rgba(255,255,255,.08);
  padding: 10px 12px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

.recommend-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
}

.footer {
  margin-top: 30px;
  padding: 26px 0 46px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.hide {
  display: none !important;
}

.search-results {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.search-results .result-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(15,23,42,.74);
}

.search-results .thumb {
  width: 52px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  background-size: cover;
  background-position: center;
}

.search-results .title {
  font-weight: 700;
  margin-bottom: 3px;
}

.search-results .meta {
  color: var(--muted);
  font-size: .88rem;
}

.empty-state {
  padding: 28px;
  border-radius: 20px;
  border: 1px dashed rgba(255,255,255,.14);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1180px) {
  .grid.cards,
  .recommend-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .hero-content,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .poster-frame {
    position: relative;
    top: 0;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(var(--max), calc(100% - 18px));
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
  }

  .header-tools {
    width: 100%;
  }

  .search-box {
    min-width: 0;
    flex: 1;
  }

  .hero-slider,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    padding: 22px;
  }

  .hero-slide-bg::after {
    background:
      linear-gradient(180deg, rgba(2,6,23,.72), rgba(2,6,23,.3) 50%, rgba(2,6,23,.9)),
      linear-gradient(90deg, rgba(2,6,23,.6), rgba(2,6,23,.12));
  }

  .hero-poster {
    min-height: 300px;
  }

  .grid.cards,
  .grid.cards.featured,
  .grid.cols-4,
  .grid.cols-3,
  .grid.cols-2,
  .recommend-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .slider-dots {
    left: 18px;
    bottom: 18px;
  }

  .slider-controls {
    right: 14px;
    bottom: 14px;
  }

  .player-hint {
    left: 14px;
    right: 14px;
    bottom: 14px;
    text-align: center;
    border-radius: 16px;
  }
}
