:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.74);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(96, 165, 250, 0.22);
  --line-strong: rgba(147, 197, 253, 0.42);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --soft: #94a3b8;
  --blue: #38bdf8;
  --blue-strong: #2563eb;
  --purple: #a855f7;
  --pink: #ec4899;
  --gold: #facc15;
  --green: #34d399;
  --shadow: 0 24px 80px rgba(2, 8, 23, 0.48);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.32), transparent 34rem),
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.24), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  background: rgba(2, 6, 23, 0.58);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  backdrop-filter: blur(20px);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-scrolled {
  background: rgba(2, 6, 23, 0.94);
  box-shadow: 0 20px 60px rgba(2, 8, 23, 0.36);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-strong), var(--purple));
  box-shadow: 0 12px 36px rgba(37, 99, 235, 0.44);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: rgba(147, 197, 253, 0.9);
  font-size: 12px;
  margin-top: 3px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
}

.nav-link,
.mobile-nav-link {
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.84);
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 14px;
  font-size: 14px;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-nav-link {
  padding: 12px 14px;
}

.main {
  min-height: 72vh;
}

.hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: 128px 0 80px;
}

.hero::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 180px;
  background: linear-gradient(0deg, var(--bg), rgba(2, 6, 23, 0));
  pointer-events: none;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  filter: saturate(1.12) contrast(1.05);
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.7) 46%, rgba(2, 6, 23, 0.34) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.26) 0%, rgba(2, 6, 23, 0.92) 100%);
}

.hero-inner,
.section-inner,
.page-wrap,
.footer-inner,
.footer-bottom {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: center;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 14px;
  border: 1px solid rgba(250, 204, 21, 0.35);
  border-radius: 999px;
  color: #fde68a;
  background: rgba(250, 204, 21, 0.08);
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(42px, 7vw, 82px);
}

.hero h1 span,
.gradient-text {
  color: transparent;
  background: linear-gradient(135deg, #60a5fa, #a78bfa, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-lead {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.75;
}

.hero-actions,
.section-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: 12px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--blue-strong), var(--purple));
  box-shadow: 0 18px 44px rgba(37, 99, 235, 0.32);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 54px rgba(37, 99, 235, 0.46);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.hero-panel,
.glass-panel,
.detail-panel,
.filter-panel,
.category-card,
.movie-card,
.rank-item,
.player-shell {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel {
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

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

.hero-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.08));
}

.hero-panel-copy {
  padding: 22px;
}

.hero-panel-copy h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.hero-panel-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

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

.hero-dot {
  width: 28px;
  height: 5px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--blue);
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: linear-gradient(180deg, rgba(30, 64, 175, 0.18), rgba(2, 6, 23, 0));
}

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

.section-head h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.03em;
}

.section-head p,
.page-hero p,
.category-card p,
.detail-title p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.text-link {
  color: #7dd3fc;
  font-weight: 700;
  white-space: nowrap;
}

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

.movie-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 70px rgba(37, 99, 235, 0.24);
}

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

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

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

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.04));
}

.play-badge,
.type-badge,
.year-badge {
  position: absolute;
  z-index: 2;
}

.play-badge {
  top: 50%;
  left: 50%;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: rgba(37, 99, 235, 0.88);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.84);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-badge {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.type-badge {
  top: 14px;
  left: 14px;
  max-width: calc(100% - 28px);
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  background: rgba(37, 99, 235, 0.9);
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 18px;
}

.card-body h2,
.rank-copy h2,
.category-card h2,
.hero-panel-copy h2 {
  margin: 0;
  color: #fff;
}

.card-body h2 {
  min-height: 52px;
  font-size: 20px;
  line-height: 1.3;
}

.card-body h2 a:hover,
.rank-copy h2 a:hover {
  color: #7dd3fc;
}

.card-body p {
  min-height: 48px;
  margin: 12px 0 0;
  color: var(--soft);
  line-height: 1.65;
}

.meta-row,
.tag-row,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.meta-row {
  margin-top: 14px;
  color: var(--soft);
  font-size: 13px;
}

.meta-row span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
}

.tag-row {
  margin-top: 14px;
}

.tag-row span,
.detail-tags span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #bfdbfe;
  font-size: 12px;
  background: rgba(59, 130, 246, 0.14);
}

.page-hero {
  padding: 132px 0 52px;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.24), transparent 32rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.36), rgba(2, 6, 23, 0));
}

.page-hero.compact {
  padding-bottom: 30px;
}

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

.category-card {
  position: relative;
  min-height: 210px;
  padding: 24px;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.category-card::before {
  content: "";
  position: absolute;
  inset: -40% -30% auto auto;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.4), rgba(168, 85, 247, 0.24));
  filter: blur(10px);
}

.category-card h2,
.category-card p,
.category-card a {
  position: relative;
  z-index: 1;
}

.category-card h2 {
  font-size: 24px;
}

.category-card a {
  display: inline-flex;
  margin-top: 18px;
  color: #7dd3fc;
  font-weight: 700;
}

.filter-panel {
  margin-bottom: 28px;
  padding: 20px;
  border-radius: var(--radius-lg);
}

.search-label,
.filter-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.search-label input,
.filter-grid select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  color: #fff;
  background: rgba(2, 6, 23, 0.66);
  outline: none;
}

.search-label input {
  padding: 0 16px;
}

.filter-grid select {
  padding: 0 14px;
}

.search-label input:focus,
.filter-grid select:focus {
  border-color: rgba(56, 189, 248, 0.72);
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 64px 92px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 14px;
  border-radius: var(--radius-md);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--blue-strong), var(--purple));
}

.rank-cover {
  width: 92px;
  height: 124px;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
}

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

.rank-copy p {
  margin: 10px 0 0;
  color: var(--soft);
  line-height: 1.65;
}

.detail-hero {
  position: relative;
  min-height: 620px;
  padding: 128px 0 66px;
  overflow: hidden;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(24px) saturate(1.2);
  transform: scale(1.12);
  opacity: 0.38;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.66)),
    linear-gradient(0deg, var(--bg), rgba(2, 6, 23, 0.24));
}

.detail-layout {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.breadcrumb {
  margin-bottom: 16px;
  color: #93c5fd;
  font-size: 14px;
}

.breadcrumb a:hover {
  color: #fff;
}

.detail-title h1 {
  font-size: clamp(36px, 6vw, 68px);
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-main {
  padding: 56px 0 82px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
}

.player-shell {
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.player-box {
  position: relative;
  background: #000;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.player-cover span {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 28px;
  background: rgba(37, 99, 235, 0.92);
  box-shadow: 0 18px 54px rgba(37, 99, 235, 0.48);
}

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

.player-title,
.detail-panel {
  padding: 24px;
}

.player-title h2,
.detail-panel h2 {
  margin: 0;
  font-size: 24px;
}

.detail-panel {
  margin-top: 22px;
  border-radius: var(--radius-lg);
}

.detail-panel p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.9;
}

.side-list {
  display: grid;
  gap: 12px;
}

.side-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 12px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.side-card img {
  width: 76px;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
}

.side-card h3 {
  margin: 4px 0 8px;
  font-size: 15px;
  line-height: 1.4;
}

.side-card p {
  margin: 0;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.6;
}

.site-footer {
  border-top: 1px solid rgba(96, 165, 250, 0.18);
  background: rgba(2, 6, 23, 0.82);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  padding: 46px 0 32px;
}

.footer-brand {
  color: #fff;
  font-size: 24px;
}

.footer-inner p {
  max-width: 520px;
  color: var(--soft);
  line-height: 1.75;
}

.footer-inner h2 {
  margin: 0 0 16px;
  font-size: 20px;
}

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

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}

.footer-links a:hover {
  color: #fff;
  background: rgba(37, 99, 235, 0.42);
}

.footer-bottom {
  padding: 20px 0 28px;
  color: var(--soft);
  font-size: 14px;
}

.empty-state {
  display: none;
  padding: 36px;
  border-radius: var(--radius-lg);
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  animation: fadeUp 0.7s ease both;
}

@media (max-width: 1100px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

  .hero-panel {
    display: none;
  }

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

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

@media (max-width: 820px) {
  .hero {
    min-height: 640px;
  }

  .header-inner {
    height: 68px;
  }

  .brand-text strong {
    font-size: 18px;
  }

  .brand-text small {
    display: none;
  }

  .section {
    padding: 52px 0;
  }

  .section-head,
  .footer-inner,
  .detail-layout {
    grid-template-columns: 1fr;
    display: grid;
  }

  .detail-layout {
    gap: 28px;
  }

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

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

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

  .rank-item .text-link {
    grid-column: 2 / 4;
  }

  .rank-cover {
    width: 76px;
    height: 104px;
  }
}

@media (max-width: 560px) {
  .hero {
    min-height: 620px;
    padding-top: 104px;
  }

  .hero-lead {
    font-size: 17px;
  }

  .btn {
    width: 100%;
  }

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

  .rank-item {
    grid-template-columns: 42px 70px minmax(0, 1fr);
    gap: 12px;
  }

  .rank-num {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 13px;
  }

  .rank-cover {
    width: 70px;
    height: 96px;
  }

  .rank-copy p {
    display: none;
  }
}
