:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(30, 41, 59, 0.58);
  --panel-solid: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.82);
  --border: rgba(100, 116, 139, 0.28);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --subtle: #94a3b8;
  --dim: #64748b;
  --brand: #6366f1;
  --brand-strong: #4f46e5;
  --brand-soft: rgba(99, 102, 241, 0.18);
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.46);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.22), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(14px);
}

.site-header-inner {
  max-width: 1280px;
  height: 64px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.logo-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 10px 34px rgba(79, 70, 229, 0.42);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

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

.logo-text small {
  margin-top: 4px;
  color: var(--subtle);
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  font-size: 15px;
  color: var(--muted);
}

.nav-link {
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
}

.mobile-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: rgba(51, 65, 85, 0.8);
  color: var(--text);
  font-size: 22px;
}

.mobile-nav {
  display: none;
  padding: 12px 24px 18px;
  border-top: 1px solid rgba(51, 65, 85, 0.9);
  background: rgba(15, 23, 42, 0.98);
}

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

.mobile-nav a {
  color: var(--muted);
  padding: 10px 0;
}

.hero {
  position: relative;
  height: 600px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.62) 44%, rgba(2, 6, 23, 0.25) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.42) 46%, rgba(2, 6, 23, 0.18) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 1280px;
  height: 100%;
  margin: 0 auto;
  padding: 0 24px 78px;
  display: flex;
  align-items: flex-end;
}

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

.hero-kicker,
.badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.82);
  color: white;
  font-size: 14px;
  line-height: 1.2;
  backdrop-filter: blur(8px);
}

.hero h1,
.hero h2 {
  margin: 18px 0 16px;
  color: white;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p {
  max-width: 680px;
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.hero-meta,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  color: var(--subtle);
  font-size: 14px;
}

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

.button,
.button-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 700;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button {
  background: var(--brand-strong);
  color: white;
}

.button:hover {
  background: #4338ca;
  transform: translateY(-1px);
}

.button-soft {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.58);
  color: var(--text);
}

.button-soft:hover {
  border-color: rgba(129, 140, 248, 0.8);
  background: rgba(30, 41, 59, 0.86);
}

.hero-arrow {
  position: absolute;
  z-index: 4;
  top: 50%;
  width: 42px;
  height: 42px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.48);
  font-size: 28px;
}

.hero-arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.hero-arrow.prev {
  left: 18px;
}

.hero-arrow.next {
  right: 18px;
}

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

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
  width: 32px;
  background: #fff;
}

.main-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 24px;
}

.section {
  margin-bottom: 74px;
}

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

.section-title h1,
.section-title h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.04em;
}

.section-title p {
  margin: 0;
  color: var(--subtle);
  line-height: 1.75;
}

.search-panel {
  margin: 0 0 30px;
}

.search-input {
  width: min(100%, 560px);
  height: 48px;
  border: 1px solid rgba(71, 85, 105, 0.88);
  outline: none;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.86);
  color: var(--text);
  padding: 0 18px;
  font-size: 15px;
}

.search-input:focus {
  border-color: rgba(129, 140, 248, 0.94);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.16);
}

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

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

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

.movie-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(51, 65, 85, 0.55);
  border-radius: 18px;
  background: var(--panel);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.72);
  background: rgba(30, 41, 59, 0.86);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #0f172a;
}

.poster-grid .poster-wrap {
  aspect-ratio: 3 / 4;
}

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.48), transparent 54%);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.card-body strong {
  color: white;
  font-size: 18px;
  line-height: 1.35;
}

.card-meta,
.card-genre,
.card-summary {
  color: var(--subtle);
  font-size: 13px;
  line-height: 1.6;
}

.card-summary {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card-genre {
  color: var(--dim);
}

.wide-card .poster-wrap {
  aspect-ratio: 16 / 9;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 214px;
  display: flex;
  align-items: flex-end;
  padding: 22px;
  border-radius: 22px;
  border: 1px solid rgba(71, 85, 105, 0.58);
  background: rgba(15, 23, 42, 0.84);
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.category-card:hover img {
  transform: scale(1.06);
  opacity: 0.62;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.18));
}

.category-card span {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
}

.category-card strong {
  font-size: 22px;
}

.category-card small {
  color: var(--muted);
  line-height: 1.6;
}

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

.compact-card {
  display: grid;
  grid-template-columns: auto 96px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 86px;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.58);
  border-radius: 16px;
  background: rgba(30, 41, 59, 0.56);
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.compact-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.68);
  background: rgba(30, 41, 59, 0.9);
}

.compact-card img {
  width: 96px;
  height: 86px;
  object-fit: cover;
}

.compact-card strong {
  display: block;
  color: white;
  line-height: 1.35;
}

.compact-card small {
  display: block;
  margin-top: 6px;
  color: var(--subtle);
}

.rank-number,
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: white;
  background: var(--brand-strong);
}

.rank-number {
  width: 34px;
  height: 34px;
  margin-left: 14px;
  border-radius: 999px;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  min-width: 38px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

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

.breadcrumb a:hover {
  color: white;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.info-card,
.side-card {
  border: 1px solid rgba(51, 65, 85, 0.55);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
  background: #000;
}

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

.player-box video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.36);
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-play {
  display: inline-grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.86);
  color: white;
  font-size: 34px;
  box-shadow: 0 18px 60px rgba(79, 70, 229, 0.45);
}

.player-caption {
  padding: 18px 22px;
  border-top: 1px solid rgba(51, 65, 85, 0.72);
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.7));
}

.player-caption h1 {
  margin: 0 0 8px;
  color: white;
  font-size: clamp(28px, 4vw, 42px);
}

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

.info-card,
.side-card {
  padding: 24px;
}

.info-card h2,
.side-card h2 {
  margin: 0 0 16px;
  color: white;
  font-size: 24px;
}

.info-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.85;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
}

.tag-list span {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.15);
  color: #c7d2fe;
  font-size: 13px;
}

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

.side-list .compact-card {
  grid-template-columns: 86px 1fr;
}

.side-list .compact-card img {
  width: 86px;
}

.side-list .rank-number {
  display: none;
}

.empty-state {
  margin: 30px 0 0;
  color: var(--subtle);
  font-size: 16px;
}

.site-footer {
  border-top: 1px solid rgba(30, 41, 59, 0.96);
  background: rgba(2, 6, 23, 0.82);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px 24px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) 1fr 1fr;
  gap: 36px;
}

.footer-logo {
  color: white;
  font-size: 22px;
  font-weight: 800;
}

.footer-brand p,
.footer-links a,
.footer-bottom {
  color: var(--subtle);
  line-height: 1.8;
}

.footer-links h2 {
  margin: 0 0 14px;
  color: white;
  font-size: 17px;
}

.footer-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(30, 41, 59, 0.95);
  padding: 18px 24px;
  text-align: center;
  font-size: 14px;
}

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

  .mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

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

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

@media (max-width: 720px) {
  .site-header-inner {
    padding: 0 16px;
  }

  .logo-text small {
    display: none;
  }

  .hero {
    height: 560px;
  }

  .hero-content {
    padding: 0 18px 72px;
  }

  .hero-arrow {
    display: none;
  }

  .main-shell {
    padding: 42px 16px;
  }

  .section-head {
    display: grid;
  }

  .feature-grid,
  .movie-grid,
  .poster-grid,
  .category-grid,
  .compact-list {
    grid-template-columns: 1fr;
  }

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

  .compact-card img {
    width: 84px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }

  .player-play {
    width: 68px;
    height: 68px;
  }
}
