:root {
  --sand-50: #faf8f3;
  --sand-100: #f5f0e6;
  --sand-200: #e8ddc4;
  --sand-300: #d7c399;
  --sand-400: #c9a876;
  --sand-500: #b88b5f;
  --sand-600: #a3744c;
  --sand-700: #885e40;
  --sand-800: #6f4d38;
  --sand-900: #5b4030;
  --desert-50: #fef9f0;
  --desert-100: #fdf2e0;
  --desert-400: #f1b070;
  --desert-500: #ec944f;
  --desert-600: #d97935;
  --desert-700: #b5602a;
  --ink: #2f2118;
  --muted: #7f6655;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(91, 64, 48, 0.12);
  --warm-shadow: 0 4px 20px rgba(236, 148, 79, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, var(--sand-50), #ffffff 55%, var(--desert-50));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(232, 221, 196, 0.82);
  box-shadow: 0 12px 30px rgba(91, 64, 48, 0.06);
  backdrop-filter: blur(18px);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--sand-900);
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--desert-600), var(--sand-700));
  box-shadow: var(--warm-shadow);
}

.brand-name {
  font-size: 22px;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--sand-700);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

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

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--sand-100);
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--sand-800);
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.mobile-link {
  min-height: 44px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 520px;
  overflow: hidden;
  background: var(--sand-900);
}

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

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

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.52) 52%, rgba(0, 0, 0, 0.12));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 68px;
  width: min(1180px, calc(100% - 48px));
  transform: translateX(-50%);
  color: #ffffff;
}

.hero-kicker,
.section-title span,
.page-hero-inner span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(217, 121, 53, 0.94);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.hero h1 {
  max-width: 780px;
  margin: 18px 0 14px;
  font-size: clamp(40px, 7vw, 78px);
  line-height: 1.02;
  font-weight: 900;
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.hero p {
  max-width: 820px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.7;
}

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

.hero-tags span,
.detail-tags span,
.card-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--sand-800);
  background: var(--desert-100);
  font-size: 12px;
  font-weight: 700;
}

.hero-tags span {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

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

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

.primary-btn,
.search-bar button {
  color: #ffffff;
  background: var(--desert-600);
  box-shadow: var(--warm-shadow);
}

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

.ghost-btn {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.32);
  font-size: 38px;
  line-height: 1;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.55);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 26px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.hero-dot.active {
  background: #ffffff;
}

.section-wrap,
.section-narrow {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.section-wrap {
  padding: 64px 0;
}

.section-narrow {
  padding: 28px 0 0;
}

.quick-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.search-bar,
.inline-search,
.select-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-bar {
  width: min(680px, 100%);
  padding: 8px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.search-bar input,
.inline-search input,
.select-filter select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--sand-200);
  border-radius: 14px;
  outline: none;
  padding: 0 14px;
  color: var(--ink);
  background: #ffffff;
}

.search-bar input {
  border: 0;
}

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

.quick-links a,
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--desert-700);
  background: var(--desert-100);
  font-weight: 800;
}

.text-link:hover,
.quick-links a:hover {
  color: #ffffff;
  background: var(--desert-600);
}

.section-title {
  margin-bottom: 28px;
}

.section-title h2 {
  margin: 12px 0 0;
  color: var(--sand-900);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.18;
}

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

.compact-title h2 {
  font-size: clamp(20px, 2vw, 28px);
}

.movie-grid,
.category-grid,
.feature-grid,
.side-grid {
  display: grid;
  gap: 24px;
}

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

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

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

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

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

.movie-card,
.category-card,
.rank-item,
.info-panel {
  overflow: hidden;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.movie-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 58px rgba(91, 64, 48, 0.18);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--sand-100);
}

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

.poster img,
.category-cover img,
.rank-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .poster img,
.category-card:hover .category-cover img,
.rank-item:hover .rank-poster img {
  transform: scale(1.08);
}

.poster-badge,
.rank-num,
.hot-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: 28px;
  padding: 0 10px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.55);
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  margin: 12px 0 8px;
  color: var(--sand-900);
  font-size: 18px;
  line-height: 1.35;
}

.card-body h3 a:hover,
.rank-info h3 a:hover {
  color: var(--desert-700);
}

.card-body p,
.rank-info p,
.category-content p,
.footer-text,
.page-hero-inner p,
.detail-section p {
  color: var(--muted);
  line-height: 1.75;
}

.card-body p {
  display: -webkit-box;
  min-height: 58px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--sand-600);
  font-size: 13px;
  font-weight: 800;
}

.card-meta span:not(.hot-chip),
.rank-meta span {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--sand-100);
}

.hot-chip {
  min-height: 26px;
  padding: 3px 9px;
  color: #ffffff;
  background: var(--desert-600);
  font-size: 12px;
}

.warm-panel,
.muted-panel {
  width: min(1280px, calc(100% - 32px));
  border-radius: 34px;
  padding: 54px;
}

.warm-panel {
  background: linear-gradient(135deg, var(--desert-50), var(--sand-50));
}

.muted-panel {
  background: var(--sand-100);
}

.category-cover {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  height: 210px;
  overflow: hidden;
  background: var(--sand-100);
}

.category-content {
  padding: 20px;
}

.category-content h3 {
  margin: 0 0 8px;
  color: var(--sand-900);
  font-size: 21px;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(135deg, var(--sand-800), var(--desert-700));
}

.page-hero {
  padding: 76px 0;
}

.page-hero-small {
  padding: 58px 0;
}

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

.page-hero-inner h1 {
  margin: 14px 0 12px;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.08;
}

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

.filter-area {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 16px;
}

.inline-search,
.select-filter {
  flex-direction: column;
  align-items: stretch;
  min-width: 220px;
  color: var(--sand-700);
  font-weight: 800;
}

.grow-field {
  flex: 1 1 420px;
}

.select-filter select {
  min-width: 180px;
}

.stacked-sections {
  display: grid;
  gap: 44px;
}

.category-preview {
  padding-bottom: 44px;
  border-bottom: 1px solid var(--sand-200);
}

.category-preview:last-child {
  border-bottom: 0;
}

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

.ranking-list {
  display: grid;
  gap: 16px;
}

.rank-item {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
  background: var(--sand-100);
}

.rank-num {
  position: absolute;
  left: 10px;
  top: 10px;
  min-width: 38px;
  min-height: 38px;
  color: #ffffff;
  background: var(--desert-600);
  box-shadow: var(--warm-shadow);
}

.rank-info {
  min-width: 0;
  align-self: center;
}

.rank-info h3 {
  margin: 0 0 8px;
  color: var(--sand-900);
  font-size: 22px;
}

.ranking-side {
  position: sticky;
  top: 96px;
}

.detail-hero {
  min-height: 470px;
  background: var(--sand-900);
}

.detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.38));
}

.detail-hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 84px 0 70px;
}

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

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

.detail-hero h1 {
  max-width: 860px;
  margin: 0 0 18px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 1.08;
}

.detail-hero p {
  max-width: 860px;
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 19px;
  line-height: 1.75;
}

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

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000000;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.22);
}

.movie-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-mask {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle, rgba(217, 121, 53, 0.18), rgba(0, 0, 0, 0.48));
}

.player-mask.hidden {
  display: none;
}

.player-button {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding-left: 6px;
  color: #ffffff;
  background: var(--desert-600);
  font-size: 34px;
  box-shadow: var(--warm-shadow);
}

.detail-section,
.info-panel {
  margin-top: 26px;
  padding: 28px;
}

.detail-section {
  border-radius: 24px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.detail-section h2,
.info-panel h2 {
  margin: 0 0 14px;
  color: var(--sand-900);
  font-size: 26px;
}

.info-panel {
  margin-top: 0;
  position: sticky;
  top: 96px;
}

.info-panel dl {
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
}

.info-panel dl div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sand-200);
}

.info-panel dt {
  color: var(--sand-600);
  font-weight: 800;
}

.info-panel dd {
  margin: 0;
  color: var(--sand-900);
  font-weight: 800;
  text-align: right;
}

.wide-btn {
  width: 100%;
}

.site-footer {
  margin-top: 40px;
  color: var(--sand-200);
  background: linear-gradient(180deg, var(--sand-800), var(--sand-900));
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 44px 0;
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.footer-brand {
  color: #ffffff;
  font-size: 20px;
}

.footer-text {
  max-width: 520px;
  color: var(--sand-200);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  justify-content: flex-end;
  gap: 12px;
}

.footer-nav a {
  padding: 9px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.footer-nav a:hover {
  background: var(--desert-600);
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--sand-300);
  text-align: center;
}

[data-card].is-hidden {
  display: none;
}

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

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

  .ranking-side,
  .info-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 600px;
  }

  .hero-content {
    bottom: 72px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search,
  .row-title,
  .footer-inner {
    align-items: stretch;
    flex-direction: column;
  }

  .movie-grid,
  .feature-grid,
  .category-grid,
  .small-grid,
  .side-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .warm-panel,
  .muted-panel {
    padding: 28px 16px;
    border-radius: 24px;
  }

  .card-body {
    padding: 14px;
  }

  .card-body h3 {
    font-size: 16px;
  }

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

  .rank-info h3 {
    font-size: 17px;
  }

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

  .detail-hero-content {
    padding: 58px 0;
  }

  .footer-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .movie-grid,
  .category-grid,
  .small-grid,
  .side-grid {
    grid-template-columns: 1fr;
  }

  .search-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-bar button {
    width: 100%;
  }

  .category-cover {
    height: 180px;
  }
}
