:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --gold: #fbbf24;
  --gold-strong: #f59e0b;
  --red: #ef4444;
  --green: #22c55e;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.16), transparent 34rem),
    radial-gradient(circle at 92% 12%, rgba(239, 68, 68, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #111827 100%);
}

body.menu-open {
  overflow: hidden;
}

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

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

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

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

.navbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #111827;
  background: linear-gradient(135deg, var(--gold), #fde68a);
  box-shadow: 0 14px 32px rgba(251, 191, 36, 0.25);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 15px;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--gold);
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px 8px 16px;
  background: rgba(15, 23, 42, 0.58);
}

.nav-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.nav-search button,
.filter-button,
.primary-button,
.ghost-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.nav-search button {
  border-radius: 999px;
  padding: 8px 13px;
  color: #111827;
  font-weight: 800;
  background: var(--gold);
}

.mobile-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 12px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.84);
}

.mobile-panel {
  display: none;
  padding: 0 0 18px;
}

.mobile-panel a {
  display: block;
  padding: 12px 4px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  padding: 76px 0 62px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.78) 44%, rgba(2, 6, 23, 0.56)),
    var(--hero-image, none) center / cover no-repeat;
  transform: scale(1.04);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 180px;
  background: linear-gradient(0deg, #0f172a, transparent);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.62fr);
  gap: 44px;
  align-items: center;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 8px 14px;
  margin-bottom: 18px;
  color: var(--gold);
  font-size: 14px;
  font-weight: 800;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.08);
}

.hero h1 {
  margin: 0 0 18px;
  max-width: 820px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero h1 span {
  color: var(--gold);
}

.hero-lead {
  max-width: 760px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: clamp(18px, 2.4vw, 24px);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 900;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.primary-button {
  color: #111827;
  background: var(--gold);
  box-shadow: 0 18px 40px rgba(251, 191, 36, 0.26);
}

.primary-button:hover,
.ghost-button:hover,
.movie-card:hover,
.category-card:hover,
.rank-row:hover,
.related-card:hover {
  transform: translateY(-3px);
}

.ghost-button {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.58);
}

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

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

.hero-stage {
  position: relative;
  border-radius: 32px;
  padding: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--shadow);
}

.hero-poster {
  aspect-ratio: 3 / 4;
  border-radius: 24px;
  overflow: hidden;
  background: #111827;
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-card-caption {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
}

.hero-card-caption h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 20px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

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

.hero-dot.active {
  width: 24px;
  background: var(--gold);
}

section {
  padding: 64px 0;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.section-head p,
.page-title p,
.detail-title p,
.card-desc,
.rank-desc,
.category-card p,
.detail-copy p {
  color: var(--dim);
  line-height: 1.75;
}

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

.movie-card,
.category-card,
.rank-row,
.related-card,
.detail-panel,
.filter-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-row:hover,
.related-card:hover {
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 20px 60px rgba(251, 191, 36, 0.14);
}

.movie-card {
  overflow: hidden;
  border-radius: 20px;
}

.card-cover {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #111827;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.32s ease;
}

.movie-card:hover .card-cover img,
.related-card:hover img {
  transform: scale(1.06);
}

.card-badge,
.rank-number,
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.card-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 5px 9px;
  color: #111827;
  font-size: 12px;
  background: var(--gold);
}

.score-badge {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 5px 9px;
  color: #fff;
  font-size: 12px;
  background: rgba(239, 68, 68, 0.9);
}

.card-body {
  padding: 15px;
}

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

.card-desc {
  display: -webkit-box;
  min-height: 50px;
  margin: 0 0 12px;
  overflow: hidden;
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--dim);
  font-size: 12px;
}

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

.category-card {
  min-height: 166px;
  padding: 22px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(251, 191, 36, 0.18), transparent 58%),
    var(--panel);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 12px;
  font-size: 23px;
}

.category-card p {
  margin: 0 0 18px;
  font-size: 14px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 80px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border-radius: 18px;
  padding: 12px;
}

.rank-number {
  width: 42px;
  height: 42px;
  color: #111827;
  background: var(--gold);
}

.rank-row img {
  width: 80px;
  height: 112px;
  object-fit: cover;
  border-radius: 14px;
}

.rank-row h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.rank-desc {
  display: -webkit-box;
  margin: 0 0 10px;
  overflow: hidden;
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.filter-panel {
  position: sticky;
  top: 84px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1.7fr repeat(3, 1fr) auto;
  gap: 12px;
  margin-bottom: 28px;
  padding: 14px;
  border-radius: 20px;
  backdrop-filter: blur(14px);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: 0;
  padding: 0 14px;
  background: rgba(2, 6, 23, 0.42);
}

.filter-panel option {
  background: #0f172a;
}

.filter-button {
  min-height: 44px;
  border-radius: 14px;
  padding: 0 18px;
  color: #111827;
  font-weight: 900;
  background: var(--gold);
}

.page-hero {
  padding: 72px 0 36px;
  background:
    radial-gradient(circle at 10% 5%, rgba(251, 191, 36, 0.15), transparent 28rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.84), rgba(15, 23, 42, 0));
}

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

.breadcrumb a:hover {
  color: var(--gold);
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.detail-poster {
  position: sticky;
  top: 94px;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.detail-title h1 {
  margin-bottom: 18px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0 24px;
}

.detail-panel {
  border-radius: 24px;
  padding: 24px;
  margin-top: 18px;
}

.detail-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
}

.detail-copy p {
  margin: 0 0 15px;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--text);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.7));
  cursor: pointer;
}

.play-core {
  display: grid;
  place-items: center;
  gap: 12px;
  font-weight: 900;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  color: #111827;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 20px 50px rgba(251, 191, 36, 0.28);
}

.player-overlay.is-hidden {
  display: none;
}

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

.related-card {
  overflow: hidden;
  border-radius: 18px;
}

.related-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.related-card h3 {
  margin: 0;
  padding: 13px;
  font-size: 15px;
  line-height: 1.35;
}

.site-footer {
  padding: 34px 0 44px;
  color: var(--dim);
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.52);
}

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

.empty-state {
  display: none;
  padding: 32px;
  color: var(--dim);
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}

@media (max-width: 1100px) {
  .card-grid,
  .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .detail-poster {
    position: static;
    max-width: 380px;
  }
}

@media (max-width: 860px) {
  .nav-links,
  .nav-search {
    display: none;
  }

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

  body.menu-open .mobile-panel {
    display: block;
  }

  .hero {
    min-height: auto;
    padding: 48px 0 42px;
  }

  .hero-stage {
    max-width: 440px;
  }

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

  .filter-panel {
    position: static;
    grid-template-columns: 1fr 1fr;
  }

  .filter-panel input {
    grid-column: 1 / -1;
  }
}

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

  .navbar {
    min-height: 62px;
  }

  .logo {
    font-size: 18px;
  }

  section {
    padding: 42px 0;
  }

  .hero-card-caption {
    left: 22px;
    right: 22px;
    bottom: 22px;
  }

  .card-grid,
  .category-grid,
  .rank-list,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 44px 70px minmax(0, 1fr);
  }

  .rank-row img {
    width: 70px;
    height: 100px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
  }
}
