:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: #111827;
  --card: rgba(15, 23, 42, 0.82);
  --card-strong: rgba(30, 41, 59, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(34, 211, 238, 0.26);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --violet: #7c3aed;
  --amber: #f59e0b;
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --shadow: 0 24px 80px rgba(2, 6, 23, 0.45);
  --max: 1180px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.16), transparent 34%),
    radial-gradient(circle at 90% 8%, rgba(37, 99, 235, 0.20), transparent 28%),
    linear-gradient(180deg, #020617 0%, #0f172a 44%, #020617 100%);
}

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

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(79, 70, 229, 0.18));
}

button,
input,
select {
  font: inherit;
}

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

.nav-shell {
  max-width: var(--max);
  margin: 0 auto;
  height: 68px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  box-shadow: 0 16px 40px rgba(34, 211, 238, 0.22);
}

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

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

.brand-text em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted-strong);
  font-weight: 700;
}

.desktop-nav a,
.nav-dropdown > a {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.nav-dropdown:hover > a {
  color: var(--cyan);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 190px;
  padding: 10px;
  transform: translate(-50%, 14px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-dropdown-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted-strong);
}

.nav-dropdown-menu a:hover {
  background: rgba(34, 211, 238, 0.10);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 8px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.92);
}

.mobile-nav {
  display: none;
  padding: 0 20px 18px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.96);
}

.mobile-nav a {
  display: block;
  padding: 12px 0;
  color: var(--muted-strong);
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.mobile-nav.is-open {
  display: block;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  padding: 56px 20px 70px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.78) 44%, rgba(8, 47, 73, 0.68)),
    radial-gradient(circle at 75% 30%, rgba(34, 211, 238, 0.22), transparent 34%);
}

.hero-inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
}

.hero-slide {
  display: none;
  align-items: center;
  gap: 54px;
  min-height: 520px;
}

.hero-slide.is-active {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  animation: fadeUp 0.55s ease both;
}

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

.eyebrow {
  margin: 0 0 12px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  font-weight: 800;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.hero-desc {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted-strong);
  font-size: clamp(17px, 2.2vw, 22px);
  line-height: 1.8;
}

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

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

.hero-tags span,
.movie-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(34, 211, 238, 0.20);
  border-radius: 999px;
  color: #a5f3fc;
  background: rgba(8, 145, 178, 0.12);
  font-size: 12px;
  font-weight: 700;
}

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

.btn-primary,
.btn-ghost,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  color: #001018;
  background: linear-gradient(135deg, #67e8f9, #38bdf8);
  box-shadow: 0 18px 44px rgba(34, 211, 238, 0.28);
}

.btn-ghost,
.section-link {
  border: 1px solid var(--line-strong);
  color: #cffafe;
  background: rgba(15, 23, 42, 0.56);
}

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

.hero-media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  max-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 36px;
  box-shadow: 0 36px 100px rgba(2, 6, 23, 0.62);
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 2;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.78));
}

.hero-controls {
  position: absolute;
  right: 20px;
  bottom: 24px;
  display: flex;
  gap: 10px;
}

.hero-controls button,
.hero-dot {
  cursor: pointer;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(15, 23, 42, 0.74);
}

.hero-controls button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
}

.hero-dots {
  position: absolute;
  left: 0;
  bottom: 38px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 50%;
}

.hero-dot.is-active {
  width: 28px;
  border-color: transparent;
  border-radius: 999px;
  background: var(--cyan);
}

main {
  position: relative;
  z-index: 1;
}

.content-section,
.category-section,
.overview-grid,
.page-hero,
.detail-hero,
.player-section,
.detail-section,
.breadcrumb {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.content-section,
.category-section {
  padding-top: 76px;
  padding-bottom: 24px;
}

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

.section-head h2,
.detail-section h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.03em;
}

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

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

.all-list,
.ranking-grid {
  margin-top: 26px;
}

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.82));
  box-shadow: 0 18px 54px rgba(2, 6, 23, 0.30);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: var(--line-strong);
  box-shadow: 0 28px 70px rgba(8, 145, 178, 0.16);
}

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

.poster-link img {
  transition: transform 0.38s ease, filter 0.38s ease;
}

.movie-card:hover .poster-link img {
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.04);
}

.poster-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(2, 6, 23, 0.86));
}

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: #001018;
  background: linear-gradient(135deg, #67e8f9, #38bdf8);
}

.rank-badge {
  left: 12px;
  top: 12px;
  min-width: 38px;
  height: 34px;
  padding: 0 10px;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.28);
}

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

.movie-card h3 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.35;
}

.movie-card h3 a:hover {
  color: var(--cyan);
}

.movie-card p {
  margin: 0;
  min-height: 66px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.movie-meta,
.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.movie-meta span,
.detail-stats span {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.10);
}

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

.category-card,
.category-overview-card a {
  display: flex;
  min-height: 170px;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(145deg, rgba(34, 211, 238, 0.12), rgba(37, 99, 235, 0.08)),
    rgba(15, 23, 42, 0.78);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.category-overview-card a:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
}

.category-card span,
.category-overview-card h2 {
  font-size: 20px;
  font-weight: 900;
}

.category-card strong,
.category-overview-card p {
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.7;
}

.category-card em,
.mini-title-row span {
  color: var(--cyan);
  font-style: normal;
  font-size: 13px;
}

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

.featured-list .movie-card p,
.featured-list .movie-meta {
  display: none;
}

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

.page-hero {
  padding-top: 78px;
  padding-bottom: 38px;
}

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

.slim-hero {
  padding-bottom: 20px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.76);
}

.search-box {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-box span {
  color: var(--cyan);
  font-weight: 900;
}

.search-box input,
.filter-select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(2, 6, 23, 0.78);
  outline: none;
}

.search-box input {
  padding: 0 14px;
}

.filter-select {
  flex: 0 0 180px;
  padding: 0 12px;
}

.search-box input:focus,
.filter-select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.10);
}

.overview-grid {
  padding-top: 20px;
  padding-bottom: 80px;
}

.category-overview-card a {
  min-height: 240px;
}

.mini-title-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 18px;
}

.breadcrumb {
  padding-top: 34px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 36px;
  padding-top: 42px;
  padding-bottom: 40px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line-strong);
  border-radius: 32px;
  box-shadow: var(--shadow);
}

.detail-one-line {
  max-width: 780px;
  color: var(--muted-strong);
  font-size: 19px;
  line-height: 1.8;
}

.player-section {
  padding-top: 20px;
  padding-bottom: 36px;
}

.movie-player {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line-strong);
  border-radius: 30px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 4;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: white;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.20), transparent 36%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.26), rgba(2, 6, 23, 0.78));
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.player-circle {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #001018;
  background: linear-gradient(135deg, #67e8f9, #38bdf8);
  box-shadow: 0 16px 42px rgba(34, 211, 238, 0.32);
  font-size: 30px;
}

.player-cover strong {
  font-size: 20px;
}

.detail-section {
  padding-top: 18px;
  padding-bottom: 34px;
}

.detail-section p {
  margin: 14px 0 28px;
  color: var(--muted-strong);
  font-size: 17px;
  line-height: 1.95;
}

.related-section {
  padding-top: 24px;
}

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

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

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

[hidden] {
  display: none !important;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

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

  .hero {
    min-height: auto;
    padding-top: 34px;
  }

  .hero-slide.is-active,
  .detail-hero {
    grid-template-columns: 1fr;
  }

  .hero-media {
    max-height: none;
    width: min(100%, 430px);
    margin: 0 auto;
  }

  .hero-controls,
  .hero-dots {
    position: static;
    margin-top: 22px;
  }

  .hero-dots {
    justify-content: center;
  }

  .hero-controls {
    justify-content: center;
  }

  .movie-grid,
  .compact-grid,
  .ranking-grid,
  .featured-list,
  .category-grid,
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 560px) {
  .nav-shell {
    padding: 0 14px;
  }

  .brand-text em {
    display: none;
  }

  .hero,
  .content-section,
  .category-section,
  .page-hero,
  .detail-hero,
  .player-section,
  .detail-section,
  .breadcrumb {
    padding-left: 14px;
    padding-right: 14px;
  }

  .movie-grid,
  .compact-grid,
  .ranking-grid,
  .featured-list,
  .category-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .filter-select {
    flex: 1 1 100%;
  }

  .movie-player {
    border-radius: 18px;
  }
}
