:root {
  --primary-50: #faf8f5;
  --primary-100: #f5f0e8;
  --primary-400: #c9aa78;
  --primary-500: #b8915a;
  --primary-600: #a67c4a;
  --primary-700: #8a6640;
  --secondary-50: #f0f9ff;
  --secondary-600: #0284c7;
  --accent-50: #fffbeb;
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --neutral-50: #fafaf9;
  --neutral-100: #f5f5f4;
  --neutral-200: #e7e5e4;
  --neutral-300: #d6d3d1;
  --neutral-400: #a8a29e;
  --neutral-500: #78716c;
  --neutral-600: #57534e;
  --neutral-700: #44403c;
  --neutral-800: #292524;
  --neutral-900: #1c1917;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 20px rgba(41, 37, 36, 0.08);
  --shadow-lg: 0 18px 40px rgba(41, 37, 36, 0.12);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--neutral-200);
  box-shadow: var(--shadow-sm);
}

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

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--primary-600), var(--secondary-600));
  border-radius: 50%;
  font-weight: 800;
  box-shadow: var(--shadow-md);
}

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

.brand-text strong,
.footer-brand strong {
  color: var(--neutral-900);
  font-size: 19px;
  font-weight: 760;
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--neutral-700);
  font-size: 15px;
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-600);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--neutral-700);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 12px 16px 18px;
  border-top: 1px solid var(--neutral-200);
  background: var(--white);
}

.mobile-nav a {
  display: block;
  padding: 10px 0;
  color: var(--neutral-700);
  font-weight: 650;
}

.mobile-nav.is-open {
  display: block;
}

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary-100), var(--secondary-50) 52%, var(--accent-50));
}

.hero-stage {
  position: relative;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

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

.hero-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.28;
  transform: scale(1.02);
}

.hero-slide.active .hero-media {
  animation: heroZoom 8s ease forwards;
}

@keyframes heroZoom {
  from {
    transform: scale(1.02);
  }
  to {
    transform: scale(1.08);
  }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.38) 46%, rgba(255, 255, 255, 0.88));
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.72fr);
  align-items: center;
  gap: 42px;
  padding: 64px 0;
}

.hero-text {
  max-width: 730px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-700);
  font-weight: 750;
  letter-spacing: 0.08em;
  font-size: 13px;
  text-transform: uppercase;
}

.hero h1,
.hero h2 {
  margin: 18px 0 20px;
  color: var(--neutral-900);
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.hero-text p {
  max-width: 660px;
  color: var(--neutral-700);
  font-size: clamp(17px, 2vw, 21px);
  margin: 0 0 26px;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 760;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.btn-primary {
  color: var(--white);
  background: var(--primary-600);
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  background: var(--primary-700);
}

.btn-ghost {
  color: var(--primary-700);
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(166, 124, 74, 0.22);
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  min-height: 440px;
  box-shadow: var(--shadow-lg);
  background-size: cover;
  background-position: center;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.72));
}

.hero-card-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 26px;
  color: var(--white);
}

.hero-card-panel strong {
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
}

.hero-card-panel span {
  display: inline-flex;
  margin-top: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-dot {
  width: 32px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(68, 64, 60, 0.25);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 48px;
  background: var(--primary-600);
}

.section {
  padding: 72px 0;
}

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

.section.soft {
  background: linear-gradient(135deg, var(--secondary-50), var(--primary-50));
}

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

.section-heading h2,
.page-hero h1,
.detail-title h1 {
  color: var(--neutral-900);
  margin: 8px 0 8px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.18;
  letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p,
.detail-title p {
  margin: 0;
  color: var(--neutral-600);
  max-width: 680px;
}

.section-action {
  flex: 0 0 auto;
  color: var(--primary-700);
  font-weight: 760;
}

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

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

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

.movie-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(166, 124, 74, 0.28);
  box-shadow: var(--shadow-lg);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background-color: var(--neutral-200);
  background-size: cover;
  background-position: center;
}

.poster-year {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  color: var(--white);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  font-size: 12px;
  font-weight: 750;
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: var(--primary-600);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
}

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

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

.card-meta span,
.detail-meta span,
.breadcrumb a,
.breadcrumb span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--neutral-100);
}

.movie-card h3 {
  margin: 12px 0 8px;
  color: var(--neutral-900);
  line-height: 1.3;
  font-size: 20px;
}

.movie-card h3 a:hover {
  color: var(--primary-700);
}

.movie-card p {
  color: var(--neutral-600);
  margin: 0 0 14px;
  font-size: 14px;
}

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

.tag-row span {
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--primary-700);
  background: var(--primary-50);
  font-size: 12px;
  font-weight: 650;
}

.movie-card.compact .poster {
  aspect-ratio: 16 / 9;
}

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

.horizontal-scroll {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 14px;
  scroll-snap-type: x proximity;
}

.horizontal-scroll .movie-card {
  width: 310px;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

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

.category-card {
  display: flex;
  min-height: 184px;
  padding: 22px;
  flex-direction: column;
  justify-content: space-between;
  color: var(--neutral-800);
  background: linear-gradient(135deg, var(--white), var(--primary-50));
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  color: var(--neutral-900);
}

.category-card p {
  margin: 0;
  color: var(--neutral-600);
  font-size: 14px;
}

.category-card span {
  color: var(--primary-700);
  font-weight: 760;
  margin-top: 18px;
}


.category-samples {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  font-size: 14px;
}

.category-samples a {
  color: var(--neutral-600);
}

.category-samples a:hover {
  color: var(--primary-700);
}

.page-hero {
  padding: 58px 0 36px;
  background: linear-gradient(135deg, var(--primary-100), var(--secondary-50), var(--accent-50));
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 16px;
  padding: 18px;
  margin: 26px 0 0;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.search-box,
.filter-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--neutral-700);
  font-size: 13px;
  font-weight: 700;
}

.search-box input,
.filter-box select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  color: var(--neutral-800);
  background: var(--white);
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  outline: none;
}

.search-box input:focus,
.filter-box select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 4px rgba(166, 124, 74, 0.12);
}

.empty-message {
  margin: 24px 0 0;
  padding: 18px;
  color: var(--neutral-600);
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--neutral-200);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 80px 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.rank-number {
  color: var(--primary-700);
  font-size: 28px;
  font-weight: 850;
  text-align: center;
}

.rank-cover {
  aspect-ratio: 16 / 10;
  background-color: var(--neutral-200);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-md);
}

.rank-info h2,
.rank-info h3 {
  margin: 0 0 6px;
  color: var(--neutral-900);
  font-size: 20px;
}

.rank-info p {
  margin: 0;
  color: var(--neutral-600);
}

.rank-link {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--white);
  background: var(--primary-600);
  font-weight: 750;
}

.detail-hero {
  padding: 40px 0 44px;
  background: linear-gradient(135deg, var(--primary-100), var(--secondary-50), var(--accent-50));
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.55fr);
  gap: 34px;
  align-items: start;
}

.detail-title {
  padding-top: 12px;
}

.detail-title h1 {
  margin-top: 14px;
}

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

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.72));
}

.player-frame.is-playing .player-cover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  position: relative;
  z-index: 3;
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: var(--primary-600);
  font-size: 34px;
  box-shadow: var(--shadow-lg);
}

.detail-panel {
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.detail-panel h2 {
  margin: 0 0 14px;
  color: var(--neutral-900);
  font-size: 22px;
}

.detail-panel p {
  color: var(--neutral-600);
  margin: 0 0 16px;
}

.detail-sidebar {
  display: grid;
  gap: 18px;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--neutral-200);
}

.info-list dt {
  color: var(--neutral-500);
}

.info-list dd {
  margin: 0;
  color: var(--neutral-800);
  font-weight: 650;
}

.breadcrumb {
  margin-bottom: 18px;
}

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

.content-block {
  margin-top: 22px;
}

.content-block h2 {
  margin: 28px 0 12px;
  color: var(--neutral-900);
  font-size: 24px;
}

.content-block p {
  margin: 0 0 18px;
  color: var(--neutral-700);
  font-size: 16px;
}

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

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

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

  .hero-card {
    min-height: 360px;
  }
}

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

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

  .hero,
  .hero-stage,
  .hero-content {
    min-height: 720px;
  }

  .hero-content {
    padding: 42px 0 78px;
  }

  .section-heading,
  .search-panel {
    grid-template-columns: 1fr;
  }

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

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

  .rank-item {
    grid-template-columns: 58px 120px minmax(0, 1fr);
  }

  .rank-link {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

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

  .brand-text strong {
    font-size: 16px;
  }

  .brand-text small {
    display: none;
  }

  .hero,
  .hero-stage,
  .hero-content {
    min-height: 760px;
  }

  .hero h1,
  .hero h2 {
    font-size: 40px;
  }

  .hero-card {
    min-height: 300px;
  }

  .section {
    padding: 52px 0;
  }

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

  .horizontal-scroll .movie-card {
    width: 280px;
  }

  .rank-item {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .rank-cover {
    display: none;
  }

  .rank-link {
    grid-column: 2 / -1;
  }

  .detail-panel {
    padding: 18px;
  }
}
