:root {
  --sand-50: #faf8f3;
  --sand-100: #f5f0e6;
  --sand-200: #ebe2cd;
  --sand-300: #ddc9a3;
  --sand-500: #c49a5c;
  --sand-700: #8f6235;
  --sand-800: #6d4a29;
  --sand-900: #4a3218;
  --dune-50: #fdf6ed;
  --dune-100: #fae9d1;
  --dune-300: #ebb76a;
  --dune-500: #d97c1e;
  --dune-600: #c05f14;
  --dune-700: #9c4613;
  --ink: #2d2115;
  --muted: #7a6244;
  --white: #ffffff;
  --shadow: 0 12px 30px rgba(74, 50, 24, 0.12);
  --shadow-lg: 0 22px 60px rgba(74, 50, 24, 0.18);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--sand-900);
  background: var(--sand-50);
  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,
select {
  font: inherit;
}

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

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

.site-logo,
.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

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

.logo-text {
  font-size: 22px;
  background: linear-gradient(90deg, var(--dune-600), var(--sand-700));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--sand-700);
  font-weight: 600;
}

.site-nav a {
  transition: color 0.2s ease;
}

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

.mobile-menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  background: var(--sand-100);
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--sand-900);
}

.mobile-nav {
  display: none;
  padding: 12px 24px 20px;
  border-top: 1px solid var(--sand-200);
  background: var(--white);
}

.mobile-nav a {
  display: block;
  padding: 11px 0;
  font-weight: 700;
  color: var(--sand-700);
}

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

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(20, 13, 7, 0.92) 0%, rgba(20, 13, 7, 0.55) 45%, rgba(20, 13, 7, 0.18) 100%);
}

.hero-content {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 92px;
  color: var(--white);
}

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

.hero-tags span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  max-width: 820px;
  margin: 20px 0 18px;
  color: var(--white);
  font-size: clamp(38px, 7vw, 74px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

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

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

.hero-meta span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 999px;
}

.hero-actions,
.center-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.center-actions {
  justify-content: center;
  margin-top: 28px;
}

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

.btn-primary {
  color: var(--white);
  background: linear-gradient(135deg, var(--dune-500), var(--dune-700));
  box-shadow: 0 12px 24px rgba(217, 124, 30, 0.24);
}

.btn-primary:hover,
.btn-ghost:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-ghost {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.btn-primary.full {
  width: 100%;
}

.hero-control {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-control.prev {
  left: 20px;
}

.hero-control.next {
  right: 20px;
}

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

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

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

.search-band {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: -42px auto 0;
  padding: 0 24px;
}

.search-panel,
.filter-toolbar {
  display: grid;
  grid-template-columns: 1.1fr 1.5fr 0.8fr auto;
  gap: 16px;
  align-items: end;
  padding: 20px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.search-panel strong,
.filter-toolbar strong {
  display: block;
  color: var(--sand-900);
  font-size: 20px;
}

.search-panel span,
.filter-toolbar span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-panel input,
.search-panel select,
.filter-toolbar input,
.filter-toolbar select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--sand-200);
  border-radius: 12px;
  color: var(--sand-900);
  background: var(--white);
  outline: none;
}

.search-panel input:focus,
.search-panel select:focus,
.filter-toolbar input:focus,
.filter-toolbar select:focus {
  border-color: var(--dune-500);
  box-shadow: 0 0 0 4px rgba(217, 124, 30, 0.12);
}

.filter-toolbar {
  grid-template-columns: 1.4fr repeat(3, minmax(150px, 0.6fr)) auto;
  margin-bottom: 28px;
}

.filter-toolbar.wide {
  grid-template-columns: 1.5fr repeat(3, minmax(140px, 0.7fr)) auto;
}

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

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

.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--sand-900);
  font-size: clamp(26px, 3vw, 38px);
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-icon,
.section-line {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: var(--white);
  background: linear-gradient(135deg, var(--dune-500), var(--dune-700));
}

.section-line {
  width: 5px;
  height: 36px;
}

.horizontal-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 300px;
  gap: 22px;
  overflow-x: auto;
  padding: 8px 2px 18px;
  scrollbar-width: none;
}

.horizontal-row::-webkit-scrollbar {
  display: none;
}

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

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

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

.card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 8px 24px rgba(74, 50, 24, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.poster-wrap {
  position: relative;
  height: 228px;
  margin: 0;
  overflow: hidden;
  background: var(--sand-200);
}

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

.card:hover .poster-wrap img,
.category-tile:hover img,
.side-item:hover img {
  transform: scale(1.08);
}

.poster-wrap figcaption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  color: var(--white);
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.poster-wrap::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.04) 58%);
  pointer-events: none;
}

.view-badge,
.rank-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.58);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.rank-badge {
  right: auto;
  left: 12px;
  background: linear-gradient(135deg, var(--dune-500), var(--dune-700));
}

.card-body {
  padding: 18px;
}

.card-body h3 {
  display: -webkit-box;
  min-height: 52px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--sand-900);
  font-size: 19px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.meta-row,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.meta-row span,
.detail-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--sand-100);
}

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

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

.tag-list.big span {
  padding: 8px 12px;
  color: var(--sand-900);
  background: var(--dune-100);
  font-size: 14px;
}

.warm-section {
  background: linear-gradient(180deg, var(--sand-50), var(--white));
}

.light-section {
  background: linear-gradient(180deg, var(--white), var(--sand-50));
}

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

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: var(--radius);
  color: var(--white);
  box-shadow: var(--shadow);
}

.category-tile img {
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(23, 14, 6, 0.85), rgba(23, 14, 6, 0.2));
}

.category-tile strong,
.category-tile em,
.category-tile p {
  position: absolute;
  left: 20px;
  right: 20px;
  z-index: 2;
}

.category-tile strong {
  bottom: 76px;
  font-size: 24px;
}

.category-tile em {
  bottom: 52px;
  font-style: normal;
  color: rgba(255, 255, 255, 0.78);
}

.category-tile p {
  bottom: 18px;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 54px 110px 1fr;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(74, 50, 24, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.rank-number {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: var(--white);
  background: linear-gradient(135deg, var(--dune-500), var(--dune-700));
  font-weight: 900;
}

.rank-item img {
  width: 110px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-item strong,
.side-item strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--sand-900);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rank-item em,
.side-item em {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

.category-strip {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 22px 0 54px;
}

.strip-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.strip-title h3 {
  margin: 0;
  font-size: 26px;
}

.strip-title a {
  color: var(--dune-600);
  font-weight: 800;
}

.page-hero {
  min-height: 330px;
  padding: 82px 24px;
  color: var(--white);
  background: radial-gradient(circle at 18% 20%, rgba(235, 183, 106, 0.5), transparent 30%), linear-gradient(135deg, var(--sand-900), #1f150d 58%, var(--dune-700));
}

.page-hero.small {
  display: grid;
  place-items: center;
}

.page-hero-inner {
  width: min(1100px, 100%);
}

.eyebrow {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.page-hero h1 {
  margin: 18px 0 14px;
  color: var(--white);
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.08;
}

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

.empty-state {
  display: none;
  padding: 40px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--sand-300);
  border-radius: var(--radius);
  background: var(--white);
}

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

.detail-main {
  background: var(--sand-50);
}

.detail-container {
  padding-top: 32px;
}

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

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

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

.player-column {
  min-width: 0;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #000000;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: contain;
}

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

.play-overlay span {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--dune-500), var(--dune-700));
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.36);
  font-size: 36px;
  transform: translateX(3px);
}

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

.detail-card,
.poster-panel,
.side-recommend {
  margin-top: 24px;
  padding: 26px;
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.detail-card h1 {
  margin: 20px 0 12px;
  color: var(--sand-900);
  font-size: clamp(30px, 4vw, 50px);
}

.one-line {
  color: var(--sand-700);
  font-size: 18px;
  font-weight: 700;
}

.detail-meta {
  margin: 20px 0 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--sand-200);
}

.text-block {
  margin-top: 24px;
}

.text-block h2,
.side-recommend h2 {
  margin: 0 0 12px;
  color: var(--sand-900);
  font-size: 24px;
}

.text-block p {
  margin: 0;
  color: var(--sand-800);
  font-size: 17px;
  line-height: 1.86;
}

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

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

.poster-panel img {
  width: 100%;
  height: 430px;
  margin-bottom: 18px;
  border-radius: 16px;
  object-fit: cover;
}

.side-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--sand-100);
}

.side-item img {
  width: 96px;
  height: 68px;
  border-radius: 12px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.related-section {
  width: 100%;
  padding-right: 0;
  padding-left: 0;
}

.detail-pagination {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
}

.detail-pagination a {
  max-width: 48%;
  padding: 14px 18px;
  border-radius: 14px;
  color: var(--dune-700);
  background: var(--dune-50);
  font-weight: 800;
}

.compact-card .poster-wrap {
  height: 190px;
}

.site-footer {
  margin-top: 56px;
  padding: 48px 24px 28px;
  background: linear-gradient(180deg, var(--sand-100), var(--sand-200));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 34px;
  width: min(1280px, 100%);
  margin: 0 auto;
}

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

.footer-grid p,
.footer-grid a {
  color: var(--sand-700);
  line-height: 1.7;
}

.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-grid li + li {
  margin-top: 8px;
}

.footer-bottom {
  width: min(1280px, 100%);
  margin: 32px auto 0;
  padding-top: 24px;
  border-top: 1px solid var(--sand-300);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

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

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

  .side-column {
    position: static;
  }

  .poster-panel {
    display: none;
  }
}

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

  .mobile-menu-button {
    display: block;
  }

  .mobile-nav.is-open {
    display: block;
  }

  .hero {
    min-height: 610px;
  }

  .hero-content {
    padding: 0 22px 82px;
  }

  .hero-control {
    display: none;
  }

  .search-panel,
  .filter-toolbar,
  .filter-toolbar.wide {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .section-container,
  .category-strip {
    width: min(100% - 32px, 1280px);
    padding: 44px 0;
  }

  .card-grid.four,
  .card-grid.three,
  .category-tile-grid,
  .category-tile-grid.large,
  .rank-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 44px 90px 1fr;
  }

  .rank-item img {
    width: 90px;
  }

  .poster-wrap {
    height: 240px;
  }

  .page-hero {
    min-height: 280px;
    padding: 56px 18px;
  }

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

  .play-overlay span {
    width: 74px;
    height: 74px;
    font-size: 28px;
  }

  .detail-pagination {
    flex-direction: column;
  }

  .detail-pagination a {
    max-width: none;
  }
}

@media (max-width: 520px) {
  .navbar {
    height: 62px;
    padding: 0 16px;
  }

  .logo-mark {
    width: 34px;
    height: 34px;
  }

  .logo-text {
    font-size: 20px;
  }

  .horizontal-row {
    grid-auto-columns: 82%;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero p {
    font-size: 16px;
  }

  .card-body h3 {
    min-height: auto;
  }
}
