:root {
  color-scheme: dark;
  --bg: #050816;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --accent-2: #06b6d4;
  --hot: #f97316;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.24), transparent 34rem),
    radial-gradient(circle at 80% 10%, rgba(6, 182, 212, 0.14), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #08111f 44%, #050816 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

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

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

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

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

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

.logo-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.34);
}

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

.main-nav > a,
.nav-dropdown > button {
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #cbd5e1;
  background: transparent;
  cursor: pointer;
  transition: 0.2s ease;
}

.main-nav > a:hover,
.main-nav > a.active,
.nav-dropdown > button:hover {
  color: white;
  border-color: var(--line);
  background: rgba(30, 41, 59, 0.74);
}

.nav-dropdown {
  position: relative;
}

.dropdown-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 180px;
  padding: 10px;
  display: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.dropdown-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: #cbd5e1;
}

.dropdown-panel a:hover {
  background: rgba(59, 130, 246, 0.14);
  color: #fff;
}

.nav-dropdown:hover .dropdown-panel {
  display: block;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: #fff;
  background: rgba(30, 41, 59, 0.7);
}

.hero {
  position: relative;
  width: min(1360px, calc(100% - 32px));
  margin: 26px auto 0;
  min-height: 650px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slider,
.hero-slide {
  min-height: 650px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.55fr);
  gap: 36px;
  align-items: center;
  padding: clamp(32px, 6vw, 76px);
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
  filter: blur(10px) saturate(1.15);
  transform: scale(1.08);
}

.hero-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.78) 48%, rgba(2, 6, 23, 0.44)),
    radial-gradient(circle at 20% 28%, rgba(59, 130, 246, 0.28), transparent 32rem);
}

.hero-copy,
.hero-cover {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 12px;
  color: #7dd3fc;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.95;
  font-weight: 950;
  letter-spacing: -0.06em;
}

.hero-summary {
  max-width: 680px;
  margin: 24px 0 0;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.75;
}

.hero-tags,
.detail-meta,
.detail-tags,
.movie-meta-row,
.tag-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

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

.hero-tags span,
.detail-meta span,
.detail-tags span,
.movie-meta-row span,
.tag-line a,
.tag-line span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
}

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

.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 18px 45px rgba(37, 99, 235, 0.34);
}

.btn-ghost {
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.64);
  color: #dbeafe;
}

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

.btn-ghost.small {
  min-height: 40px;
  padding: 0 14px;
  font-size: 14px;
}

.hero-cover {
  display: block;
  aspect-ratio: 3 / 4.2;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.24), rgba(6, 182, 212, 0.18));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

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

.hero-dots {
  position: absolute;
  left: clamp(32px, 6vw, 76px);
  bottom: 26px;
  z-index: 4;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 36px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

.hero-dot.is-active {
  width: 58px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.category-strip,
.filter-panel,
.content-section,
.category-overview,
.detail-content,
.player-section,
.page-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 40px auto 0;
}

.category-strip,
.filter-panel,
.page-hero,
.category-card,
.detail-content,
.player-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.category-strip,
.filter-panel,
.page-hero {
  padding: clamp(22px, 4vw, 34px);
}

.simple-hero {
  min-height: 280px;
  display: grid;
  align-content: center;
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.26), transparent 26rem),
    rgba(15, 23, 42, 0.84);
}

.page-hero p:last-child {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  line-height: 1.8;
  font-size: 18px;
}

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

.section-heading.compact {
  margin: 0 0 16px;
}

.section-heading h2,
.filter-panel h2,
.category-card-title,
.detail-content h2,
.site-footer h2 {
  margin: 0;
  color: white;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.section-heading a {
  color: #93c5fd;
  font-weight: 800;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-list a {
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.7);
  color: #dbeafe;
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  align-items: center;
  gap: 24px;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 160px 170px;
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: #fff;
  background: rgba(2, 6, 23, 0.72);
  padding: 0 14px;
  outline: none;
}

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

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

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.46);
  background: rgba(15, 23, 42, 0.96);
}

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

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(6, 182, 212, 0.14)),
    #0f172a;
}

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

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(to top, rgba(2, 6, 23, 0.72), transparent);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #f97316, #ef4444);
  color: #fff;
  font-size: 14px;
}

.movie-info {
  padding: 14px;
}

.movie-info h3 {
  margin: 10px 0 8px;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.35;
}

.movie-info p {
  min-height: 66px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.68;
}

.tag-line a {
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
}

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

.category-card {
  padding: 24px;
}

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

.mini-link-list {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.mini-link-list a {
  color: #bfdbfe;
}

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

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

.breadcrumb a {
  color: #93c5fd;
}

.detail-layout {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: clamp(24px, 5vw, 54px);
  align-items: center;
  padding: clamp(24px, 5vw, 54px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.22), transparent 28rem),
    var(--panel);
  box-shadow: var(--shadow);
}

.detail-poster {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.24), rgba(6, 182, 212, 0.14));
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
}

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

.detail-one-line {
  max-width: 820px;
  margin: 22px 0;
  color: #dbeafe;
  font-size: 20px;
  line-height: 1.75;
}

.detail-meta,
.detail-tags {
  margin: 16px 0;
}

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

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

.play-cover {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 12px;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.14), rgba(2, 6, 23, 0.58));
  cursor: pointer;
}

.play-cover span {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.38);
  font-size: 28px;
}

.play-cover strong {
  padding: 0 22px;
  font-size: 20px;
}

.player-shell.is-playing .play-cover {
  opacity: 0;
  pointer-events: none;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
  padding: clamp(22px, 4vw, 34px);
}

.detail-content article p {
  color: #cbd5e1;
  font-size: 17px;
  line-height: 2;
}

.detail-content aside {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.detail-content dl {
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
}

.detail-content dl div {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
}

.detail-content dt {
  color: var(--muted);
}

.detail-content dd {
  margin: 0;
  color: #e0f2fe;
}

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

.footer-grid {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.8fr;
  gap: 34px;
}

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

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

.footer-links a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
}

.footer-bottom {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 32px;
  color: var(--muted);
  font-size: 14px;
}

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

  .hero-slide {
    grid-template-columns: 1fr;
  }

  .hero-cover {
    display: none;
  }

  .filter-panel,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-content aside {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 24px 0 0;
  }
}

@media (max-width: 760px) {
  .nav-shell {
    min-height: 64px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: fixed;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--panel-strong);
    box-shadow: var(--shadow);
  }

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

  .nav-dropdown {
    display: none;
  }

  .hero,
  .hero-slider,
  .hero-slide {
    min-height: 600px;
  }

  .hero-slide {
    padding: 28px;
  }

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

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

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

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

  .movie-info p {
    min-height: 0;
  }

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