:root {
  --sand-50: #fdfbf7;
  --sand-100: #f8f3e8;
  --sand-200: #eadfc9;
  --dune-50: #fbf6ee;
  --dune-100: #f4ede0;
  --dune-500: #c88a48;
  --dune-600: #b37439;
  --desert-50: #fef8f0;
  --desert-100: #fdefd9;
  --desert-400: #f2a15d;
  --desert-500: #ee7b29;
  --desert-600: #d7651c;
  --stone-50: #faf8f4;
  --stone-100: #eee8de;
  --stone-300: #c9bead;
  --stone-500: #847766;
  --stone-700: #6f6555;
  --stone-800: #5d5449;
  --stone-900: #302a25;
  --white: #ffffff;
  --shadow-sm: 0 10px 25px rgba(93, 84, 73, 0.08);
  --shadow-md: 0 18px 45px rgba(93, 84, 73, 0.16);
  --shadow-xl: 0 30px 80px rgba(30, 25, 22, 0.26);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--stone-800);
  background: linear-gradient(180deg, var(--sand-50), var(--stone-50));
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: linear-gradient(90deg, rgba(253, 251, 247, 0.96), rgba(251, 246, 238, 0.96));
  border-bottom: 1px solid var(--sand-200);
  box-shadow: 0 8px 24px rgba(93, 84, 73, 0.08);
  backdrop-filter: blur(18px);
}

.nav-shell {
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 22px;
  color: var(--stone-800);
  white-space: nowrap;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--desert-500), var(--dune-600));
  box-shadow: 0 10px 24px rgba(238, 123, 41, 0.25);
}

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

.desktop-nav a,
.mobile-panel a {
  font-weight: 700;
  color: var(--stone-700);
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.nav-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--sand-200);
  box-shadow: var(--shadow-sm);
}

.nav-search input {
  width: 220px;
  border: none;
  outline: none;
  background: transparent;
  padding: 10px 12px;
  color: var(--stone-800);
}

.nav-search button,
.btn {
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 800;
  cursor: pointer;
  color: var(--white);
  background: linear-gradient(135deg, var(--desert-500), var(--dune-600));
  box-shadow: 0 12px 28px rgba(238, 123, 41, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-search button:hover,
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(238, 123, 41, 0.32);
}

.btn-secondary {
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.36);
  backdrop-filter: blur(8px);
}

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 12px;
  background: var(--desert-50);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.mobile-menu-button span {
  width: 20px;
  height: 2px;
  background: var(--stone-800);
  border-radius: 99px;
}

.mobile-panel {
  display: none;
  padding: 14px 24px 22px;
  border-top: 1px solid var(--sand-200);
  background: var(--sand-50);
}

.mobile-panel.is-open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

main {
  min-height: 70vh;
}

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  background: var(--stone-900);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  transition: transform 4s ease;
}

.hero-slide.is-active img {
  transform: scale(1);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 18%, rgba(238, 123, 41, 0.28), transparent 28%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.55) 42%, rgba(0, 0, 0, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  min-height: 72vh;
  margin: 0 auto;
  padding: 72px 24px;
  display: flex;
  align-items: center;
}

.hero-text {
  max-width: 760px;
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--desert-400);
  font-weight: 800;
  letter-spacing: 0.03em;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 28px;
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.86);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-meta,
.meta-line,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-meta span,
.meta-line span,
.detail-meta span,
.year-chip,
.play-chip,
.tag-row span,
.category-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.hero-meta span {
  padding: 8px 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 32px;
  z-index: 4;
  width: min(1232px, calc(100% - 48px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.hero-dot {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(12px);
  cursor: pointer;
  text-align: left;
  min-width: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-dot:hover,
.hero-dot.is-active {
  background: rgba(238, 123, 41, 0.88);
  transform: translateY(-2px);
}

.hero-dot img {
  width: 46px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  flex: none;
}

.hero-dot span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px;
}

.section.compact {
  padding-top: 36px;
}

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

.section-title {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  color: var(--stone-800);
  letter-spacing: -0.04em;
}

.section-subtitle {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--stone-500);
  line-height: 1.8;
}

.text-link {
  font-weight: 900;
  color: var(--desert-600);
}

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

.category-card {
  position: relative;
  min-height: 210px;
  border-radius: 26px;
  overflow: hidden;
  background: var(--stone-800);
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card img {
  width: 100%;
  height: 100%;
  min-height: 210px;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 0.35s ease;
}

.category-card:hover img {
  transform: scale(1.1);
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.78));
}

.category-card-body {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 22px;
  color: var(--white);
}

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

.category-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.card-link {
  display: block;
  height: 100%;
}

.poster-wrap {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--dune-100), var(--stone-100));
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.62));
}

.year-chip,
.play-chip {
  position: absolute;
  z-index: 3;
  padding: 7px 10px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.66);
  backdrop-filter: blur(8px);
}

.year-chip {
  top: 12px;
  right: 12px;
}

.play-chip {
  left: 12px;
  bottom: 12px;
  background: rgba(238, 123, 41, 0.9);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 4;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: var(--white);
  font-weight: 900;
  background: linear-gradient(135deg, var(--desert-500), var(--dune-600));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

.card-body {
  padding: 18px;
}

.meta-line {
  margin-bottom: 10px;
}

.meta-line span,
.detail-meta span,
.category-pill {
  padding: 6px 10px;
  color: var(--dune-600);
  background: var(--desert-50);
}

.card-body h3 {
  margin: 0 0 10px;
  color: var(--stone-800);
  font-size: 19px;
  line-height: 1.35;
}

.card-body p {
  margin: 0;
  min-height: 48px;
  color: var(--stone-500);
  line-height: 1.65;
}

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

.tag-row span {
  padding: 6px 9px;
  color: var(--stone-700);
  background: var(--sand-100);
}

.feature-layout {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 26px;
  align-items: stretch;
}

.rank-panel {
  border-radius: 28px;
  padding: 24px;
  background: linear-gradient(135deg, var(--stone-800), var(--stone-900));
  box-shadow: var(--shadow-md);
  color: var(--white);
}

.rank-panel h3 {
  margin: 0 0 18px;
  font-size: 24px;
}

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

.rank-line {
  display: grid;
  grid-template-columns: auto 52px 1fr auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-line:hover {
  background: rgba(238, 123, 41, 0.24);
  transform: translateX(4px);
}

.rank-line img {
  width: 52px;
  height: 68px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-number {
  font-size: 18px;
  font-weight: 900;
  color: var(--desert-400);
}

.rank-title {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 800;
}

.rank-meta {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 85% 10%, rgba(238, 123, 41, 0.34), transparent 32%),
    linear-gradient(135deg, var(--stone-800), var(--stone-900));
}

.page-hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 24px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
}

.breadcrumb a:hover {
  color: var(--desert-400);
}

.page-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 5vw, 60px);
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 820px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 18px;
  line-height: 1.8;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  margin-bottom: 28px;
  padding: 14px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid var(--sand-200);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--stone-800);
  background: var(--sand-50);
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--desert-500);
  box-shadow: 0 0 0 4px rgba(238, 123, 41, 0.14);
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.category-pill:hover {
  color: var(--white);
  background: var(--desert-500);
}

.detail-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px 70px;
}

.player-card {
  overflow: hidden;
  border-radius: 30px;
  background: var(--stone-900);
  box-shadow: var(--shadow-xl);
}

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

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.68));
  cursor: pointer;
  z-index: 3;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.player-button {
  width: 92px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--white);
  font-size: 34px;
  background: linear-gradient(135deg, var(--desert-500), var(--dune-600));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  transform: translateZ(0);
}

.detail-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  margin-top: 34px;
}

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow-md);
  background: var(--stone-100);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-content h1 {
  margin: 0 0 14px;
  color: var(--stone-800);
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.05em;
}

.detail-content .lead {
  margin: 20px 0 0;
  color: var(--stone-700);
  font-size: 18px;
  line-height: 1.85;
}

.content-panel {
  margin-top: 26px;
  padding: 26px;
  border-radius: 26px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.content-panel h2 {
  margin: 0 0 14px;
  font-size: 24px;
  color: var(--stone-800);
}

.content-panel p {
  margin: 0;
  color: var(--stone-600, #716557);
  line-height: 1.9;
}

.site-footer {
  color: rgba(255, 255, 255, 0.72);
  background: linear-gradient(135deg, var(--stone-800), var(--stone-900));
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 54px 24px 38px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 34px;
}

.footer-logo {
  color: var(--white);
}

.site-footer p {
  max-width: 560px;
  line-height: 1.8;
}

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

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a:hover {
  color: var(--desert-400);
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 24px 28px;
  color: rgba(255, 255, 255, 0.45);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.is-filtered-out {
  display: none !important;
}

.empty-state {
  display: none;
  padding: 32px;
  border-radius: 24px;
  color: var(--stone-500);
  text-align: center;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.empty-state.is-visible {
  display: block;
}

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

  .mobile-menu-button {
    display: inline-flex;
  }

  .nav-search {
    margin-left: auto;
  }

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

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

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

  .hero-dot:nth-child(n+4) {
    display: none;
  }

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

  .detail-poster {
    max-width: 340px;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    height: auto;
    min-height: 66px;
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .site-logo {
    font-size: 18px;
  }

  .nav-search {
    order: 3;
    width: 100%;
  }

  .nav-search input {
    width: 100%;
  }

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

  .hero-content {
    padding: 46px 18px 160px;
    align-items: flex-start;
  }

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

  .hero-controls {
    bottom: 18px;
    width: calc(100% - 32px);
    grid-template-columns: 1fr;
  }

  .hero-dot:nth-child(n+2) {
    display: none;
  }

  .section,
  .page-hero-inner,
  .detail-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  .section-header {
    display: block;
  }

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

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

  .rank-line {
    grid-template-columns: auto 46px 1fr;
  }

  .rank-line img {
    width: 46px;
    height: 60px;
  }

  .rank-meta {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .content-panel {
    padding: 20px;
  }
}

@media (max-width: 460px) {
  .category-grid,
  .movie-grid,
  .movie-grid.dense {
    grid-template-columns: 1fr;
  }

  .poster-wrap {
    aspect-ratio: 4 / 5;
  }

  .player-button {
    width: 72px;
    height: 72px;
    font-size: 28px;
  }
}
