* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.84);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --amber: #f59e0b;
  --amber-light: #fbbf24;
  --danger: #ef4444;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(245, 158, 11, 0.16), transparent 28rem),
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.94));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}

.nav-bar {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 10px 26px rgba(245, 158, 11, 0.3);
  font-weight: 900;
}

.brand-title {
  display: block;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.brand-subtitle {
  display: block;
  margin-top: -3px;
  color: var(--muted);
  font-size: 12px;
}

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

.main-nav a {
  color: #dbeafe;
  font-size: 15px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
  color: var(--amber-light);
  transform: translateY(-1px);
}

.nav-search {
  position: relative;
  width: min(300px, 28vw);
}

.nav-search input,
.filter-input,
.filter-select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.26);
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.88);
  border-radius: 999px;
  padding: 11px 16px;
}

.nav-search input:focus,
.filter-input:focus,
.filter-select:focus {
  border-color: rgba(251, 191, 36, 0.7);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.13);
}

.mobile-toggle {
  display: none;
  margin-left: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.88);
  padding: 8px 11px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--line);
  padding: 14px 0 18px;
}

.mobile-panel.is-open {
  display: block;
}

.mobile-links {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
}

.hero-track {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.18)),
    var(--cover);
  background-position: center;
  background-size: cover;
  transition: opacity 0.55s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 116px 0 88px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.32);
  font-size: 14px;
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-title {
  margin: 18px 0 14px;
  max-width: 820px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.hero-text {
  max-width: 720px;
  color: #dbeafe;
  font-size: 18px;
}

.hero-meta,
.card-meta,
.detail-meta,
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hero-meta {
  margin: 20px 0 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  padding: 5px 10px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  font-size: 13px;
}

.pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 11px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 13px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0 20px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
  color: var(--text);
  background: rgba(15, 23, 42, 0.76);
  border-color: rgba(148, 163, 184, 0.28);
}

.hero-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34px;
  z-index: 4;
  pointer-events: none;
}

.hero-control-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  pointer-events: auto;
}

.hero-arrows {
  display: flex;
  gap: 10px;
}

.arrow-btn,
.dot-btn {
  border: 1px solid rgba(148, 163, 184, 0.26);
  color: var(--text);
  background: rgba(2, 6, 23, 0.62);
  cursor: pointer;
}

.arrow-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

.dot-btn {
  width: 28px;
  height: 7px;
  padding: 0;
  border-radius: 999px;
}

.dot-btn.is-active {
  background: var(--amber-light);
  border-color: var(--amber-light);
}

.section {
  padding: 64px 0 10px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
}

.section-desc {
  margin: 8px 0 0;
  color: var(--muted);
}

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

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.category-card,
.info-card,
.filter-box,
.rank-card,
.detail-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.category-card {
  padding: 24px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.46);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
}

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

.movie-card {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.84);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 28px 58px rgba(0, 0, 0, 0.34);
}

.card-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-image:
    linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.78)),
    var(--cover),
    linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(14, 165, 233, 0.16));
  background-position: center;
  background-size: cover;
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.18), transparent 18rem);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .card-cover::after {
  opacity: 1;
}

.cover-label {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
}

.cover-score {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.3;
}

.card-summary {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 14px;
}

.card-meta {
  color: #cbd5e1;
  font-size: 13px;
}

.page-hero {
  padding: 76px 0 34px;
}

.page-hero h1 {
  margin-top: 0;
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.filter-box {
  margin: 24px 0 26px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 14px;
}

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

.rank-card {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
}

.rank-index {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  font-size: 22px;
  font-weight: 900;
}

.rank-card h3 {
  margin: 0 0 6px;
}

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

.breadcrumbs {
  margin: 34px 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--amber-light);
}

.detail-hero {
  padding: 28px 0 34px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
  gap: 24px;
  align-items: start;
}

.player-card {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: #000;
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background-image:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.72)),
    var(--cover),
    linear-gradient(135deg, #111827, #0f172a);
  background-position: center;
  background-size: cover;
}

.player-box video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(2, 6, 23, 0.22);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-box.is-playing .player-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 999px;
  color: #111827;
  background: linear-gradient(135deg, var(--amber-light), var(--amber));
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 18px 50px rgba(245, 158, 11, 0.38);
}

.player-caption {
  padding: 14px 18px;
  color: #cbd5e1;
  background: rgba(2, 6, 23, 0.92);
}

.detail-panel {
  padding: 24px;
}

.detail-panel h2,
.info-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-panel p,
.info-card p {
  color: #cbd5e1;
}

.detail-cover {
  min-height: 340px;
  border-radius: 24px;
  margin-bottom: 18px;
  background-image:
    linear-gradient(180deg, rgba(2, 6, 23, 0.02), rgba(2, 6, 23, 0.68)),
    var(--cover),
    linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(59, 130, 246, 0.18));
  background-position: center;
  background-size: cover;
}

.content-stack {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.info-card {
  padding: 24px;
}

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

.site-footer {
  margin-top: 72px;
  padding: 42px 0 32px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55), #020617);
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
}

.footer-grid h3,
.footer-grid h4 {
  color: var(--text);
  margin: 0 0 10px;
}

.footer-links {
  display: grid;
  gap: 8px;
}

.footer-bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
  font-size: 14px;
}

.hide {
  display: none !important;
}

@media (max-width: 980px) {
  .main-nav,
  .site-header .nav-search {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

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

  .filter-box,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .hero-track {
    min-height: 560px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand-subtitle {
    display: none;
  }

  .grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .hero-track {
    min-height: 590px;
  }

  .hero-content {
    padding: 92px 0 86px;
  }

  .hero h1,
  .detail-title {
    font-size: 36px;
  }

  .rank-card {
    grid-template-columns: 52px 1fr;
  }

  .rank-card .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}
