:root {
  --earth-950: #241812;
  --earth-900: #35251b;
  --earth-800: #4d3729;
  --earth-700: #684b39;
  --desert-700: #b75617;
  --desert-600: #dd6f1f;
  --desert-500: #ef8d3f;
  --desert-400: #f2ad6b;
  --sand-50: #fdfaf7;
  --sand-100: #f8efe6;
  --sand-200: #f2e6d9;
  --paper: rgba(255, 255, 255, 0.92);
  --white: #ffffff;
  --muted: #77695f;
  --shadow: 0 24px 70px rgba(77, 55, 41, 0.16);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--earth-900);
  background:
    radial-gradient(circle at top left, rgba(242, 173, 107, 0.25), transparent 32rem),
    linear-gradient(180deg, var(--sand-50), #ffffff 38%, var(--sand-100));
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 24px rgba(36, 24, 18, 0.08);
}

.nav-wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--earth-950);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--desert-600), var(--earth-800));
  box-shadow: 0 12px 26px rgba(221, 111, 31, 0.28);
}

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

.nav-link {
  color: var(--earth-700);
  font-weight: 700;
  transition: color 0.2s ease;
}

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

.mobile-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--earth-800);
  font-size: 28px;
  cursor: pointer;
}

.mobile-nav {
  display: none;
  padding: 0 24px 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--sand-100);
  color: var(--earth-700);
  font-weight: 700;
}

.hero-shell {
  position: relative;
  min-height: 78vh;
  background: var(--earth-950);
  overflow: hidden;
}

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

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

.hero-inner {
  min-height: 78vh;
  max-width: 1240px;
  margin: 0 auto;
  padding: 86px 24px 92px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.7fr);
  align-items: center;
  gap: 54px;
}

.hero-copy {
  color: var(--white);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--desert-500);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p,
.page-hero p,
.lead-text {
  max-width: 760px;
  font-size: 19px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.86);
}

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

.hero-tags span,
.tag-row span,
.card-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: inherit;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  color: var(--white);
  background: linear-gradient(135deg, var(--desert-600), var(--desert-700));
  box-shadow: 0 16px 36px rgba(221, 111, 31, 0.32);
}

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

.ghost-btn.light {
  color: var(--earth-900);
  border-color: rgba(77, 55, 41, 0.18);
  background: rgba(255, 255, 255, 0.7);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.hero-poster {
  border-radius: 34px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.08));
  box-shadow: 0 38px 90px rgba(0, 0, 0, 0.32);
  transform: rotate(2deg);
}

.hero-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 26px;
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
}

.hero-controls button {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-controls button.active {
  background: var(--desert-500);
}

.section-wrap,
.page-main,
.detail-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 54px 24px;
}

.intro-search {
  padding-top: 46px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2,
.copy-card h2,
.side-rank h2 {
  margin: 0 0 10px;
  color: var(--earth-950);
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-heading p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.row-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.text-link {
  color: var(--desert-700);
  font-weight: 800;
}

.filter-panel {
  margin: 22px 0 28px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.search-box {
  display: grid;
  gap: 8px;
  color: var(--earth-700);
  font-weight: 800;
}

.search-box input {
  width: 100%;
  border: 1px solid rgba(77, 55, 41, 0.12);
  border-radius: 18px;
  outline: none;
  padding: 15px 18px;
  color: var(--earth-950);
  background: var(--white);
}

.search-box input:focus {
  border-color: var(--desert-500);
  box-shadow: 0 0 0 4px rgba(221, 111, 31, 0.12);
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.filter-actions button {
  border: 0;
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--earth-700);
  background: var(--sand-100);
  font-weight: 800;
  cursor: pointer;
}

.filter-actions button.active {
  color: var(--white);
  background: var(--desert-600);
}

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

.category-tile,
.category-overview-card {
  position: relative;
  overflow: hidden;
  min-height: 180px;
  border-radius: var(--radius-lg);
  padding: 22px;
  color: var(--white);
  background: var(--earth-900);
  box-shadow: var(--shadow);
}

.category-tile img,
.category-overview-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  transition: transform 0.45s ease;
}

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

.category-tile span,
.category-overview-card span,
.category-tile strong,
.category-overview-card h2,
.category-overview-card p {
  position: relative;
  z-index: 1;
}

.category-tile span,
.category-overview-card span {
  display: block;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 10px;
}

.category-tile strong,
.category-overview-card h2,
.category-overview-card p {
  display: block;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
}

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

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

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

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

.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 80px rgba(77, 55, 41, 0.22);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--earth-900);
}

.compact-card .poster-link {
  aspect-ratio: 3 / 4;
}

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

.movie-card:hover .poster-link img {
  transform: scale(1.09);
}

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.poster-text {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  color: var(--white);
  font-size: 13px;
  line-height: 1.6;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade,
.movie-card:hover .poster-text {
  opacity: 1;
}

.card-content {
  padding: 18px;
}

.card-meta,
.detail-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--desert-700);
}

.card-meta span,
.detail-meta span,
.tag-row span {
  background: var(--sand-100);
}

.card-content h2 {
  margin: 13px 0 8px;
  color: var(--earth-950);
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

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

.card-content p {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.tag-row {
  color: var(--earth-700);
}

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

.side-rank {
  position: sticky;
  top: 94px;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: var(--earth-950);
  color: var(--white);
  box-shadow: var(--shadow);
}

.side-rank h2 {
  color: var(--white);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 44px 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.ranking-grid .rank-item {
  background: var(--paper);
  color: var(--earth-900);
  box-shadow: 0 8px 30px rgba(77, 55, 41, 0.09);
}

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

.rank-item img {
  width: 64px;
  height: 82px;
  object-fit: cover;
  border-radius: 12px;
}

.rank-text {
  min-width: 0;
}

.rank-text strong,
.rank-text small {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-text strong {
  font-weight: 900;
}

.rank-text small {
  color: var(--muted);
  margin-top: 4px;
}

.side-rank .rank-text small {
  color: rgba(255, 255, 255, 0.62);
}

.rank-item em {
  color: var(--desert-600);
  font-style: normal;
  font-weight: 900;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(135deg, rgba(53, 37, 27, 0.96), rgba(104, 75, 57, 0.86)),
    radial-gradient(circle at top right, rgba(242, 173, 107, 0.32), transparent 26rem);
  color: var(--white);
  padding: 52px;
  box-shadow: var(--shadow);
}

.slim-hero,
.category-hero,
.ranking-hero {
  margin-top: 28px;
}

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

.category-overview-card {
  min-height: 250px;
  display: flex;
  align-items: end;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 30px 0 20px;
  color: var(--muted);
  font-weight: 700;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

.detail-poster {
  border-radius: 28px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.18);
}

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

.detail-info .lead-text {
  color: rgba(255, 255, 255, 0.86);
}

.detail-meta span,
.detail-tags span {
  color: var(--earth-900);
  background: rgba(255, 255, 255, 0.78);
}

.watch-section {
  max-width: 1040px;
  margin: 46px auto 0;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #000000;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.32);
  aspect-ratio: 16 / 9;
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000000;
  cursor: pointer;
}

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.54));
  cursor: pointer;
}

.play-layer span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--desert-600);
  font-size: 32px;
  box-shadow: 0 18px 42px rgba(221, 111, 31, 0.44);
}

.video-frame.playing .play-layer {
  display: none;
}

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

.copy-card {
  padding: 28px;
  border-radius: var(--radius-xl);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.copy-card p {
  margin: 0;
  color: var(--earth-700);
  font-size: 17px;
  line-height: 1.9;
}

.empty-state {
  display: none;
  padding: 30px;
  border-radius: var(--radius-lg);
  color: var(--muted);
  background: var(--paper);
  text-align: center;
  font-weight: 800;
}

.empty-state.show {
  display: block;
}

.site-footer {
  margin-top: 34px;
  padding: 50px 24px;
  color: rgba(255, 255, 255, 0.78);
  background: var(--earth-950);
}

.footer-grid {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
}

.footer-brand,
.site-footer h2 {
  color: var(--white);
}

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

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

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

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

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

  .split-section,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .side-rank {
    position: static;
  }
}

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

  .mobile-toggle {
    display: block;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    padding-top: 62px;
  }

  .hero-poster {
    max-width: 280px;
    transform: none;
  }

  .category-grid,
  .catalog-grid,
  .movie-grid,
  .latest-grid,
  .related-grid,
  .category-overview-grid,
  .ranking-grid,
  .detail-copy,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

  .page-hero,
  .detail-hero {
    padding: 30px;
  }

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

@media (max-width: 520px) {
  .nav-wrap,
  .section-wrap,
  .page-main,
  .detail-main {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand {
    font-size: 20px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .hero-copy p,
  .page-hero p,
  .lead-text {
    font-size: 16px;
  }

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

  .rank-item em {
    display: none;
  }
}
