:root {
  --sand-50: #fdfaf7;
  --sand-100: #faf3ea;
  --sand-200: #f2e6d9;
  --sand-300: #e8d4bd;
  --earth-100: #ede9e4;
  --earth-300: #c2b4a3;
  --earth-500: #8f7862;
  --earth-600: #786351;
  --earth-700: #635144;
  --earth-800: #53453a;
  --earth-900: #473c33;
  --desert-50: #fff3e7;
  --desert-400: #f2ad6b;
  --desert-500: #ec8b3b;
  --desert-600: #dd6f1f;
  --desert-700: #b75617;
  --white: #ffffff;
  --shadow-soft: 0 12px 30px rgba(71, 60, 51, 0.12);
  --shadow-strong: 0 28px 60px rgba(71, 60, 51, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

img,
video {
  display: block;
  width: 100%;
  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(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--sand-200);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(71, 60, 51, 0.06);
}

.header-inner {
  height: 70px;
  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(--earth-900);
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: linear-gradient(135deg, var(--desert-600), var(--desert-400));
  box-shadow: 0 12px 24px rgba(221, 111, 31, 0.28);
}

.brand-text {
  font-size: 1.35rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

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

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

.nav-toggle {
  display: none;
  border: 0;
  color: var(--earth-900);
  background: var(--sand-100);
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.hero-carousel {
  position: relative;
  height: min(82vh, 760px);
  min-height: 560px;
  overflow: hidden;
  background: var(--earth-900);
}

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

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

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

.hero-slide.active img {
  transform: scale(1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(31, 24, 20, 0.88), rgba(31, 24, 20, 0.52), rgba(31, 24, 20, 0.18)), linear-gradient(0deg, rgba(31, 24, 20, 0.55), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  color: var(--white);
}

.hero-kicker,
.section-kicker {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: var(--desert-700);
  background: var(--desert-50);
}

.hero-kicker {
  color: #ffe3c9;
  background: rgba(236, 139, 59, 0.22);
  border: 1px solid rgba(255, 227, 201, 0.22);
  backdrop-filter: blur(6px);
}

.hero-content h1 {
  margin: 22px 0 16px;
  font-size: clamp(2.8rem, 7vw, 6.5rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-content p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

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

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

.hero-tags span,
.tag-row span,
.detail-tags a {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--earth-700);
  background: var(--sand-100);
}

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

.hero-actions,
.intro-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

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

.button.primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--desert-600), var(--desert-500));
  box-shadow: 0 14px 26px rgba(221, 111, 31, 0.28);
}

.button.secondary {
  color: var(--earth-800);
  background: var(--white);
  border-color: var(--sand-300);
}

.button.light {
  color: var(--earth-900);
  background: var(--white);
}

.button.ghost,
.button.ghost-light {
  color: var(--earth-800);
  background: transparent;
  border-color: var(--sand-300);
}

.button.ghost-light {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.12);
}

.button.wide {
  width: 100%;
  margin-top: 12px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  font-size: 2rem;
  line-height: 1;
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.active {
  width: 34px;
  background: var(--desert-400);
}

.section {
  padding: 72px 0;
}

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

.intro-copy h2,
.section-head h2,
.filter-panel h2,
.side-card h2,
.article-section h2 {
  margin: 12px 0 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.intro-copy p,
.section-head p,
.filter-panel p {
  max-width: 720px;
  color: var(--earth-600);
}

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

.section-head a {
  color: var(--desert-700);
  font-weight: 800;
}

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

.category-card,
.category-overview-card,
.filter-panel,
.detail-card,
.side-card,
.player-card {
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
}

.category-card {
  min-height: 210px;
  padding: 24px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover,
.movie-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-strong);
}

.category-card strong,
.category-title-link {
  display: block;
  margin-bottom: 10px;
  font-size: 1.3rem;
  color: var(--earth-900);
  font-weight: 900;
}

.category-card p,
.category-overview-card p {
  margin: 0 0 18px;
  color: var(--earth-600);
}

.category-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-card div span {
  max-width: 100%;
  overflow: hidden;
  padding: 6px 9px;
  border-radius: 999px;
  color: var(--earth-700);
  background: var(--sand-100);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.movie-grid.dense-grid {
  grid-template-columns: repeat(5, 1fr);
}

.movie-card {
  overflow: hidden;
  border-radius: 24px;
  background: var(--white);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--sand-200);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card.is-hidden,
.rank-row.is-hidden {
  display: none;
}

.movie-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--earth-900);
}

.movie-cover img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

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

.cover-type {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(31, 24, 20, 0.72);
  font-size: 0.75rem;
  font-weight: 800;
}

.movie-info {
  padding: 18px;
}

.movie-title {
  display: -webkit-box;
  min-height: 3.1em;
  margin-bottom: 8px;
  overflow: hidden;
  color: var(--earth-900);
  font-size: 1.1rem;
  line-height: 1.35;
  font-weight: 900;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-large .movie-title {
  font-size: 1.35rem;
}

.movie-info p {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--earth-600);
  font-size: 0.95rem;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--earth-500);
  font-size: 0.86rem;
}

.movie-meta span,
.movie-meta a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 26px;
}

.filter-controls {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr) auto;
  gap: 12px;
  margin-top: 22px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--sand-300);
  border-radius: 16px;
  color: var(--earth-900);
  background: var(--sand-50);
  outline: none;
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: var(--desert-500);
  box-shadow: 0 0 0 4px rgba(236, 139, 59, 0.12);
}

.filter-empty {
  display: none;
  margin-top: 20px;
  color: var(--earth-600);
  font-weight: 700;
}

.filter-panel.has-empty .filter-empty {
  display: block;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 54px 120px 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid var(--sand-200);
  background: var(--white);
  box-shadow: 0 10px 20px rgba(71, 60, 51, 0.08);
}

.rank-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  color: var(--white);
  background: var(--desert-600);
  font-weight: 900;
}

.rank-thumb {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 16 / 10;
  background: var(--earth-900);
}

.rank-thumb img {
  height: 100%;
  object-fit: cover;
}

.rank-title {
  display: block;
  margin-bottom: 6px;
  color: var(--earth-900);
  font-size: 1.05rem;
  font-weight: 900;
}

.rank-main p {
  display: -webkit-box;
  margin: 0 0 8px;
  overflow: hidden;
  color: var(--earth-600);
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.rank-views {
  color: var(--desert-700);
  font-weight: 900;
}

.page-hero {
  padding: 88px 0;
  color: var(--white);
  background: radial-gradient(circle at 12% 20%, rgba(236, 139, 59, 0.45), transparent 30%), linear-gradient(135deg, var(--earth-900), #2f261f);
}

.soft-hero {
  color: var(--earth-900);
  background: radial-gradient(circle at 12% 20%, rgba(236, 139, 59, 0.22), transparent 28%), linear-gradient(135deg, var(--sand-100), var(--sand-50));
}

.page-hero h1 {
  max-width: 760px;
  margin: 18px 0 16px;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.page-hero p {
  max-width: 760px;
  color: currentColor;
  opacity: 0.76;
  font-size: 1.1rem;
}

.category-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 40px;
  align-items: center;
}

.category-collage {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.category-collage img {
  height: 150px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-radius: 22px;
  object-fit: cover;
  box-shadow: var(--shadow-strong);
}

.category-collage img:nth-child(2),
.category-collage img:nth-child(4) {
  transform: translateY(24px);
}

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

.category-overview-card {
  padding: 26px;
}

.compact-list {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.compact-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 16px;
  background: var(--sand-50);
  transition: background 0.2s ease;
}

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

.compact-card img {
  height: 60px;
  border-radius: 12px;
  object-fit: cover;
}

.compact-card strong,
.compact-card em {
  display: block;
}

.compact-card strong {
  overflow: hidden;
  color: var(--earth-900);
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card em {
  color: var(--earth-500);
  font-size: 0.82rem;
  font-style: normal;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 0 0;
  color: var(--earth-600);
  font-size: 0.92rem;
}

.breadcrumbs a {
  color: var(--desert-700);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 28px;
  padding: 24px 0 76px;
}

.detail-main {
  display: grid;
  gap: 24px;
}

.player-card {
  overflow: hidden;
  padding: 0;
}

.video-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  background: #050403;
}

.video-frame video {
  height: 100%;
  object-fit: contain;
  background: #050403;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: var(--white);
  background: #050403;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: 0.56;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 4, 3, 0.45), rgba(5, 4, 3, 0.08));
}

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

.play-button {
  position: relative;
  z-index: 2;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  color: var(--earth-900);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-strong);
  font-size: 2rem;
  text-indent: 5px;
}

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

.detail-card h1 {
  margin: 0 0 14px;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.detail-one-line {
  margin: 0 0 20px;
  color: var(--earth-700);
  font-size: 1.1rem;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 22px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--sand-200);
}

.detail-meta span,
.detail-meta a {
  padding: 7px 11px;
  border-radius: 999px;
  color: var(--earth-700);
  background: var(--sand-100);
  font-weight: 700;
  font-size: 0.9rem;
}

.detail-meta a {
  color: var(--desert-700);
}

.article-section + .article-section {
  margin-top: 28px;
}

.article-section h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.article-section p {
  margin: 0;
  color: var(--earth-700);
  white-space: pre-line;
}

.review-box {
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--desert-50), var(--sand-100));
}

.detail-side {
  display: grid;
  align-content: start;
  gap: 20px;
}

.side-card {
  position: sticky;
  top: 92px;
}

.side-card + .side-card {
  position: static;
}

.detail-tags a:hover {
  color: var(--desert-700);
  background: var(--desert-50);
}

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

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

.footer-brand {
  color: var(--white);
  margin-bottom: 18px;
}

.footer-grid p,
.footer-bottom,
.footer-links a {
  color: var(--earth-300);
}

.footer-grid h2 {
  margin: 0 0 14px;
  color: var(--white);
  font-size: 1.05rem;
}

.footer-links {
  display: grid;
  gap: 10px;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid rgba(237, 233, 228, 0.12);
  font-size: 0.9rem;
}

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

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

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

  .side-card {
    position: static;
  }
}

@media (max-width: 780px) {
  .header-inner {
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    padding: 10px 0;
  }

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

  .site-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 10px;
  }

  .site-nav.open {
    display: flex;
  }

  .nav-link {
    border-radius: 14px;
  }

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

  .hero-content {
    justify-content: flex-end;
    padding-bottom: 88px;
  }

  .hero-arrow {
    display: none;
  }

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

  .section {
    padding: 48px 0;
  }

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

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

  .rank-row {
    grid-template-columns: 42px 88px 1fr;
  }

  .rank-views {
    grid-column: 3;
  }

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

  .category-collage img {
    height: 120px;
  }

  .detail-card,
  .side-card,
  .filter-panel {
    padding: 20px;
    border-radius: 22px;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 20px, 1180px);
  }

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

  .hero-content h1 {
    font-size: 2.5rem;
  }

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

  .rank-row {
    grid-template-columns: 36px 76px 1fr;
    gap: 10px;
  }

  .rank-main p {
    display: none;
  }

  .compact-card {
    grid-template-columns: 78px 1fr;
  }
}
