:root {
  --earth-950: #2a1710;
  --earth-900: #573729;
  --earth-800: #6a4130;
  --earth-700: #814e34;
  --earth-600: #9b5f3c;
  --bronze-700: #7e5d41;
  --bronze-600: #98724c;
  --bronze-500: #a68558;
  --bronze-300: #d0bd9f;
  --stone-50: #f8f7f4;
  --stone-100: #efede6;
  --stone-200: #ddd9cc;
  --stone-500: #998d73;
  --stone-600: #8b7d67;
  --stone-700: #746957;
  --clay-100: #f0ebe6;
  --white: #ffffff;
  --black: #000000;
  --shadow-sm: 0 6px 18px rgba(42, 23, 16, 0.08);
  --shadow-md: 0 14px 35px rgba(42, 23, 16, 0.12);
  --shadow-lg: 0 25px 60px rgba(42, 23, 16, 0.18);
  --radius-lg: 18px;
  --radius-xl: 26px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.6;
  color: var(--earth-900);
  background: var(--stone-50);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  color: var(--stone-50);
  background: rgba(106, 65, 48, 0.95);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(14px);
}

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

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

.brand-text {
  font-size: 24px;
}

.brand-mark {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--earth-950);
  background: linear-gradient(135deg, var(--bronze-300), var(--bronze-500));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 8px 24px rgba(0, 0, 0, 0.22);
}

.desktop-nav,
.mobile-links,
.footer-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  position: relative;
  font-weight: 600;
  color: var(--stone-50);
  opacity: 0.9;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--bronze-300);
  opacity: 1;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
}

.menu-button span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 5px auto;
  border-radius: 2px;
  background: var(--white);
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

.mobile-links {
  align-items: flex-start;
  flex-direction: column;
  gap: 0;
  padding: 10px 0 18px;
}

.mobile-links .nav-link {
  width: 100%;
  padding: 10px 0;
}

.hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: var(--white);
  background: radial-gradient(circle at 20% 20%, rgba(208, 189, 159, 0.34), transparent 36%), linear-gradient(135deg, var(--earth-800), var(--earth-700) 46%, var(--bronze-700));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(42, 23, 16, 0.88), rgba(42, 23, 16, 0.62) 48%, rgba(42, 23, 16, 0.22));
  z-index: 2;
}

.hero-track {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s ease, transform 1.2s ease;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  z-index: 5;
  display: grid;
  min-height: 650px;
  align-items: center;
  grid-template-columns: minmax(0, 1.04fr) minmax(300px, 0.7fr);
  gap: 48px;
  padding: 78px 0 56px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: var(--bronze-300);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 700;
}

.hero h1,
.page-hero h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.07em;
}

.hero-copy p {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--stone-200);
  font-size: 20px;
}

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

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border: 0;
  border-radius: 14px;
  color: var(--white);
  background: var(--bronze-500);
  box-shadow: var(--shadow-sm);
  font-weight: 800;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.button:hover,
button.button:hover {
  transform: translateY(-2px);
  background: var(--bronze-600);
  box-shadow: var(--shadow-md);
}

.button.secondary {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.hero-search,
.page-search {
  position: relative;
  width: min(100%, 620px);
  margin-top: 28px;
}

.hero-search input,
.page-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  outline: 0;
  color: var(--earth-900);
  background: rgba(255, 255, 255, 0.96);
  padding: 0 18px;
  box-shadow: var(--shadow-sm);
}

.page-search input,
.filter-bar input,
.filter-bar select {
  border-color: var(--stone-200);
}

.search-results {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  z-index: 30;
  display: none;
  max-height: 420px;
  overflow: auto;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-lg);
}

.search-results.is-open {
  display: block;
}

.search-results a {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--stone-100);
  color: var(--earth-900);
}

.search-results img {
  width: 56px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
}

.search-results strong,
.search-results small {
  display: block;
}

.search-results small {
  margin-top: 3px;
  color: var(--stone-600);
}

.hero-panel {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.hero-mini-card {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  transition: transform 0.25s ease, background 0.25s ease;
}

.hero-mini-card:hover,
.hero-mini-card.is-active {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
}

.hero-mini-card img {
  width: 80px;
  height: 104px;
  border-radius: 14px;
  object-fit: cover;
}

.hero-mini-card strong,
.hero-mini-card small {
  display: block;
}

.hero-mini-card small {
  margin-top: 6px;
  color: var(--stone-200);
}

.section {
  padding: 72px 0;
}

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

.section.gradient {
  background: linear-gradient(90deg, var(--clay-100), #f1ede3);
}

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

.section-head h2 {
  margin: 0 0 6px;
  color: var(--earth-900);
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-head p {
  margin: 0;
  color: var(--stone-600);
}

.section-link {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--earth-800);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  font-weight: 800;
}

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

.movie-grid.six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

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

.movie-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
  position: relative;
  display: block;
  height: 250px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--earth-800), var(--bronze-600));
}

.movie-card-large .poster-wrap {
  height: 360px;
}

.movie-card-small .poster-wrap {
  height: 190px;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 28%, rgba(0, 0, 0, 0.78));
}

.poster-meta {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.poster-meta b,
.rank-badge,
.card-foot span,
.tag-row span,
.meta-pill,
.detail-tag,
.top-number {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.poster-meta b,
.rank-badge {
  color: var(--white);
  background: rgba(0, 0, 0, 0.42);
  padding: 5px 9px;
  backdrop-filter: blur(8px);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 40px;
  justify-content: center;
  background: var(--bronze-500);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.card-body strong {
  color: var(--earth-900);
  font-size: 18px;
  line-height: 1.25;
}

.card-line {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  color: var(--stone-600);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}

.card-foot em {
  overflow: hidden;
  color: var(--stone-500);
  font-size: 12px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-foot span {
  flex: 0 0 auto;
  color: var(--earth-800);
  background: var(--stone-100);
  padding: 3px 8px;
}

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

.tag-row span,
.detail-tag {
  color: var(--earth-800);
  background: #f1ede3;
  padding: 5px 9px;
}

.horizontal-scroll {
  display: flex;
  gap: 22px;
  margin: 0 -16px;
  padding: 4px 16px 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

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

.story-list {
  display: grid;
  gap: 22px;
}

.story-card {
  display: grid;
  overflow: hidden;
  grid-template-columns: 320px 1fr;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.story-card img {
  width: 100%;
  height: 100%;
  min-height: 230px;
  object-fit: cover;
}

.story-card div {
  padding: 28px;
}

.story-card h3 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 1.2;
}

.story-card p {
  margin: 0 0 18px;
  color: var(--stone-600);
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meta-pill {
  color: var(--earth-800);
  background: var(--stone-100);
  padding: 6px 10px;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
}

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

.compact-card {
  display: grid;
  align-items: center;
  grid-template-columns: auto 72px 1fr;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.compact-card img {
  width: 72px;
  height: 96px;
  overflow: hidden;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.compact-card strong,
.compact-card small {
  display: block;
}

.compact-card small {
  margin-top: 7px;
  color: var(--stone-600);
}

.top-number {
  width: 42px;
  height: 42px;
  justify-content: center;
  color: var(--white);
  background: var(--bronze-500);
}

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

.category-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border-radius: var(--radius-xl);
  color: var(--white);
  background: linear-gradient(135deg, var(--earth-800), var(--bronze-700));
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h2,
.category-card p {
  margin: 0;
}

.category-card h2 {
  font-size: 28px;
  line-height: 1.15;
}

.category-card p {
  color: var(--stone-200);
}

.category-card span {
  align-self: flex-start;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--earth-950);
  background: var(--bronze-300);
  font-weight: 800;
}

.page-hero {
  color: var(--white);
  background: linear-gradient(135deg, var(--earth-900), var(--earth-700));
  padding: 64px 0;
}

.page-hero p {
  max-width: 820px;
  margin: 16px 0 0;
  color: var(--stone-200);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--bronze-300);
  font-size: 14px;
  font-weight: 700;
}

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

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

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

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

.player-card,
.detail-card,
.side-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-md);
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--black);
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: var(--black);
}

.player-poster {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  z-index: 4;
}

.player-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.75));
}

.play-button {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 88px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(166, 133, 88, 0.92);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.35);
  font-size: 34px;
  line-height: 1;
  transition: transform 0.25s ease, background 0.25s ease;
}

.play-button:hover {
  transform: scale(1.06);
  background: var(--bronze-600);
}

.player-poster.is-hidden {
  display: none;
}

.detail-card {
  padding: 28px;
}

.detail-card h2,
.side-card h2 {
  margin: 0 0 18px;
  color: var(--earth-900);
  font-size: 26px;
  line-height: 1.2;
}

.detail-card p {
  margin: 0 0 18px;
  color: var(--stone-700);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--stone-200);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.side-card {
  padding: 18px;
}

.side-card .compact-card {
  grid-template-columns: 58px 1fr;
  box-shadow: none;
  border: 1px solid var(--stone-100);
}

.side-card .compact-card .top-number {
  display: none;
}

.side-card .compact-card img {
  width: 58px;
  height: 78px;
}

.site-footer {
  margin-top: 72px;
  color: var(--stone-200);
  background: var(--earth-950);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 36px;
  padding: 50px 0;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: var(--bronze-300);
  font-size: 18px;
}

.site-footer p {
  margin: 16px 0 0;
  color: var(--stone-200);
}

.footer-brand {
  color: var(--white);
  font-size: 22px;
}

.footer-links {
  align-items: flex-start;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--stone-200);
}

.footer-links a:hover {
  color: var(--bronze-300);
}

.footer-bottom {
  padding: 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  color: var(--stone-500);
}

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

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

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

  .hero-panel {
    display: grid;
    grid-template-columns: repeat(5, minmax(160px, 1fr));
    overflow-x: auto;
    padding-bottom: 12px;
  }
}

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

  .menu-button {
    display: block;
  }

  .hero,
  .hero-content {
    min-height: auto;
  }

  .hero-content {
    padding: 62px 0 34px;
  }

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

  .hero-panel {
    grid-template-columns: repeat(5, minmax(220px, 1fr));
  }

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

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

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

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

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

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

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

  .section {
    padding: 52px 0;
  }

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

  .movie-grid,
  .movie-grid.six,
  .movie-grid.three,
  .category-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .poster-wrap,
  .movie-card-large .poster-wrap {
    height: 300px;
  }

  .compact-card {
    grid-template-columns: auto 62px 1fr;
  }

  .compact-card img {
    width: 62px;
    height: 84px;
  }

  .detail-card {
    padding: 22px;
  }
}
