:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --blue: #2563eb;
  --blue-soft: rgba(37, 99, 235, 0.18);
  --purple: #7c3aed;
  --cyan: #06b6d4;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 2%, rgba(37, 99, 235, 0.28), transparent 34%),
    radial-gradient(circle at 84% 10%, rgba(124, 58, 237, 0.2), transparent 30%),
    linear-gradient(180deg, #020617 0%, #08111f 38%, #020617 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
  font: inherit;
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

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

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

.brand-name {
  font-size: 20px;
}

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

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  color: #cbd5e1;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(37, 99, 235, 0.22);
}

.header-search {
  display: flex;
  align-items: center;
  min-width: 280px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  overflow: hidden;
}

.header-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  padding: 10px 14px;
}

.header-search button,
.btn,
.filter-grid button {
  border: 0;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.25);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}

.btn.ghost {
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.text-link {
  color: #93c5fd;
  font-weight: 700;
}

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

.hero-stage,
.hero-slide,
.hero-bg,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.hero-bg {
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  filter: saturate(1.05) contrast(1.08);
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.82) 40%, rgba(2, 6, 23, 0.28) 100%),
    linear-gradient(0deg, #020617 0%, transparent 38%);
}

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

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

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: #93c5fd;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

.hero p,
.page-hero p,
.detail-one {
  max-width: 720px;
  margin: 20px 0 0;
  color: #cbd5e1;
  font-size: 18px;
  line-height: 1.85;
}

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

.hero-tags span,
.tag-row span {
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(147, 197, 253, 0.22);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

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

.hero-poster {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transform: rotate(2deg);
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 30px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transform: translateX(-50%);
  pointer-events: none;
}

.hero-controls button {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  background: rgba(15, 23, 42, 0.68);
  cursor: pointer;
}

.hero-dots {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  opacity: 0.48;
}

.hero-dot.active {
  width: 28px;
  opacity: 1;
  background: #60a5fa;
}

.section-block,
.page-hero {
  padding: 54px 0;
}

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

.section-head h2,
.prose-card h2,
.side-card h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
}

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

.movie-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(96, 165, 250, 0.48);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: #020617;
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.28s ease;
}

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

.poster-glow {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.9), transparent);
}

.play-chip,
.rank-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  background: rgba(37, 99, 235, 0.86);
}

.rank-badge {
  top: 10px;
  bottom: auto;
  background: linear-gradient(135deg, #f97316, #ef4444);
}

.movie-body {
  padding: 14px;
}

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 48px;
  color: #fff;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.movie-body p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  margin: 10px 0 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.category-link {
  display: inline-flex;
  margin-top: 12px;
  color: #93c5fd;
  font-size: 13px;
  font-weight: 700;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--panel);
}

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

.category-card:hover img {
  transform: scale(1.08);
}

.category-card span,
.category-card p,
.category-card strong {
  position: relative;
  z-index: 2;
}

.category-card span {
  display: block;
  margin-top: 78px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  color: #cbd5e1;
  line-height: 1.7;
}

.category-card strong {
  color: #93c5fd;
}

.ranking-slab {
  border-top: 1px solid var(--line);
}

.page-hero {
  margin-top: 20px;
}

.filter-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.68);
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 14px;
  align-items: end;
}

.filter-grid label {
  display: grid;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
}

.filter-grid input,
.filter-grid select {
  width: 100%;
  border: 1px solid var(--line);
  outline: 0;
  border-radius: 14px;
  color: #fff;
  background: #020617;
  padding: 12px;
}

.filter-count {
  margin: 12px 0 0;
  color: var(--muted);
}

.category-wide-list {
  display: grid;
  gap: 22px;
  padding-bottom: 64px;
}

.category-wide {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  padding: 20px;
}

.category-wide-cover {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.category-wide-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.category-wide h2 {
  margin: 0;
  font-size: 30px;
}

.category-wide p {
  color: #cbd5e1;
  line-height: 1.8;
}

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

.detail-bg,
.detail-overlay {
  position: absolute;
  inset: 0;
}

.detail-bg {
  background-size: cover;
  background-position: center;
  filter: blur(6px) saturate(1.1);
  transform: scale(1.06);
  opacity: 0.48;
}

.detail-overlay {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.66)),
    linear-gradient(0deg, #020617 0%, transparent 42%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  min-height: 620px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #93c5fd;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--line);
}

.player-section {
  padding: 20px 0 54px;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: #000;
  box-shadow: var(--shadow);
}

.movie-player,
.player-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.movie-player {
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: #fff;
  cursor: pointer;
  background: #000;
}

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

.player-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.46;
}

.big-play {
  position: absolute;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 20px 60px rgba(37, 99, 235, 0.48);
  font-size: 34px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  padding-bottom: 34px;
}

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

.prose-card p {
  color: #dbe3ef;
  font-size: 16px;
  line-height: 2;
}

.prose-card h2 + p {
  margin-top: 12px;
}

.prose-card p + h2 {
  margin-top: 28px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  color: #cbd5e1;
}

.side-card dt {
  color: #93c5fd;
  font-weight: 800;
}

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

.mini-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
  padding: 10px;
}

.mini-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.mini-card span {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  margin-top: 10px;
  font-weight: 800;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.mini-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 38px 0;
}

.footer-logo {
  font-size: 22px;
  font-weight: 900;
}

.site-footer p,
.copyright {
  color: var(--muted);
}

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

.footer-links a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd5e1;
}

.copyright {
  padding: 0 0 24px;
}

.movie-card.is-hidden {
  display: none;
}

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

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

@media (max-width: 820px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 12px 0;
  }

  .main-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .header-search {
    min-width: 0;
    flex: 1;
  }

  .hero,
  .hero-content,
  .detail-hero,
  .detail-layout {
    min-height: auto;
  }

  .hero-content,
  .detail-layout,
  .category-wide,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-content {
    padding: 84px 0 116px;
  }

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

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

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

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

  .detail-layout {
    padding: 44px 0;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand-name {
    font-size: 18px;
  }

  .header-search {
    width: 100%;
    flex-basis: 100%;
  }

  .hero h1,
  .page-hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .hero p,
  .page-hero p,
  .detail-one {
    font-size: 15px;
  }

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

  .category-wide-cover {
    grid-template-columns: repeat(2, 1fr);
  }
}
