
:root {
  --bg: #070b16;
  --bg2: #0d1324;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.28);
  --text: #e5eefc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #38bdf8;
  --accent2: #8b5cf6;
  --good: #22c55e;
  --warn: #f59e0b;
  --shadow: 0 20px 60px rgba(0,0,0,.35);
  --radius: 24px;
  --radius-sm: 16px;
  --wrap: min(1200px, calc(100vw - 32px));
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56,189,248,.17), transparent 30%),
    radial-gradient(circle at top right, rgba(139,92,246,.16), transparent 26%),
    linear-gradient(180deg, #060912 0%, #0a1020 45%, #050816 100%);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select { font: inherit; }
.wrap { width: var(--wrap); margin: 0 auto; }
.section { padding: 18px 0 28px; }
.section + .section { margin-top: 8px; }
.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 18px;
  margin-bottom: 16px;
}
.section-title {
  margin: 0; font-size: clamp(22px, 2.2vw, 34px); line-height: 1.1;
}
.section-desc { margin: 8px 0 0; color: var(--muted); max-width: 72ch; line-height: 1.75; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--soft); background: rgba(255,255,255,.04); backdrop-filter: blur(18px);
}
.badge strong { color: white; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 10, 20, .72); backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148,163,184,.12);
}
.header-inner {
  min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: white; font-weight: 800; box-shadow: 0 14px 28px rgba(56,189,248,.25);
}
.brand-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand-text strong { font-size: 16px; letter-spacing: .3px; }
.brand-text small { color: var(--muted); font-size: 12px; }
.site-nav { display: flex; align-items: center; gap: 10px; }
.nav-link {
  padding: 10px 14px; border-radius: 999px; color: var(--soft);
  border: 1px solid transparent; transition: .25s ease;
}
.nav-link:hover, .nav-link.active {
  color: white; background: rgba(255,255,255,.06); border-color: rgba(148,163,184,.18);
}
.menu-toggle {
  display: none; width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(255,255,255,.04); color: white; align-items: center; justify-content: center; gap: 4px;
}
.menu-toggle span { display: block; width: 18px; height: 2px; background: currentColor; border-radius: 99px; }

.hero {
  padding: 28px 0 10px;
}
.hero-shell {
  position: relative; overflow: hidden; border-radius: 32px;
  border: 1px solid rgba(148,163,184,.16);
  background:
    radial-gradient(circle at 20% 20%, rgba(56,189,248,.18), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(139,92,246,.14), transparent 28%),
    linear-gradient(135deg, rgba(15,23,42,.95), rgba(2,6,23,.92));
  box-shadow: var(--shadow);
}
.hero-shell::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.08), transparent 18%, transparent 82%, rgba(255,255,255,.04));
  pointer-events: none;
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; padding: 24px;
}
.hero-copy { padding: 10px 8px 10px 6px; display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.kicker { color: var(--accent); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
.hero h1 { margin: 0; font-size: clamp(34px, 5vw, 68px); line-height: .96; letter-spacing: -.03em; }
.hero-lead { margin: 0; max-width: 62ch; color: var(--soft); line-height: 1.85; font-size: 15px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; border: 1px solid transparent; padding: 12px 18px; font-weight: 700;
  transition: .25s ease; cursor: pointer;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: white; box-shadow: 0 16px 30px rgba(56,189,248,.18); }
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-ghost { background: rgba(255,255,255,.05); color: white; border-color: rgba(148,163,184,.16); }
.btn-ghost:hover { background: rgba(255,255,255,.08); }
.hero-links { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-link { padding: 9px 14px; border-radius: 999px; border: 1px solid rgba(148,163,184,.18); background: rgba(255,255,255,.04); color: var(--soft); }
.hero-link:hover { color: white; border-color: rgba(56,189,248,.4); }
.search-row {
  display: flex; gap: 10px; flex-wrap: wrap; padding: 14px; border: 1px solid rgba(148,163,184,.16);
  background: rgba(255,255,255,.05); border-radius: 20px;
}
.search-row input, .search-row select {
  flex: 1 1 180px; min-width: 0; padding: 13px 16px; border-radius: 14px;
  border: 1px solid rgba(148,163,184,.18); background: rgba(2,6,23,.5); color: white;
  outline: none;
}
.search-row input::placeholder { color: #7c8aa6; }
.search-row select { flex: 0 0 180px; }
.search-row .btn { flex: 0 0 auto; }
.hero-panel {
  display: grid; grid-template-columns: 1fr; gap: 14px; align-content: center;
}
.hero-slider {
  position: relative; min-height: 500px; border-radius: 28px; overflow: hidden; border: 1px solid rgba(148,163,184,.16);
  background: rgba(255,255,255,.03);
}
.hero-slide {
  position: absolute; inset: 0; display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 14px; padding: 20px;
  opacity: 0; transform: translateY(8px); transition: .65s ease;
}
.hero-slide.active { opacity: 1; transform: translateY(0); }
.hero-slide-media, .hero-slide-content {
  border-radius: 24px; border: 1px solid rgba(148,163,184,.14); overflow: hidden;
  background: rgba(255,255,255,.04);
}
.hero-slide-content { padding: 20px; display: flex; flex-direction: column; justify-content: end; gap: 12px; }
.hero-slide-title { margin: 0; font-size: clamp(24px, 2.8vw, 40px); line-height: 1.08; }
.hero-slide-line { margin: 0; color: var(--soft); line-height: 1.85; }
.hero-slide-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.hero-slide-links .btn { padding-inline: 15px; }
.hero-dots {
  position: absolute; left: 20px; right: 20px; bottom: 18px; display: flex; gap: 8px; justify-content: center; z-index: 5;
}
.hero-dot {
  width: 9px; height: 9px; border-radius: 999px; border: 0; background: rgba(255,255,255,.3);
}
.hero-dot.active { width: 28px; background: linear-gradient(135deg, var(--accent), var(--accent2)); }

.poster-link { display: block; }
.poster {
  position: relative; overflow: hidden; border-radius: 22px; min-height: 100%;
  background: linear-gradient(160deg, var(--g1), var(--g2) 55%, var(--g3));
  border: 1px solid rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
}
.poster::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 18%, rgba(255,255,255,.34), transparent 24%),
              radial-gradient(circle at 90% 0%, rgba(255,255,255,.18), transparent 22%),
              linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.18));
}
.poster::after {
  content: ''; position: absolute; inset: auto -20% -25% -20%; height: 55%;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.45));
}
.poster-sm { aspect-ratio: 16/22; min-height: 260px; }
.poster-md { min-height: 100%; }
.poster-chip {
  position: absolute; top: 14px; left: 14px; z-index: 1;
  padding: 6px 10px; border-radius: 999px; background: rgba(2,6,23,.42); color: white; font-size: 12px;
  border: 1px solid rgba(255,255,255,.18);
}
.poster-abbr {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 1;
  color: rgba(255,255,255,.94); font-size: clamp(38px, 7vw, 72px); font-weight: 900; letter-spacing: .08em;
  text-shadow: 0 12px 24px rgba(0,0,0,.3);
}
.poster-footer {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 18px 18px 16px;
}
.poster-title { font-weight: 800; line-height: 1.2; font-size: 18px; }
.poster-meta { color: rgba(255,255,255,.82); margin-top: 6px; font-size: 13px; }
.poster-sm .poster-title { font-size: 15px; }

.stats-grid, .category-grid, .movie-grid, .related-grid, .overview-grid {
  display: grid; gap: 14px;
}
.stats-grid { grid-template-columns: repeat(4, 1fr); margin-top: 18px; }
.stat {
  padding: 18px; border-radius: 20px; background: rgba(255,255,255,.05); border: 1px solid rgba(148,163,184,.16);
}
.stat strong { display: block; font-size: 28px; margin-bottom: 6px; }
.stat span { color: var(--muted); font-size: 14px; }
.category-grid { grid-template-columns: repeat(5, 1fr); }
.category-card {
  display: block; padding: 18px; border-radius: 22px; background: rgba(255,255,255,.05); border: 1px solid rgba(148,163,184,.16);
  transition: .25s ease; min-height: 150px;
}
.category-card:hover { transform: translateY(-3px); border-color: rgba(56,189,248,.35); box-shadow: 0 18px 40px rgba(0,0,0,.22); }
.category-card h3 { margin: 0 0 8px; font-size: 20px; }
.category-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.category-card .count { margin-top: 12px; color: white; font-weight: 700; }
.movie-grid { grid-template-columns: repeat(4, 1fr); }
.movie-card {
  border-radius: 24px; overflow: hidden; background: rgba(255,255,255,.05); border: 1px solid rgba(148,163,184,.16);
  display: grid; grid-template-columns: 116px 1fr; gap: 12px; padding: 12px; transition: .25s ease;
}
.movie-card:hover { transform: translateY(-4px); border-color: rgba(56,189,248,.33); box-shadow: 0 20px 46px rgba(0,0,0,.22); }
.movie-card-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.movie-title { font-size: 17px; font-weight: 800; line-height: 1.25; }
.movie-meta { color: var(--muted); margin-top: 4px; font-size: 13px; }
.movie-excerpt { margin: 0; color: var(--soft); line-height: 1.75; font-size: 14px; }
.movie-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.tag { padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(148,163,184,.14); color: var(--soft); font-size: 12px; }

.rank-list {
  display: grid; gap: 12px;
}
.rank-item {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center;
  padding: 14px 16px; border-radius: 20px; background: rgba(255,255,255,.05); border: 1px solid rgba(148,163,184,.16);
}
.rank-no {
  width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px;
  background: linear-gradient(135deg, rgba(56,189,248,.15), rgba(139,92,246,.18));
  border: 1px solid rgba(255,255,255,.12); font-size: 20px; font-weight: 900;
}
.rank-title { font-size: 18px; font-weight: 800; }
.rank-meta { color: var(--muted); margin-top: 6px; line-height: 1.6; font-size: 13px; }
.rank-cta {
  padding: 10px 14px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(148,163,184,.16);
  color: white;
}

.page-hero {
  margin-top: 18px; padding: 26px; border-radius: 28px; border: 1px solid rgba(148,163,184,.16);
  background: linear-gradient(135deg, rgba(15,23,42,.94), rgba(2,6,23,.92)); box-shadow: var(--shadow);
}
.page-hero h1 { margin: 0 0 10px; font-size: clamp(30px, 4vw, 52px); line-height: 1; }
.page-hero p { margin: 0; color: var(--soft); line-height: 1.8; max-width: 82ch; }
.page-hero .hero-actions { margin-top: 18px; }
.page-tools {
  display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0;
}
.page-tools .pill {
  padding: 9px 14px; border-radius: 999px; border: 1px solid rgba(148,163,184,.18); background: rgba(255,255,255,.04); color: var(--soft);
}

.detail-wrap {
  padding: 24px 0 26px;
}
.detail-hero {
  display: grid; grid-template-columns: 290px 1fr; gap: 18px; align-items: start;
  padding: 22px; border-radius: 30px; background: rgba(255,255,255,.05); border: 1px solid rgba(148,163,184,.16);
  box-shadow: var(--shadow);
}
.detail-main h1 { margin: 0 0 10px; font-size: clamp(30px, 4vw, 52px); line-height: 1.05; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 16px; }
.detail-meta .tag { background: rgba(56,189,248,.08); }
.detail-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 18px; margin-top: 18px; }
.detail-panel {
  padding: 22px; border-radius: 26px; background: rgba(255,255,255,.05); border: 1px solid rgba(148,163,184,.16);
}
.detail-panel h2, .detail-panel h3 { margin-top: 0; }
.detail-panel p { color: var(--soft); line-height: 1.9; }
.info-list { display: grid; gap: 10px; }
.info-row { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid rgba(148,163,184,.12); padding-bottom: 10px; }
.info-row span:first-child { color: var(--muted); }
.info-row strong { color: white; text-align: right; }
.player-shell {
  position: relative; overflow: hidden; border-radius: 24px;
  background: linear-gradient(160deg, rgba(15,23,42,.9), rgba(2,6,23,.96));
  border: 1px solid rgba(148,163,184,.16);
}
.player-stage { position: relative; aspect-ratio: 16 / 9; background: #020617; }
.player-stage video {
  width: 100%; height: 100%; display: block; background: #020617; object-fit: cover;
}
.player-overlay {
  position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(180deg, rgba(2,6,23,.12), rgba(2,6,23,.42));
  transition: opacity .25s ease;
}
.player-overlay.hidden { opacity: 0; pointer-events: none; }
.player-button {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 20px; border-radius: 999px; border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); color: white; font-size: 16px; font-weight: 800;
  box-shadow: 0 16px 32px rgba(56,189,248,.2);
}
.player-hint { margin-top: 12px; color: var(--muted); font-size: 14px; }
.related-grid { grid-template-columns: repeat(3, 1fr); }
.site-footer {
  margin-top: 24px; padding: 24px 0 16px; border-top: 1px solid rgba(148,163,184,.12);
  background: rgba(2,6,23,.55);
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 18px; }
.footer-brand { font-size: 22px; font-weight: 900; margin-bottom: 10px; }
.footer-title { font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.footer-grid p, .footer-grid a { color: var(--soft); line-height: 1.8; }
.footer-copy { margin-top: 18px; color: var(--muted); font-size: 13px; }

.filter-note { color: var(--muted); margin: 8px 0 0; }
.hidden-card { display: none !important; }
.topbar-note { color: var(--muted); font-size: 13px; }
.backtop {
  position: fixed; right: 18px; bottom: 18px; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid rgba(148,163,184,.16); background: rgba(15,23,42,.88); color: white; display: grid; place-items: center;
  opacity: 0; pointer-events: none; transition: .2s ease; z-index: 40;
}
.backtop.show { opacity: 1; pointer-events: auto; }

@media (max-width: 1080px) {
  .hero-grid, .detail-hero, .detail-grid, .footer-grid { grid-template-columns: 1fr; }
  .movie-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-slider { min-height: 620px; }
}

@media (max-width: 760px) {
  .wrap { width: min(100vw - 20px, 1200px); }
  .menu-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: 72px; left: 10px; right: 10px; display: none; flex-direction: column;
    padding: 12px; border-radius: 20px; background: rgba(6, 10, 20, .96); border: 1px solid rgba(148,163,184,.16);
  }
  .site-nav.open { display: flex; }
  .hero-grid, .hero-slide, .movie-grid, .category-grid, .stats-grid, .related-grid, .footer-grid { grid-template-columns: 1fr; }
  .hero-slider { min-height: 760px; }
  .hero-slide { padding: 14px; }
  .hero-slide-media { min-height: 240px; }
  .search-row select { flex-basis: 100%; }
  .movie-card { grid-template-columns: 94px 1fr; }
  .rank-item { grid-template-columns: 52px 1fr; }
  .rank-cta { grid-column: 1 / -1; justify-self: start; }
}
