:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --border: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #0ea5e9;
  --accent-strong: #38bdf8;
  --danger: #f97316;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.22), transparent 32rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.18), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 78%);
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.92));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(22px);
}

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

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

.brand-mark {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.34);
}

.brand-text {
  font-size: 22px;
}

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

.nav-link {
  padding: 10px 16px;
  color: #cbd5e1;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  border-color: rgba(14, 165, 233, 0.34);
  background: rgba(14, 165, 233, 0.15);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: #e2e8f0;
  border-radius: 999px;
}

main {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  margin: 24px auto 56px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-xl);
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slider {
  position: relative;
  min-height: 640px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 0.75s ease, transform 0.75s ease, visibility 0.75s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}

.hero-slide img {
  position: absolute;
  inset: 0;
  z-index: 0;
  filter: saturate(1.15) contrast(1.06);
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 38%, rgba(2, 6, 23, 0.34) 66%, rgba(2, 6, 23, 0.72) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.95), transparent 46%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(680px, 100%);
  padding: 88px 64px 96px;
}

.kicker {
  margin: 0 0 12px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  color: white;
  font-size: clamp(36px, 6vw, 70px);
  line-height: 1.04;
  font-weight: 950;
  letter-spacing: -0.055em;
}

.hero p {
  margin: 20px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  transition: 0.22s ease;
}

.btn.primary {
  color: white;
  border-color: rgba(14, 165, 233, 0.64);
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 16px 40px rgba(14, 165, 233, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span,
.info-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  font-size: 12px;
  font-weight: 800;
}

.hero-side {
  position: absolute;
  right: 42px;
  bottom: 42px;
  z-index: 3;
  width: min(420px, 42%);
  display: grid;
  gap: 14px;
}

.hero-mini-card {
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(18px);
}

.hero-mini-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 900;
}

.hero-mini-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.hero-dots {
  position: absolute;
  left: 64px;
  bottom: 36px;
  z-index: 5;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 40px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
}

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

.section {
  margin: 56px 0;
}

.section-head,
.page-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-head h2,
.page-hero h1,
.detail-section h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 950;
  letter-spacing: -0.035em;
}

.section-head p,
.page-hero p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  flex: none;
  padding: 10px 16px;
  border: 1px solid rgba(14, 165, 233, 0.26);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.1);
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  min-height: 148px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.24), transparent 52%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.76));
  transition: 0.22s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(14, 165, 233, 0.44);
}

.category-tile h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 950;
}

.category-tile p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.75;
}

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

.movie-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(14, 165, 233, 0.42);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.3);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.96);
}

.poster-link img {
  transition: 0.32s ease;
}

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

.play-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: white;
  background: rgba(14, 165, 233, 0.86);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.28);
}

.movie-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.movie-meta-line {
  display: flex;
  gap: 8px;
  color: #93c5fd;
  font-size: 12px;
  font-weight: 800;
}

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

.movie-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.horizontal-scroll::-webkit-scrollbar {
  display: none;
}

.movie-card.compact {
  min-width: 180px;
}

.movie-card.compact p {
  display: none;
}

.filter-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px;
  margin-bottom: 24px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.7);
}

.search-field {
  flex: 1;
  min-width: 240px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-field span {
  color: #bae6fd;
  font-weight: 900;
}

.search-field input,
.filter-box select {
  width: 100%;
  height: 44px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  color: white;
  background: rgba(2, 6, 23, 0.72);
  outline: none;
  padding: 0 14px;
}

.filter-box select {
  width: 168px;
}

.page-hero {
  align-items: flex-start;
  margin: 34px 0 32px;
  padding: 34px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.2), transparent 42%),
    rgba(15, 23, 42, 0.76);
}

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

.rank-item {
  display: grid;
  grid-template-columns: 68px 104px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
}

.rank-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: white;
  background: rgba(14, 165, 233, 0.22);
  font-weight: 950;
}

.rank-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
}

.rank-item h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 950;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #93c5fd;
  font-size: 14px;
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 34px;
  align-items: start;
  margin: 34px 0;
  padding: 30px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.17), transparent 42%),
    rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  border-radius: 24px;
  aspect-ratio: 3 / 4;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36);
}

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

.detail-title p {
  max-width: 780px;
  color: #dbeafe;
  font-size: 17px;
  line-height: 1.85;
}

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

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

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: var(--radius-xl);
  background: black;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-box video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: black;
}

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  border: 0;
  color: white;
  background: rgba(2, 6, 23, 0.46);
  cursor: pointer;
}

.player-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.18), rgba(2, 6, 23, 0.72));
}

.player-cover span {
  position: relative;
  z-index: 2;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  font-size: 18px;
  font-weight: 950;
  box-shadow: 0 18px 48px rgba(14, 165, 233, 0.36);
}

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

.detail-section {
  margin: 34px 0;
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.74);
}

.detail-section h2 {
  margin-bottom: 16px;
}

.detail-section p {
  margin: 0 0 18px;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.95;
}

.site-footer {
  width: min(1240px, calc(100% - 32px));
  margin: 72px auto 0;
  padding: 36px 0 42px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 36px;
}

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

.site-footer p {
  max-width: 680px;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 950;
}

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

.footer-links a {
  padding: 8px 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
}

.copyright {
  margin-top: 26px;
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 32px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
}

.empty-state.show {
  display: block;
}

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

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

  .hero-side {
    display: none;
  }
}

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

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 72px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.96);
  }

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

  .hero-slider {
    min-height: 560px;
  }

  .hero-content {
    padding: 64px 24px 92px;
  }

  .hero-dots {
    left: 24px;
  }

  .section-head,
  .page-hero,
  .footer-grid,
  .detail-layout {
    display: block;
  }

  .section-more {
    margin-top: 16px;
  }

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

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

  .detail-poster {
    max-width: 260px;
    margin-bottom: 24px;
  }

  .rank-item {
    grid-template-columns: 52px 82px minmax(0, 1fr);
  }

  .rank-item .btn {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

@media (max-width: 540px) {
  main,
  .site-header-inner,
  .site-footer {
    width: min(100% - 22px, 1240px);
  }

  .brand-text {
    font-size: 19px;
  }

  .hero {
    border-radius: 22px;
  }

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

  .filter-box select {
    width: 100%;
  }

  .detail-layout,
  .detail-section,
  .page-hero {
    padding: 22px;
  }

  .player-cover span {
    width: 76px;
    height: 76px;
    font-size: 15px;
  }
}
