:root {
  --earth-950: #332018;
  --earth-900: #573729;
  --earth-850: #60402f;
  --earth-800: #6a4130;
  --earth-700: #814e34;
  --earth-600: #9b5f3c;
  --earth-100: #ede3d9;
  --bronze-800: #684c37;
  --bronze-700: #85643f;
  --bronze-600: #9a754c;
  --bronze-500: #a68558;
  --bronze-300: #d7c6a5;
  --bronze-100: #f1ede3;
  --clay-100: #f0ebe6;
  --stone-900: #1f1d1a;
  --stone-700: #4f4a43;
  --stone-600: #676057;
  --stone-500: #81796d;
  --stone-200: #ddd9cc;
  --stone-100: #efede6;
  --stone-50: #f8f7f4;
  --white: #ffffff;
  --shadow-sm: 0 8px 22px rgba(80, 55, 38, 0.08);
  --shadow-md: 0 18px 45px rgba(80, 55, 38, 0.14);
  --shadow-lg: 0 25px 70px rgba(30, 18, 13, 0.22);
  --radius-lg: 18px;
  --radius-xl: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, 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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(106, 65, 48, 0.96);
  color: var(--white);
  box-shadow: 0 12px 30px rgba(35, 20, 12, 0.22);
  backdrop-filter: blur(14px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bronze-300), var(--bronze-600));
  color: var(--earth-950);
  font-size: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
  font-weight: 650;
  font-size: 15px;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.9);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover {
  color: var(--bronze-300);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 640px;
  color: var(--white);
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 20%, rgba(215, 198, 165, 0.30), transparent 30%),
    radial-gradient(circle at 88% 15%, rgba(166, 133, 88, 0.35), transparent 32%),
    linear-gradient(135deg, var(--earth-900), var(--earth-700) 52%, var(--bronze-800));
}

.hero::before,
.hero::after {
  position: absolute;
  content: "";
  border-radius: 999px;
  filter: blur(6px);
  opacity: 0.45;
}

.hero::before {
  right: -160px;
  top: 80px;
  width: 380px;
  height: 380px;
  background: rgba(215, 198, 165, 0.16);
}

.hero::after {
  left: -140px;
  bottom: -150px;
  width: 330px;
  height: 330px;
  background: rgba(255, 255, 255, 0.10);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0 72px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 48px;
  align-items: center;
}

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

.hero h1,
.page-hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(17px, 2vw, 21px);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 14px;
  font-weight: 780;
  cursor: pointer;
  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: var(--bronze-500);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
}

.btn-primary:hover {
  background: var(--bronze-600);
}

.btn-soft {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.20);
}

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

.hero-mini-links a,
.tag-link {
  padding: 8px 12px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.12);
  font-size: 14px;
  transition: background 0.2s ease, color 0.2s ease;
}

.hero-mini-links a:hover,
.tag-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.22);
}

.hero-slider {
  position: relative;
}

.hero-slide {
  display: none;
  position: relative;
  min-height: 470px;
  overflow: hidden;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: var(--shadow-lg);
  isolation: isolate;
}

.hero-slide.is-active {
  display: block;
}

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

.hero-slide::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.04));
}

.hero-slide-info {
  position: absolute;
  z-index: 2;
  left: 24px;
  right: 24px;
  bottom: 24px;
}

.hero-slide-info h2 {
  margin: 0 0 8px;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.12;
}

.hero-slide-info p {
  display: -webkit-box;
  max-width: 520px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-slide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.hero-slide-meta span {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.34);
  font-size: 13px;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
}

.slider-dots button {
  width: 26px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.34);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.slider-dots button.is-active {
  width: 46px;
  background: var(--bronze-300);
}

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

.section {
  padding: 72px 0;
}

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

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

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

.section-heading h2 {
  margin: 0 0 6px;
  color: var(--earth-900);
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

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

.grid {
  display: grid;
  gap: 24px;
}

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

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

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

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

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

.card-link {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent 62%);
}

.poster-meta {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.46);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.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-desc {
  display: -webkit-box;
  min-height: 46px;
  color: var(--stone-600);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

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

.card-foot b {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--earth-800);
  background: var(--earth-100);
  font-size: 12px;
}

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

.featured-layout .movie-card:first-child {
  grid-column: span 2;
}

.featured-layout .movie-card:first-child .poster-wrap {
  aspect-ratio: 16 / 8.5;
}

.scroller {
  display: grid;
  grid-auto-columns: minmax(280px, 340px);
  grid-auto-flow: column;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 0 16px;
  scroll-snap-type: x mandatory;
}

.scroller > * {
  scroll-snap-align: start;
}

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

.category-card {
  min-height: 160px;
  padding: 22px;
  border-radius: var(--radius-lg);
  color: var(--white);
  background: linear-gradient(135deg, var(--earth-800), var(--bronze-700));
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 22px;
}

.category-card span {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

.page-hero {
  padding: 58px 0;
  color: var(--white);
  background:
    radial-gradient(circle at 20% 10%, rgba(215, 198, 165, 0.24), transparent 32%),
    linear-gradient(135deg, var(--earth-900), var(--earth-700), var(--bronze-800));
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}

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

.filter-panel {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(140px, 0.6fr));
  gap: 14px;
  margin: 0 0 28px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.filter-panel input,
.filter-panel select,
.search-box input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--stone-200);
  border-radius: 13px;
  color: var(--earth-900);
  background: var(--stone-50);
  padding: 0 14px;
  outline: none;
}

.filter-panel input:focus,
.filter-panel select:focus,
.search-box input:focus {
  border-color: var(--bronze-500);
  box-shadow: 0 0 0 4px rgba(166, 133, 88, 0.13);
}

.search-box {
  max-width: 760px;
  margin: 24px 0 0;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.compact-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 10px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.compact-card img {
  width: 92px;
  height: 72px;
  object-fit: cover;
  border-radius: 13px;
  transition: transform 0.4s ease;
}

.compact-card strong,
.rank-title {
  display: block;
  color: var(--earth-900);
  font-size: 16px;
  line-height: 1.28;
}

.compact-card small {
  display: block;
  margin-top: 6px;
  color: var(--stone-500);
  font-size: 12px;
  line-height: 1.45;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 112px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--white);
  background: linear-gradient(135deg, var(--bronze-500), var(--earth-800));
  font-weight: 850;
}

.rank-row img {
  width: 112px;
  height: 74px;
  border-radius: 14px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.rank-row p {
  display: -webkit-box;
  margin: 5px 0 0;
  color: var(--stone-600);
  font-size: 13px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.86fr);
  gap: 30px;
  padding: 38px 0 72px;
}

.player-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: #000;
  box-shadow: var(--shadow-lg);
}

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

.player-frame video {
  width: 100%;
  height: 100%;
  background: #000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 28px;
  color: var(--white);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.24)), var(--poster-url);
  background-position: center;
  background-size: cover;
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.big-play {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(166, 133, 88, 0.92);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

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

.player-message {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index: 6;
  display: none;
  padding: 12px 14px;
  border-radius: 14px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.72);
  text-align: center;
}

.player-message.is-visible {
  display: block;
}

.content-card,
.side-card {
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.content-card {
  margin-top: 24px;
  padding: 26px;
}

.content-card h2,
.side-card h2 {
  margin: 0 0 16px;
  color: var(--earth-900);
  font-size: 26px;
}

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

.side-card {
  padding: 20px;
  margin-bottom: 22px;
}

.detail-poster {
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: 18px;
  object-fit: cover;
  margin-bottom: 18px;
}

.meta-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.meta-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--stone-200);
}

.meta-list dt {
  color: var(--stone-500);
}

.meta-list dd {
  margin: 0;
  color: var(--earth-900);
  font-weight: 700;
  text-align: right;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tags span {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--earth-800);
  background: var(--earth-100);
  font-size: 13px;
  font-weight: 650;
}

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

.site-footer {
  color: var(--stone-200);
  background: var(--earth-900);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0 34px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.site-footer h2,
.site-footer h3 {
  margin: 0 0 16px;
  color: var(--bronze-300);
}

.site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.site-footer ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.72);
}

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

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.58);
  text-align: center;
}

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

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

@media (max-width: 1080px) {
  .hero-inner,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

@media (max-width: 860px) {
  .nav-shell {
    flex-wrap: wrap;
    min-height: 66px;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav-links {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 10px 0;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding: 56px 0 48px;
  }

  .hero-slide,
  .hero-slide img {
    min-height: auto;
    height: 380px;
  }

  .featured-layout,
  .featured-layout .movie-card:first-child,
  .movie-grid,
  .grid-3,
  .grid-4,
  .rank-list,
  .related-grid,
  .search-results,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 560px) {
  .logo {
    font-size: 20px;
  }

  .section {
    padding: 50px 0;
  }

  .hero-actions,
  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-slide,
  .hero-slide img {
    height: 330px;
  }

  .featured-layout,
  .movie-grid,
  .grid-3,
  .grid-4,
  .category-grid,
  .rank-list,
  .related-grid,
  .search-results,
  .footer-grid,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .rank-row img {
    width: 92px;
    height: 68px;
  }

  .content-card,
  .side-card {
    padding: 18px;
  }
}
