:root {
  --color-sand-50: #faf8f3;
  --color-sand-100: #f5f0e6;
  --color-sand-200: #ebe2cd;
  --color-sand-300: #ddc9a3;
  --color-sand-400: #d4b683;
  --color-sand-500: #c49a5c;
  --color-sand-600: #b07d44;
  --color-sand-700: #8f6235;
  --color-sand-800: #6d4a29;
  --color-sand-900: #4a3218;
  --color-dune-50: #fdf6ed;
  --color-dune-100: #fae9d1;
  --color-dune-200: #f5d4a3;
  --color-dune-300: #ebb76a;
  --color-dune-400: #e19838;
  --color-dune-500: #d97c1e;
  --color-dune-600: #c05f14;
  --color-dune-700: #9c4613;
  --shadow-soft: 0 18px 45px rgba(74, 50, 24, 0.14);
  --shadow-card: 0 10px 25px rgba(74, 50, 24, 0.10);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-sand-50);
  color: var(--color-sand-900);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  box-shadow: 0 4px 18px rgba(74, 50, 24, 0.12);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  max-width: 1280px;
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-dune-500), var(--color-dune-600));
  color: #fff;
  box-shadow: 0 10px 22px rgba(217, 124, 30, 0.28);
}

.brand-text {
  background: linear-gradient(90deg, var(--color-dune-600), var(--color-sand-700));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 21px;
  letter-spacing: 0.02em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-link,
.mobile-nav-link {
  color: var(--color-sand-700);
  font-weight: 650;
  transition: color 0.2s ease;
}

.nav-link:hover,
.mobile-nav-link:hover,
.nav-link.is-active,
.mobile-nav-link.is-active {
  color: var(--color-dune-600);
}

.header-search,
.mobile-search,
.hero-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-search input,
.mobile-search input,
.hero-search input,
.inline-filter {
  width: 100%;
  border: 1px solid var(--color-sand-200);
  border-radius: 999px;
  background: #fff;
  color: var(--color-sand-900);
  outline: none;
  padding: 11px 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
  width: 235px;
}

.header-search input:focus,
.mobile-search input:focus,
.hero-search input:focus,
.inline-filter:focus {
  border-color: var(--color-dune-400);
  box-shadow: 0 0 0 4px rgba(217, 124, 30, 0.14);
}

.header-search button,
.mobile-search button {
  border: 0;
  border-radius: 999px;
  background: var(--color-dune-500);
  color: #fff;
  padding: 10px 16px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 12px;
  background: var(--color-sand-100);
  padding: 10px;
  cursor: pointer;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-sand-900);
}

.mobile-panel {
  border-top: 1px solid var(--color-sand-200);
  padding: 16px 24px 20px;
  background: #fff;
}

.mobile-nav {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.hero-carousel {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: var(--color-sand-900);
}

.hero-slides,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transition: opacity 1s ease;
}

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

.hero-slide img,
.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: radial-gradient(circle at 25% 20%, var(--color-dune-400), var(--color-sand-900));
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.06));
}

.hero-content {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(1280px, 100%);
  transform: translateX(-50%);
  padding: 0 24px 86px;
  color: #fff;
}

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

.hero-tags span,
.detail-tags span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.20);
  backdrop-filter: blur(8px);
  padding: 7px 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 650;
}

.hero-content h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  color: #fff;
}

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

.hero-meta,
.detail-meta,
.movie-meta,
.rank-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.hero-meta span,
.detail-meta span,
.rank-meta span {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  padding: 6px 11px;
}

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  padding: 12px 22px;
  font-weight: 750;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: var(--color-dune-500);
  color: #fff;
  box-shadow: 0 12px 24px rgba(217, 124, 30, 0.28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--color-dune-600);
  box-shadow: 0 18px 28px rgba(217, 124, 30, 0.34);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  backdrop-filter: blur(10px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 34px;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: #fff;
}

.section-container {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0;
}

.section-band {
  background: linear-gradient(to bottom, var(--color-sand-50), #fff);
}

.section-band.soft {
  background: linear-gradient(to bottom, #fff, var(--color-sand-100));
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 30px;
}

.section-heading h2 {
  margin: 0;
  color: var(--color-sand-900);
  font-size: clamp(26px, 3vw, 36px);
}

.section-heading p {
  margin: 7px 0 0;
  color: var(--color-sand-700);
}

.section-bar {
  width: 5px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(to bottom, var(--color-dune-500), var(--color-dune-600));
}

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 310px;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 4px 18px;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

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

.movie-card,
.category-card,
.category-overview-card,
.wide-card,
.rank-item,
.detail-side,
.detail-article {
  border: 1px solid rgba(221, 201, 163, 0.55);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-card);
}

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

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-sand-200), var(--color-dune-100));
}

.poster-link img,
.detail-poster img,
.rank-thumb img,
.wide-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.movie-card:hover .poster-link img,
.wide-card:hover .wide-poster img,
.rank-item:hover .rank-thumb img {
  transform: scale(1.06);
}

.card-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--color-dune-600);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

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

.movie-meta {
  color: var(--color-sand-600);
  font-size: 13px;
}

.movie-meta span:not(:last-child)::after {
  margin-left: 9px;
  color: var(--color-sand-400);
  content: "•";
}

.movie-card h3,
.rank-content h3,
.wide-content h3 {
  margin: 9px 0 8px;
  color: var(--color-sand-900);
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a,
.rank-content h3 a,
.wide-content h3 a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card p,
.rank-content p,
.wide-content p,
.category-card p,
.category-overview-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--color-sand-700);
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tag-list {
  margin-top: 14px;
}

.tag-list span {
  border-radius: 7px;
  background: var(--color-sand-100);
  color: var(--color-sand-700);
  padding: 5px 8px;
  font-size: 12px;
}

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

.category-card,
.category-overview-card {
  padding: 22px;
}

.category-card-main,
.category-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
  color: var(--color-sand-900);
  font-size: 20px;
  font-weight: 800;
}

.category-card-main strong {
  color: var(--color-dune-600);
  font-size: 14px;
}

.category-samples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.category-samples a {
  border-radius: 999px;
  background: var(--color-dune-50);
  color: var(--color-dune-700);
  padding: 6px 10px;
  font-size: 13px;
}

.category-samples.large a {
  background: var(--color-sand-100);
  color: var(--color-sand-800);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 116px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 14px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rank-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.rank-number {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--color-dune-500), var(--color-dune-600));
  color: #fff;
  font-weight: 900;
}

.rank-thumb {
  display: block;
  height: 86px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--color-sand-200);
}

.rank-meta {
  color: var(--color-sand-600);
  font-size: 13px;
}

.rank-meta span {
  background: var(--color-sand-100);
}

.section-more {
  margin-top: 30px;
  text-align: center;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 20% 10%, var(--color-dune-200), var(--color-sand-50) 42%, var(--color-sand-100));
}

.page-hero > div {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 76px 0;
}

.page-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 4vw, 54px);
}

.page-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--color-sand-700);
  font-size: 18px;
  line-height: 1.7;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--color-sand-700);
  font-size: 14px;
}

.breadcrumb.light {
  color: rgba(255, 255, 255, 0.84);
}

.filter-panel {
  display: grid;
  max-width: 520px;
  gap: 10px;
  margin-bottom: 28px;
}

.filter-panel label {
  color: var(--color-sand-800);
  font-weight: 800;
}

.empty-result {
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--color-sand-700);
  padding: 28px;
  text-align: center;
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  filter: blur(1px);
}

.detail-backdrop::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.45));
  content: "";
}

.detail-hero-inner {
  position: relative;
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0;
  color: #fff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 285px minmax(0, 1fr);
  gap: 38px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 8px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  aspect-ratio: 3 / 4;
  background: var(--color-sand-200);
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.32);
}

.detail-info h1 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(34px, 5vw, 62px);
}

.detail-one-line {
  max-width: 780px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
  line-height: 1.7;
}

.detail-tags {
  margin: 20px 0 28px;
}

.detail-section {
  padding-top: 36px;
  padding-bottom: 36px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #070605;
  box-shadow: 0 24px 64px rgba(74, 50, 24, 0.25);
  aspect-ratio: 16 / 9;
}

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

.player-start {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle at center, rgba(217, 124, 30, 0.24), rgba(0, 0, 0, 0.36));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start span {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-dune-600);
  font-size: 38px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
}

.player-shell.is-playing .player-start {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
}

.detail-article,
.detail-side {
  padding: 28px;
}

.detail-article h2,
.detail-side h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

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

.detail-side dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px 14px;
  margin: 0;
}

.detail-side dt {
  color: var(--color-sand-600);
}

.detail-side dd {
  margin: 0;
  color: var(--color-sand-900);
  font-weight: 650;
}

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

.search-grid {
  align-items: stretch;
}

.site-footer {
  margin-top: 42px;
  background: linear-gradient(to bottom, var(--color-sand-100), var(--color-sand-200));
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 46px 0;
}

.footer-brand p {
  max-width: 420px;
  color: var(--color-sand-700);
  line-height: 1.8;
}

.footer-links h2 {
  margin: 0 0 14px;
  font-size: 18px;
}

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

.footer-links a {
  color: var(--color-sand-700);
}

.footer-links a:hover {
  color: var(--color-dune-600);
}

.footer-bottom {
  border-top: 1px solid var(--color-sand-300);
  color: var(--color-sand-700);
  padding: 18px 24px;
  text-align: center;
}

@media (max-width: 1100px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

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

  .rank-grid,
  .rank-grid.compact,
  .article-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .hero-carousel {
    height: 560px;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .detail-poster {
    width: min(260px, 72vw);
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header-inner,
  .section-container,
  .page-hero > div,
  .detail-hero-inner,
  .footer-inner {
    width: min(100% - 28px, 1280px);
    padding-left: 0;
    padding-right: 0;
  }

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

  .hero-carousel {
    height: 520px;
  }

  .hero-content {
    padding: 0 16px 74px;
  }

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

  .rank-item {
    grid-template-columns: 44px 90px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-number {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .rank-thumb {
    height: 76px;
  }

  .rail {
    grid-auto-columns: 82vw;
  }

  .player-start span {
    width: 70px;
    height: 70px;
    font-size: 30px;
  }
}
