:root {
  color-scheme: dark;
  --bg: #0c0a09;
  --panel: rgba(28, 25, 23, 0.86);
  --panel-strong: #1c1917;
  --card: #292524;
  --card-soft: rgba(41, 37, 36, 0.72);
  --line: rgba(245, 158, 11, 0.16);
  --text: #fafaf9;
  --muted: #c7bfb8;
  --amber: #f59e0b;
  --amber-dark: #b45309;
  --amber-soft: rgba(245, 158, 11, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 20% -10%, rgba(245, 158, 11, 0.16), transparent 30rem),
    radial-gradient(circle at 100% 10%, rgba(180, 83, 9, 0.12), transparent 32rem),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(12, 10, 9, 0.78);
  border-bottom: 1px solid rgba(245, 158, 11, 0.14);
}

.header-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  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: 900;
  letter-spacing: 0.03em;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #1c1917;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: 0 10px 30px rgba(217, 119, 6, 0.32);
}

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

.nav-link {
  padding: 9px 14px;
  border-radius: 999px;
  color: var(--muted);
  transition: color 0.22s ease, background 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--amber-soft);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(41, 37, 36, 0.72);
  color: var(--text);
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  border-radius: 999px;
}

.hero {
  position: relative;
  min-height: 760px;
  overflow: hidden;
  isolation: isolate;
}

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

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

.hero-image,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.05);
}

.hero-overlay,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 10, 9, 0.96) 0%, rgba(12, 10, 9, 0.68) 40%, rgba(12, 10, 9, 0.35) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 38%),
    radial-gradient(circle at 70% 40%, rgba(245, 158, 11, 0.2), transparent 28rem);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 150px;
  max-width: 1180px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fbbf24;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 18px 0 18px;
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.95;
  letter-spacing: -0.06em;
  max-width: 820px;
}

.hero p,
.page-hero p,
.detail-one-line {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.hero-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.hero-tags span,
.tag-row span {
  display: inline-flex;
  border: 1px solid rgba(245, 158, 11, 0.26);
  background: rgba(245, 158, 11, 0.1);
  color: #fed7aa;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

.hero-actions,
.detail-info .primary-btn {
  margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.22s ease, background 0.22s ease, border 0.22s ease;
}

.primary-btn {
  color: #1c1917;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: 0 14px 34px rgba(217, 119, 6, 0.32);
}

.ghost-btn,
.section-link {
  color: var(--text);
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(41, 37, 36, 0.56);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
  transform: translateY(-2px);
}

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

.hero-dots {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 230px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 36px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

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

.hero-rail {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 34px;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

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

.strip-inner,
.filter-panel {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(28, 25, 23, 0.74);
  box-shadow: var(--shadow);
  padding: 18px;
}

.strip-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.strip-inner a,
.quick-links a {
  color: #fed7aa;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(245, 158, 11, 0.1);
}

.content-section {
  width: min(1180px, calc(100% - 32px));
  margin: 60px auto;
}

.amber-section {
  border-top: 1px solid rgba(245, 158, 11, 0.16);
  padding-top: 48px;
}

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

.section-head h2,
.detail-text h2 {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: 0;
}

.section-head p {
  color: var(--muted);
  margin: 8px 0 0;
}

.filter-panel {
  margin-bottom: 24px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2fr;
  gap: 18px;
  align-items: center;
}

.search-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.search-field input {
  width: 100%;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 16px;
  background: rgba(12, 10, 9, 0.72);
  color: var(--text);
  min-height: 46px;
  padding: 0 14px;
  outline: none;
}

.search-field input:focus {
  border-color: rgba(245, 158, 11, 0.76);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.12);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(41, 37, 36, 0.92), rgba(28, 25, 23, 0.94));
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border 0.24s ease, box-shadow 0.24s ease;
}

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

.poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #1c1917;
}

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

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

.poster-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(12, 10, 9, 0.86));
}

.poster em,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-style: normal;
  font-weight: 900;
}

.poster em {
  right: 10px;
  bottom: 10px;
  min-width: 42px;
  height: 30px;
  color: #1c1917;
  background: #fbbf24;
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 34px;
  height: 34px;
  color: #fff7ed;
  background: rgba(180, 83, 9, 0.92);
}

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

.movie-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: #fbbf24;
}

.meta-line,
.one-line {
  color: var(--muted);
}

.meta-line {
  font-size: 13px;
  margin: 7px 0;
}

.one-line {
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
}

.page-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 42px auto 0;
  padding: 70px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 75% 20%, rgba(245, 158, 11, 0.18), transparent 25rem),
    linear-gradient(135deg, rgba(41, 37, 36, 0.94), rgba(12, 10, 9, 0.84));
  box-shadow: var(--shadow);
}

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

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

.category-card {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(28, 25, 23, 0.78);
  padding: 24px;
  transition: transform 0.22s ease, border 0.22s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 158, 11, 0.42);
}

.category-card span {
  color: #fbbf24;
  font-weight: 800;
}

.category-card h2 {
  font-size: 32px;
  margin: 10px 0;
}

.category-card p {
  color: var(--muted);
  line-height: 1.7;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.mini-links a {
  color: #fed7aa;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

.detail-hero {
  min-height: 620px;
}

.detail-wrap {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 76px 0 60px;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 42px;
  align-items: center;
}

.detail-poster {
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(245, 158, 11, 0.2);
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
  background: #1c1917;
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  margin-bottom: 18px;
}

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

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

.detail-meta span {
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(28, 25, 23, 0.72);
  border: 1px solid rgba(245, 158, 11, 0.16);
  color: #fff7ed;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.movie-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: var(--text);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.54));
}

.play-overlay span {
  width: 78px;
  height: 78px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: 0 14px 34px rgba(217, 119, 6, 0.38);
  position: relative;
}

.play-overlay span::after {
  content: "";
  position: absolute;
  left: 32px;
  top: 24px;
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 22px solid #1c1917;
}

.video-shell.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-text {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(28, 25, 23, 0.72);
  padding: 32px;
}

.detail-text h2 + p {
  margin-top: 12px;
}

.detail-text p {
  color: var(--muted);
  line-height: 1.95;
  font-size: 17px;
  margin: 0 0 28px;
}

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 70px;
  padding: 42px 0;
  background: rgba(12, 10, 9, 0.74);
}

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

.footer-grid strong,
.footer-logo {
  color: var(--text);
}

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

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

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

@media (max-width: 980px) {
  .hero {
    min-height: 880px;
  }

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

  .filter-panel,
  .detail-wrap,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 64px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(12, 10, 9, 0.96);
    padding: 12px;
  }

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

  .nav-link {
    width: 100%;
  }

  .hero {
    min-height: 780px;
  }

  .hero-content {
    padding-top: 106px;
  }

  .hero h1,
  .detail-info h1 {
    font-size: clamp(38px, 13vw, 58px);
  }

  .hero-dots {
    bottom: 210px;
  }

  .hero-rail {
    display: flex;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .hero-rail .movie-card {
    flex: 0 0 260px;
  }

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

  .page-hero {
    padding: 34px 22px;
    border-radius: 26px;
  }

  .content-section {
    margin: 42px auto;
  }

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

  .detail-wrap {
    padding-top: 42px;
  }
}
