:root {
  color-scheme: dark;
  --bg: #0f172a;
  --bg-soft: #111827;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --gold: #f59e0b;
  --gold-light: #fbbf24;
  --orange: #f97316;
  --red: #ef4444;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.22), transparent 34rem),
    radial-gradient(circle at 84% 18%, rgba(249, 115, 22, 0.18), transparent 30rem),
    linear-gradient(180deg, #0f172a 0%, #111827 52%, #020617 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.25);
}

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

.header-shell {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 26px;
}

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

.brand {
  font-size: 22px;
  background: linear-gradient(90deg, #fde68a, #fb923c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: #ffffff;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold-light), var(--orange));
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a {
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

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

.site-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}

.site-search-form input,
.filter-form input,
.filter-form select {
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.22);
  outline: none;
  background: rgba(15, 23, 42, 0.66);
  border-radius: 999px;
  padding: 10px 16px;
}

.site-search-form input {
  width: 210px;
}

.site-search-form button,
.cta,
.ghost-cta,
.filter-form button,
.player-cover,
.menu-toggle {
  border: 0;
  cursor: pointer;
  color: #fff;
  border-radius: 999px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.site-search-form button,
.cta,
.filter-form button {
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 14px 32px rgba(249, 115, 22, 0.24);
}

.site-search-form button {
  padding: 10px 16px;
}

.cta,
.ghost-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  font-weight: 800;
}

.ghost-cta {
  background: rgba(15, 23, 42, 0.52);
  border: 1px solid rgba(251, 191, 36, 0.42);
}

.cta:hover,
.ghost-cta:hover,
.site-search-form button:hover,
.filter-form button:hover,
.player-cover:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  background: rgba(30, 41, 59, 0.8);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 18px;
  border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.mobile-nav.open {
  display: grid;
  gap: 14px;
}

.hero-carousel {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  display: none;
  min-height: 640px;
  position: relative;
}

.hero-slide.active {
  display: block;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1) contrast(1.08);
  transform: scale(1.02);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.72) 46%, rgba(2, 6, 23, 0.42) 100%),
    linear-gradient(0deg, #0f172a 0%, transparent 40%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  min-height: 640px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 46px;
  align-items: center;
  padding: 70px 0;
}

.eyebrow {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.3);
  font-weight: 800;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-copy p {
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
}

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

.hero-poster {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow);
  transform: rotate(1deg);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 42px;
  height: 8px;
  padding: 0;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: rgba(226, 232, 240, 0.34);
}

.hero-dot.active {
  background: linear-gradient(90deg, var(--gold-light), var(--orange));
}

.section {
  padding: 72px 0;
}

.section.tight {
  padding-top: 36px;
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 3.4vw, 42px);
  letter-spacing: -0.03em;
}

.section-title p {
  margin: 6px 0 0;
  color: var(--subtle);
}

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

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

.movie-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 26px 74px rgba(0, 0, 0, 0.36);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(2, 6, 23, 0.92));
}

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.84), transparent);
}

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--red), var(--orange));
  box-shadow: 0 14px 26px rgba(239, 68, 68, 0.25);
}

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

.movie-meta-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--subtle);
  font-size: 13px;
}

.category-link {
  color: #fcd34d;
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 19px;
  line-height: 1.28;
}

.movie-card h3 a:hover {
  color: var(--gold-light);
}

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

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  color: #fde68a;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.22);
  font-size: 12px;
}

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

.category-card {
  min-height: 180px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.7));
  padding: 24px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.38));
}

.category-card-content {
  position: relative;
  z-index: 1;
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

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

.page-hero,
.detail-hero {
  padding: 64px 0;
  background:
    radial-gradient(circle at 80% 0%, rgba(245, 158, 11, 0.16), transparent 30rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.8));
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.page-hero p,
.detail-copy p {
  max-width: 880px;
  color: var(--muted);
  font-size: 18px;
}

.filter-panel {
  margin-top: 28px;
  padding: 22px;
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px 140px;
  gap: 12px;
}

.filter-form button {
  padding: 10px 18px;
}

.search-item.hidden {
  display: none;
}

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

.side-panel,
.text-panel {
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.side-panel {
  padding: 20px;
  position: sticky;
  top: 96px;
}

.side-panel h3,
.text-panel h2 {
  margin: 0 0 16px;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 18px;
  background: rgba(30, 41, 59, 0.58);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.compact-card:hover {
  border-color: rgba(251, 191, 36, 0.36);
}

.compact-card img {
  width: 74px;
  height: 98px;
  object-fit: cover;
  border-radius: 14px;
}

.compact-card strong {
  display: block;
  line-height: 1.35;
}

.compact-card em {
  display: block;
  color: var(--subtle);
  font-style: normal;
  font-size: 13px;
  margin-top: 5px;
}

.compact-rank {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-bottom: 6px;
  border-radius: 9px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--orange));
}

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

.detail-poster {
  border-radius: 32px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--subtle);
  font-size: 14px;
}

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

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

.detail-meta span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.72);
  color: var(--muted);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.player-section {
  padding: 56px 0 20px;
}

.video-wrap {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow);
  border: 1px solid rgba(251, 191, 36, 0.2);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 12px;
  background:
    radial-gradient(circle, rgba(245, 158, 11, 0.26), transparent 28%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18));
  font-size: 18px;
  font-weight: 900;
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.play-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: 32px;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  box-shadow: 0 18px 44px rgba(249, 115, 22, 0.34);
}

.text-panel {
  padding: 30px;
}

.text-panel p {
  color: var(--muted);
  margin: 0 0 18px;
}

.site-footer {
  margin-top: 46px;
  padding: 48px 0;
  color: var(--subtle);
  background: rgba(2, 6, 23, 0.82);
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.footer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: start;
}

.footer-brand {
  color: #fde68a;
  font-size: 22px;
}

.footer-shell p {
  max-width: 560px;
  margin: 12px 0 0;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 10px 22px;
}

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

  .hero-content,
  .layout-split,
  .detail-hero .section-shell {
    grid-template-columns: 1fr;
  }

  .hero-poster,
  .detail-poster {
    max-width: 320px;
  }

  .side-panel {
    position: static;
  }
}

@media (max-width: 820px) {
  .desktop-nav,
  .site-search-form {
    display: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .header-shell {
    height: 64px;
  }

  .hero-carousel,
  .hero-slide,
  .hero-content {
    min-height: 580px;
  }

  .hero-content {
    padding: 50px 0 76px;
  }

  .hero-poster {
    display: none;
  }

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

  .filter-form {
    grid-template-columns: 1fr;
  }

  .footer-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .brand {
    font-size: 18px;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
  }

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

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

  .section {
    padding: 52px 0;
  }

  .text-panel {
    padding: 22px;
  }

  .play-icon {
    width: 66px;
    height: 66px;
    font-size: 26px;
  }
}
