:root {
  --ancient-950: #2b2419;
  --ancient-925: #332a1d;
  --ancient-900: #423a2c;
  --ancient-850: #4d4232;
  --ancient-800: #5c4c38;
  --ancient-700: #6f5f47;
  --ancient-600: #8b7655;
  --ancient-500: #a89571;
  --ancient-400: #c4b49a;
  --ancient-300: #d9cfbd;
  --ancient-200: #e8e2d6;
  --ancient-100: #f5f2ed;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --bronze-900: #4a2d16;
  --page-width: 1180px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.28);
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ancient-100);
  background:
    radial-gradient(circle at 12% 8%, rgba(245, 158, 11, 0.16), transparent 32rem),
    radial-gradient(circle at 86% 18%, rgba(168, 149, 113, 0.12), transparent 30rem),
    linear-gradient(180deg, var(--ancient-950) 0%, #211a12 100%);
  font-family: Inter, "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(111, 95, 71, 0.42);
  background: rgba(43, 36, 25, 0.9);
  backdrop-filter: blur(14px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--amber-400);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 24px;
  font-weight: 800;
  white-space: nowrap;
}

.logo-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: var(--ancient-950);
  background: linear-gradient(135deg, var(--amber-400), var(--amber-600));
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.28);
}

.logo:hover .logo-text {
  color: var(--amber-300);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--ancient-200);
  font-weight: 600;
}

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

.nav-links a:hover,
.nav-links a.is-current {
  color: var(--amber-400);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-search {
  position: relative;
  width: min(26vw, 270px);
}

.header-search input,
.catalog-search input,
.search-panel input,
.search-panel select {
  width: 100%;
  color: var(--ancient-100);
  border: 1px solid rgba(111, 95, 71, 0.88);
  border-radius: var(--radius-sm);
  outline: none;
  background: rgba(66, 58, 44, 0.55);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  padding: 10px 42px 10px 14px;
}

.header-search button {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 32px;
  height: 32px;
  border: 0;
  color: var(--ancient-400);
  background: transparent;
  transform: translateY(-50%);
}

.header-search input:focus,
.catalog-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
  background: rgba(66, 58, 44, 0.82);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(111, 95, 71, 0.72);
  border-radius: 12px;
  color: var(--ancient-200);
  background: rgba(66, 58, 44, 0.42);
}

.mobile-nav {
  display: none;
  padding: 0 0 18px;
  border-top: 1px solid rgba(111, 95, 71, 0.42);
}

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

.mobile-nav a {
  display: block;
  padding: 14px 0;
  color: var(--ancient-200);
  font-weight: 650;
}

.mobile-nav a:hover {
  color: var(--amber-400);
}

.hero {
  position: relative;
  height: 60vh;
  min-height: 500px;
  overflow: hidden;
  background: var(--ancient-900);
}

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.06) contrast(1.05);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(43, 36, 25, 0.95) 0%, rgba(43, 36, 25, 0.76) 42%, rgba(43, 36, 25, 0.32) 100%),
    linear-gradient(0deg, var(--ancient-950) 0%, rgba(43, 36, 25, 0.78) 34%, rgba(43, 36, 25, 0.25) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  height: 100%;
  align-items: flex-end;
  padding: 0 0 80px;
}

.hero-copy {
  max-width: 720px;
  animation: fadeIn 0.5s ease-in;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  margin-bottom: 16px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  color: var(--amber-400);
  background: rgba(245, 158, 11, 0.15);
  font-size: 14px;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 18px;
  color: #fff;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 22px;
  color: var(--ancient-200);
  font-size: clamp(16px, 1.8vw, 20px);
}

.hero-meta,
.detail-meta,
.card-tags,
.quick-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta {
  margin-bottom: 26px;
}

.meta-pill,
.tag-pill,
.filter-chip,
.year-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid rgba(111, 95, 71, 0.72);
  border-radius: 999px;
  color: var(--ancient-200);
  background: rgba(66, 58, 44, 0.58);
  font-size: 13px;
  font-weight: 650;
}

.meta-pill.is-hot,
.tag-pill.is-hot {
  border-color: rgba(245, 158, 11, 0.38);
  color: var(--amber-400);
  background: rgba(245, 158, 11, 0.15);
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.36);
}

.btn-ghost {
  color: var(--ancient-100);
  border-color: rgba(111, 95, 71, 0.72);
  background: rgba(66, 58, 44, 0.5);
}

.btn-ghost:hover {
  border-color: var(--amber-500);
  background: rgba(245, 158, 11, 0.16);
}

.hero-dots {
  position: absolute;
  right: max(24px, calc((100vw - var(--page-width)) / 2));
  bottom: 38px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--ancient-500);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.is-active {
  width: 36px;
  background: var(--amber-500);
}

.main-sections {
  padding: 54px 0 0;
}

.section {
  margin-bottom: 76px;
}

.section-card {
  padding: 28px;
  border: 1px solid rgba(111, 95, 71, 0.44);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(66, 58, 44, 0.62), rgba(92, 76, 56, 0.26));
  box-shadow: var(--shadow-soft);
}

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

.section-title {
  margin: 0;
  color: var(--amber-400);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.15;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--ancient-400);
}

.view-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--amber-400);
  font-weight: 700;
  white-space: nowrap;
}

.view-more:hover {
  color: var(--amber-300);
}

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

.movie-grid.compact {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(111, 95, 71, 0.38);
  border-radius: 16px;
  background: rgba(66, 58, 44, 0.42);
  box-shadow: var(--shadow-soft);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.movie-card:hover {
  border-color: rgba(245, 158, 11, 0.58);
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}

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

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--ancient-900);
}

.poster-link.wide {
  aspect-ratio: 16 / 9;
}

.poster-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.48s ease, filter 0.48s ease;
}

.movie-card:hover .poster-link img {
  filter: brightness(1.06);
  transform: scale(1.08);
}

.poster-link::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(0deg, rgba(43, 36, 25, 0.92), rgba(43, 36, 25, 0.05) 58%);
  opacity: 0.86;
}

.card-play {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(245, 158, 11, 0.92);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.32);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translateY(0);
}

.card-body {
  padding: 15px 15px 16px;
}

.card-title {
  margin: 0 0 7px;
  color: #fff;
  font-size: 17px;
  line-height: 1.35;
  font-weight: 800;
}

.card-title a:hover {
  color: var(--amber-400);
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 9px;
  color: var(--ancient-400);
  font-size: 13px;
}

.card-desc {
  display: -webkit-box;
  min-height: 45px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--ancient-300);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-tags {
  gap: 6px;
}

.card-tags .tag-pill {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 22px;
  border: 1px solid rgba(111, 95, 71, 0.52);
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.16), transparent 12rem),
    rgba(66, 58, 44, 0.5);
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-tile:hover {
  border-color: rgba(245, 158, 11, 0.58);
  background:
    radial-gradient(circle at top right, rgba(245, 158, 11, 0.24), transparent 12rem),
    rgba(66, 58, 44, 0.78);
  transform: translateY(-4px);
}

.category-tile h3 {
  margin: 0 0 10px;
  color: var(--amber-400);
  font-size: 22px;
}

.category-tile p {
  margin: 0;
  color: var(--ancient-300);
}

.category-count {
  display: inline-flex;
  margin-top: 20px;
  color: var(--ancient-950);
  background: var(--amber-400);
}

.page-hero {
  padding: 62px 0 40px;
  border-bottom: 1px solid rgba(111, 95, 71, 0.36);
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.16), transparent 32rem),
    linear-gradient(135deg, rgba(66, 58, 44, 0.58), rgba(43, 36, 25, 0));
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--ancient-400);
  font-size: 14px;
}

.breadcrumbs a:hover {
  color: var(--amber-400);
}

.page-title {
  max-width: 920px;
  margin: 0;
  color: #fff;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
}

.page-desc {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--ancient-300);
  font-size: 18px;
}

.catalog-toolbar,
.search-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 26px;
}

.catalog-search input,
.search-panel input,
.search-panel select {
  min-height: 48px;
  padding: 0 15px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chip {
  border-color: rgba(111, 95, 71, 0.72);
}

.filter-chip:hover,
.filter-chip.is-active {
  color: var(--ancient-950);
  border-color: var(--amber-400);
  background: var(--amber-400);
}

.result-count {
  color: var(--ancient-400);
  font-size: 14px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 72px 86px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(111, 95, 71, 0.44);
  border-radius: 16px;
  background: rgba(66, 58, 44, 0.46);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
  border-color: rgba(245, 158, 11, 0.55);
  transform: translateX(4px);
}

.rank-num {
  color: var(--amber-400);
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 800;
  text-align: center;
}

.rank-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  background: var(--ancient-900);
}

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

.rank-title {
  margin: 0 0 6px;
  color: #fff;
  font-size: 20px;
}

.rank-title:hover {
  color: var(--amber-400);
}

.rank-desc {
  margin: 0;
  color: var(--ancient-300);
}

.rank-score {
  color: var(--amber-400);
  font-weight: 800;
  white-space: nowrap;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 58px 0;
  background: var(--ancient-900);
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.2;
  filter: blur(4px) saturate(1.05);
  transform: scale(1.06);
}

.detail-hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(43, 36, 25, 0.94), rgba(43, 36, 25, 0.78)),
    linear-gradient(0deg, var(--ancient-950), transparent 72%);
}

.detail-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 34px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 20px;
  background: var(--ancient-900);
  box-shadow: var(--shadow-lg);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.detail-copy h1 {
  margin: 0 0 18px;
  color: #fff;
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(36px, 5vw, 62px);
  line-height: 1.1;
}

.detail-copy .one-line {
  max-width: 820px;
  margin: 0 0 18px;
  color: var(--ancient-200);
  font-size: 19px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  padding-top: 44px;
}

.player-card,
.info-card {
  border: 1px solid rgba(111, 95, 71, 0.44);
  border-radius: 20px;
  background: rgba(66, 58, 44, 0.46);
  box-shadow: var(--shadow-soft);
}

.player-card {
  overflow: hidden;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #100d09;
}

.video-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #100d09;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 22px;
  color: #fff;
  background: linear-gradient(180deg, rgba(16, 13, 9, 0.34), rgba(16, 13, 9, 0.72));
  border: 0;
  transition: opacity 0.2s ease;
}

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

.play-circle {
  display: grid;
  width: 76px;
  height: 76px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--amber-500), var(--amber-600));
  box-shadow: 0 18px 42px rgba(245, 158, 11, 0.36);
}

.play-overlay span:last-child {
  color: var(--ancient-200);
  font-weight: 700;
}

.player-status {
  min-height: 24px;
  padding: 12px 18px 16px;
  color: var(--ancient-300);
  font-size: 14px;
}

.content-card {
  padding: 26px;
  margin-top: 24px;
  border: 1px solid rgba(111, 95, 71, 0.44);
  border-radius: 20px;
  background: rgba(66, 58, 44, 0.42);
}

.content-card h2,
.info-card h2 {
  margin: 0 0 16px;
  color: var(--amber-400);
  font-family: "Noto Serif SC", "Songti SC", serif;
  font-size: 26px;
}

.content-card p {
  margin: 0 0 16px;
  color: var(--ancient-200);
  font-size: 16px;
}

.info-card {
  padding: 22px;
  align-self: start;
}

.info-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(111, 95, 71, 0.35);
}

.info-list dt {
  color: var(--ancient-400);
}

.info-list dd {
  margin: 0;
  color: var(--ancient-100);
  font-weight: 650;
}

.related-section {
  padding-top: 46px;
}

.site-footer {
  margin-top: 88px;
  border-top: 1px solid rgba(111, 95, 71, 0.44);
  background: rgba(33, 26, 18, 0.76);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  padding: 42px 0;
}

.footer-grid h2,
.footer-grid h3 {
  margin: 0 0 14px;
  color: var(--amber-400);
}

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

.footer-grid a:hover {
  color: var(--amber-400);
}

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

.footer-bottom {
  padding: 18px 0 28px;
  border-top: 1px solid rgba(111, 95, 71, 0.34);
  color: var(--ancient-400);
  font-size: 14px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

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

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

  .hero-content {
    padding: 130px 0 78px;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, var(--ancient-950) 0%, rgba(43, 36, 25, 0.82) 55%, rgba(43, 36, 25, 0.54) 100%);
  }

  .hero-dots {
    right: 20px;
    bottom: 24px;
  }

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

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

  .detail-poster {
    max-width: 260px;
  }

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

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

  .logo {
    font-size: 20px;
  }

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

  .hero h1,
  .page-title,
  .detail-copy h1 {
    letter-spacing: -0.02em;
  }

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

  .section-card,
  .content-card,
  .info-card {
    padding: 20px;
  }

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

  .rank-item {
    grid-template-columns: 48px 72px 1fr;
  }

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