:root {
  --earth-50: #faf8f5;
  --earth-100: #f2ede4;
  --earth-200: #e8dcc8;
  --earth-300: #dbc5a3;
  --earth-500: #b88d55;
  --earth-600: #a47549;
  --earth-700: #8a5f3e;
  --earth-900: #5a4029;
  --stone-50: #faf9f7;
  --stone-100: #f5f3f0;
  --stone-200: #e5e1da;
  --stone-300: #d1cac0;
  --stone-400: #b8aea0;
  --stone-500: #9c8d7b;
  --stone-600: #87786a;
  --stone-700: #6f6259;
  --stone-800: #5c534c;
  --stone-900: #4c4740;
  --canyon-50: #fdf6f3;
  --canyon-100: #fae8df;
  --canyon-500: #d96840;
  --canyon-600: #c44e2c;
  --canyon-700: #a33f25;
  --canyon-900: #6e3021;
  --moss-50: #f6f7f4;
  --moss-600: #61704a;
  --moss-900: #363e2d;
  --white: #ffffff;
  --black: #0f1110;
  --shadow: 0 20px 50px rgba(76, 71, 64, 0.16);
  --soft-shadow: 0 12px 32px rgba(76, 71, 64, 0.1);
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--stone-900);
  background: var(--stone-50);
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 249, 247, 0.94);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 225, 218, 0.88);
}

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--earth-900);
  letter-spacing: 0.02em;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--white);
  background: linear-gradient(135deg, var(--earth-600), var(--canyon-600));
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(164, 117, 73, 0.28);
}

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

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--stone-700);
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--earth-100);
  color: var(--earth-700);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--stone-200);
  border-radius: 12px;
  background: var(--white);
  color: var(--stone-900);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
}

.hero {
  position: relative;
  min-height: 70vh;
  height: 680px;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--earth-900), var(--stone-800), var(--canyon-900));
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 72px 72px;
}

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

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

.hero-backdrop,
.detail-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.hero-backdrop::after,
.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 20%, rgba(219, 197, 163, 0.25), transparent 28%),
    linear-gradient(to top, rgba(76, 71, 64, 0.94), rgba(76, 71, 64, 0.18));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 360px;
  align-items: center;
  gap: 58px;
}

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

.eyebrow {
  margin: 0 0 14px;
  color: var(--earth-300);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.45rem, 6vw, 5.25rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero-desc {
  max-width: 690px;
  margin: 24px 0 0;
  color: var(--stone-100);
  font-size: clamp(1.05rem, 2vw, 1.34rem);
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.detail-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
  font-size: 0.86rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.tag-row span {
  min-height: 24px;
  color: var(--stone-600);
  background: var(--stone-100);
  border-color: var(--stone-200);
  font-size: 0.78rem;
}

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

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

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--earth-600), var(--canyon-600));
  box-shadow: 0 16px 35px rgba(164, 117, 73, 0.28);
}

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

.btn-soft {
  color: var(--earth-900);
  background: rgba(255, 255, 255, 0.86);
}

.hero-poster {
  position: relative;
  overflow: hidden;
  height: 500px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--earth-600), var(--canyon-900));
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.32);
}

.hero-img,
.detail-img,
.poster-img,
.tile-img,
.rank-img,
.compact-img,
.ranking-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-hidden {
  opacity: 0;
}

.hero-poster span {
  position: absolute;
  left: 20px;
  bottom: 20px;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--earth-900);
  background: rgba(255, 255, 255, 0.88);
  font-weight: 800;
}

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

.hero-dot {
  width: 38px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--earth-300);
}

.section {
  padding: 78px 0;
  background: var(--white);
}

.bg-soft {
  background: var(--stone-50);
}

.gradient-section {
  background: linear-gradient(135deg, var(--stone-100), var(--earth-50));
}

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

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.15;
}

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

.section-link {
  flex: 0 0 auto;
  color: var(--earth-700);
  font-weight: 800;
}

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--earth-300);
  box-shadow: var(--shadow);
}

.poster,
.category-tile figure,
.compact-poster,
.rank-item figure,
.ranking-row figure {
  position: relative;
  overflow: hidden;
  margin: 0;
  background:
    radial-gradient(circle at 70% 20%, rgba(219, 197, 163, 0.45), transparent 30%),
    linear-gradient(135deg, var(--earth-900), var(--canyon-900));
}

.poster {
  height: 248px;
}

.poster-img {
  transition: transform 0.42s ease, opacity 0.2s ease;
}

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

.poster-year {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 4px 9px;
  border-radius: 8px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.64);
  font-size: 0.8rem;
  font-weight: 800;
}

.poster-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%) scale(0.8);
  opacity: 0;
  border-radius: 999px;
  color: var(--earth-700);
  background: rgba(255, 255, 255, 0.9);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
}

.card-body h3,
.category-tile h3,
.rank-item h3,
.compact-card h3,
.ranking-info h3 {
  margin: 0;
  color: var(--stone-900);
  line-height: 1.35;
}

.card-body h3 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.7em;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 1.05rem;
}

.card-body p {
  display: -webkit-box;
  overflow: hidden;
  margin: 10px 0 14px;
  color: var(--stone-600);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.92rem;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  color: var(--stone-500);
  font-size: 0.86rem;
}

.card-meta span:last-child {
  padding: 3px 8px;
  border-radius: 8px;
  color: var(--stone-700);
  background: var(--stone-100);
}

.tag-row {
  margin-top: 12px;
}

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

.category-tile {
  position: relative;
  display: grid;
  min-height: 275px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--stone-900);
  box-shadow: var(--soft-shadow);
}

.category-tile figure,
.category-tile figure::after {
  position: absolute;
  inset: 0;
}

.category-tile figure::after {
  content: "";
  background: linear-gradient(to top, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.15));
}

.category-tile div {
  position: relative;
  z-index: 2;
  align-self: end;
  padding: 22px;
  color: var(--white);
}

.category-tile h3 {
  color: var(--white);
  font-size: 1.3rem;
}

.category-tile p {
  display: -webkit-box;
  overflow: hidden;
  margin: 8px 0 14px;
  color: var(--stone-200);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.92rem;
}

.category-tile span {
  color: var(--earth-300);
  font-weight: 800;
}

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 360px;
  gap: 34px;
  align-items: start;
}

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

.rank-item,
.ranking-row,
.compact-card {
  display: grid;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: 16px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover,
.ranking-row:hover,
.compact-card:hover {
  transform: translateY(-3px);
  border-color: var(--earth-300);
}

.rank-item {
  grid-template-columns: 52px 72px minmax(0, 1fr);
  padding: 10px;
}

.rank-num,
.ranking-index {
  color: var(--canyon-600);
  font-size: 1.12rem;
  font-weight: 900;
  text-align: center;
}

.rank-item figure {
  width: 72px;
  height: 86px;
  border-radius: 12px;
}

.rank-item p,
.compact-card p,
.ranking-info p {
  margin: 5px 0 0;
  color: var(--stone-600);
  font-size: 0.9rem;
}

.spotlight-panel {
  position: sticky;
  top: 94px;
  padding: 30px;
  color: var(--white);
  background: linear-gradient(135deg, var(--moss-900), var(--earth-900));
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.spotlight-panel h2 {
  margin: 0 0 14px;
  font-size: 2rem;
  line-height: 1.18;
}

.spotlight-panel p {
  margin: 0 0 24px;
  color: var(--stone-100);
}

.page-main {
  background: var(--stone-50);
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: linear-gradient(135deg, var(--earth-900), var(--stone-800), var(--canyon-900));
}

.page-hero {
  padding: 90px 0 70px;
}

.page-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--stone-100);
  font-size: 1.1rem;
}

.channel-hero {
  padding-bottom: 60px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
  color: var(--stone-200);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: var(--earth-300);
  font-weight: 700;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  margin-bottom: 26px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
}

.search-filter {
  grid-template-columns: minmax(0, 1fr) 180px 160px 140px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--stone-900);
  background: var(--stone-50);
  border: 1px solid var(--stone-200);
  border-radius: 12px;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--earth-500);
  box-shadow: 0 0 0 4px rgba(184, 141, 85, 0.12);
}

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

.category-overview .category-tile {
  min-height: 310px;
}

.ranking-row {
  grid-template-columns: 64px 86px minmax(0, 1fr) 74px;
  padding: 12px;
}

.ranking-row figure {
  width: 86px;
  height: 108px;
  border-radius: 12px;
}

.ranking-info p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ranking-info div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  color: var(--stone-500);
  font-size: 0.84rem;
}

.ranking-row strong {
  color: var(--canyon-600);
  font-size: 1.2rem;
  text-align: center;
}

.detail-hero {
  min-height: 640px;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 54px 0 70px;
}

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

.detail-poster {
  overflow: hidden;
  height: 468px;
  margin: 0;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--earth-900), var(--canyon-900));
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.34);
}

.detail-one-line {
  max-width: 780px;
  margin: 20px 0 0;
  color: var(--stone-100);
  font-size: 1.16rem;
}

.detail-tags {
  margin-top: 24px;
}

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

.player-panel,
.side-recommend,
.movie-article,
.meta-panel {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--stone-200);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000000;
  cursor: pointer;
}

.video-player {
  display: block;
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  color: var(--white);
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.62));
  cursor: pointer;
}

.player-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  color: var(--earth-700);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  font-size: 1.7rem;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.25);
}

.player-overlay strong {
  font-size: 1.08rem;
}

.player-shell.is-playing .player-overlay {
  display: none;
}

.side-recommend {
  padding: 20px;
}

.side-recommend h2,
.meta-panel h2 {
  margin: 0 0 16px;
}

.side-recommend > div {
  display: grid;
  gap: 12px;
}

.compact-card {
  grid-template-columns: 72px minmax(0, 1fr);
  padding: 10px;
}

.compact-poster {
  width: 72px;
  height: 90px;
  border-radius: 12px;
}

.compact-card h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.96rem;
}

.movie-article {
  padding: 30px;
}

.movie-article h2 {
  margin: 0 0 14px;
  font-size: 1.45rem;
}

.movie-article h2 + p {
  margin-top: 0;
}

.movie-article p {
  color: var(--stone-700);
  font-size: 1.04rem;
}

.meta-panel {
  padding: 24px;
}

.meta-panel dl {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 12px 14px;
  margin: 0;
}

.meta-panel dt {
  color: var(--stone-500);
  font-weight: 700;
}

.meta-panel dd {
  margin: 0;
  color: var(--stone-800);
}

.site-footer {
  padding: 54px 0 24px;
  color: var(--stone-200);
  background: var(--stone-900);
}

.footer-grid {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-logo {
  color: var(--white);
  font-size: 1.15rem;
}

.footer-grid p {
  max-width: 520px;
  margin: 12px 0 0;
  color: var(--stone-300);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--earth-300);
  font-weight: 700;
}

.footer-copy {
  padding-top: 22px;
  color: var(--stone-400);
  font-size: 0.92rem;
}

[hidden],
.is-hidden {
  display: none !important;
}

@media (max-width: 1040px) {
  .hero-content,
  .ranking-layout,
  .player-layout,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    height: auto;
    min-height: 760px;
  }

  .hero-content {
    padding: 86px 0 96px;
  }

  .hero-poster {
    display: none;
  }

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

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

  .spotlight-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .mobile-nav.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .hero-content {
    display: flex;
    padding-top: 74px;
  }

  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    font-size: clamp(2.1rem, 13vw, 3.4rem);
  }

  .section {
    padding: 56px 0;
  }

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

  .movie-grid,
  .featured-grid,
  .category-grid,
  .category-overview {
    grid-template-columns: 1fr;
  }

  .poster {
    height: 300px;
  }

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

  .ranking-row {
    grid-template-columns: 42px 72px minmax(0, 1fr);
  }

  .ranking-row strong {
    display: none;
  }

  .ranking-row figure {
    width: 72px;
    height: 92px;
  }

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

  .detail-poster {
    width: min(320px, 100%);
    height: 430px;
  }

  .player-overlay span {
    width: 60px;
    height: 60px;
  }
}
