:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-strong: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #0ea5e9;
  --primary-dark: #0369a1;
  --accent: #f59e0b;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #f8fafc 0%, #eef4fb 48%, #f8fafc 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0f172a, #334155, #0f172a);
  color: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.32);
}

.nav-wrap {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.35);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

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

.brand-subtitle {
  color: #bae6fd;
  font-size: 12px;
}

.site-menu {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #e2e8f0;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(14, 165, 233, 0.24);
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #0f172a;
}

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

.hero-slide {
  opacity: 0;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide > img {
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.72) 43%, rgba(15, 23, 42, 0.28) 100%),
    radial-gradient(circle at 22% 25%, rgba(14, 165, 233, 0.35), transparent 34%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  align-items: center;
  gap: 52px;
}

.hero-copy {
  max-width: 760px;
  color: #fff;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.03;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.hero-lead {
  max-width: 680px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 18px;
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span {
  padding: 6px 10px;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 999px;
  color: #0369a1;
  background: #e0f2fe;
  font-size: 12px;
  font-weight: 800;
}

.hero-tags span {
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.16);
  border-color: rgba(186, 230, 253, 0.32);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  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, #0ea5e9, #2563eb);
  box-shadow: 0 16px 30px rgba(14, 165, 233, 0.28);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-poster {
  position: relative;
  display: block;
  height: 420px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 30px;
  overflow: hidden;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.55);
}

.hero-poster span,
.score-pill,
.detail-poster span {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #0f172a;
  background: #facc15;
  font-size: 13px;
  font-weight: 900;
}

.hero-controls {
  position: absolute;
  z-index: 3;
  right: max(24px, calc((100vw - 1240px) / 2));
  bottom: 78px;
  display: flex;
  gap: 10px;
}

.hero-controls button,
.rail-buttons button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(15, 23, 42, 0.72);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: max(24px, calc((100vw - 1240px) / 2));
  bottom: 46px;
  display: flex;
  gap: 8px;
}

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

.hero-dot.active {
  background: #38bdf8;
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.page-top {
  padding-top: 38px;
}

.page-hero {
  position: relative;
  margin-bottom: 28px;
  padding: 42px;
  border-radius: 32px;
  color: #fff;
  overflow: hidden;
  background:
    radial-gradient(circle at 78% 20%, rgba(56, 189, 248, 0.34), transparent 34%),
    linear-gradient(135deg, #0f172a, #1e3a8a 56%, #0f172a);
  box-shadow: var(--shadow);
}

.page-hero.small h1 {
  max-width: 850px;
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
  font-weight: 900;
}

.page-hero.small p:last-child {
  max-width: 820px;
  margin: 16px 0 0;
  color: #dbeafe;
}

.filter-panel {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 14px;
  margin: -24px 0 32px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.filter-panel label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  outline: none;
  color: var(--text);
  background: #fff;
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.content-section,
.rail-section,
.category-gallery {
  margin: 42px 0;
}

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

.section-head.compact {
  align-items: center;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-action {
  flex: 0 0 auto;
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: #e0f2fe;
  font-weight: 900;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.86);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(14, 165, 233, 0.42);
  box-shadow: var(--shadow);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(145deg, #1e293b, #0369a1);
}

.poster-link img {
  transition: transform 0.35s ease, opacity 0.2s ease;
}

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

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

.card-kicker,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  color: #b45309;
}

.movie-card h3 {
  min-height: 48px;
  margin: 8px 0;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 900;
}

.movie-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 210px;
  gap: 16px;
  overflow-x: auto;
  padding: 4px 4px 20px;
  scroll-snap-type: x mandatory;
}

.rail::-webkit-scrollbar {
  height: 8px;
}

.rail::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #cbd5e1;
}

.rail-card {
  position: relative;
  display: grid;
  gap: 8px;
  scroll-snap-align: start;
  padding: 10px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.10);
}

.rail-card img {
  aspect-ratio: 16 / 10;
  border-radius: 16px;
  background: linear-gradient(145deg, #1e293b, #0ea5e9);
}

.rail-card span {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #facc15;
  font-weight: 900;
  font-size: 12px;
}

.rail-card strong {
  font-size: 15px;
}

.rail-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.rail-buttons {
  display: flex;
  gap: 8px;
}

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

.category-strip a,
.category-card {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 22px;
  border-radius: 28px;
  color: #fff;
  background: linear-gradient(135deg, #0f172a, #0369a1);
  box-shadow: var(--shadow);
}

.category-strip strong,
.category-card strong {
  display: block;
  font-size: 24px;
  font-weight: 900;
}

.category-strip span,
.category-card span {
  display: block;
  margin-top: 10px;
  color: #dbeafe;
}

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

.category-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.category-card img {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.38;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.86));
}

.category-card span,
.category-card strong {
  position: relative;
  z-index: 2;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 800;
}

.breadcrumb a {
  color: var(--primary-dark);
}

.detail-hero {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
  padding: 28px;
  border-radius: 32px;
  color: #fff;
  background:
    radial-gradient(circle at 80% 22%, rgba(14, 165, 233, 0.38), transparent 30%),
    linear-gradient(135deg, #0f172a, #1e293b 64%, #0f172a);
  box-shadow: var(--shadow);
}

.detail-poster {
  position: relative;
  overflow: hidden;
  min-height: 440px;
  border-radius: 26px;
  background: linear-gradient(145deg, #1e293b, #0369a1);
}

.detail-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.detail-copy h1 {
  max-width: 860px;
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.detail-line {
  max-width: 820px;
  margin: 18px 0;
  color: #e0f2fe;
  font-size: 18px;
}

.detail-meta {
  margin-bottom: 18px;
  color: #cbd5e1;
}

.detail-tags span {
  color: #dbeafe;
  background: rgba(14, 165, 233, 0.16);
  border-color: rgba(186, 230, 253, 0.26);
}

.detail-copy .btn {
  width: max-content;
  margin-top: 26px;
}

.player-section,
.article-section {
  margin-top: 36px;
}

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

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

.play-layer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.78));
  cursor: pointer;
}

.play-layer span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 18px 44px rgba(14, 165, 233, 0.36);
  font-size: 28px;
}

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

.player-box.playing .play-layer {
  display: none;
}

.article-section {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.article-section h2 {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 900;
}

.article-section h2:not(:first-child) {
  margin-top: 28px;
}

.article-section p {
  margin: 0;
  color: #334155;
  font-size: 17px;
}

.related-section {
  margin-bottom: 58px;
}

.site-footer {
  margin-top: 60px;
  color: #cbd5e1;
  background: #0f172a;
}

.footer-grid {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-brand {
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.footer-grid p {
  max-width: 620px;
  margin: 10px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: flex-start;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.16);
  font-weight: 800;
}

.filter-item.hidden {
  display: none;
}

@media (max-width: 1120px) {
  .movie-grid,
  .large-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 860px) {
  .nav-wrap {
    min-height: 64px;
  }

  .menu-toggle {
    display: block;
  }

  .site-menu {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 20px;
    background: #0f172a;
    box-shadow: var(--shadow);
  }

  .site-menu.open {
    display: flex;
  }

  .hero {
    height: 680px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 24px;
    align-content: center;
  }

  .hero-poster {
    display: none;
  }

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

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

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

  .detail-poster {
    min-height: 360px;
  }

  .footer-grid {
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .brand-subtitle {
    display: none;
  }

  .hero {
    height: 620px;
  }

  .hero-actions,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-controls {
    bottom: 36px;
  }

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

  .page-hero,
  .detail-hero,
  .article-section {
    padding: 22px;
    border-radius: 24px;
  }
}
