:root {
  color-scheme: dark;
  --deep-space-950: #020617;
  --deep-space-900: #0f172a;
  --deep-space-800: #1e293b;
  --deep-space-700: #334155;
  --cloud-realm-500: #0ea5e9;
  --cloud-realm-400: #38bdf8;
  --cyber-blue-600: #2563eb;
  --text-main: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --glass: rgba(15, 23, 42, 0.78);
  --glass-soft: rgba(30, 41, 59, 0.72);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

* {
  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-main);
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.22), transparent 32rem),
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 28rem),
    linear-gradient(135deg, var(--deep-space-950), var(--deep-space-900) 46%, var(--deep-space-950));
}

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

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

button,
input {
  font: inherit;
}

button {
  border: 0;
}

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

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex: 0 0 auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.85rem;
  font-weight: 900;
  color: white;
  background: linear-gradient(135deg, var(--cloud-realm-500), var(--cyber-blue-600));
  box-shadow: 0 14px 35px rgba(14, 165, 233, 0.35);
}

.brand-text {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1 1 auto;
}

.nav-link,
.dropdown-menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.58rem 0.88rem;
  border-radius: 0.72rem;
  color: var(--text-soft);
  background: transparent;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.dropdown-menu a:hover {
  color: var(--cloud-realm-400);
  background: rgba(30, 41, 59, 0.78);
}

.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-menu {
  position: absolute;
  top: 115%;
  left: 0;
  display: grid;
  min-width: 12rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(0.4rem);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 1 24rem;
}

.header-search input,
.filter-panel input {
  width: 100%;
  border: 1px solid rgba(7, 89, 133, 0.45);
  border-radius: 999px;
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.82);
  outline: none;
  padding: 0.78rem 1rem;
}

.header-search input:focus,
.filter-panel input:focus {
  border-color: var(--cloud-realm-500);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.header-search button,
.primary-btn,
.secondary-btn,
.ghost-link,
.play-overlay button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cloud-realm-500), var(--cyber-blue-600));
  box-shadow: 0 14px 34px rgba(14, 165, 233, 0.28);
  padding: 0.78rem 1.15rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  white-space: nowrap;
}

.header-search button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.ghost-link:hover,
.play-overlay button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 18px 42px rgba(14, 165, 233, 0.36);
}

.secondary-btn {
  color: var(--text-main);
  background: rgba(30, 41, 59, 0.86);
  box-shadow: none;
  border: 1px solid var(--line);
}

.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 0.28rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.75rem;
  background: rgba(30, 41, 59, 0.9);
  align-items: center;
  justify-content: center;
}

.mobile-toggle span {
  display: block;
  width: 1.15rem;
  height: 2px;
  border-radius: 99px;
  background: white;
}

.mobile-nav {
  display: none;
  padding: 0 1.25rem 1rem;
  border-top: 1px solid var(--line);
}

.mobile-nav.open {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.main-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.2rem 1.25rem 4rem;
}

.hero {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: black;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
  transform: scale(1.02);
}

.hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72) 38%, rgba(2, 6, 23, 0.24)),
    linear-gradient(0deg, var(--deep-space-950), transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.62fr);
  align-items: center;
  gap: 2rem;
  max-width: 1280px;
  min-height: 70vh;
  margin: 0 auto;
  padding: 4.5rem 1.25rem 5.5rem;
}

.hero-copy {
  max-width: 46rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(56, 189, 248, 0.36);
  border-radius: 999px;
  padding: 0.38rem 0.78rem;
  color: var(--cloud-realm-400);
  background: rgba(14, 165, 233, 0.1);
}

.hero h1,
.page-hero h1,
.detail-title h1 {
  margin: 0;
  font-size: clamp(2.25rem, 6vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p,
.page-hero p {
  max-width: 42rem;
  color: var(--text-soft);
  font-size: 1.08rem;
  line-height: 1.85;
}

.hero-actions,
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.hero-panel {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 1.35rem;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.58));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-panel img {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  opacity: 1;
  transform: none;
}

.hero-panel-body {
  padding: 1rem;
}

.hero-panel-body strong {
  display: block;
  font-size: 1.18rem;
}

.hero-panel-body span {
  display: block;
  margin-top: 0.35rem;
  color: var(--text-muted);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transform: translateX(-50%);
}

.hero-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
  width: 2rem;
  background: var(--cloud-realm-400);
}

.page-hero,
.detail-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.18), transparent 36%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.88), rgba(15, 23, 42, 0.86));
  box-shadow: var(--shadow);
  padding: clamp(1.4rem, 4vw, 2.4rem);
}

.page-hero {
  margin-bottom: 2rem;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(14rem, 22rem) minmax(0, 1fr);
  gap: 2rem;
  align-items: stretch;
}

.detail-cover img {
  width: 100%;
  height: 100%;
  min-height: 28rem;
  border-radius: 1.2rem;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.detail-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

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

.breadcrumb a:hover {
  color: var(--cloud-realm-400);
}

.meta-pills,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.meta-pills span,
.tag-row span {
  display: inline-flex;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 999px;
  color: var(--cloud-realm-400);
  background: rgba(14, 165, 233, 0.08);
  padding: 0.35rem 0.72rem;
  font-size: 0.88rem;
}

.section-block {
  margin-top: 3rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
}

.section-head p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.05rem;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: rgba(15, 23, 42, 0.7);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(30, 41, 59, 0.78);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--deep-space-800);
}

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

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

.poster-gradient {
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), transparent);
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  color: white;
  background: rgba(14, 165, 233, 0.88);
  padding: 0.34rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.play-chip {
  right: 0.75rem;
  bottom: 0.75rem;
}

.rank-badge {
  left: 0.75rem;
  top: 0.75rem;
  min-width: 2rem;
  text-align: center;
  background: rgba(37, 99, 235, 0.92);
}

.card-body {
  padding: 0.95rem;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.card-body h3,
.ranking-info h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
}

.card-body h3 a:hover,
.ranking-info h3 a:hover {
  color: var(--cloud-realm-400);
}

.card-body p,
.ranking-info p,
.detail-copy p {
  color: var(--text-soft);
  line-height: 1.75;
}

.card-body p {
  min-height: 4.8rem;
  margin: 0.45rem 0 0.8rem;
  font-size: 0.92rem;
}

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

.category-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.82), rgba(15, 23, 42, 0.86));
  padding: 1rem;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.45);
}

.category-covers {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.8fr;
  gap: 0.4rem;
  min-height: 8rem;
  margin-bottom: 1rem;
}

.category-covers img {
  width: 100%;
  height: 100%;
  border-radius: 0.9rem;
  object-fit: cover;
}

.category-card h2,
.category-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.category-card p {
  flex: 1 1 auto;
  color: var(--text-soft);
  line-height: 1.65;
}

.category-card span {
  color: var(--cloud-realm-400);
  font-weight: 700;
}

.filter-panel {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 1.2rem 0 1.6rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: rgba(15, 23, 42, 0.72);
  padding: 1rem;
}

.filter-panel input {
  border-radius: 0.9rem;
}

.ranking-list {
  display: grid;
  gap: 0.75rem;
}

.ranking-row {
  display: grid;
  grid-template-columns: 4rem 5.5rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem;
}

.ranking-number {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  color: var(--cloud-realm-400);
  background: rgba(14, 165, 233, 0.1);
  font-weight: 900;
}

.ranking-cover img {
  width: 5.5rem;
  height: 7.2rem;
  border-radius: 0.85rem;
  object-fit: cover;
}

.detail-copy {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.25rem;
}

.copy-card,
.player-card {
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  background: rgba(15, 23, 42, 0.72);
  padding: 1.25rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.copy-card h2,
.player-card h2 {
  margin: 0 0 0.8rem;
  font-size: 1.35rem;
}

.video-shell {
  position: relative;
  overflow: hidden;
  border-radius: 1.15rem;
  background: black;
  aspect-ratio: 16 / 9;
}

.video-shell video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: black;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.18), rgba(0, 0, 0, 0.72));
}

.video-shell.is-playing .play-overlay {
  display: none;
}

.play-overlay button {
  min-width: 8rem;
  font-weight: 800;
}

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

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
  color: var(--text-muted);
}

.footer-inner strong {
  color: var(--text-main);
}

.footer-inner p {
  margin: 0.35rem 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.footer-links a:hover {
  color: var(--cloud-realm-400);
}

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

@media (max-width: 920px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
    margin-left: auto;
  }

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

  .hero-panel {
    max-width: 24rem;
  }

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

@media (max-width: 640px) {
  .header-inner {
    padding: 0.75rem 1rem;
  }

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

  .hero,
  .hero-content {
    min-height: 82vh;
  }

  .hero-content {
    padding-top: 3.8rem;
  }

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

  .section-head,
  .footer-inner,
  .filter-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .ranking-row {
    grid-template-columns: 3.2rem 4.6rem minmax(0, 1fr);
  }

  .ranking-row .ghost-link {
    grid-column: 2 / 4;
    width: max-content;
  }

  .ranking-cover img {
    width: 4.6rem;
    height: 6.2rem;
  }

  .card-body p {
    display: none;
  }
}
