:root {
  color-scheme: dark;
  --bg: #120804;
  --bg-soft: #1f1208;
  --panel: rgba(45, 24, 8, 0.78);
  --panel-strong: rgba(78, 42, 10, 0.88);
  --gold: #f6c453;
  --gold-soft: #ffe6a3;
  --amber: #d97706;
  --text: #fff8e7;
  --muted: #d7b778;
  --line: rgba(246, 196, 83, 0.22);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(251, 191, 36, 0.15), transparent 30rem),
    radial-gradient(circle at 90% 10%, rgba(217, 119, 6, 0.18), transparent 28rem),
    linear-gradient(180deg, #210f05 0%, var(--bg) 45%, #080403 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 80%);
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(120, 53, 15, 0.96), rgba(146, 64, 14, 0.96), rgba(113, 63, 18, 0.96));
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: #fff3cf;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #432004;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 8px 26px rgba(245, 158, 11, 0.35);
}

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: #fff0c8;
  font-size: 0.94rem;
  transition: 0.18s ease;
}

.nav-link:hover,
.nav-link.active {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  color: #fff7df;
  background: rgba(255, 255, 255, 0.12);
  padding: 8px 14px;
}

.hero {
  position: relative;
  min-height: 620px;
  margin: 28px 0 36px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: linear-gradient(135deg, rgba(76, 29, 8, 0.92), rgba(17, 8, 3, 0.96));
  box-shadow: var(--shadow);
}

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

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.65s ease, transform 5s ease;
}

.hero-bg img.active {
  opacity: 0.35;
  transform: scale(1.11);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(17, 8, 3, 0.94), rgba(17, 8, 3, 0.66) 45%, rgba(17, 8, 3, 0.9)),
    radial-gradient(circle at 82% 22%, rgba(251, 191, 36, 0.24), transparent 28rem);
}

.hero-content {
  position: relative;
  z-index: 1;
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 0.95fr;
  align-items: center;
  gap: 42px;
  padding: 58px;
}

.hero-slide {
  display: none;
}

.hero-slide.active {
  display: block;
  animation: slideIn 0.46s ease both;
}

.hero-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-soft);
  font-weight: 800;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 16px 0 18px;
  max-width: 760px;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 720px;
  color: #f3d6a0;
  font-size: 1.08rem;
  line-height: 1.9;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.hero-tags span,
.tag-row span,
.movie-meta span,
.rank-meta span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 999px;
  color: #ffe6a3;
  background: rgba(146, 64, 14, 0.22);
  padding: 6px 10px;
  font-size: 0.82rem;
}

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

.btn,
.card-actions a,
.rank-play,
.play-button,
.section-link,
.search-submit,
.category-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  color: #321403;
  background: linear-gradient(135deg, #fcd34d, #f59e0b);
  padding: 10px 18px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn.alt {
  color: #fff7df;
  border: 1px solid rgba(251, 191, 36, 0.3);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.btn:hover,
.card-actions a:hover,
.rank-play:hover,
.play-button:hover,
.section-link:hover,
.search-submit:hover,
.category-card a:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 16px 34px rgba(245, 158, 11, 0.34);
}

.hero-panel {
  align-self: stretch;
  display: grid;
  align-content: end;
}

.hero-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.hero-mini {
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.hero-mini a {
  display: grid;
  min-height: 220px;
  align-content: end;
  position: relative;
  padding: 18px;
}

.hero-mini img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
}

.hero-mini h2,
.hero-mini p {
  position: relative;
  margin: 0;
}

.hero-mini h2 {
  font-size: 1rem;
  font-weight: 900;
}

.hero-mini p {
  color: #ffe9b7;
  font-size: 0.82rem;
  line-height: 1.5;
}

.hero-dots {
  position: absolute;
  left: 58px;
  bottom: 34px;
  z-index: 2;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 28px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.hero-dot.active {
  background: var(--gold);
}

.section {
  margin: 46px 0;
}

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 3rem);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-title p,
.detail-title p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(80, 42, 10, 0.72), rgba(27, 13, 5, 0.92));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.48);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.poster-wrap,
.rank-cover {
  position: relative;
  display: block;
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(251, 191, 36, 0.32), rgba(80, 42, 10, 0.96));
}

.poster-wrap {
  aspect-ratio: 2 / 3;
}

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

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

.poster-name,
.rank-cover span {
  position: absolute;
  inset: auto 12px 12px 12px;
  display: none;
  border-radius: 16px;
  color: #fff7df;
  background: rgba(0, 0, 0, 0.44);
  padding: 10px;
  font-weight: 900;
  text-align: center;
}

.poster-missing img {
  opacity: 0;
}

.poster-missing .poster-name,
.poster-missing span {
  display: block;
}

.rating-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  border-radius: 999px;
  color: #351706;
  background: #fcd34d;
  padding: 5px 9px;
  font-size: 0.82rem;
  font-weight: 900;
}

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

.movie-meta,
.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.movie-card h2 {
  margin: 0 0 9px;
  font-size: 1.04rem;
  line-height: 1.35;
  font-weight: 900;
}

.movie-card p {
  min-height: 4.7em;
  margin: 0 0 14px;
  color: #dbbf85;
  font-size: 0.92rem;
  line-height: 1.6;
}

.card-actions {
  justify-content: space-between;
}

.card-actions span {
  color: var(--muted);
  font-size: 0.86rem;
}

.card-actions a {
  min-height: 34px;
  padding: 8px 12px;
  font-size: 0.85rem;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background:
    radial-gradient(circle at 80% 10%, rgba(251, 191, 36, 0.2), transparent 12rem),
    linear-gradient(135deg, rgba(91, 43, 10, 0.84), rgba(20, 10, 5, 0.9));
  padding: 24px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.category-card h2 {
  margin: 12px 0 10px;
  font-size: 1.48rem;
  font-weight: 950;
}

.category-card p {
  margin: 0 0 20px;
  color: #dfc58e;
  line-height: 1.7;
}

.page-title,
.detail-hero {
  margin: 36px 0 28px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 92% 0%, rgba(251, 191, 36, 0.18), transparent 18rem),
    rgba(45, 24, 8, 0.62);
  box-shadow: var(--shadow);
}

.filter-bar,
.search-panel {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.055);
}

.filter-bar input,
.search-panel input {
  flex: 1;
  min-width: 0;
  border: 1px solid rgba(251, 191, 36, 0.26);
  border-radius: 999px;
  color: #fff7df;
  background: rgba(0, 0, 0, 0.26);
  padding: 12px 16px;
  outline: none;
}

.filter-bar input:focus,
.search-panel input:focus {
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.1);
}

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

.rank-item {
  display: grid;
  grid-template-columns: auto 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(45, 24, 8, 0.72);
  padding: 14px;
}

.rank-no {
  width: 44px;
  color: var(--gold);
  font-size: 1.28rem;
  font-weight: 950;
  text-align: center;
}

.rank-cover {
  width: 96px;
  aspect-ratio: 2 / 3;
  border-radius: 16px;
}

.rank-info h2 {
  margin: 0 0 8px;
  font-size: 1.18rem;
  font-weight: 900;
}

.rank-info p {
  margin: 0 0 10px;
  color: #ddc18a;
  line-height: 1.65;
}

.detail-hero {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  aspect-ratio: 2 / 3;
  background: radial-gradient(circle at 30% 20%, rgba(251, 191, 36, 0.32), rgba(80, 42, 10, 0.96));
}

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

.detail-title h1 {
  font-size: clamp(2.25rem, 5vw, 4.7rem);
}

.detail-title .lead {
  color: #f0d39d;
  font-size: 1.08rem;
}

.player-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #050505;
  box-shadow: var(--shadow);
}

.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  padding: 14px 16px;
}

.player-toolbar h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
}

.video-wrap {
  position: relative;
  background: #000;
}

.video-wrap video {
  width: 100%;
  min-height: 420px;
  max-height: 72vh;
  background: #000;
}

.player-status {
  color: var(--muted);
  font-size: 0.9rem;
}

.content-panel {
  display: grid;
  gap: 20px;
  margin: 36px 0;
}

.story-box {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(45, 24, 8, 0.68);
  padding: 24px;
}

.story-box h2 {
  margin: 0 0 12px;
  font-size: 1.35rem;
  font-weight: 950;
}

.story-box p {
  margin: 0;
  color: #e6c991;
  line-height: 1.95;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: #ffe6a3;
}

.search-results {
  display: grid;
  gap: 14px;
}

.search-result {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(45, 24, 8, 0.7);
  padding: 12px;
}

.search-result img {
  width: 82px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.search-result h2 {
  margin: 0 0 7px;
  font-size: 1.05rem;
  font-weight: 900;
}

.search-result p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.index-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0 48px;
}

.index-list a {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  padding: 12px;
  color: #ffe4aa;
  line-height: 1.45;
}

.hidden-card {
  display: none !important;
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(45, 24, 8, 0.72), rgba(14, 6, 3, 0.92));
}

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

.footer-grid h2 {
  margin: 0 0 12px;
  color: var(--gold-soft);
  font-size: 1rem;
}

.footer-grid p,
.footer-links a,
.footer-bottom {
  color: var(--muted);
  line-height: 1.75;
}

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

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  border-top: 1px solid rgba(251, 191, 36, 0.12);
  padding: 18px 0 28px;
  text-align: center;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

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

@media (max-width: 980px) {
  .main-nav {
    position: absolute;
    top: 72px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(45, 24, 8, 0.96);
    padding: 12px;
  }

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

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

  .hero-content,
  .detail-hero {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .hero,
  .hero-content {
    min-height: auto;
  }

  .hero-stack,
  .movie-grid,
  .category-grid,
  .footer-grid,
  .index-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rank-item,
  .search-result {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .rank-no,
  .rank-play,
  .search-result .btn {
    display: none;
  }
}

@media (max-width: 640px) {
  main,
  .header-inner,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

  .hero-content,
  .page-title,
  .detail-hero {
    padding: 22px;
  }

  .movie-grid,
  .category-grid,
  .footer-grid,
  .index-list,
  .hero-stack {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .filter-bar,
  .search-panel,
  .player-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .video-wrap video {
    min-height: 260px;
  }
}
