:root {
  --bg: #170b05;
  --bg-soft: #241007;
  --panel: rgba(60, 28, 9, 0.78);
  --panel-strong: rgba(86, 38, 11, 0.9);
  --text: #fff8e7;
  --muted: #f6d7a8;
  --gold: #fbbf24;
  --gold-strong: #f59e0b;
  --line: rgba(251, 191, 36, 0.22);
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(251, 191, 36, 0.22), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(217, 119, 6, 0.20), transparent 32%),
    linear-gradient(180deg, #2b1207 0%, #170b05 42%, #0d0704 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: linear-gradient(90deg, rgba(92, 39, 9, 0.92), rgba(120, 53, 15, 0.88));
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

.logo {
  font-size: 22px;
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #4b2505;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.32);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #fff3cf;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(251, 191, 36, 0.20);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: #fff4d2;
  border-radius: 999px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  padding: 72px 0 48px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 7, 4, 0.92) 0%, rgba(25, 12, 5, 0.78) 45%, rgba(13, 7, 4, 0.28) 100%),
    var(--hero-bg, linear-gradient(135deg, #4b1d07, #b45309));
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  filter: saturate(1.05);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 220px;
  background: linear-gradient(180deg, transparent, var(--bg));
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.72fr);
  gap: 36px;
  align-items: center;
}

.hero-copy {
  display: grid;
  gap: 22px;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(120, 53, 15, 0.48);
  font-size: 14px;
  font-weight: 800;
}

.hero h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 82px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: #ffe8b5;
  font-size: 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.36);
  color: #fff7dc;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
  background: rgba(255, 255, 255, 0.13);
}

.btn.primary {
  color: #3b1d02;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  font-weight: 900;
}

.hero-feature {
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.30);
  border-radius: 34px;
  background: rgba(36, 16, 7, 0.72);
  box-shadow: var(--shadow);
}

.hero-poster {
  position: relative;
  aspect-ratio: 16 / 21;
  overflow: hidden;
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  background: linear-gradient(180deg, transparent, rgba(12, 7, 3, 0.9));
}

.hero-card-body {
  padding: 24px;
}

.hero-card-body h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.hero-card-body p {
  color: var(--muted);
  font-size: 15px;
}

.hero-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-top: 36px;
}

.hero-mini {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.18);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.hero-mini:hover {
  transform: translateY(-4px);
  border-color: rgba(251, 191, 36, 0.46);
}

.hero-mini img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.hero-mini span {
  display: block;
  padding: 10px 12px 12px;
  color: #fff5d7;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section {
  padding: 58px 0;
}

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

.section-title h1,
.section-title h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}

.section-title p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 760px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(86, 38, 11, 0.78), rgba(36, 16, 7, 0.86));
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.52);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.32);
}

.poster-link {
  position: relative;
  display: block;
  background: linear-gradient(135deg, #3b1b08, #78350f);
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 2.9;
  object-fit: cover;
}

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #341805;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  font-size: 12px;
  font-weight: 900;
}

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

.movie-card h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.28;
}

.movie-card h2 a:hover {
  color: #fde68a;
}

.movie-card p {
  min-height: 68px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #ffedc2;
  font-size: 13px;
}

.meta-line span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip-row span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.16);
  font-size: 12px;
}

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

.category-card {
  min-height: 170px;
  padding: 22px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 100% 0%, rgba(251, 191, 36, 0.24), transparent 36%),
    rgba(86, 38, 11, 0.72);
  transition: transform 0.2s ease, background 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  background:
    radial-gradient(circle at 100% 0%, rgba(251, 191, 36, 0.34), transparent 42%),
    rgba(120, 53, 15, 0.88);
}

.category-card h2 {
  margin: 0 0 12px;
  font-size: 22px;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

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

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(36, 16, 7, 0.78);
  box-shadow: var(--shadow);
}

.rank-panel h2 {
  margin: 0 0 16px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-radius: 16px;
  color: #fff2ce;
  background: rgba(255, 255, 255, 0.06);
}

.rank-item:hover {
  background: rgba(251, 191, 36, 0.14);
}

.rank-no {
  font-weight: 900;
  color: var(--gold);
}

.rank-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

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

.search-panel {
  padding: 20px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(24, 11, 5, 0.54);
}

.search-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 220px 220px;
  gap: 14px;
}

.search-box,
.select-box {
  display: grid;
  gap: 7px;
  color: #fde68a;
  font-size: 13px;
  font-weight: 800;
}

.search-box input,
.select-box select {
  width: 100%;
  height: 48px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  outline: none;
  background: rgba(255, 255, 255, 0.08);
}

.search-box input:focus,
.select-box select:focus {
  border-color: rgba(251, 191, 36, 0.60);
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12);
}

.page-hero {
  padding: 70px 0 36px;
  background:
    radial-gradient(circle at 18% 20%, rgba(251, 191, 36, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(120, 53, 15, 0.48), transparent);
}

.page-hero h1 {
  max-width: 960px;
  margin: 0;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 820px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #fde68a;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

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

.player-shell {
  overflow: hidden;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 30px;
  background: #070403;
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  cursor: pointer;
  background: #000;
  overflow: hidden;
  z-index: 3;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
}

.play-icon {
  position: relative;
  z-index: 4;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #3b1d02;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
  box-shadow: 0 18px 48px rgba(245, 158, 11, 0.45);
  font-size: 26px;
  font-weight: 900;
}

.player-box.playing .player-cover {
  display: none;
}

.detail-panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(36, 16, 7, 0.72);
}

.detail-panel h1 {
  margin: 0 0 14px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.12;
}

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

.detail-meta span {
  padding: 6px 11px;
  border: 1px solid rgba(251, 191, 36, 0.18);
  border-radius: 999px;
  color: #ffedc2;
  background: rgba(255, 255, 255, 0.08);
}

.content-block {
  margin-top: 26px;
}

.content-block h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.content-block p {
  margin: 0;
  color: #ffe6b0;
}

.related-list {
  display: grid;
  gap: 12px;
}

.related-list a {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
}

.related-list a:hover {
  background: rgba(251, 191, 36, 0.13);
}

.related-list img {
  width: 72px;
  aspect-ratio: 2 / 2.7;
  object-fit: cover;
  border-radius: 12px;
}

.related-list strong {
  display: block;
  line-height: 1.32;
}

.related-list span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.sitemap-grid {
  columns: 4 240px;
  column-gap: 28px;
}

.sitemap-grid a {
  display: block;
  break-inside: avoid;
  padding: 8px 0;
  color: #ffe4a3;
  border-bottom: 1px solid rgba(251, 191, 36, 0.10);
}

.sitemap-grid a:hover {
  color: #fff;
}

.site-footer {
  margin-top: 64px;
  padding: 48px 0 0;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(86, 38, 11, 0.42), rgba(17, 9, 4, 0.92));
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 30px;
}

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

.footer-grid p {
  max-width: 560px;
  margin: 12px 0 0;
  color: var(--muted);
}

.footer-grid a:not(.footer-logo) {
  display: block;
  margin: 8px 0;
  color: #ffe5a6;
}

.footer-grid a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: 38px;
  padding: 18px 0;
  text-align: center;
  color: #ffd98f;
  border-top: 1px solid rgba(251, 191, 36, 0.12);
}

.empty-state {
  display: none;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

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

@media (max-width: 980px) {
  .hero-layout,
  .feature-layout,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .rank-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 76px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(45, 20, 7, 0.96);
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    border-radius: 14px;
  }

  .hero {
    min-height: auto;
    padding: 48px 0 28px;
  }

  .hero-card-body {
    padding: 18px;
  }

  .hero-strip {
    grid-template-columns: 1fr;
  }

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

  .section {
    padding: 40px 0;
  }

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