:root {
  --primary-950: #0f172a;
  --primary-900: #1e1b4b;
  --primary-800: #312e81;
  --primary-700: #4338ca;
  --primary-600: #4f46e5;
  --accent-500: #f59e0b;
  --accent-400: #fbbf24;
  --accent-300: #fcd34d;
  --neutral-950: #020617;
  --neutral-900: #0f172a;
  --neutral-800: #1e293b;
  --neutral-700: #334155;
  --neutral-200: #e2e8f0;
  --neutral-100: #f1f5f9;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(2, 6, 23, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--neutral-900);
  background: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: var(--white);
  background: linear-gradient(90deg, var(--primary-900), var(--primary-800));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
}

.nav-wrap {
  max-width: 1200px;
  height: 64px;
  margin: 0 auto;
  padding: 0 20px;
  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: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  color: var(--primary-900);
  background: linear-gradient(135deg, var(--accent-300), var(--accent-500));
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  font-weight: 650;
}

.nav-links a {
  opacity: 0.94;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent-300);
  opacity: 1;
}

.menu-toggle {
  display: none;
  border: 0;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 20px;
  cursor: pointer;
}

.mobile-menu {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px 18px;
}

.mobile-menu a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 650;
}

.mobile-menu a:hover {
  background: rgba(255, 255, 255, 0.09);
}

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

.hero {
  position: relative;
  color: var(--white);
  overflow: hidden;
  background: radial-gradient(circle at 15% 20%, rgba(251, 191, 36, 0.28), transparent 28%), linear-gradient(135deg, var(--primary-950), var(--primary-800));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.85), rgba(30, 27, 75, 0.62), rgba(2, 6, 23, 0.86));
  z-index: 1;
}

.hero-slide {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: none;
  align-items: center;
  padding: 76px 0 86px;
}

.hero-slide.active {
  display: flex;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.34;
  filter: saturate(1.08) contrast(1.04);
}

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

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-300);
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 820px;
  margin: 16px 0 18px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 760px;
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 750;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: var(--primary-950);
  background: linear-gradient(135deg, var(--accent-300), var(--accent-500));
  box-shadow: 0 15px 30px rgba(245, 158, 11, 0.24);
}

.btn-ghost {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.hero-poster {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(1.2deg);
  background: rgba(255, 255, 255, 0.08);
}

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

.hero-card-badge {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 16px;
  border-radius: 18px;
  color: var(--white);
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(16px);
}

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

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

.hero-dot.active {
  background: var(--accent-400);
}

.section {
  padding: 56px 0 0;
}

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

.section-title {
  margin: 0;
  color: var(--neutral-950);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.18;
  font-weight: 900;
}

.section-desc {
  max-width: 760px;
  margin: 8px 0 0;
  color: #64748b;
}

.search-panel {
  margin: 32px 0 0;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(16px);
}

.search-input {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  color: var(--neutral-950);
  background: var(--white);
  font-size: 16px;
  outline: none;
}

.search-input:focus {
  border-color: var(--primary-600);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.filter-chip,
.meta-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  color: #475569;
  background: #f1f5f9;
  font-size: 13px;
  font-weight: 700;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 20px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.14);
}

.card-poster {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e1b4b, #0f172a);
}

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

.movie-card:hover .card-poster img {
  transform: scale(1.055);
}

.card-year {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 9px;
  border-radius: 10px;
  color: var(--white);
  background: var(--accent-500);
  font-size: 12px;
  font-weight: 800;
}

.card-body {
  padding: 15px;
}

.card-title {
  margin: 0 0 8px;
  color: var(--neutral-950);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 850;
}

.card-meta {
  margin: 0 0 8px;
  color: #64748b;
  font-size: 13px;
}

.card-text {
  margin: 0;
  color: #475569;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.category-card {
  padding: 24px;
  border-radius: 24px;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-900), var(--primary-700));
  box-shadow: var(--shadow);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 25px;
  font-weight: 900;
}

.category-card p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.85);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.rank-number {
  color: var(--accent-500);
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.rank-cover {
  width: 96px;
  height: 128px;
  border-radius: 14px;
  object-fit: cover;
}

.rank-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 900;
}

.rank-desc {
  margin: 0;
  color: #64748b;
}

.page-hero {
  padding: 54px 0 34px;
  color: var(--white);
  background: radial-gradient(circle at 18% 20%, rgba(251, 191, 36, 0.22), transparent 28%), linear-gradient(135deg, var(--primary-950), var(--primary-800));
}

.page-hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.page-hero p {
  max-width: 780px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  gap: 28px;
  align-items: start;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  z-index: 2;
}

.play-layer.hidden {
  display: none;
}

.play-button {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--primary-950);
  background: linear-gradient(135deg, var(--accent-300), var(--accent-500));
  font-size: 32px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.detail-card {
  margin-top: 22px;
  padding: 24px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.detail-card h2 {
  margin: 0 0 14px;
  font-size: 24px;
  font-weight: 900;
}

.detail-card p {
  color: #334155;
}

.side-poster {
  position: sticky;
  top: 88px;
  padding: 18px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.side-poster img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 14px;
}

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

.site-footer {
  margin-top: 64px;
  padding: 46px 0 30px;
  color: #cbd5e1;
  background: var(--neutral-900);
}

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

.footer-title {
  margin: 0 0 10px;
  color: var(--white);
  font-size: 20px;
  font-weight: 900;
}

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

.footer-links a:hover {
  color: var(--accent-300);
}

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

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

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

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

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

  .hero-slide {
    min-height: auto;
    padding: 54px 0 82px;
  }

  .hero-poster {
    max-width: 360px;
    margin: 0 auto;
  }

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

  .rank-item {
    grid-template-columns: 46px 74px minmax(0, 1fr);
  }

  .rank-cover {
    width: 74px;
    height: 100px;
  }

  .rank-item .btn {
    grid-column: 2 / -1;
    width: fit-content;
  }

  .side-poster {
    position: static;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, 1200px);
  }

  .logo {
    font-size: 18px;
  }

  .hero h1 {
    font-size: 38px;
  }

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

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