
:root {
  --bg: #08111f;
  --bg-soft: #0d1727;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-2: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5eefb;
  --muted: #9fb2cc;
  --accent: #06b6d4;
  --accent-2: #10b981;
  --accent-3: #8b5cf6;
  --danger: #fb7185;
  --shadow: 0 24px 80px rgba(2, 8, 23, .38);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --max: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(6, 182, 212, 0.12), transparent 26%),
    radial-gradient(circle at 82% 12%, rgba(16, 185, 129, 0.10), transparent 22%),
    radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.10), transparent 26%),
    linear-gradient(180deg, #08111f 0%, #09121f 42%, #060c18 100%);
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  background: rgba(5, 11, 22, 0.72);
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.topbar-inner {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
}

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

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  color: #06111f;
  background: linear-gradient(135deg, #67e8f9, #34d399);
  box-shadow: 0 10px 24px rgba(6, 182, 212, .24);
  font-size: 20px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo-text strong {
  font-size: 1.02rem;
}
.logo-text span {
  font-size: .78rem;
  color: var(--muted);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255,255,255,.04);
  cursor: pointer;
}

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

.nav a,
.nav button.linkish {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: .2s ease;
  font-weight: 600;
}

.nav a:hover,
.nav a.active,
.nav button.linkish:hover {
  color: var(--text);
  border-color: rgba(103, 232, 249, .18);
  background: rgba(103, 232, 249, .08);
}

.nav-cta {
  margin-left: 8px;
  padding: 11px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #10b981);
  color: #06111f;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(16, 185, 129, .22);
}

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

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: 22px;
  align-items: stretch;
}

.hero-copy {
  position: relative;
  padding: 28px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.86)),
    radial-gradient(circle at top right, rgba(6, 182, 212, 0.22), transparent 36%);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -60px -80px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,.20), rgba(16,185,129,0) 70%);
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(103, 232, 249, .10);
  border: 1px solid rgba(103, 232, 249, .16);
  color: #bdf5ff;
  font-weight: 700;
  font-size: .88rem;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 18px 0 12px;
  font-size: clamp(2.1rem, 4vw, 4.6rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
  font-size: 1.01rem;
}

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

.btn,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
  border: 1px solid transparent;
}

.btn {
  background: linear-gradient(135deg, #06b6d4, #10b981);
  color: #06111f;
  box-shadow: 0 12px 24px rgba(6, 182, 212, .16);
}

.btn-secondary {
  background: rgba(255,255,255,.05);
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

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

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

.stat {
  min-width: 140px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(148, 163, 184, .14);
}

.stat strong {
  display: block;
  font-size: 1.34rem;
  margin-bottom: 2px;
}
.stat span {
  color: var(--muted);
  font-size: .86rem;
}

.hero-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.hero-carousel-viewport {
  overflow: hidden;
  height: 100%;
}

.hero-track {
  display: flex;
  height: 100%;
  transition: transform .45s ease;
}

.hero-slide {
  min-width: 100%;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-card {
  flex: 1;
  min-height: 380px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.10);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(8, 17, 31, .20), rgba(8, 17, 31, .72)),
    var(--hero-bg, linear-gradient(135deg, #334155, #0f172a));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 18%, rgba(255,255,255,.24), transparent 30%),
    radial-gradient(circle at 78% 12%, rgba(255,255,255,.14), transparent 24%),
    linear-gradient(180deg, rgba(2,6,23,0.12), rgba(2,6,23,0.82));
}

.hero-card-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.hero-pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(6, 182, 212, .16);
  border: 1px solid rgba(103, 232, 249, .18);
  color: #d9fbff;
  font-weight: 700;
  font-size: .84rem;
}

.hero-card h3 {
  margin: 14px 0 10px;
  font-size: clamp(1.45rem, 2.6vw, 2.5rem);
  line-height: 1.1;
}

.hero-card p {
  margin: 0;
  color: rgba(229, 238, 251, .85);
  max-width: 42ch;
}

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: #dfefff;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
  font-size: .84rem;
}

.hero-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-card-footer .btn {
  min-height: 42px;
  padding: 0 14px;
  font-size: .94rem;
}

.hero-dots {
  display: flex;
  gap: 8px;
  padding: 12px 18px 18px;
  justify-content: center;
}

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

.hero-dot.active {
  width: 30px;
  background: linear-gradient(135deg, #06b6d4, #10b981);
}

.section {
  padding: 24px 0 6px;
}

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

.section-head h2,
.section-head h3 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
}

.section-head p {
  margin: 5px 0 0;
  color: var(--muted);
  max-width: 76ch;
}

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

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.58);
  margin-bottom: 16px;
}

.input,
.select {
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: rgba(2, 6, 23, .42);
  color: var(--text);
  padding: 0 14px;
  outline: none;
  min-width: 220px;
}

.input::placeholder { color: rgba(159, 178, 204, .68); }

.select {
  min-width: 170px;
}

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

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

.film-card {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .14);
  background: rgba(15, 23, 42, .64);
  box-shadow: 0 14px 44px rgba(2, 8, 23, .22);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.film-card:hover {
  transform: translateY(-4px);
  border-color: rgba(103, 232, 249, .28);
  box-shadow: 0 20px 54px rgba(2, 8, 23, .34);
}

.film-poster {
  aspect-ratio: 2 / 3;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  background:
    linear-gradient(180deg, rgba(8, 17, 31, .18), rgba(8, 17, 31, .84)),
    var(--card-bg, linear-gradient(135deg, #1e293b, #0f172a));
}

.film-poster::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.08);
  pointer-events: none;
}

.film-poster-top,
.film-poster-bottom {
  position: relative;
  z-index: 1;
}

.poster-title {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.22;
  font-weight: 800;
  text-shadow: 0 8px 24px rgba(0,0,0,.36);
}

.poster-sub {
  margin: 5px 0 0;
  color: rgba(229,238,251,.82);
  font-size: .84rem;
}

.film-body {
  padding: 14px 14px 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: .76rem;
  background: rgba(255,255,255,.07);
  color: rgba(229,238,251,.92);
  border: 1px solid rgba(255,255,255,.06);
}

.badge.accent {
  background: rgba(6, 182, 212, .14);
  border-color: rgba(6, 182, 212, .16);
}

.badge.green {
  background: rgba(16, 185, 129, .14);
  border-color: rgba(16, 185, 129, .16);
}

.badge.purple {
  background: rgba(139, 92, 246, .14);
  border-color: rgba(139, 92, 246, .16);
}

.film-body p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

.card-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
}

.card-actions .btn,
.card-actions .btn-secondary,
.card-actions .btn-ghost {
  min-height: 38px;
  padding: 0 12px;
  font-size: .86rem;
  flex: 1;
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.category-grid,
.stats-grid,
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-card,
.info-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, .14);
  background: rgba(15, 23, 42, .62);
  box-shadow: 0 14px 44px rgba(2, 8, 23, .20);
}

.category-card h3,
.info-card h3 {
  margin: 10px 0 8px;
  font-size: 1.08rem;
}

.category-card p,
.info-card p {
  margin: 0;
  color: var(--muted);
}

.category-count {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(6, 182, 212, .12);
  border: 1px solid rgba(6, 182, 212, .14);
  color: #d6fbff;
  font-weight: 700;
  font-size: .8rem;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .14);
  background: rgba(15, 23, 42, .56);
}

.rank-num {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(6, 182, 212, .18), rgba(16, 185, 129, .18));
  border: 1px solid rgba(255,255,255,.08);
}

.rank-item h3 {
  margin: 0 0 5px;
  font-size: 1rem;
}
.rank-item p {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

.detail-top {
  margin-top: 18px;
  padding: 22px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, .72);
  box-shadow: var(--shadow);
}

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

.breadcrumb a {
  color: #cffafe;
}

.detail-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 20px;
  margin-top: 16px;
}

.detail-cover {
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .14);
  background:
    linear-gradient(180deg, rgba(8,17,31,.12), rgba(8,17,31,.84)),
    var(--cover-bg, linear-gradient(135deg, #0f172a, #1e293b));
  min-height: 520px;
  position: relative;
}

.detail-cover::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.08);
  pointer-events: none;
}

.cover-inner {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cover-title {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.1;
}

.cover-desc {
  margin-top: 10px;
  color: rgba(229,238,251,.86);
}

.cover-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.cover-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.player-shell {
  position: relative;
  margin-top: 14px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .14);
  background: #020617;
  box-shadow: 0 20px 54px rgba(2, 8, 23, .34);
}

.player-shell video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: auto auto 18px 18px;
  z-index: 3;
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #06b6d4, #10b981);
  color: #06111f;
  font-weight: 900;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(6, 182, 212, .28);
}

.play-overlay.hide {
  opacity: 0;
  pointer-events: none;
  transform: scale(.95);
}

.detail-content {
  display: grid;
  gap: 14px;
}

.detail-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(148, 163, 184, .14);
  background: rgba(15, 23, 42, .56);
}

.detail-card h3 {
  margin: 0 0 12px;
}

.detail-card p {
  margin: 0;
  color: var(--muted);
}

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.meta-box {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(148, 163, 184, .12);
}
.meta-box span {
  display: block;
  font-size: .82rem;
  color: var(--muted);
}
.meta-box strong {
  display: block;
  margin-top: 4px;
  font-size: .98rem;
}

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

.empty-state {
  padding: 36px 24px;
  border-radius: 22px;
  border: 1px dashed rgba(148, 163, 184, .20);
  background: rgba(15, 23, 42, .42);
  color: var(--muted);
  text-align: center;
}

.footer {
  padding: 30px 0 40px;
  color: var(--muted);
  border-top: 1px solid rgba(148, 163, 184, .10);
  margin-top: 28px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.small-note {
  font-size: .88rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .cards, .related-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cards.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
  .category-grid, .info-grid, .detail-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .site-shell, .topbar-inner { width: min(var(--max), calc(100% - 18px)); }
  .topbar-inner { min-height: 70px; }
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 70px;
    flex-direction: column;
    gap: 8px;
    padding: 14px 18px 18px;
    background: rgba(5, 11, 22, 0.98);
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  }
  .nav.open { display: flex; }
  .nav a, .nav button.linkish { width: 100%; justify-content: center; }
  .cards, .cards.compact, .related-grid, .category-grid, .info-grid, .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .section-head, .hero-card-footer, .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
  .hero-copy, .hero-card, .detail-top { padding: 18px; }
  .hero-card { min-height: 330px; }
  .input, .select { min-width: 100%; width: 100%; }
  .filter-bar { padding: 12px; }
  .rank-item {
    grid-template-columns: 1fr;
  }
  .rank-num {
    width: 48px;
    height: 48px;
  }
}

@media (max-width: 520px) {
  .cards, .cards.compact, .related-grid, .category-grid, .info-grid, .stats-grid, .detail-meta-grid {
    grid-template-columns: 1fr;
  }
  .hero-copy h1, .hero-copy h2 { font-size: 2rem; }
  .logo-text span { display: none; }
}
