:root {
  --sand-50: #fdfaf7;
  --sand-100: #f9f3ed;
  --sand-200: #eee2d5;
  --earth-100: #ede9e4;
  --earth-300: #c7b9ac;
  --earth-500: #8f7d6d;
  --earth-700: #6c5a4d;
  --earth-900: #473c33;
  --desert-50: #fff7ed;
  --desert-100: #fdf2e5;
  --desert-500: #ef8a33;
  --desert-600: #dd6f1f;
  --desert-700: #b75617;
  --shadow-soft: 0 18px 50px rgba(71, 60, 51, 0.13);
  --shadow-card: 0 10px 30px rgba(71, 60, 51, 0.12);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--earth-900);
  background: var(--sand-50);
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 18px rgba(71, 60, 51, 0.08);
  backdrop-filter: blur(18px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

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

.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--desert-500), var(--desert-700));
  box-shadow: 0 10px 24px rgba(221, 111, 31, 0.3);
  font-size: 14px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 700;
  color: var(--earth-700);
}

.nav-links a,
.mobile-panel a {
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
  color: var(--desert-600);
}

.menu-button {
  display: none;
  border: 0;
  background: transparent;
  color: var(--earth-900);
  font-size: 28px;
  cursor: pointer;
}

.mobile-panel {
  display: none;
  padding: 0 24px 18px;
  border-top: 1px solid var(--sand-200);
  background: white;
}

.mobile-panel.is-open {
  display: grid;
  gap: 12px;
}

.hero-carousel {
  position: relative;
  height: 74vh;
  min-height: 560px;
  overflow: hidden;
  background: #111;
}

.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,
.page-hero > img,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.05));
}

.hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding-bottom: 108px;
  color: white;
}

.hero-kicker,
.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(221, 111, 31, 0.18);
  color: #fff0df;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.hero-content h1 {
  max-width: 850px;
  margin: 18px 0 16px;
  font-size: clamp(40px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-content p {
  max-width: 760px;
  margin: 0 0 22px;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.9);
}

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

.hero-tags span,
.tag-list span,
.detail-tags a,
.chip-row a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: inherit;
  font-size: 13px;
  font-weight: 700;
}

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

.btn-primary,
.btn-ghost,
.home-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 999px;
  border: 0;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary,
.home-search button {
  color: white;
  background: var(--desert-600);
  box-shadow: 0 16px 30px rgba(221, 111, 31, 0.34);
}

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

.btn-ghost {
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 44px;
  display: flex;
  gap: 9px;
  transform: translateX(-50%);
}

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

.hero-dots button.is-active {
  width: 34px;
  background: white;
}

.search-band {
  background: linear-gradient(135deg, var(--desert-100), var(--sand-100));
  border-bottom: 1px solid var(--sand-200);
}

.search-band-inner {
  display: grid;
  grid-template-columns: 1fr minmax(320px, 520px);
  gap: 28px;
  align-items: center;
  padding: 30px 0;
}

.search-band h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.search-band p {
  margin: 0;
  color: var(--earth-700);
}

.home-search,
.filter-panel {
  display: flex;
  gap: 12px;
}

.home-search input,
.filter-panel input {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--sand-200);
  border-radius: 999px;
  padding: 0 18px;
  color: var(--earth-900);
  background: white;
  outline: none;
  box-shadow: 0 8px 24px rgba(71, 60, 51, 0.06);
}

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

.main-stack,
.page-section {
  padding: 72px 0;
}

.main-stack {
  display: grid;
  gap: 88px;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.04em;
}

.section-head p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--earth-700);
  line-height: 1.65;
}

.section-link {
  flex-shrink: 0;
  color: var(--desert-600);
  font-weight: 900;
}

.featured-grid,
.movie-grid {
  display: grid;
  gap: 22px;
}

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

.three-cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

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

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

.movie-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(199, 185, 172, 0.32);
  border-radius: var(--radius-xl);
  color: var(--earth-900);
  background: white;
  box-shadow: var(--shadow-card);
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(221, 111, 31, 0.35);
  box-shadow: 0 22px 55px rgba(71, 60, 51, 0.18);
}

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

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

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 55%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.62), transparent);
}

.poster-wrap em {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  padding: 5px 10px;
  border-radius: 999px;
  color: white;
  background: rgba(0, 0, 0, 0.45);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--desert-600), var(--desert-700));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.22);
}

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

.movie-card-body strong {
  font-size: 19px;
  line-height: 1.3;
  transition: color 0.2s ease;
}

.movie-card:hover .movie-card-body strong {
  color: var(--desert-600);
}

.movie-card-body small {
  color: var(--earth-500);
  font-weight: 700;
}

.line-clamp {
  display: -webkit-box;
  min-height: 46px;
  overflow: hidden;
  color: var(--earth-700);
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-list span {
  color: var(--earth-700);
  background: var(--sand-100);
}

.movie-card-large .poster-wrap {
  aspect-ratio: 16 / 9;
}

.movie-card-large .movie-card-body {
  padding: 24px;
}

.movie-card-large .movie-card-body strong {
  font-size: 25px;
}

.movie-card-horizontal {
  display: grid;
  grid-template-columns: minmax(160px, 38%) 1fr;
}

.movie-card-horizontal .poster-wrap {
  height: 100%;
  min-height: 160px;
  aspect-ratio: auto;
}

.editor-section,
.discover-section,
.category-section,
.ranking-strip {
  padding: 36px;
  border-radius: 32px;
  background: linear-gradient(135deg, var(--desert-50), var(--sand-100));
}

.horizontal-scroll {
  display: grid;
  grid-auto-columns: 300px;
  grid-auto-flow: column;
  gap: 22px;
  overflow-x: auto;
  padding: 6px 4px 18px;
  scrollbar-width: thin;
}

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

.category-tile,
.category-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: white;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile {
  min-height: 150px;
  padding: 22px;
  border: 1px solid rgba(199, 185, 172, 0.32);
}

.category-tile::before {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -36px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(221, 111, 31, 0.22), transparent 70%);
}

.category-tile span,
.category-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 22px;
  font-weight: 900;
}

.category-tile small,
.category-card small {
  display: block;
  color: var(--earth-700);
  line-height: 1.55;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 60px rgba(71, 60, 51, 0.18);
}

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

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

.page-hero,
.detail-hero {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  color: white;
  background: linear-gradient(135deg, var(--earth-900), #1d1713);
}

.soft-hero {
  color: var(--earth-900);
  background: linear-gradient(135deg, var(--desert-100), var(--sand-100));
}

.page-hero .container {
  position: relative;
  z-index: 1;
  padding: 84px 0;
}

.page-hero h1 {
  max-width: 820px;
  margin: 18px 0 16px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.page-hero p {
  max-width: 680px;
  margin: 0;
  color: inherit;
  line-height: 1.75;
  opacity: 0.88;
}

.soft-hero .page-kicker {
  color: var(--desert-700);
  background: white;
}

.page-hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.1));
}

.category-card {
  min-height: 250px;
  color: white;
}

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

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

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.18));
}

.category-card span {
  position: absolute;
  z-index: 1;
  left: 22px;
  right: 22px;
  bottom: 22px;
}

.filter-panel {
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 30px;
  padding: 18px;
  border-radius: var(--radius-xl);
  background: white;
  box-shadow: var(--shadow-card);
}

.filter-panel input {
  flex: 1 1 320px;
}

.big-filter {
  align-items: stretch;
  flex-direction: column;
}

.chip-row a {
  color: var(--earth-700);
  background: var(--sand-100);
}

.chip-row a:hover,
.detail-tags a:hover {
  color: white;
  background: var(--desert-600);
}

.empty-state {
  display: none;
  padding: 44px;
  border-radius: var(--radius-xl);
  text-align: center;
  color: var(--earth-700);
  background: white;
  box-shadow: var(--shadow-card);
}

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

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

.detail-hero-inner {
  position: relative;
  z-index: 1;
  padding: 42px 0 72px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 38px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 800;
}

.breadcrumb a:hover {
  color: white;
}

.detail-intro {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 38px;
  align-items: end;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 8px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.detail-intro h1 {
  max-width: 800px;
  margin: 18px 0;
  font-size: clamp(36px, 5vw, 68px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-intro p {
  max-width: 780px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 19px;
  line-height: 1.7;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 800;
}

.watch-section {
  margin-top: -56px;
  position: relative;
  z-index: 3;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 32px;
  background: #070707;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.08));
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: rgba(221, 111, 31, 0.94);
  box-shadow: 0 24px 48px rgba(221, 111, 31, 0.36);
  font-size: 32px;
  transform: translateX(4px);
}

.play-overlay.hidden {
  display: none;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  padding: 48px 0 82px;
}

.detail-article,
.related-panel {
  border-radius: 28px;
  background: white;
  box-shadow: var(--shadow-card);
}

.detail-article {
  padding: 34px;
}

.detail-article h2,
.related-panel h2 {
  margin: 0 0 18px;
  font-size: 26px;
  letter-spacing: -0.03em;
}

.detail-article h2:not(:first-child) {
  margin-top: 34px;
}

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

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

.info-list div {
  padding: 14px;
  border-radius: 16px;
  background: var(--sand-100);
}

.info-list dt {
  margin-bottom: 6px;
  color: var(--earth-500);
  font-size: 13px;
  font-weight: 800;
}

.info-list dd {
  margin: 0;
  font-weight: 900;
}

.detail-tags a {
  color: var(--earth-700);
  background: var(--sand-100);
}

.related-panel {
  position: sticky;
  top: 90px;
  align-self: start;
  padding: 24px;
}

.related-list {
  display: grid;
  gap: 14px;
}

.compact-card {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 18px;
  transition: background 0.2s ease;
}

.compact-card:hover {
  background: var(--sand-100);
}

.compact-card img {
  width: 116px;
  height: 74px;
  object-fit: cover;
  border-radius: 14px;
}

.compact-card strong {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.compact-card small {
  display: block;
  margin-top: 6px;
  color: var(--earth-500);
  font-weight: 700;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 34px;
  padding: 56px 0 36px;
}

.footer-logo {
  margin-bottom: 16px;
  color: white;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: white;
  font-size: 18px;
}

.site-footer p,
.site-footer a,
.footer-bottom {
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.7;
}

.site-footer a:hover {
  color: #ffd6b7;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 20px 0;
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1024px) {
  .featured-grid,
  .three-cols,
  .four-cols,
  .category-grid,
  .category-card-grid,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .related-panel {
    position: static;
  }
}

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

  .menu-button {
    display: block;
  }

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

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

  .hero-arrow {
    display: none;
  }

  .search-band-inner,
  .detail-intro,
  .two-cols,
  .ranking-list {
    grid-template-columns: 1fr;
  }

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

  .editor-section,
  .discover-section,
  .category-section,
  .ranking-strip {
    padding: 24px;
  }

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

  .detail-cover {
    width: min(70vw, 260px);
  }

  .watch-section {
    margin-top: -34px;
  }

  .player-shell {
    border-radius: 22px;
  }
}

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

  .brand {
    font-size: 20px;
  }

  .hero-carousel {
    min-height: 520px;
  }

  .hero-content h1 {
    font-size: 42px;
  }

  .hero-tags span:nth-child(n+4) {
    display: none;
  }

  .main-stack,
  .page-section {
    padding: 46px 0;
  }

  .featured-grid,
  .three-cols,
  .four-cols,
  .category-grid,
  .category-card-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .movie-card-horizontal {
    grid-template-columns: 132px 1fr;
  }

  .movie-card-horizontal .poster-wrap {
    min-height: 142px;
  }

  .movie-card-body {
    padding: 14px;
  }

  .movie-card-body strong {
    font-size: 17px;
  }

  .line-clamp {
    -webkit-line-clamp: 2;
  }

  .page-hero .container {
    padding: 62px 0;
  }

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

  .detail-article {
    padding: 24px;
  }

  .info-list {
    grid-template-columns: 1fr;
  }

  .play-overlay span {
    width: 72px;
    height: 72px;
    font-size: 26px;
  }
}
