:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: #0f172a;
  --panel-soft: rgba(30, 41, 59, 0.55);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.32);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --amber: #fbbf24;
  --accent: #e2e8f0;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(51, 65, 85, 0.42), transparent 34rem), var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

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

.header-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #0f172a;
  font-weight: 900;
  background: linear-gradient(135deg, #f8fafc, #fbbf24);
  box-shadow: 0 10px 24px rgba(251, 191, 36, 0.22);
}

.brand-text,
.footer-brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a {
  padding: 8px 0;
  transition: color 0.25s ease;
}

.main-nav a:hover {
  color: var(--text);
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 300px;
  max-width: 32vw;
}

.top-search input,
.local-search input {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  color: var(--text);
  background: rgba(15, 23, 42, 0.78);
  border-radius: 999px;
  padding: 10px 14px;
}

.top-search button,
.hero-button,
.dark-button,
.light-button,
.player-button {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.top-search button,
.light-button {
  background: #f8fafc;
  color: #0f172a;
  padding: 10px 18px;
  font-weight: 700;
}

.top-search button:hover,
.hero-button:hover,
.light-button:hover,
.dark-button:hover {
  transform: translateY(-2px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--text);
}

.hero {
  position: relative;
  min-height: 85vh;
  overflow: hidden;
  background: #020617;
}

.hero-track {
  position: absolute;
  inset: 0;
}

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

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #020617 4%, rgba(2, 6, 23, 0.86) 28%, rgba(2, 6, 23, 0.36) 68%, rgba(2, 6, 23, 0.12));
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 85vh;
  display: flex;
  align-items: flex-end;
  padding: 120px 0 92px;
}

.hero-copy {
  max-width: 760px;
}

.eyebrow,
.movie-meta,
.list-top,
.detail-meta,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--subtle);
  font-size: 13px;
}

.eyebrow span,
.tag-row span,
.detail-tags span,
.list-top span,
.detail-meta span,
.breadcrumb a,
.breadcrumb span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
  padding: 5px 10px;
}

.hero h1 {
  margin: 18px 0 8px;
  font-size: clamp(38px, 6vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero h2 {
  margin: 0 0 18px;
  color: #e2e8f0;
  font-size: clamp(24px, 3.4vw, 46px);
  line-height: 1.12;
}

.hero p {
  max-width: 680px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: clamp(16px, 1.4vw, 20px);
}

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

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.hero-button.primary {
  background: #f8fafc;
  color: #0f172a;
}

.hero-button.secondary,
.dark-button {
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  border: 1px solid var(--line-strong);
}

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

.hero-dots button {
  width: 42px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.28);
  cursor: pointer;
}

.hero-dots button.is-active {
  background: #f8fafc;
}

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

.section-wrap {
  padding: 72px 0;
}

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

.section-heading h2,
.page-title h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p,
.page-title p,
.detail-title p {
  margin: 10px 0 0;
  color: var(--subtle);
}

.section-heading > span {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--line-strong), transparent);
}

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

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.22);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.movie-card:hover,
.list-card:hover,
.category-tile:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  background: rgba(15, 23, 42, 0.82);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.movie-card-small .poster-link {
  aspect-ratio: 3 / 4;
}

.poster-link img,
.list-cover img,
.detail-poster img,
.related-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s ease;
}

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.88), transparent 58%);
}

.poster-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  color: var(--text);
  font-size: 12px;
  backdrop-filter: blur(10px);
}

.movie-info {
  padding: 16px;
}

.movie-info h3,
.list-body h3,
.related-card h3 {
  margin: 8px 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.25;
}

.movie-info p,
.list-body p,
.related-card p {
  color: var(--subtle);
  font-size: 14px;
  margin: 0 0 12px;
}

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

.tag-row span,
.detail-tags span {
  color: var(--muted);
  font-size: 12px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.8fr);
  gap: 32px;
  align-items: start;
}

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

.list-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.52);
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.list-cover {
  aspect-ratio: 16 / 11;
  overflow: hidden;
}

.list-body {
  padding: 16px 16px 16px 0;
}

.rank-number {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  color: #0f172a;
  background: linear-gradient(135deg, #f8fafc, #fbbf24);
  font-weight: 900;
}

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

.category-tile {
  min-height: 170px;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.52));
  transition: transform 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

.category-tile h2,
.category-tile h3 {
  margin: 0 0 12px;
  font-size: 22px;
}

.category-tile p {
  margin: 0 0 18px;
  color: var(--subtle);
  font-size: 14px;
}

.page-title {
  padding: 64px 0 28px;
}

.filter-bar {
  position: sticky;
  top: 74px;
  z-index: 50;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(16px);
}

.local-search {
  min-width: min(420px, 100%);
  flex: 1;
}

.filter-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  color: var(--muted);
  padding: 9px 14px;
  cursor: pointer;
}

.filter-chip.is-active {
  color: #0f172a;
  background: #f8fafc;
}

.empty-state {
  display: none;
  margin: 32px 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  color: var(--subtle);
  background: var(--panel);
}

.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #020617;
}

.detail-backdrop {
  position: absolute;
  inset: 0;
  opacity: 0.34;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(16px);
  transform: scale(1.08);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, #020617, rgba(2, 6, 23, 0.72));
}

.detail-inner {
  position: relative;
  z-index: 2;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  padding: 54px 0 64px;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow);
}

.detail-title h1 {
  margin-top: 18px;
}

.detail-title p {
  max-width: 860px;
  font-size: 17px;
}

.player-section,
.content-section,
.related-section {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 0;
}

.player-section h2,
.content-section h2,
.related-section h2 {
  margin: 0 0 18px;
  font-size: 28px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background: #000;
  aspect-ratio: 16 / 9;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border-radius: 0;
  background: #020617;
  overflow: hidden;
  cursor: pointer;
  z-index: 3;
}

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

.player-cover.is-hidden {
  display: none;
}

.player-button {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  color: #0f172a;
  background: rgba(248, 250, 252, 0.94);
  font-size: 30px;
  box-shadow: var(--shadow);
}

.content-card {
  display: grid;
  gap: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
  background: rgba(15, 23, 42, 0.54);
}

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

.related-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 72px;
}

.related-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.54);
}

.related-card a:first-child {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.related-card h3,
.related-card p {
  padding: 0 12px;
}

.related-card h3 {
  font-size: 15px;
}

.related-card p {
  padding-bottom: 12px;
  font-size: 12px;
}

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

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 36px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--subtle);
}

.footer-links {
  display: flex;
  gap: 14px;
}

.footer-links a:hover {
  color: var(--text);
}

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

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

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

@media (max-width: 860px) {
  .header-inner {
    min-height: auto;
    padding: 14px 0;
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav,
  .top-search {
    display: none;
    width: 100%;
    max-width: none;
  }

  .site-header.is-open .main-nav,
  .site-header.is-open .top-search {
    display: flex;
  }

  .main-nav {
    flex-wrap: wrap;
    gap: 12px;
  }

  .hero,
  .hero-content {
    min-height: 78vh;
  }

  .hero-content {
    padding-bottom: 74px;
  }

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

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

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .movie-grid,
  .movie-grid.compact,
  .category-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .list-card {
    grid-template-columns: 118px minmax(0, 1fr);
  }

  .list-body {
    padding: 12px 12px 12px 0;
  }

  .list-body p,
  .movie-info p {
    display: none;
  }

  .section-wrap,
  .player-section,
  .content-section,
  .related-section {
    padding-top: 42px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-button {
    width: 100%;
  }
}
