:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.86);
  --bg-card-strong: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #fbbf24;
  --accent-soft: rgba(251, 191, 36, 0.16);
  --accent-dark: #0f172a;
  --danger: #ef4444;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(251, 191, 36, 0.12), transparent 34rem), linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  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 {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(18px);
}

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

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  color: #111827;
  box-shadow: 0 14px 30px rgba(251, 191, 36, 0.28);
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 15px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent);
  background: rgba(251, 191, 36, 0.1);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  border-radius: 999px;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  padding: 78px 0 72px;
  background: linear-gradient(180deg, #020617 0%, #0f172a 100%);
}

.hero-aurora {
  position: absolute;
  inset: -20% -10% auto auto;
  width: 62vw;
  height: 62vw;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.22), transparent 60%);
  filter: blur(12px);
  opacity: 0.9;
}

.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(360px, 0.97fr);
  align-items: center;
  gap: 42px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy-block h1,
.inner-hero h1,
.detail-content h1 {
  margin: 0;
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1.04;
}

.hero-copy-block h1 {
  max-width: 780px;
  font-size: clamp(40px, 6vw, 72px);
}

.hero-desc {
  max-width: 620px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: 19px;
}

.hero-search,
.page-filter {
  width: min(100%, 620px);
  margin-top: 28px;
  display: flex;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.hero-search input,
.page-filter input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  padding: 12px 14px;
}

.hero-search input::placeholder,
.page-filter input::placeholder {
  color: #64748b;
}

.hero-search button {
  border: 0;
  border-radius: 12px;
  padding: 0 20px;
  background: var(--accent);
  color: #111827;
  font-weight: 800;
  cursor: pointer;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #111827;
}

.btn-ghost {
  border: 1px solid rgba(251, 191, 36, 0.28);
  color: #fde68a;
  background: rgba(251, 191, 36, 0.1);
}

.btn-dark {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
}

.hero-showcase {
  position: relative;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 30px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.64);
  box-shadow: var(--shadow);
}

.hero-slides {
  position: relative;
  min-height: 520px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}

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

.hero-poster {
  position: relative;
  min-height: 330px;
  overflow: hidden;
}

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.06), rgba(2, 6, 23, 0.96));
}

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

.hero-slide-copy {
  position: relative;
  padding: 0 28px 30px;
  margin-top: -86px;
}

.hero-slide-copy h2 {
  margin: 12px 0 10px;
  color: #fff;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

.hero-slide-copy p {
  min-height: 54px;
  margin: 0 0 18px;
  color: #cbd5e1;
}

.hero-controls {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 18px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.hero-dot {
  width: 28px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.32);
  cursor: pointer;
}

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

.inner-hero {
  padding: 72px 0 46px;
  background: linear-gradient(180deg, #020617, rgba(15, 23, 42, 0.78));
  border-bottom: 1px solid var(--line);
}

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

.inner-hero p {
  max-width: 760px;
  margin: 18px 0 0;
  color: #cbd5e1;
  font-size: 18px;
}

.page-stack {
  display: grid;
  gap: 46px;
  padding: 46px 0 68px;
}

.content-section,
.ranking-block,
.category-strip,
.related-section {
  display: grid;
  gap: 20px;
}

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

.section-heading h2 {
  margin: 0;
  font-size: 26px;
  color: #fff;
}

.section-more {
  color: var(--accent);
  font-weight: 800;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

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

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

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

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.88));
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #111827;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(251, 191, 36, 0.26);
}

.movie-card-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

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

.movie-card h2 a:hover {
  color: var(--accent);
}

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

.movie-line {
  min-height: 42px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.11);
  color: #fde68a;
  font-size: 12px;
}

.ranking-grid,
.strip-scroll {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.slim-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.78);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.slim-card:hover {
  transform: translateY(-3px);
  border-color: rgba(251, 191, 36, 0.42);
}

.slim-card img {
  width: 74px;
  height: 96px;
  border-radius: 12px;
  object-fit: cover;
  background: #111827;
}

.slim-card strong,
.slim-card em {
  display: block;
}

.slim-card strong {
  margin-bottom: 6px;
  color: #fff;
  line-height: 1.35;
}

.slim-card em {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

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

.category-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.82);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(251, 191, 36, 0.42);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  min-height: 170px;
  background: #111827;
}

.category-covers img {
  width: 100%;
  height: 170px;
  object-fit: cover;
}

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

.category-card h2 {
  margin: 0 0 8px;
  color: #fff;
}

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

.category-card span {
  color: var(--accent);
  font-weight: 800;
}

.detail-hero {
  padding: 38px 0 56px;
  background: radial-gradient(circle at top right, rgba(251, 191, 36, 0.12), transparent 30rem), linear-gradient(180deg, #020617, #0f172a);
}

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

.detail-main,
.detail-side {
  display: grid;
  gap: 18px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #94a3b8;
  font-size: 14px;
}

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

.player-card,
.detail-content,
.info-card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

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

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

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.82));
  cursor: pointer;
}

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

.play-icon {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  background: var(--accent);
  position: relative;
  box-shadow: 0 18px 44px rgba(251, 191, 36, 0.28);
}

.play-icon::after {
  content: "";
  position: absolute;
  left: 31px;
  top: 22px;
  width: 0;
  height: 0;
  border-top: 16px solid transparent;
  border-bottom: 16px solid transparent;
  border-left: 24px solid #111827;
}

.play-overlay strong {
  max-width: 80%;
  font-size: 22px;
  text-align: center;
}

.detail-content {
  padding: 28px;
}

.detail-content h1 {
  margin-bottom: 14px;
  font-size: clamp(34px, 4vw, 54px);
}

.detail-content h2 {
  margin: 28px 0 12px;
  color: #fff;
  font-size: 24px;
}

.detail-content p {
  color: #cbd5e1;
}

.detail-one-line {
  font-size: 18px;
}

.detail-tags {
  margin-top: 16px;
}

.detail-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #111827;
}

.info-card {
  padding: 20px;
}

.info-card h2 {
  margin: 0 0 16px;
  color: #fff;
}

.info-card dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px 12px;
  margin: 0;
}

.info-card dt {
  color: #94a3b8;
}

.info-card dd {
  margin: 0;
  color: #e2e8f0;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.86);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 30px;
  padding: 42px 0;
}

.site-footer p,
.footer-links a {
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 12px;
  font-size: 18px;
  color: #fff;
}

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

.footer-links a:hover,
.footer-brand:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 16px;
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

.movie-card.is-hidden {
  display: none;
}

@media (max-width: 1080px) {
  .movie-grid,
  .large-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

  .hero-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-side {
    grid-template-columns: 240px 1fr;
  }
}

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

  .nav-toggle {
    display: block;
  }

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

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

  .hero-shell {
    padding: 46px 0 50px;
  }

  .hero-showcase,
  .hero-slides {
    min-height: 470px;
  }

  .hero-search,
  .page-filter {
    flex-direction: column;
  }

  .hero-search button {
    min-height: 44px;
  }

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

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

  .category-grid,
  .ranking-grid,
  .strip-scroll,
  .footer-grid,
  .detail-side {
    grid-template-columns: 1fr;
  }

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

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

  .slim-card {
    grid-template-columns: 64px 1fr;
  }

  .slim-card img {
    width: 64px;
    height: 86px;
  }

  .detail-content {
    padding: 20px;
  }
}

@media (max-width: 420px) {
  .container,
  .site-header-inner {
    width: min(100% - 24px, var(--max));
  }

  .brand-name {
    font-size: 17px;
  }

  .movie-line {
    display: none;
  }

  .tag-row span {
    font-size: 11px;
  }
}
