* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
  --bg: #f8fafc;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #e2e8f0;
  --line: #dbe3ef;
  --cyan: #06b6d4;
  --cyan-dark: #0891b2;
  --orange: #f59e0b;
  --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f8fafc 0%, #eef4fb 100%);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

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

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

.logo-mark {
  display: inline-flex;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 12px 28px rgba(6, 182, 212, 0.32);
}

.logo-text {
  font-size: 22px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
}

.main-nav a:hover {
  color: #0e7490;
  background: #ecfeff;
}

.nav-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  background: #ecfeff;
  color: #0e7490;
  font-size: 22px;
  padding: 8px 12px;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: #020617;
}

.hero-track {
  position: relative;
  min-height: 72vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 800ms ease;
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(320px, 1.35fr);
  align-items: end;
  gap: 56px;
  padding: 110px max(32px, calc((100vw - 1180px) / 2)) 70px;
  color: #ffffff;
  background:
    radial-gradient(circle at 22% 30%, rgba(6, 182, 212, 0.42), transparent 34%),
    radial-gradient(circle at 78% 28%, rgba(37, 99, 235, 0.42), transparent 30%),
    linear-gradient(135deg, #020617, #0f172a 48%, #111827);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-art {
  min-height: 420px;
  border-radius: 34px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.03)),
    linear-gradient(135deg, var(--p1), var(--p2));
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.hero-art span {
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.hero-art strong {
  font-size: clamp(36px, 4.5vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.hero-copy h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-copy h2 {
  margin: 0 0 18px;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 14px;
  color: #67e8f9;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.hero-copy p {
  max-width: 760px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.85;
}

.hero-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 24px;
}

.hero-meta span,
.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  padding: 13px 22px;
  font-weight: 900;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

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

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 36px rgba(6, 182, 212, 0.24);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  font-size: 34px;
  line-height: 1;
  background: rgba(15, 23, 42, 0.56);
  cursor: pointer;
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

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

.hero-dots button {
  width: 26px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #67e8f9;
}

.intro-panel,
.section-block,
.page-title,
.ranking-page,
.detail-content,
.player-section {
  margin-top: 34px;
}

.intro-panel {
  padding: 34px;
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.intro-panel h2,
.section-heading h2,
.page-title h1 {
  margin: 0;
  letter-spacing: -0.04em;
}

.intro-panel p,
.section-heading p,
.page-title p {
  color: var(--muted);
  line-height: 1.8;
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.quick-links a {
  padding: 10px 15px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0e7490;
  font-weight: 800;
}

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

.section-heading h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.section-more {
  flex-shrink: 0;
  color: #0891b2;
  font-weight: 900;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 22px;
  padding: 16px;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: #f8fafc;
}

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

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.09);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

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

.poster {
  min-height: 252px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(2, 6, 23, 0.42)),
    linear-gradient(135deg, var(--p1), var(--p2));
}

.poster-type,
.poster-meta {
  align-self: flex-start;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 13px;
  font-weight: 800;
}

.poster-title {
  font-size: 28px;
  line-height: 1.08;
  font-weight: 950;
  letter-spacing: -0.05em;
  text-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

.card-body {
  padding: 18px;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.rating {
  color: #f59e0b;
}

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

.card-body h3 a:hover {
  color: #0891b2;
}

.card-body p {
  margin: 0 0 12px;
  min-height: 66px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 14px;
}

.card-tags,
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  color: #0e7490;
  background: #ecfeff;
  font-size: 12px;
  font-weight: 800;
}

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

.category-card,
.category-summary {
  border-radius: 24px;
  padding: 24px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.category-card strong,
.category-summary h2 {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
}

.category-card span,
.category-summary strong {
  color: #0891b2;
  font-weight: 900;
}

.category-card p,
.category-summary p {
  color: var(--muted);
  line-height: 1.72;
}

.category-card:hover,
.category-summary:hover {
  transform: translateY(-3px);
}

.mini-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  font-size: 14px;
  color: #0e7490;
  font-weight: 700;
}

.ranking-list,
.ranking-page {
  display: grid;
  gap: 12px;
}

.ranking-row,
.rank-card a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.rank-card a {
  grid-template-columns: auto 1fr;
  align-items: start;
}

.rank-no {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  font-weight: 950;
}

.rank-no.large {
  width: 46px;
  height: 46px;
  border-radius: 16px;
}

.ranking-row em,
.rank-card small {
  color: var(--muted);
  font-style: normal;
}

.rank-card h2 {
  margin: 0 0 8px;
}

.rank-card p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.7;
}

.page-main {
  padding: 28px 0 64px;
}

.page-title {
  padding: 28px 0 10px;
}

.page-title h1 {
  font-size: clamp(34px, 5vw, 56px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 18px;
  color: #64748b;
  font-size: 14px;
}

.breadcrumb a {
  color: #0e7490;
  font-weight: 800;
}

.detail-hero {
  padding: 54px 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.20), transparent 28%),
    linear-gradient(135deg, var(--p1), var(--p2));
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(220px, 360px) 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  min-height: 460px;
  border-radius: 30px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.26);
}

.detail-poster span,
.detail-poster em {
  align-self: flex-start;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-style: normal;
  font-weight: 800;
}

.detail-poster strong {
  font-size: clamp(34px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.detail-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 1;
  letter-spacing: -0.07em;
}

.detail-line {
  max-width: 820px;
  color: #e0f2fe;
  font-size: 19px;
  line-height: 1.85;
}

.player-section h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.22);
}

.video-shell 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: 14px;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 45%, rgba(6, 182, 212, 0.2), transparent 28%),
    rgba(2, 6, 23, 0.62);
  cursor: pointer;
}

.play-layer span {
  display: inline-flex;
  width: 88px;
  height: 88px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  font-size: 34px;
  box-shadow: 0 20px 40px rgba(6, 182, 212, 0.28);
}

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

.video-shell.is-playing .play-layer {
  display: none;
}

.detail-content {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 20px;
}

.content-card {
  padding: 28px;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.content-card h2 {
  margin: 0 0 12px;
}

.content-card p {
  margin: 0;
  color: #475569;
  line-height: 1.9;
}

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

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

.footer-logo {
  color: #ffffff;
  font-size: 24px;
  font-weight: 950;
}

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

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-links strong {
  color: #ffffff;
  margin-bottom: 6px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-size: 14px;
}

.palette-1 { --p1: #06b6d4; --p2: #2563eb; }
.palette-2 { --p1: #8b5cf6; --p2: #ec4899; }
.palette-3 { --p1: #f97316; --p2: #ef4444; }
.palette-4 { --p1: #14b8a6; --p2: #0f766e; }
.palette-5 { --p1: #6366f1; --p2: #312e81; }
.palette-6 { --p1: #22c55e; --p2: #15803d; }
.palette-7 { --p1: #eab308; --p2: #b45309; }
.palette-8 { --p1: #0ea5e9; --p2: #075985; }
.palette-9 { --p1: #d946ef; --p2: #7e22ce; }
.palette-10 { --p1: #f43f5e; --p2: #be123c; }
.palette-11 { --p1: #64748b; --p2: #0f172a; }
.palette-12 { --p1: #10b981; --p2: #065f46; }

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

@media (max-width: 1080px) {
  .movie-grid,
  .full-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .hero-art {
    min-height: 320px;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

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

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

  .hero,
  .hero-track {
    min-height: 86vh;
  }

  .hero-slide {
    min-height: 86vh;
    padding: 96px 24px 68px;
    gap: 28px;
  }

  .hero-art {
    min-height: 240px;
    border-radius: 24px;
  }

  .hero-control {
    display: none;
  }

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

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

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

  .ranking-row {
    grid-template-columns: auto 1fr;
  }

  .ranking-row em {
    grid-column: 2;
  }

  .detail-hero {
    padding: 30px 0;
  }

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