:root {
  --sand-50: #faf8f3;
  --sand-100: #f5f0e6;
  --sand-200: #e8ddc4;
  --sand-300: #dbc5a0;
  --sand-400: #c9a876;
  --sand-500: #b8895a;
  --sand-600: #a3744c;
  --sand-700: #885e40;
  --sand-800: #6f4d38;
  --sand-900: #5b4030;
  --desert-50: #fef9f0;
  --desert-100: #fdf2e0;
  --desert-300: #f6cd9a;
  --desert-400: #f1b070;
  --desert-500: #ec944f;
  --desert-600: #d97935;
  --desert-700: #b5602a;
  --ink: #1f1712;
  --white: #ffffff;
  --shadow: 0 16px 45px rgba(91, 64, 48, 0.12);
  --warm-shadow: 0 4px 20px rgba(236, 148, 79, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--sand-900);
  background: linear-gradient(180deg, var(--sand-50), #ffffff 38%, var(--sand-50));
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: var(--sand-50);
  background: linear-gradient(90deg, var(--sand-700), var(--desert-700));
  box-shadow: 0 10px 24px rgba(31, 23, 18, 0.18);
}

.top-nav {
  width: min(1180px, calc(100% - 32px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand-mark,
.footer-logo span {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--sand-900);
  background: var(--desert-300);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28);
}

.brand-name {
  font-size: 20px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link,
.mobile-link {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--sand-100);
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #ffffff;
  background: rgba(163, 116, 76, 0.5);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--sand-50);
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 8px 0 16px;
}

.mobile-nav.is-open {
  display: grid;
  gap: 6px;
}

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

.hero-carousel {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--sand-900);
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.46) 48%, rgba(0, 0, 0, 0.08));
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 72px;
  left: 50%;
  transform: translateX(-50%);
}

.hero-copy {
  max-width: 760px;
  color: #ffffff;
}

.hero-kicker,
.section-kicker {
  margin: 0 0 12px;
  color: var(--desert-300);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.36);
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--sand-200);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

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

.hero-tags span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  padding: 8px 14px;
  color: #ffffff;
  background: rgba(91, 64, 48, 0.82);
  backdrop-filter: blur(8px);
}

.hero-tags span:first-child {
  background: var(--desert-600);
}

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

.primary-btn,
.ghost-btn,
.section-link,
.quick-search button,
.filter-bar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 12px;
  padding: 0 22px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.quick-search button,
.filter-bar button {
  border: 0;
  color: #ffffff;
  background: var(--desert-600);
  box-shadow: var(--warm-shadow);
  cursor: pointer;
}

.primary-btn:hover,
.quick-search button:hover,
.filter-bar button:hover {
  transform: translateY(-1px);
  background: var(--desert-700);
}

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

.ghost-btn:hover {
  transform: translateY(-1px);
  background: rgba(0, 0, 0, 0.42);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.32);
  font-size: 32px;
  line-height: 1;
  transform: translateY(-50%);
  cursor: pointer;
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.55);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.3s ease, background 0.3s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--desert-500);
}

.home-search {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 28px;
  align-items: center;
  margin-top: -42px;
  position: relative;
  z-index: 4;
  padding: 28px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.home-search h2,
.section-head h2,
.compact-hero h1,
.detail-card h1,
.detail-card h2,
.side-card h2,
.footer-column h2 {
  margin: 0;
  color: var(--sand-900);
}

.home-search p,
.section-head p,
.compact-hero p,
.detail-card p,
.footer-brand p,
.category-copy p {
  color: var(--sand-700);
  line-height: 1.75;
}

.quick-search {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 18px;
  background: var(--sand-100);
}

.quick-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  border: 1px solid transparent;
  outline: 0;
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--sand-900);
  background: #ffffff;
}

.quick-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--desert-400);
  box-shadow: 0 0 0 3px rgba(236, 148, 79, 0.18);
}

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

.warm-section {
  margin: 32px 0;
  border-radius: 34px;
  background: linear-gradient(90deg, var(--desert-50), var(--sand-50));
}

.sand-section {
  background: var(--sand-100);
}

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

.section-head h2 {
  font-size: clamp(28px, 3vw, 38px);
  letter-spacing: -0.03em;
}

.section-head p {
  max-width: 720px;
  margin: 10px 0 0;
}

.section-head.slim {
  margin-bottom: 16px;
}

.section-link {
  color: var(--desert-700);
  background: var(--desert-50);
}

.section-link:hover {
  color: #ffffff;
  background: var(--desert-600);
}

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

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

.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(91, 64, 48, 0.10);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--sand-200);
}

.movie-card.wide {
  display: grid;
  grid-template-columns: minmax(220px, 45%) 1fr;
}

.movie-card.wide .card-cover {
  aspect-ratio: auto;
  min-height: 260px;
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .card-cover img,
.category-tile:hover img,
.category-overview:hover img {
  transform: scale(1.08);
}

.card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.04));
  opacity: 0.84;
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  font-weight: 800;
}

.play-chip {
  right: 14px;
  bottom: 14px;
  height: 32px;
  padding: 0 14px;
  background: var(--desert-600);
}

.rank-badge {
  left: 14px;
  top: 14px;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  background: rgba(0, 0, 0, 0.68);
}

.card-body {
  padding: 18px;
}

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

.card-body h2 a {
  transition: color 0.2s ease;
}

.card-body h2 a:hover {
  color: var(--desert-600);
}

.card-desc {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--sand-700);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  color: var(--sand-600);
  font-size: 13px;
}

.card-meta span:not(:last-child)::after {
  content: "•";
  margin-left: 10px;
  color: var(--sand-300);
}

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

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  color: var(--desert-700);
  background: var(--desert-50);
  font-size: 12px;
  font-weight: 700;
}

.tag-row.large span {
  min-height: 32px;
  padding: 0 12px;
  font-size: 13px;
}

.scroll-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 1fr);
  gap: 22px;
  overflow-x: auto;
  padding: 4px 4px 18px;
  scrollbar-width: none;
}

.scroll-row::-webkit-scrollbar {
  display: none;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 34px;
  align-items: start;
}

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

.category-tile {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: 24px;
  color: #ffffff;
  background: var(--sand-900);
  box-shadow: var(--shadow);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 170px;
  object-fit: cover;
  opacity: 0.68;
  transition: transform 0.5s ease, opacity 0.3s ease;
}

.category-tile:hover img {
  opacity: 0.45;
}

.category-tile span,
.category-tile em {
  position: absolute;
  left: 20px;
  right: 20px;
  z-index: 2;
}

.category-tile span {
  bottom: 64px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile em {
  bottom: 20px;
  color: var(--sand-200);
  font-style: normal;
  line-height: 1.45;
}

.ranking-panel,
.detail-card,
.side-card,
.filter-bar,
.category-overview {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.ranking-panel {
  padding: 22px;
}

.rank-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid var(--sand-100);
}

.rank-row span {
  grid-row: span 2;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #ffffff;
  background: var(--desert-600);
  font-weight: 900;
}

.rank-row strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-row em {
  color: var(--sand-600);
  font-size: 13px;
  font-style: normal;
}

.page-hero {
  padding: 88px 0 42px;
  background: linear-gradient(135deg, var(--sand-900), var(--sand-700) 46%, var(--desert-700));
}

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

.compact-hero h1 {
  max-width: 850px;
  color: #ffffff;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.compact-hero p:not(.section-kicker) {
  max-width: 780px;
  color: var(--sand-200);
  font-size: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 180px 160px auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 30px;
  padding: 18px;
}

.filter-bar label {
  display: grid;
  gap: 8px;
  color: var(--sand-700);
  font-size: 13px;
  font-weight: 800;
}

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

.category-overview {
  display: grid;
  grid-template-columns: 220px 1fr;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-overview:hover {
  transform: translateY(-4px);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: var(--sand-200);
}

.category-covers img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-copy {
  padding: 24px;
}

.category-copy h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.category-copy span {
  display: inline-flex;
  margin-top: 8px;
  color: var(--desert-700);
  font-weight: 900;
}

.player-shell {
  padding: 24px 0 0;
  background: var(--sand-50);
}

.player-shell > .back-line,
.detail-layout {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.back-line {
  display: flex;
  gap: 14px;
  padding: 12px 0 20px;
}

.back-line a {
  color: var(--sand-600);
  font-weight: 800;
}

.back-line a:hover {
  color: var(--desert-600);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 24px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.22);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.54));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

.play-cover span {
  width: 76px;
  height: 76px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding-left: 4px;
  color: #ffffff;
  background: var(--desert-600);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32);
  font-size: 32px;
}

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

.detail-card,
.side-card {
  padding: 26px;
}

.detail-card h1 {
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.detail-meta {
  margin: 18px 0;
}

.detail-card h2,
.side-card h2 {
  margin-top: 26px;
  margin-bottom: 12px;
  font-size: 24px;
}

.detail-card p {
  margin: 0 0 14px;
  font-size: 16px;
}

.lead-text {
  color: var(--sand-900) !important;
  font-weight: 800;
}

.detail-side {
  display: grid;
  gap: 20px;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 24px;
  background: var(--sand-200);
  box-shadow: var(--shadow);
}

.side-card dl {
  margin: 0;
  display: grid;
  gap: 12px;
}

.side-card div {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sand-100);
}

.side-card dt {
  color: var(--sand-600);
  font-weight: 800;
}

.side-card dd {
  margin: 0;
  color: var(--sand-900);
}

.site-footer {
  margin-top: 40px;
  color: var(--sand-200);
  background: linear-gradient(180deg, var(--sand-800), var(--sand-900));
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 220px 260px;
  gap: 42px;
  padding: 48px 0;
}

.footer-brand p {
  max-width: 500px;
  color: var(--sand-300);
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-column h2 {
  color: var(--sand-100);
  font-size: 16px;
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(232, 221, 196, 0.16);
  color: var(--sand-400);
  text-align: center;
  font-size: 14px;
}

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

  .split-section,
  .detail-layout,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .detail-side {
    grid-template-columns: 240px 1fr;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero-carousel {
    height: 76vh;
    min-height: 540px;
  }

  .hero-content {
    padding-bottom: 86px;
  }

  .hero-arrow {
    display: none;
  }

  .home-search,
  .featured-grid,
  .category-overview-grid,
  .category-overview,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .quick-search {
    flex-direction: column;
  }

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

  .movie-card.wide {
    grid-template-columns: 1fr;
  }

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

  .detail-side {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .top-nav,
  .shell,
  .mobile-nav,
  .compact-hero > div,
  .player-shell > .back-line,
  .detail-layout,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

  .brand-name {
    font-size: 18px;
  }

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

  .hero-copy p {
    font-size: 16px;
  }

  .movie-grid,
  .movie-grid.four-cols {
    grid-template-columns: 1fr;
  }

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

  .detail-card,
  .side-card,
  .ranking-panel {
    padding: 20px;
  }

  .content-section {
    padding: 52px 0;
  }
}
