:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111c33;
  --line: #1e293b;
  --text: #ffffff;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #f59e0b;
  --accent-soft: rgba(245, 158, 11, 0.14);
  --accent-line: rgba(245, 158, 11, 0.28);
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.08), transparent 34rem), var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  border-bottom: 1px solid rgba(30, 41, 59, 0.92);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand:hover {
  color: var(--accent);
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #111827;
  font-size: 14px;
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.32);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted-strong);
  font-size: 15px;
  font-weight: 600;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.footer-links a:hover {
  color: var(--accent);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  color: var(--text);
}

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

.mobile-nav {
  display: none;
  padding: 12px 16px 18px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: var(--muted-strong);
  font-weight: 700;
}

main {
  padding-top: 64px;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: var(--panel);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-position: center;
  background-size: cover;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.2s ease;
  pointer-events: none;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slide::after,
.detail-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, var(--bg), transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 32px));
  margin-left: max(16px, calc((100vw - 1280px) / 2));
  padding: 64px 0;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-title h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-summary,
.page-title p,
.detail-one-line {
  max-width: 720px;
  margin: 22px 0 0;
  color: var(--muted-strong);
  font-size: 18px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.tag-row span,
.chip-links a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 12px;
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  background: var(--accent-soft);
  color: #fbbf24;
  font-size: 13px;
  font-weight: 700;
}

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

.primary-button,
.ghost-button,
.search-bar button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button,
.search-bar button {
  border: 1px solid #f59e0b;
  background: #f59e0b;
  color: #111827;
}

.ghost-button,
.section-more {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
  color: var(--muted-strong);
}

.primary-button:hover,
.ghost-button:hover,
.search-bar button:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  z-index: 3;
  left: max(16px, calc((100vw - 1280px) / 2));
  bottom: 34px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 5px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
}

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

.search-panel {
  position: relative;
  z-index: 5;
  margin-top: -46px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.92);
  box-shadow: var(--shadow);
}

.search-panel h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.search-bar {
  display: flex;
  gap: 12px;
}

.search-bar input {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: rgba(2, 6, 23, 0.72);
  color: var(--text);
}

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

section.wrap {
  margin-top: 56px;
}

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

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

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

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

.category-tile {
  min-height: 142px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.13), rgba(15, 23, 42, 0.86));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}

.category-tile span {
  display: block;
  font-size: 22px;
  font-weight: 900;
}

.category-tile em {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-style: normal;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(30, 41, 59, 0.82);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.84);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.play-chip {
  right: 10px;
  bottom: 10px;
  min-height: 28px;
  padding: 0 10px;
  background: rgba(245, 158, 11, 0.96);
  color: #111827;
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 32px;
  height: 32px;
  background: rgba(2, 6, 23, 0.84);
  color: var(--accent);
  border: 1px solid var(--accent-line);
}

.movie-info {
  padding: 14px;
}

.movie-info h3 {
  margin: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 16px;
}

.movie-info h3 a:hover {
  color: var(--accent);
}

.movie-meta,
.movie-desc {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.movie-desc {
  display: -webkit-box;
  min-height: 42px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.compact-grid,
.ranking-grid,
.related-grid,
.overview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 26px;
  align-items: start;
}

.ranking-panel {
  position: sticky;
  top: 88px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
}

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

.page-main {
  padding-bottom: 70px;
}

.page-title {
  padding: 74px 0 18px;
}

.category-hero,
.ranking-hero,
.search-hero {
  padding: 56px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(15, 23, 42, 0.82));
  box-shadow: var(--shadow);
}

.inline-filter {
  max-width: 720px;
  margin-top: 26px;
}

.chip-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.category-overview {
  display: grid;
  gap: 26px;
}

.category-overview-card,
.content-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
}

.small-heading {
  align-items: center;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  background-position: center;
  background-size: cover;
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 36px;
  align-items: end;
  min-height: 520px;
  padding: 70px 0 60px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 700;
}

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

.player-section {
  margin-top: 34px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(0, 0, 0, 0.72));
  color: #fff;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #111827;
  font-size: 30px;
  box-shadow: 0 0 36px rgba(245, 158, 11, 0.42);
}

.play-overlay strong {
  font-size: 20px;
}

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

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.content-card p {
  margin: 0;
  color: var(--muted-strong);
}

.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.5fr 2fr auto;
  gap: 28px;
  align-items: start;
}

.footer-inner p,
.footer-copy {
  color: var(--muted);
}

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

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  color: var(--muted-strong);
  font-weight: 700;
}

@media (max-width: 1120px) {
  .desktop-nav {
    display: none;
  }

  .menu-button {
    display: block;
  }

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

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

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

  .split-section,
  .detail-content,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .wrap,
  .header-inner,
  .footer-inner {
    width: min(100% - 24px, 1280px);
  }

  .hero {
    min-height: 680px;
  }

  .hero-content {
    width: min(100% - 24px, 760px);
    margin-left: 12px;
  }

  .hero h1,
  .page-title h1,
  .detail-copy h1 {
    font-size: 40px;
  }

  .search-panel,
  .category-hero,
  .ranking-hero,
  .search-hero {
    padding: 22px;
  }

  .search-bar {
    flex-direction: column;
  }

  .movie-grid,
  .compact-grid,
  .ranking-grid,
  .related-grid,
  .overview-grid,
  .ranking-panel .movie-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

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

  .detail-hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 42px;
  }

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