:root {
  --sand-50: #faf8f3;
  --sand-100: #f4efe3;
  --sand-200: #ebe2cd;
  --sand-300: #ddc9a3;
  --sand-500: #b9935c;
  --sand-700: #76532a;
  --sand-800: #5e3e1d;
  --sand-900: #4a3218;
  --dune-50: #fdf6ed;
  --dune-100: #fae9d1;
  --dune-200: #f5d4a3;
  --dune-300: #ebb76a;
  --dune-400: #e19838;
  --dune-500: #d97c1e;
  --dune-600: #c05f14;
  --dune-700: #9c4613;
  --cream: #fffaf0;
  --white: #ffffff;
  --text: #4a3218;
  --muted: #7d6648;
  --shadow-soft: 0 20px 50px rgba(74, 50, 24, 0.12);
  --shadow-card: 0 16px 36px rgba(74, 50, 24, 0.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(217, 124, 30, 0.16), transparent 34rem),
    linear-gradient(180deg, var(--sand-50), #fffdf8 42rem, var(--sand-50));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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;
  backdrop-filter: blur(18px);
  background: rgba(255, 250, 240, 0.86);
  border-bottom: 1px solid rgba(221, 201, 163, 0.72);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--sand-900);
}

.brand-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--dune-500), var(--dune-700));
  box-shadow: 0 10px 24px rgba(217, 124, 30, 0.32);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  color: var(--sand-700);
  font-weight: 700;
}

.desktop-nav a,
.mobile-panel a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
  color: var(--dune-600);
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  background: var(--sand-100);
  color: var(--sand-900);
  font-size: 22px;
  padding: 8px 12px;
}

.mobile-panel {
  display: none;
  border-top: 1px solid var(--sand-200);
  background: rgba(255, 250, 240, 0.96);
}

.mobile-panel nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 18px;
  display: grid;
  gap: 12px;
  color: var(--sand-700);
  font-weight: 700;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(circle at 12% 12%, rgba(235, 183, 106, 0.55), transparent 25rem),
    radial-gradient(circle at 76% 18%, rgba(217, 124, 30, 0.28), transparent 28rem),
    linear-gradient(135deg, var(--dune-50), var(--sand-100) 48%, #fff8ea);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 140px;
  background: linear-gradient(180deg, transparent, var(--sand-50));
  pointer-events: none;
}

.hero-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  align-items: center;
  gap: 48px;
  padding: 72px 0 88px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--dune-700);
  background: rgba(250, 233, 209, 0.86);
  border: 1px solid rgba(217, 124, 30, 0.20);
  font-weight: 800;
  font-size: 14px;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 18px 0 18px;
  font-size: clamp(36px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
  color: var(--sand-900);
}

.hero h1 span,
.gradient-text {
  background: linear-gradient(90deg, var(--dune-600), var(--sand-800));
  -webkit-background-clip: text;
  color: transparent;
}

.hero-copy p,
.page-hero p,
.section-head p,
.detail-title p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--dune-500), var(--dune-700));
  box-shadow: 0 14px 30px rgba(217, 124, 30, 0.28);
}

.btn-secondary {
  color: var(--sand-800);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(221, 201, 163, 0.88);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(540px, 100%);
  padding: 10px 12px 10px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(221, 201, 163, 0.92);
  box-shadow: 0 18px 40px rgba(74, 50, 24, 0.08);
}

.hero-search input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15px;
  color: var(--sand-900);
}

.hero-search button {
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  color: #fff;
  background: var(--dune-600);
  font-weight: 800;
  cursor: pointer;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98) translateY(12px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-card {
  overflow: hidden;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.hero-card-img {
  position: relative;
  min-height: 330px;
  background: var(--sand-200);
}

.hero-card-img img {
  width: 100%;
  height: 420px;
  object-fit: cover;
}

.hero-card-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 36%, rgba(74, 50, 24, 0.72));
}

.hero-card-content {
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 24px;
  color: #fff;
  z-index: 2;
}

.hero-card-content h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: 30px;
}

.hero-card-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.65;
}

.hero-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
}

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

.hero-pills span,
.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--sand-800);
  background: var(--dune-100);
  font-size: 12px;
  font-weight: 800;
}

.carousel-dots {
  position: absolute;
  left: 24px;
  bottom: -28px;
  display: flex;
  gap: 8px;
}

.carousel-dots button {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: var(--sand-300);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.carousel-dots button.active {
  width: 30px;
  background: var(--dune-600);
}

.section-block {
  padding: 72px 0;
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
  margin-top: 0;
}

.section-head h2,
.page-title {
  margin-bottom: 10px;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(221, 201, 163, 0.72);
  box-shadow: 0 10px 26px rgba(74, 50, 24, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
  border-color: rgba(217, 124, 30, 0.36);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--sand-200);
}

.poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.play-dot {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(217, 124, 30, 0.92);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--dune-500), var(--dune-700));
  font-weight: 900;
}

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

.movie-title {
  display: block;
  margin-bottom: 8px;
  color: var(--sand-900);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-meta {
  color: var(--dune-700);
  font-size: 13px;
  font-weight: 800;
}

.movie-card p {
  min-height: 48px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

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

.category-card {
  min-height: 150px;
  padding: 22px;
  border-radius: 24px;
  color: var(--sand-900);
  background:
    radial-gradient(circle at top right, rgba(217, 124, 30, 0.18), transparent 10rem),
    rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(221, 201, 163, 0.74);
  box-shadow: 0 10px 26px rgba(74, 50, 24, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.page-hero {
  padding: 72px 0 42px;
  background:
    radial-gradient(circle at 16% 0%, rgba(235, 183, 106, 0.34), transparent 22rem),
    linear-gradient(180deg, rgba(255, 250, 240, 0.94), rgba(250, 248, 243, 0));
}

.filter-panel {
  position: sticky;
  top: 88px;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 170px 170px;
  gap: 12px;
  margin: 0 0 28px;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.90);
  border: 1px solid rgba(221, 201, 163, 0.84);
  box-shadow: 0 14px 34px rgba(74, 50, 24, 0.07);
  backdrop-filter: blur(18px);
}

.filter-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--sand-50);
  border: 1px solid var(--sand-200);
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--sand-200);
  border-radius: 14px;
  padding: 0 14px;
  color: var(--sand-900);
  background: var(--sand-50);
  outline: 0;
  font-size: 15px;
}

.filter-input-wrap input {
  border: 0;
  padding: 0;
}

.no-result {
  display: none;
  padding: 26px;
  border-radius: 20px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--sand-200);
}

.ranking-list {
  display: grid;
  gap: 18px;
}

.rank-row {
  display: grid;
  grid-template-columns: 78px 120px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(221, 201, 163, 0.72);
  box-shadow: 0 10px 26px rgba(74, 50, 24, 0.06);
}

.rank-num {
  font-size: 34px;
  font-weight: 950;
  color: var(--dune-600);
  text-align: center;
}

.rank-row img {
  width: 120px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  background: var(--sand-200);
}

.rank-row h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.rank-row p {
  color: var(--muted);
  line-height: 1.7;
}

.detail-hero {
  padding: 54px 0 34px;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--sand-700);
  font-size: 14px;
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 360px;
  gap: 36px;
  align-items: start;
}

.player-card,
.detail-side,
.story-card {
  overflow: hidden;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(221, 201, 163, 0.78);
  box-shadow: var(--shadow-card);
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.52));
  cursor: pointer;
}

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

.play-button {
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--dune-500), var(--dune-700));
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.28);
  font-size: 34px;
  cursor: pointer;
}

.player-caption {
  padding: 20px 24px 24px;
}

.player-caption h2 {
  margin: 0 0 10px;
}

.player-caption p {
  color: var(--muted);
  line-height: 1.75;
}

.detail-side img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--sand-200);
}

.detail-side-body,
.story-card {
  padding: 24px;
}

.meta-grid {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sand-200);
  color: var(--muted);
}

.meta-item strong {
  color: var(--sand-900);
}

.story-card {
  margin-top: 26px;
}

.story-card h2 {
  margin: 0 0 14px;
}

.story-card p {
  color: var(--muted);
  line-height: 1.85;
}

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

.compact-card .movie-title {
  font-size: 16px;
}

.site-footer {
  margin-top: 72px;
  padding: 52px 0 24px;
  background: linear-gradient(180deg, rgba(250, 233, 209, 0.42), rgba(250, 248, 243, 0.92));
  border-top: 1px solid var(--sand-200);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 38px;
}

.site-footer p {
  color: var(--muted);
  line-height: 1.7;
}

.footer-links {
  display: grid;
  gap: 10px;
  color: var(--sand-700);
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--dune-600);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--sand-200);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

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

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

  .mobile-panel.open {
    display: block;
  }

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

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

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

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

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

  .rank-row {
    grid-template-columns: 56px 96px 1fr;
  }

  .rank-row .btn-secondary {
    grid-column: 2 / -1;
  }
}

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

  .nav-shell {
    height: 64px;
  }

  .brand {
    font-size: 18px;
  }

  .hero {
    min-height: auto;
  }

  .hero-layout {
    padding: 42px 0 76px;
    gap: 32px;
  }

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

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

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

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

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

  .movie-title {
    font-size: 16px;
  }

  .rank-row {
    grid-template-columns: 44px 82px 1fr;
    gap: 12px;
  }

  .rank-row img {
    width: 82px;
  }

  .rank-row h2 {
    font-size: 18px;
  }

  .rank-row p {
    display: none;
  }
}
