:root {
  --ancient-950: #2b2419;
  --ancient-900: #423a2c;
  --ancient-850: #4f4432;
  --ancient-800: #5a4d39;
  --ancient-700: #6f5f47;
  --ancient-500: #a89571;
  --ancient-400: #c4b49a;
  --ancient-300: #d9cfbd;
  --ancient-200: #e8e2d6;
  --ancient-100: #f5f2ed;
  --amber-600: #d97706;
  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --amber-300: #fcd34d;
  --shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.28);
  --shadow-card: 0 18px 30px rgba(0, 0, 0, 0.18);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ancient-100);
  background:
    radial-gradient(circle at 20% 0%, rgba(245, 158, 11, 0.18), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(168, 149, 113, 0.14), transparent 28%),
    linear-gradient(180deg, #241d14 0%, var(--ancient-950) 42%, #1f1a12 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(43, 36, 25, 0.95);
  border-bottom: 1px solid rgba(90, 77, 57, 0.5);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

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

.brand-text {
  color: var(--amber-400);
  font-size: 24px;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  letter-spacing: 0.04em;
}

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

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--amber-400);
}

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

.header-search input,
.mobile-search input,
.filter-bar input,
.filter-bar select {
  color: var(--ancient-100);
  background: rgba(66, 58, 44, 0.58);
  border: 1px solid var(--ancient-700);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input {
  width: 225px;
  padding: 10px 12px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
  border-color: var(--amber-500);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.header-search button,
.mobile-search button,
.primary-btn,
.ghost-btn,
.play-cover,
.filter-bar button,
.hero-control,
.category-link {
  cursor: pointer;
}

.header-search button,
.mobile-search button,
.primary-btn {
  border: 0;
  color: white;
  background: var(--amber-500);
  border-radius: 12px;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(245, 158, 11, 0.22);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search button:hover,
.mobile-search button:hover,
.primary-btn:hover {
  background: var(--amber-600);
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(245, 158, 11, 0.26);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  color: var(--ancient-100);
  background: rgba(66, 58, 44, 0.64);
  border: 1px solid var(--ancient-700);
  border-radius: 12px;
}

.mobile-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 14px 0 20px;
  border-top: 1px solid rgba(90, 77, 57, 0.5);
}

.mobile-panel[hidden] {
  display: none;
}

.mobile-link {
  display: block;
  padding: 12px 0;
}

.mobile-search input {
  width: 100%;
  padding: 11px 12px;
}

.mobile-search button {
  padding: 11px 16px;
}

main {
  min-height: 60vh;
}

.hero {
  position: relative;
  height: clamp(580px, 70vh, 760px);
  overflow: hidden;
  background: var(--ancient-950);
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.04);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(43, 36, 25, 0.95) 0%, rgba(43, 36, 25, 0.72) 42%, rgba(43, 36, 25, 0.26) 100%),
    linear-gradient(0deg, var(--ancient-950) 0%, rgba(43, 36, 25, 0.32) 38%, rgba(43, 36, 25, 0.12) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  padding-bottom: 86px;
}

.hero-copy {
  width: min(670px, 100%);
  animation: fadeUp 0.6s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px 12px;
  color: var(--amber-300);
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 999px;
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  color: #fff;
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
  line-height: 1.08;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 76px);
}

.hero-desc {
  margin: 18px 0 0;
  color: var(--ancient-200);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.hero-meta,
.detail-meta,
.card-meta,
.breadcrumb {
  color: var(--ancient-300);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 12px;
  background: rgba(66, 58, 44, 0.56);
  border: 1px solid rgba(111, 95, 71, 0.76);
  border-radius: 999px;
}

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

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
}

.ghost-btn {
  color: var(--ancient-100);
  background: rgba(66, 58, 44, 0.58);
  border: 1px solid var(--ancient-700);
  border-radius: 12px;
  font-weight: 800;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ghost-btn:hover {
  background: rgba(90, 77, 57, 0.7);
  border-color: var(--amber-500);
  transform: translateY(-1px);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 42px;
  display: flex;
  gap: 10px;
}

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

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

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

.content-wrap.stacked {
  display: grid;
  gap: 52px;
}

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

.section-heading h2,
.site-footer h2,
.related-block h2,
.detail-section h2 {
  margin: 0;
  color: var(--amber-400);
  font-family: Georgia, "Times New Roman", "Songti SC", serif;
}

.section-heading h2 {
  font-size: clamp(26px, 3vw, 38px);
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--ancient-300);
  line-height: 1.7;
}

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

.movie-grid.dense {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
}

.movie-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(66, 58, 44, 0.78), rgba(43, 36, 25, 0.92));
  border: 1px solid rgba(90, 77, 57, 0.66);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 158, 11, 0.55);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ancient-900), var(--ancient-800));
}

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

.movie-card:hover .poster-wrap img {
  transform: scale(1.05);
  filter: brightness(1.05);
}

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 32%, rgba(0, 0, 0, 0.62) 100%);
}

.year-badge,
.rank-badge,
.play-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 850;
}

.year-badge {
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  color: var(--amber-300);
  background: rgba(43, 36, 25, 0.72);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 999px;
}

.rank-badge {
  top: 12px;
  left: 12px;
  min-width: 34px;
  height: 34px;
  color: var(--ancient-950);
  background: linear-gradient(135deg, var(--amber-300), var(--amber-600));
  border-radius: 50%;
}

.play-badge {
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  color: var(--ancient-950);
  background: rgba(251, 191, 36, 0.9);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.card-content {
  padding: 16px;
}

.card-content h3 {
  margin: 0;
  color: var(--ancient-100);
  font-size: 18px;
  line-height: 1.35;
}

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

.card-meta {
  margin: 9px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

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

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tag-list span {
  padding: 5px 9px;
  color: var(--amber-300);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 999px;
  font-size: 12px;
}

.category-panel,
.filter-panel,
.page-hero,
.detail-shell,
.player-card,
.detail-section,
.related-block {
  background: linear-gradient(135deg, rgba(66, 58, 44, 0.66), rgba(43, 36, 25, 0.9));
  border: 1px solid rgba(90, 77, 57, 0.58);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.category-panel {
  padding: 28px;
}

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

.category-link {
  position: relative;
  min-height: 150px;
  padding: 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 80% 0%, rgba(245, 158, 11, 0.22), transparent 34%),
    rgba(66, 58, 44, 0.58);
  border: 1px solid rgba(111, 95, 71, 0.72);
  border-radius: 18px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-link:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 158, 11, 0.52);
  background:
    radial-gradient(circle at 80% 0%, rgba(245, 158, 11, 0.28), transparent 34%),
    rgba(90, 77, 57, 0.66);
}

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

.category-link p {
  margin: 0;
  color: var(--ancient-300);
  line-height: 1.65;
}

.page-hero {
  padding: clamp(30px, 5vw, 56px);
  margin-bottom: 34px;
}

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

.page-hero p {
  max-width: 820px;
  margin: 16px 0 0;
  color: var(--ancient-200);
  font-size: 18px;
  line-height: 1.8;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px 160px 120px;
  gap: 12px;
}

.filter-bar input,
.filter-bar select {
  width: 100%;
  padding: 12px 14px;
}

.filter-bar button {
  color: white;
  background: var(--amber-500);
  border: 0;
  border-radius: 12px;
  font-weight: 850;
}

.empty-state {
  display: none;
  padding: 44px;
  text-align: center;
  color: var(--ancient-300);
  background: rgba(66, 58, 44, 0.42);
  border: 1px solid rgba(90, 77, 57, 0.55);
  border-radius: 18px;
}

.empty-state.active {
  display: block;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 16px;
  padding: 14px;
  background: rgba(66, 58, 44, 0.58);
  border: 1px solid rgba(90, 77, 57, 0.55);
  border-radius: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-row:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.52);
}

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

.rank-row h3 {
  margin: 0 0 8px;
  color: var(--ancient-100);
}

.rank-row h3 a:hover {
  color: var(--amber-400);
}

.rank-row p {
  margin: 0;
  color: var(--ancient-300);
  line-height: 1.6;
  font-size: 14px;
}

.breadcrumb {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  font-size: 14px;
}

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

.detail-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: clamp(22px, 4vw, 38px);
}

.detail-top {
  display: grid;
  grid-template-columns: minmax(220px, 310px) 1fr;
  gap: clamp(24px, 4vw, 46px);
  align-items: start;
}

.detail-poster {
  overflow: hidden;
  border-radius: 22px;
  box-shadow: var(--shadow-soft);
  background: linear-gradient(135deg, var(--ancient-900), var(--ancient-800));
}

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

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

.detail-copy .lead {
  margin: 18px 0 0;
  color: var(--ancient-200);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 0;
}

.player-card {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: clamp(18px, 3vw, 28px);
}

.player-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #050505;
  border-radius: 20px;
  border: 1px solid rgba(245, 158, 11, 0.26);
  box-shadow: var(--shadow-soft);
}

.video-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #050505;
}

.play-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  background: rgba(20, 16, 11, 0.5);
  border: 0;
}

.play-cover[hidden] {
  display: none;
}

.play-cover span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  color: var(--ancient-950);
  background: linear-gradient(135deg, var(--amber-300), var(--amber-600));
  border-radius: 50%;
  font-size: 34px;
  box-shadow: 0 18px 36px rgba(245, 158, 11, 0.3);
  transition: transform 0.2s ease;
}

.play-cover:hover span {
  transform: scale(1.06);
}

.detail-section,
.related-block {
  width: min(1180px, calc(100% - 32px));
  margin: 34px auto 0;
  padding: clamp(22px, 4vw, 34px);
}

.detail-section p {
  margin: 14px 0 0;
  color: var(--ancient-200);
  font-size: 17px;
  line-height: 1.9;
}

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

.related-grid .movie-card .card-desc {
  display: none;
}

.related-grid .movie-card .tag-list {
  display: none;
}

.site-footer {
  margin-top: 64px;
  background: rgba(31, 26, 18, 0.96);
  border-top: 1px solid rgba(90, 77, 57, 0.58);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 34px;
}

.footer-brand {
  margin-bottom: 16px;
}

.site-footer p,
.site-footer a {
  color: var(--ancient-300);
  line-height: 1.8;
}

.site-footer a {
  display: block;
  margin-top: 8px;
}

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  color: var(--ancient-400);
  border-top: 1px solid rgba(90, 77, 57, 0.45);
  text-align: center;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

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

@media (max-width: 760px) {
  .header-inner {
    height: 66px;
  }

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

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

  .hero {
    height: 660px;
  }

  .hero-content {
    align-items: center;
    padding-bottom: 40px;
  }

  .hero-dots {
    left: 16px;
    right: auto;
    bottom: 24px;
  }

  .section-heading {
    display: block;
  }

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

  .card-content {
    padding: 13px;
  }

  .card-content h3 {
    font-size: 16px;
  }

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

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

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

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

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

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

@media (max-width: 480px) {
  .movie-grid,
  .movie-grid.dense,
  .category-grid,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    display: grid;
  }
}
