:root {
  --blue-900: #102a6a;
  --blue-800: #153d96;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --ink: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --bg: #f8fafc;
  --card: #ffffff;
  --radius: 22px;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, var(--blue-600), var(--blue-800), var(--blue-900));
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.22);
}

.header-inner {
  max-width: 1180px;
  height: 66px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.brand-text {
  font-size: 20px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 650;
}

.nav-link {
  position: relative;
  padding: 8px 0;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #dbeafe;
}

.nav-link.active::after,
.nav-link:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: #dbeafe;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: #fff;
}

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

.mobile-nav.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-link {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
  padding: 11px 14px;
  border-radius: 14px;
}

.hero-carousel {
  position: relative;
  height: min(72vh, 720px);
  min-height: 520px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--blue-900), var(--blue-700));
}

.hero-track,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.9s ease, transform 1.4s ease;
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

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

.hero-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 25%, rgba(37, 99, 235, 0.48), transparent 32%),
    linear-gradient(90deg, rgba(6, 18, 48, 0.92) 0%, rgba(8, 22, 58, 0.66) 48%, rgba(8, 22, 58, 0.22) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 50%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  height: 100%;
  margin: 0 auto;
  padding: 110px 20px 90px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #fff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 700;
}

.hero-content h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-content p {
  margin: 22px 0 0;
  max-width: 760px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(17px, 2vw, 22px);
}

.hero-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: 14px;
  border: 0;
  font-weight: 750;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

.btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

.btn-light {
  color: var(--blue-800);
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.46);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
  background: rgba(0, 0, 0, 0.68);
  transform: translateY(-50%) scale(1.06);
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 36px;
  background: #fff;
}

.search-panel,
.content-section,
.list-toolbar {
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.search-panel {
  margin-top: -46px;
  position: relative;
  z-index: 10;
}

.search-panel-inner {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 380px);
  gap: 22px;
  align-items: center;
  padding: 26px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.search-panel h2 {
  margin: 0 0 6px;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.2;
}

.search-panel p {
  margin: 0;
  color: var(--muted);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 8px 12px 8px 18px;
  border-radius: 18px;
  background: #f1f5f9;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

.search-box span {
  color: var(--blue-700);
  font-weight: 800;
}

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

.category-chips {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.category-chips a,
.inline-links a {
  flex: 0 0 auto;
  padding: 9px 14px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue-800);
  font-weight: 700;
  box-shadow: var(--soft-shadow);
}

.content-section {
  padding-top: 68px;
}

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

.section-heading h2,
.detail-content h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.16;
  letter-spacing: -0.025em;
}

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

.section-heading a {
  color: var(--blue-700);
  font-weight: 800;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #dbeafe;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.28), transparent 58%);
  pointer-events: none;
}

.poster-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.18) 45%, transparent 68%);
  transform: translateX(-120%);
  transition: transform 0.6s ease;
}

.movie-card:hover .poster-shine {
  transform: translateX(120%);
}

.movie-card-body {
  padding: 16px;
}

.movie-meta-line {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 800;
}

.movie-card h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h2 a:hover {
  color: var(--blue-700);
}

.movie-card p {
  display: -webkit-box;
  min-height: 46px;
  margin: 9px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.tag-row span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #1e40af;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 750;
}

.movie-card-wide {
  display: grid;
  grid-template-columns: 210px 1fr;
  min-height: 170px;
}

.movie-card-wide .poster-link {
  aspect-ratio: auto;
  height: 100%;
}

.movie-card-compact {
  width: 286px;
  flex: 0 0 286px;
}

.horizontal-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 4px 18px;
}

.soft-section,
.color-section,
.warm-section {
  max-width: none;
  margin-top: 68px;
  padding: 58px max(20px, calc((100vw - 1180px) / 2 + 20px));
  border-radius: 0;
}

.soft-section {
  background: linear-gradient(90deg, #ecfdf5, #eff6ff);
}

.color-section {
  background: linear-gradient(135deg, #eff6ff, #eef2ff, #faf5ff);
}

.warm-section {
  background: linear-gradient(90deg, #fff7ed, #fefce8);
}

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

.category-tile {
  min-height: 170px;
  padding: 22px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.category-tile span {
  display: block;
  margin-bottom: 10px;
  color: var(--blue-800);
  font-size: 22px;
  font-weight: 850;
}

.category-tile p {
  margin: 0;
  color: var(--muted);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f97316);
  box-shadow: 0 12px 24px rgba(239, 68, 68, 0.28);
}

.page-hero {
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.54), transparent 34%),
    linear-gradient(135deg, var(--blue-900), var(--blue-700));
}

.page-hero > div {
  max-width: 1180px;
  min-height: 330px;
  margin: 0 auto;
  padding: 80px 20px 58px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.1;
}

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

.inline-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.list-toolbar {
  padding-top: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.compact-search {
  width: min(100%, 540px);
  background: #fff;
}

.category-overview-card {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
}

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

.category-overview-card:hover img {
  transform: scale(1.08);
}

.category-card-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.18));
}

.category-card-content {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  color: #fff;
}

.category-card-content strong {
  display: block;
  margin-bottom: 8px;
  font-size: 24px;
}

.category-card-content em {
  color: rgba(255, 255, 255, 0.82);
  font-style: normal;
}

.ranking-list {
  display: grid;
  gap: 18px;
}

.empty-result {
  display: none;
  margin: 36px 0 0;
  padding: 28px;
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.empty-result.is-visible {
  display: block;
}

.detail-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 20px 40px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  background: #dbeafe;
}

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

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

.breadcrumb a {
  color: var(--blue-700);
  font-weight: 750;
}

.detail-info h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.detail-one-line {
  margin: 20px 0 0;
  color: #344054;
  font-size: 19px;
}

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

.detail-meta div {
  padding: 14px 16px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.detail-meta dt {
  color: var(--muted);
  font-size: 13px;
}

.detail-meta dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.detail-tags {
  margin-bottom: 28px;
}

.player-section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px 10px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.35);
  font-size: 34px;
  padding-left: 5px;
}

.player-overlay strong {
  font-size: 22px;
}

.detail-content {
  max-width: 920px;
}

.detail-content p {
  margin: 16px 0 0;
  color: #344054;
  font-size: 17px;
  line-height: 1.95;
}

.review-panel {
  padding: 30px;
  border-radius: 26px;
  background: #fff;
  box-shadow: var(--soft-shadow);
}

.site-footer {
  margin-top: 72px;
  padding: 54px 20px 26px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 38px;
}

.footer-brand {
  display: inline-flex;
  margin-bottom: 14px;
  color: #fff;
  font-size: 22px;
  font-weight: 850;
}

.site-footer p {
  margin: 0;
  max-width: 520px;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: 18px;
}

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

.footer-links a:hover {
  color: #fff;
}

.footer-bottom {
  max-width: 1180px;
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  text-align: center;
}

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

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

  .hero-carousel {
    min-height: 480px;
  }

  .movie-grid-4,
  .movie-grid-3,
  .category-showcase,
  .category-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-poster {
    max-width: 420px;
  }
}

@media (max-width: 720px) {
  .header-inner {
    height: 62px;
  }

  .brand-text {
    font-size: 18px;
  }

  .hero-carousel {
    height: 68vh;
    min-height: 520px;
  }

  .hero-content {
    padding: 96px 20px 82px;
  }

  .hero-control {
    display: none;
  }

  .search-panel-inner {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .section-heading,
  .list-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid-4,
  .movie-grid-3,
  .movie-grid-2,
  .category-showcase,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-wide {
    grid-template-columns: 120px 1fr;
    min-height: 142px;
  }

  .movie-card-wide .movie-card-body {
    padding: 12px;
  }

  .movie-card-wide h2 {
    font-size: 16px;
  }

  .movie-card-wide p {
    display: none;
  }

  .detail-hero {
    padding-top: 38px;
  }

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

  .play-icon {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
