:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.16);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --pink: #f472b6;
  --amber: #f59e0b;
  --green: #34d399;
  --shadow: 0 24px 80px rgba(8, 47, 73, 0.35);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(34, 211, 238, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 0%, rgba(37, 99, 235, 0.24), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 70%);
}

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

img {
  display: block;
  max-width: 100%;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(37, 99, 235, 0.18));
}

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

.site-header-inner,
.hero-inner,
.main-wrap,
.site-footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.22);
  transition: transform 0.24s ease;
}

.brand:hover .brand-mark {
  transform: scale(1.08) rotate(-4deg);
}

.brand-text {
  font-size: 1.35rem;
  background: linear-gradient(90deg, var(--cyan), #60a5fa 45%, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--soft);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: white;
  background: rgba(34, 211, 238, 0.12);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  color: white;
  font-size: 22px;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  padding: 58px 0 52px;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 22%, rgba(34, 211, 238, 0.22), transparent 24rem),
    radial-gradient(circle at 72% 18%, rgba(244, 114, 182, 0.12), transparent 26rem);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.78fr);
  align-items: center;
  gap: 36px;
}

.hero-copy {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.58));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(34, 211, 238, 0.08);
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 20px 0 16px;
  font-size: clamp(2.3rem, 6vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.gradient-text {
  background: linear-gradient(90deg, white, var(--cyan) 42%, #60a5fa 72%, #c084fc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy p,
.page-hero p,
.detail-title p,
.section-head p {
  color: var(--muted);
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.82);
  color: var(--text);
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 211, 238, 0.48);
  box-shadow: 0 18px 50px rgba(8, 47, 73, 0.36);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.98) translateX(18px);
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-poster-card {
  position: relative;
  overflow: hidden;
  height: 560px;
  border-radius: 34px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: #0f172a;
  box-shadow: var(--shadow);
}

.hero-poster-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-poster-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 12%, rgba(2, 6, 23, 0.2) 44%, rgba(2, 6, 23, 0.92) 100%),
    linear-gradient(90deg, rgba(2, 6, 23, 0.88), transparent 54%);
}

.hero-slide-content {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  z-index: 2;
}

.hero-slide-content h2 {
  margin: 12px 0 8px;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.05;
}

.hero-slide-content p {
  max-width: 560px;
  color: #dbeafe;
  line-height: 1.75;
}

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

.hero-tags span,
.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.2);
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-dots {
  position: absolute;
  left: 22px;
  top: 22px;
  z-index: 4;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 28px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.hero-dots button.active {
  background: var(--cyan);
}

.main-wrap {
  position: relative;
  padding: 34px 0 0;
}

.page-hero {
  margin: 32px auto 30px;
  padding: 34px;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.42));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 4.2rem);
}

.section {
  margin: 44px 0;
}

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

.section-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.45rem);
  letter-spacing: -0.04em;
}

.section-link {
  color: var(--cyan);
  font-weight: 900;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 16px 42px rgba(2, 6, 23, 0.28);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.38);
  box-shadow: 0 28px 60px rgba(8, 47, 73, 0.38);
}

.movie-cover {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.22), rgba(37, 99, 235, 0.18));
}

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

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

.cover-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(2, 6, 23, 0.86));
}

.play-dot {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.36);
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  min-width: 34px;
  height: 28px;
  padding: 0 8px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(135deg, #fef08a, #f59e0b);
  font-weight: 950;
}

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

.movie-title {
  display: block;
  min-height: 46px;
  color: white;
  font-size: 1.02rem;
  font-weight: 900;
  line-height: 1.35;
}

.movie-title:hover {
  color: var(--cyan);
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.movie-meta span:not(:last-child)::after {
  content: "·";
  margin-left: 8px;
  color: rgba(148, 163, 184, 0.46);
}

.movie-card p {
  min-height: 48px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

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

.category-card {
  display: block;
  min-height: 160px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at right top, rgba(34, 211, 238, 0.16), transparent 45%),
    rgba(15, 23, 42, 0.76);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.42);
}

.category-card strong {
  display: block;
  margin-bottom: 12px;
  font-size: 1.4rem;
}

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

.ranking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  align-items: start;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.compact-card:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.42);
}

.compact-card b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: #0f172a;
  background: linear-gradient(135deg, #fef08a, #f59e0b);
  font-style: normal;
}

.compact-card strong {
  color: white;
}

.compact-card em {
  color: var(--muted);
  font-size: 0.88rem;
  font-style: normal;
  white-space: nowrap;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 12px;
  margin: 22px 0 24px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  outline: 0;
  padding: 0 14px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.8);
}

.filter-panel input:focus,
.filter-panel select:focus {
  border-color: rgba(34, 211, 238, 0.7);
}

.detail-hero {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 28px;
  align-items: end;
  margin: 34px 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.38)),
    radial-gradient(circle at right, rgba(34, 211, 238, 0.12), transparent 42%);
  box-shadow: var(--shadow);
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.18), rgba(37, 99, 235, 0.14));
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

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

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

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: #000;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(2, 6, 23, 0.26);
  cursor: pointer;
  z-index: 3;
}

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

.play-overlay span {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  font-size: 34px;
  box-shadow: 0 28px 70px rgba(37, 99, 235, 0.48);
  transition: transform 0.2s ease;
}

.play-overlay:hover span {
  transform: scale(1.08);
}

.content-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
}

.content-card h2 {
  margin-top: 0;
}

.content-card p {
  color: var(--soft);
  line-height: 1.9;
}

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

.site-footer-inner {
  padding: 36px 0;
  color: var(--muted);
}

.footer-brand {
  margin-bottom: 8px;
  color: white;
  font-size: 1.3rem;
  font-weight: 900;
}

.hidden-by-filter {
  display: none !important;
}

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

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

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

  .hero-poster-card {
    height: 480px;
  }

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

@media (max-width: 760px) {
  .site-header-inner,
  .hero-inner,
  .main-wrap,
  .site-footer-inner {
    width: min(100% - 22px, 1180px);
  }

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

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

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

  .hero {
    min-height: auto;
    padding: 28px 0 26px;
  }

  .hero-copy,
  .page-hero,
  .detail-hero,
  .content-card {
    padding: 20px;
  }

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

  .hero-poster-card {
    height: 430px;
    border-radius: 24px;
  }

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

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

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

  .compact-card {
    grid-template-columns: 38px 1fr;
  }

  .compact-card em {
    grid-column: 2;
  }

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

@media (max-width: 420px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .brand-text {
    font-size: 1.1rem;
  }

  .hero-copy h1,
  .page-hero h1,
  .detail-title h1 {
    font-size: 2.25rem;
  }
}
