:root {
  --primary-50: #eef8fc;
  --primary-100: #cce5f1;
  --primary-300: #64b5d8;
  --primary-600: #006494;
  --primary-700: #004b6f;
  --primary-900: #002538;
  --accent-50: #fef9e7;
  --accent-300: #f4d35e;
  --accent-600: #ee964b;
  --neutral-50: #f8f9fa;
  --neutral-100: #edf2f4;
  --neutral-300: #ced4da;
  --neutral-500: #6c757d;
  --neutral-700: #343a40;
  --neutral-900: #212529;
  --white: #ffffff;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --shadow-soft: 0 18px 50px rgba(0, 37, 56, 0.12);
  --shadow-card: 0 14px 35px rgba(0, 37, 56, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--neutral-900);
  background: var(--neutral-50);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--white);
  font-weight: 800;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
  box-shadow: 0 10px 24px rgba(0, 100, 148, 0.25);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.brand-text small {
  color: var(--neutral-500);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--neutral-700);
  font-weight: 600;
  white-space: nowrap;
}

.main-nav a {
  transition: color 0.2s ease;
}

.main-nav a:hover {
  color: var(--primary-600);
}

.header-search {
  display: flex;
  width: min(330px, 28vw);
  padding: 4px;
  background: var(--neutral-100);
  border: 1px solid rgba(0, 100, 148, 0.12);
  border-radius: 999px;
}

.header-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 9px 12px;
}

.header-search button,
.primary-btn,
.secondary-btn,
.filter-btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.primary-btn,
.filter-btn {
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  box-shadow: 0 10px 22px rgba(0, 100, 148, 0.22);
}

.header-search button {
  padding: 8px 14px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  font-weight: 800;
}

.secondary-btn {
  color: var(--primary-700);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 100, 148, 0.16);
}

.primary-btn:hover,
.secondary-btn:hover,
.filter-btn:hover,
.header-search button:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: var(--neutral-100);
}

.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--neutral-900);
}

.mobile-panel {
  display: none;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  background: var(--white);
  border: 1px solid rgba(0, 100, 148, 0.12);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.mobile-panel.is-open {
  display: grid;
}

.mobile-panel a {
  padding: 10px 12px;
  background: var(--neutral-50);
  border-radius: 12px;
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  padding: 76px 0 58px;
  color: var(--white);
  background:
    radial-gradient(circle at 18% 14%, rgba(244, 211, 94, 0.30), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(238, 150, 75, 0.24), transparent 26%),
    linear-gradient(135deg, var(--primary-900), var(--primary-700) 52%, var(--primary-600));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(120deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.88), transparent 92%);
}

.hero-shell {
  position: relative;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: 42px;
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--primary-700);
  background: var(--accent-50);
  border-radius: 999px;
}

.hero h1 {
  margin: 20px 0 14px;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-lead {
  max-width: 720px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.hero-stats div {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
}

.hero-stats strong {
  display: block;
  font-size: 30px;
  line-height: 1;
}

.hero-stats span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.hero-slider {
  position: relative;
  min-height: 500px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateX(22px) scale(0.98);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.hero-card {
  display: grid;
  grid-template-columns: 0.86fr 1fr;
  gap: 18px;
  min-height: 500px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(18px);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  min-height: 460px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
}

.hero-poster img,
.movie-cover img,
.rank-cover img,
.detail-poster img,
.related-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-poster img.is-hidden,
.movie-cover img.is-hidden,
.rank-cover img.is-hidden,
.detail-poster img.is-hidden,
.related-cover img.is-hidden {
  display: none;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 58%);
}

.hero-card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 12px 10px;
}

.hero-card-body h2 {
  margin: 0 0 12px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
}

.hero-card-body p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.78);
}

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: rgba(255, 255, 255, 0.90);
  background: rgba(255, 255, 255, 0.14);
}

.hero-dots {
  position: absolute;
  right: 30px;
  bottom: 28px;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.36);
}

.hero-dots button.is-active {
  width: 30px;
  border-radius: 999px;
  background: var(--accent-300);
}

.section {
  padding: 58px 0;
}

.section-muted {
  background: var(--white);
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
  margin: 10px 0 0;
  color: var(--neutral-900);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.detail-title p {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--neutral-500);
}

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(0, 100, 148, 0.10);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 45px rgba(0, 37, 56, 0.16);
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 18%, rgba(244, 211, 94, 0.38), transparent 28%),
    linear-gradient(135deg, var(--primary-700), var(--primary-600));
}

.movie-cover::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.54), transparent);
  pointer-events: none;
}

.movie-score,
.movie-year {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.50);
  backdrop-filter: blur(8px);
}

.movie-score {
  top: 10px;
  left: 10px;
}

.movie-year {
  right: 10px;
  bottom: 10px;
}

.movie-info {
  padding: 14px;
}

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

.movie-line {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--neutral-500);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--neutral-500);
  font-size: 13px;
}

.movie-meta a,
.rank-meta strong,
.detail-meta strong {
  color: var(--primary-700);
  font-weight: 800;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  color: var(--primary-700);
  background: var(--primary-50);
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  padding: 22px;
  color: var(--white);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 75% 18%, rgba(244, 211, 94, 0.34), transparent 24%),
    linear-gradient(135deg, var(--primary-700), var(--primary-600));
  box-shadow: var(--shadow-card);
}

.category-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.category-card p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.category-card strong {
  position: absolute;
  right: 20px;
  bottom: 16px;
  font-size: 44px;
  line-height: 1;
  opacity: 0.22;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.rank-item {
  display: grid;
  grid-template-columns: auto 78px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: var(--white);
  border: 1px solid rgba(0, 100, 148, 0.10);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--white);
  font-weight: 900;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
}

.rank-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-700), var(--accent-600));
}

.rank-title {
  font-weight: 900;
}

.rank-body p {
  margin: 5px 0 8px;
  color: var(--neutral-500);
  font-size: 13px;
}

.page-hero,
.detail-hero {
  padding: 52px 0;
  background:
    radial-gradient(circle at 18% 10%, rgba(244, 211, 94, 0.20), transparent 30%),
    linear-gradient(135deg, var(--white), var(--primary-50));
  border-bottom: 1px solid rgba(0, 100, 148, 0.08);
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 160px 160px 120px;
  gap: 12px;
  margin: 24px 0 28px;
  padding: 14px;
  background: var(--white);
  border: 1px solid rgba(0, 100, 148, 0.10);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--neutral-300);
  border-radius: 14px;
  outline: 0;
  padding: 0 13px;
  background: var(--white);
}

.filter-btn {
  min-height: 44px;
  padding: 0 16px;
  font-weight: 800;
}

.hidden-by-filter {
  display: none !important;
}

.detail-wrap {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start;
}

.detail-poster {
  position: sticky;
  top: 100px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--primary-700), var(--accent-600));
  box-shadow: var(--shadow-soft);
}

.detail-title h1 {
  margin-top: 0;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.detail-tags span {
  padding: 6px 12px;
  color: var(--primary-700);
  background: var(--primary-50);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.player-card,
.text-card {
  overflow: hidden;
  margin-top: 24px;
  background: var(--white);
  border: 1px solid rgba(0, 100, 148, 0.10);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.player-head,
.text-card h2 {
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(0, 100, 148, 0.08);
  font-size: 20px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #000000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  border: 0;
  cursor: pointer;
  background:
    radial-gradient(circle, rgba(0, 100, 148, 0.20), rgba(0, 0, 0, 0.66)),
    transparent;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  padding-left: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-600), var(--accent-600));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
  font-size: 36px;
}

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

.text-card div {
  padding: 20px;
}

.text-card p {
  margin: 0 0 12px;
}

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

.related-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(0, 100, 148, 0.10);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.related-cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-700), var(--accent-600));
}

.related-card strong {
  display: block;
  padding: 10px 10px 2px;
  line-height: 1.35;
}

.related-card span {
  display: block;
  padding: 0 10px 12px;
  color: var(--neutral-500);
  font-size: 12px;
}

.search-results-note {
  margin: 0 0 18px;
  color: var(--neutral-500);
}

.sitemap-list {
  columns: 4 240px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.sitemap-list li {
  break-inside: avoid;
  margin: 0 0 9px;
}

.sitemap-list a {
  color: var(--primary-700);
  font-weight: 700;
}

.site-footer {
  color: rgba(255, 255, 255, 0.78);
  background: var(--neutral-900);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 28px;
  padding: 42px 0;
}

.footer-brand {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--white);
  font-size: 22px;
  font-weight: 900;
}

.site-footer h3 {
  margin: 0 0 12px;
  color: var(--white);
}

.site-footer a {
  display: block;
  margin: 8px 0;
  transition: color 0.2s ease;
}

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

.footer-bottom {
  padding: 16px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1080px) {
  .main-nav,
  .header-search {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

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

  .hero-slider {
    min-height: 460px;
  }

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

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

  .detail-poster {
    position: relative;
    top: auto;
    width: min(360px, 100%);
  }
}

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

  .hero {
    min-height: auto;
    padding: 42px 0;
  }

  .hero-card {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-poster {
    min-height: 280px;
  }

  .hero-slider {
    min-height: 640px;
  }

  .hero-stats,
  .footer-grid,
  .rank-list,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

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

  .rank-item {
    grid-template-columns: auto 70px 1fr;
  }
}

@media (max-width: 460px) {
  .brand-text strong {
    font-size: 17px;
  }

  .brand-text small {
    display: none;
  }

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