:root {
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --blue-800: #1e40af;
  --blue-950: #172554;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --card: #ffffff;
  --soft: #f8fafc;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #eef5ff 0%, #ffffff 36%, #f8fafc 100%);
  min-height: 100vh;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, var(--blue-600), var(--blue-700), var(--blue-800));
  box-shadow: 0 12px 32px rgba(29, 78, 216, 0.25);
}

.nav-wrap {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #dbeafe;
  font-weight: 650;
  font-size: 15px;
}

.main-nav a:hover {
  color: #ffffff;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 22px;
}

.hero-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 26px auto 42px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
}

.hero-carousel {
  min-height: 560px;
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a, #2563eb 48%, #60a5fa);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  padding: clamp(32px, 6vw, 74px);
  background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.9), rgba(30, 64, 175, 0.64), rgba(37, 99, 235, 0.24)), var(--hero-image);
  background-size: cover;
  background-position: center;
  transition: opacity 0.55s ease, transform 0.55s ease;
  transform: scale(1.02);
}

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

.hero-copy {
  max-width: 650px;
  color: #ffffff;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.16);
  color: #dbeafe;
  font-size: 14px;
  font-weight: 750;
  margin-bottom: 18px;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  font-size: clamp(36px, 6vw, 68px);
  line-height: 1.05;
  margin: 0 0 18px;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p,
.detail-info .lead {
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.8;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.88);
}

.hero-tags,
.detail-tags,
.tag-row,
.info-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-tags span,
.detail-tags a,
.tag-row span,
.info-pills span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.hero-tags span,
.info-pills span {
  background: rgba(255, 255, 255, 0.17);
  color: #ffffff;
}

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

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

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

.btn.primary {
  background: #ffffff;
  color: var(--blue-700);
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.18);
}

.btn.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.btn.subtle {
  color: #eff6ff;
  background: rgba(37, 99, 235, 0.28);
}

.btn.small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
}

.hero-dots {
  position: absolute;
  left: clamp(32px, 6vw, 74px);
  bottom: 32px;
  display: flex;
  gap: 10px;
  z-index: 3;
}

.hero-dots button {
  width: 34px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.hero-dots button.active {
  background: #ffffff;
}

.hero-side {
  padding: 18px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.side-title,
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.side-title span,
.section-head h2 {
  font-size: 25px;
  font-weight: 900;
  margin: 0;
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.side-title a,
.section-head a,
.card-meta a,
.breadcrumb a {
  color: var(--blue-700);
  font-weight: 800;
}

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

.search-panel {
  margin-bottom: 34px;
  padding: 20px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

.search-panel label {
  display: block;
  font-weight: 900;
  margin-bottom: 10px;
}

.search-line {
  display: flex;
  gap: 12px;
}

.search-line input {
  flex: 1;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  font-size: 15px;
  outline: none;
  background: #f8fafc;
}

.search-line input:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.search-line a {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 16px;
  background: var(--blue-700);
  color: #ffffff;
  font-weight: 800;
}

.search-line.narrow {
  max-width: 680px;
}

section.container {
  margin-top: 38px;
  margin-bottom: 42px;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.movie-card.compact {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  border-radius: 18px;
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  background-image: linear-gradient(135deg, rgba(37, 99, 235, 0.88), rgba(15, 23, 42, 0.76)), var(--poster-image);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.movie-card.compact .poster {
  aspect-ratio: auto;
  min-height: 124px;
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15, 23, 42, 0.78));
}

.poster-year {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
}

.rank-num {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.28);
}

.card-body {
  padding: 16px;
}

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

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

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

.movie-card.compact h3 {
  font-size: 15px;
}

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

.movie-card.compact p {
  font-size: 12px;
  -webkit-line-clamp: 1;
}

.tag-row span {
  background: #eff6ff;
  color: var(--blue-700);
}

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

.category-tile,
.category-card {
  min-height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 20px;
  border-radius: 24px;
  color: #ffffff;
  background-image: linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.86)), var(--tile-image);
  background-size: cover;
  background-position: center;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.category-tile span,
.category-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile p,
.category-card p {
  margin: 0;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
}

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

.category-card {
  min-height: 280px;
  justify-content: space-between;
}

.category-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.category-preview a,
.quick-links a {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.17);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.page-hero {
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue-800), var(--blue-600) 54%, #60a5fa);
}

.compact-hero {
  padding: 66px 0;
  margin-bottom: 34px;
  box-shadow: 0 16px 36px rgba(29, 78, 216, 0.16);
}

.compact-hero h1 {
  margin-bottom: 14px;
}

.compact-hero p {
  max-width: 860px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
}

.breadcrumb a {
  color: #dbeafe;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.detail-hero {
  padding: 46px 0;
  color: #ffffff;
  background: radial-gradient(circle at 20% 0%, rgba(96, 165, 250, 0.38), transparent 34%), linear-gradient(135deg, #0f172a, var(--blue-950) 48%, var(--blue-700));
}

.detail-grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 30px;
  background-image: linear-gradient(135deg, rgba(37, 99, 235, 0.65), rgba(15, 23, 42, 0.32)), var(--poster-image);
  background-size: cover;
  background-position: center;
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.3);
}

.detail-info h1 {
  color: #ffffff;
}

.detail-tags a {
  background: rgba(219, 234, 254, 0.14);
  color: #dbeafe;
}

.detail-section {
  margin-top: 42px;
}

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

.video-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.18), rgba(15, 23, 42, 0.62));
}

.play-layer span {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  font-size: 34px;
}

.play-layer b {
  font-size: 18px;
}

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

.player-message {
  position: absolute;
  left: 18px;
  bottom: 12px;
  margin: 0;
  color: #ffffff;
  font-size: 14px;
}

.article-body {
  padding: 30px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.article-body h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.article-body p {
  margin: 0 0 24px;
  color: #374151;
  line-height: 2;
  font-size: 16px;
}

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

.site-footer {
  margin-top: 72px;
  padding: 48px 0;
  color: #d1d5db;
  background: #111827;
}

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

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

.site-footer p {
  margin: 0;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

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

[data-card].is-hidden {
  display: none;
}

@media (max-width: 1040px) {
  .hero-shell {
    grid-template-columns: 1fr;
  }

  .hero-side {
    display: none;
  }

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

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

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border-radius: 20px;
    background: var(--blue-800);
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

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

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

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

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

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

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

  .brand {
    font-size: 18px;
  }

  .hero-slide {
    padding: 28px;
  }

  .hero-dots {
    left: 28px;
  }

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

  .search-line {
    flex-direction: column;
  }

  .movie-card.compact {
    grid-template-columns: 100px minmax(0, 1fr);
  }
}
