:root {
  --ancient-50: #f9f7f4;
  --ancient-100: #f0ebe3;
  --ancient-200: #e4dac8;
  --ancient-300: #d4c3a4;
  --ancient-600: #a67f4d;
  --ancient-700: #8c663d;
  --earth-50: #f7f6f4;
  --earth-100: #edeae5;
  --earth-600: #6f6258;
  --earth-800: #554840;
  --earth-900: #352d28;
  --sage-50: #f6f7f6;
  --sage-600: #505c50;
  --text: #352d28;
  --muted: #74685f;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(53, 45, 40, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--ancient-50), #ffffff 32%, var(--ancient-50));
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(249, 247, 244, 0.94);
  border-bottom: 1px solid rgba(228, 218, 200, 0.85);
  backdrop-filter: blur(16px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--ancient-600), var(--earth-800));
  box-shadow: 0 10px 25px rgba(166, 127, 77, 0.28);
}

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

.nav-link,
.mobile-link,
.footer-links a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--earth-600);
  font-weight: 600;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active,
.footer-links a:hover {
  color: var(--ancient-700);
  background: var(--ancient-100);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: var(--ancient-100);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--earth-800);
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--ancient-200);
}

.mobile-brand {
  padding: 14px 4px 8px;
  font-weight: 800;
}

.mobile-link {
  display: block;
}

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

.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,
.detail-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-slide.is-active > img {
  animation: heroZoom 8s ease forwards;
}

@keyframes heroZoom {
  from { transform: scale(1.04); }
  to { transform: scale(1.12); }
}

.hero-overlay,
.detail-hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.1));
}

.hero-content,
.detail-hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  color: #ffffff;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--ancient-300);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2,
.detail-hero h1,
.page-hero h1 {
  margin: 0;
  line-height: 1.05;
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-weight: 900;
}

.hero-copy h1 {
  font-size: clamp(34px, 5vw, 68px);
}

.hero-copy h2,
.hero-movie-title {
  margin-top: 12px;
  font-size: clamp(30px, 4vw, 56px);
}

.hero-copy p,
.detail-hero-content > p,
.page-hero p {
  width: min(700px, 100%);
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

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

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

.hero-tags span,
.detail-tags span,
.card-tags span,
.ranking-tags em {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(166, 127, 77, 0.84);
  color: #ffffff;
  font-size: 13px;
  font-style: normal;
  padding: 6px 12px;
}

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

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

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

.btn.primary {
  color: #ffffff;
  background: var(--ancient-600);
  box-shadow: 0 16px 35px rgba(166, 127, 77, 0.34);
}

.btn.primary:hover {
  background: var(--ancient-700);
}

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

.btn.text {
  color: var(--ancient-200);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  transition: background 0.25s ease;
}

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

.hero-arrow.prev {
  left: 24px;
}

.hero-arrow.next {
  right: 24px;
}

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

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

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

.quick-search {
  margin-top: -56px;
  position: relative;
  z-index: 10;
}

.quick-search-inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 420px);
  gap: 24px;
  align-items: center;
  padding: 26px;
  border: 1px solid rgba(228, 218, 200, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.quick-search h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 36px);
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
}

.quick-search p {
  margin: 0;
  color: var(--muted);
}

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

.search-box {
  padding: 10px 14px;
  border: 1px solid var(--ancient-200);
  border-radius: 16px;
  background: #ffffff;
}

.search-box span,
.filter-bar span {
  color: var(--ancient-700);
  font-weight: 800;
}

.search-box input,
.filter-bar select {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--earth-900);
  background: transparent;
}

.search-box.slim {
  min-width: min(420px, 100%);
}

.section {
  padding: 72px 0;
}

.sage-bg {
  background: var(--sage-50);
}

.earth-bg {
  background: var(--earth-50);
}

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

.section-head.compact {
  align-items: center;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  color: var(--earth-900);
}

.section-more {
  color: var(--ancient-700);
  font-weight: 800;
}

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

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

.movie-card {
  min-width: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(53, 45, 40, 0.08);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

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

.movie-card.is-hidden,
.ranking-item.is-hidden {
  display: none;
}

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

.card-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--earth-100);
}

.card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

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

.card-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.64), rgba(0, 0, 0, 0.08));
  transition: opacity 0.25s ease;
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(166, 127, 77, 0.9);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .card-shade,
.movie-card:hover .card-play {
  opacity: 1;
}

.movie-card:hover .card-play {
  transform: translate(-50%, -50%) scale(1);
}

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

.card-title {
  color: var(--earth-900);
  font-size: 18px;
  font-weight: 900;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.card-meta {
  color: #8b8077;
  font-size: 13px;
}

.card-tags span {
  color: var(--ancient-700);
  background: var(--ancient-100);
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 12px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  align-items: start;
}

.category-grid,
.category-page-grid {
  display: grid;
  gap: 18px;
}

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

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

.category-tile,
.category-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 128px;
  padding: 22px;
  border: 1px solid var(--ancient-200);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.category-tile:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--ancient-300);
  box-shadow: var(--shadow);
}

.category-main-link {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-tile span,
.category-card-title {
  color: var(--earth-900);
  font-size: 20px;
  font-weight: 900;
}

.category-tile em,
.category-card-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  font-style: normal;
}

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

.category-samples a {
  min-height: auto;
  display: inline-flex;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  color: var(--ancient-700);
  background: var(--ancient-100);
  font-size: 12px;
  box-shadow: none;
}

.ranking-panel,
.side-card,
.watch-aside {
  border: 1px solid var(--ancient-200);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 32px rgba(53, 45, 40, 0.08);
}

.ranking-panel {
  padding: 22px;
  position: sticky;
  top: 96px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  padding: 12px;
  border-radius: 14px;
  transition: background 0.25s ease;
}

.rank-row:hover {
  background: var(--ancient-100);
}

.rank-num {
  grid-row: span 2;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: #ffffff;
  background: var(--ancient-600);
  font-weight: 900;
}

.rank-title {
  overflow: hidden;
  color: var(--earth-900);
  font-weight: 900;
  white-space: nowrap;
  text-overflow: ellipsis;
}

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

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: var(--earth-900);
}

.page-hero.small-hero {
  padding: 96px 0 74px;
  background: radial-gradient(circle at 20% 20%, rgba(166, 127, 77, 0.44), transparent 32%), linear-gradient(135deg, var(--earth-900), #1d1815);
}

.page-hero h1 {
  font-size: clamp(34px, 4vw, 58px);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  padding: 18px;
  border: 1px solid var(--ancient-200);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(53, 45, 40, 0.07);
}

.filter-bar label {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--ancient-200);
  border-radius: 14px;
  background: var(--ancient-50);
}

.filter-bar select {
  min-width: 150px;
}

.empty-state {
  display: none;
  margin-top: 24px;
  padding: 28px;
  border-radius: 18px;
  text-align: center;
  color: var(--muted);
  background: var(--earth-50);
}

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

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

.ranking-item {
  border-radius: 18px;
}

.ranking-item a {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 90px;
  gap: 18px;
  align-items: center;
  padding: 14px;
}

.ranking-cover {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: var(--earth-100);
}

.ranking-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ranking-info {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.ranking-index {
  color: var(--ancient-700);
  font-size: 22px;
  font-weight: 900;
}

.ranking-title {
  color: var(--earth-900);
  font-size: 20px;
  font-weight: 900;
}

.ranking-desc {
  color: var(--muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ranking-meta {
  color: var(--muted);
  text-align: right;
  line-height: 1.8;
}

.detail-hero {
  height: 62vh;
  min-height: 520px;
}

.detail-hero-content {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.76);
}

.breadcrumb a:hover {
  color: var(--ancient-200);
}

.detail-hero h1 {
  font-size: clamp(36px, 5vw, 68px);
}

.detail-player-section {
  background: #101010;
}

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

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #000000;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: radial-gradient(circle at center, rgba(166, 127, 77, 0.24), rgba(0, 0, 0, 0.48));
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-cover-icon {
  width: 74px;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(166, 127, 77, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  font-size: 28px;
}

.watch-aside {
  padding: 22px;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(85, 72, 64, 0.96), rgba(53, 45, 40, 0.96));
}

.watch-aside h2,
.side-card h2,
.detail-copy h2 {
  margin: 0 0 18px;
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
}

.watch-aside dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.watch-aside dl div {
  display: grid;
  gap: 4px;
}

.watch-aside dt {
  color: var(--ancient-300);
  font-size: 13px;
  font-weight: 800;
}

.watch-aside dd {
  margin: 0;
  line-height: 1.6;
}

.detail-copy-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.detail-copy,
.side-card {
  padding: 28px;
  border: 1px solid var(--ancient-200);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(53, 45, 40, 0.08);
}

.detail-copy p {
  margin: 0 0 28px;
  color: var(--earth-600);
  line-height: 2;
  font-size: 16px;
}

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

.detail-tags span {
  color: var(--ancient-700);
  background: var(--ancient-100);
}

.side-card {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 96px;
}

.side-card a {
  padding: 13px 14px;
  border-radius: 12px;
  color: var(--ancient-700);
  background: var(--ancient-100);
  font-weight: 800;
}

.site-footer {
  padding: 42px 0;
  color: rgba(255, 255, 255, 0.74);
  background: var(--earth-900);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

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

.site-footer p {
  max-width: 560px;
  margin: 12px 0 0;
  line-height: 1.8;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.72);
}

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

  .split-layout,
  .player-layout,
  .detail-copy-grid {
    grid-template-columns: 1fr;
  }

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

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

  .nav-toggle {
    display: inline-flex;
  }

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

  .hero-carousel,
  .detail-hero {
    height: 74vh;
    min-height: 560px;
  }

  .hero-overlay,
  .detail-hero-shade {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.35));
  }

  .hero-content,
  .detail-hero-content {
    align-items: flex-end;
    padding-bottom: 86px;
  }

  .hero-arrow {
    display: none;
  }

  .quick-search {
    margin-top: 0;
  }

  .quick-search-inner {
    grid-template-columns: 1fr;
    border-radius: 0;
    width: 100%;
  }

  .section {
    padding: 50px 0;
  }

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

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

  .ranking-item a {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .ranking-meta {
    grid-column: 2;
    text-align: left;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

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

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .filter-bar,
  .filter-bar label,
  .search-box.slim {
    width: 100%;
  }

  .ranking-item a {
    grid-template-columns: 1fr;
  }

  .ranking-meta {
    grid-column: auto;
  }

  .player-layout {
    gap: 18px;
  }

  .play-cover-icon {
    width: 64px;
    height: 64px;
  }
}
