:root {
  color-scheme: dark;
  --page-bg: #020617;
  --surface: #0f172a;
  --surface-soft: #111c33;
  --surface-strong: #172239;
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.28);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --ocean: #0ea5e9;
  --ocean-dark: #0284c7;
  --violet: #8b5cf6;
  --pink: #ec4899;
  --gold: #f59e0b;
  --radius-lg: 24px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 80px rgba(2, 8, 23, 0.48);
  --shadow-soft: 0 18px 40px rgba(2, 8, 23, 0.26);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page-bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(14, 165, 233, 0.18), transparent 32rem),
    radial-gradient(circle at 88% 12%, rgba(139, 92, 246, 0.18), transparent 32rem),
    linear-gradient(180deg, #020617 0%, #07111f 48%, #020617 100%);
}

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(20px);
}

.header-inner,
.footer-inner,
.page-shell,
.hero-content,
.hero-controls,
.hero-dots {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: linear-gradient(135deg, var(--ocean), var(--violet));
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.3);
}

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

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

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted-strong);
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: white;
  background: rgba(14, 165, 233, 0.18);
}

.nav-link:hover {
  transform: translateY(-1px);
}

.nav-link-muted {
  color: #9ca3af;
}

.mobile-menu-button {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: white;
  background: rgba(15, 23, 42, 0.72);
}

.mobile-menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 99px;
  background: white;
}

.hero-slider {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
}

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

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(2, 6, 23, 0.64) 44%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.05) 0%, #020617 100%);
}

.hero-content {
  position: relative;
  z-index: 3;
  min-height: 620px;
  display: flex;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
  padding: 96px 0 120px;
}

.pill-row,
.meta-row,
.detail-meta,
.quick-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.pill,
.type-badge,
.year-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: white;
  font-size: 13px;
  font-weight: 700;
  background: rgba(14, 165, 233, 0.86);
}

.pill.alt {
  background: rgba(139, 92, 246, 0.82);
}

.pill.ghost {
  color: var(--muted-strong);
  border: 1px solid var(--line-strong);
  background: rgba(15, 23, 42, 0.58);
}

.hero-copy h1 {
  margin: 22px 0 16px;
  max-width: 780px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  margin: 0;
  max-width: 640px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

.meta-row {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 14px;
  color: white;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--ocean), var(--ocean-dark));
  box-shadow: 0 16px 34px rgba(14, 165, 233, 0.26);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(14, 165, 233, 0.38);
}

.button.secondary {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: none;
}

.hero-search {
  width: min(520px, 100%);
  display: flex;
  gap: 10px;
  margin-top: 26px;
  padding: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.64);
  backdrop-filter: blur(18px);
}

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

.hero-search input {
  min-height: 46px;
  padding: 0 16px;
}

.hero-search button {
  min-width: 96px;
  border: none;
  cursor: pointer;
}

.hero-controls {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: white;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(18px);
  cursor: pointer;
  pointer-events: auto;
}

.hero-arrow:hover {
  background: rgba(14, 165, 233, 0.42);
}

.hero-prev {
  left: 0;
}

.hero-next {
  right: 0;
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: white;
}

.page-shell {
  padding: 54px 0 76px;
}

.section-block {
  margin-top: 46px;
}

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

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

.section-heading p {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  flex-shrink: 0;
  color: var(--ocean);
  font-weight: 800;
}

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

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

.movie-card {
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow-soft);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(14, 165, 233, 0.42);
  background: rgba(17, 28, 51, 0.96);
}

.movie-link,
.movie-card-body {
  display: flex;
  flex-direction: column;
}

.poster-frame {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.94);
}

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

.poster-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, filter 0.35s ease;
}

.movie-card:hover .poster-frame img {
  transform: scale(1.06);
  filter: saturate(1.15);
}

.poster-shade {
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.92));
}

.type-badge {
  position: absolute;
  top: 12px;
  left: 12px;
}

.year-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(245, 158, 11, 0.92);
}

.play-chip {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  background: rgba(14, 165, 233, 0.92);
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.28);
}

.movie-card-body {
  gap: 9px;
  min-height: 178px;
  padding: 16px;
}

.movie-card-body strong {
  display: -webkit-box;
  overflow: hidden;
  min-height: 52px;
  color: white;
  font-size: 18px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card-body small {
  color: var(--muted);
  line-height: 1.5;
}

.movie-line {
  display: -webkit-box;
  overflow: hidden;
  min-height: 44px;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.movie-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #bae6fd;
  font-size: 12px;
  background: rgba(14, 165, 233, 0.12);
}

.feature-band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 24px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(139, 92, 246, 0.12)),
    rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow);
}

.ranking-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
}

.ranking-link {
  display: grid;
  grid-template-columns: 70px 88px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
}

.rank-index {
  color: var(--gold);
  font-size: 28px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.ranking-link img {
  width: 88px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.ranking-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.ranking-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-title small,
.rank-meta {
  color: var(--muted);
}

.rank-meta {
  white-space: nowrap;
}

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

.category-tile {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(circle at 80% 0%, rgba(14, 165, 233, 0.22), transparent 42%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(17, 24, 39, 0.92));
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-5px);
  border-color: rgba(14, 165, 233, 0.42);
}

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

.category-tile span {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.65;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 12px;
}

.filter-bar input,
.filter-bar select {
  min-height: 46px;
  padding: 0 14px;
}

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(15, 23, 42, 0.72);
}

.empty-state.is-visible {
  display: block;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #020617;
}

.detail-bg {
  position: absolute;
  inset: 0;
  opacity: 0.22;
}

.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px);
  transform: scale(1.06);
}

.detail-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.72)),
    linear-gradient(180deg, transparent, #020617);
}

.detail-inner {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0;
}

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

.breadcrumb a {
  color: #bae6fd;
}

.detail-main {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 34px;
  align-items: end;
}

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

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

.detail-copy h1 {
  margin: 16px 0;
  max-width: 900px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.detail-copy p {
  margin: 0;
  max-width: 880px;
  color: var(--muted-strong);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  margin-top: 24px;
  color: var(--muted);
}

.detail-meta span {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
}

.player-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #020617;
  box-shadow: var(--shadow);
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: none;
  color: white;
  background:
    linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.62)),
    rgba(2, 6, 23, 0.1);
  cursor: pointer;
}

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

.play-ring {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: white;
  font-size: 34px;
  background: linear-gradient(135deg, var(--ocean), var(--violet));
  box-shadow: 0 20px 60px rgba(14, 165, 233, 0.34);
}

.player-overlay strong {
  font-size: 22px;
}

.content-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.74);
  box-shadow: var(--shadow-soft);
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.content-card p {
  margin: 0 0 22px;
  color: var(--muted-strong);
  font-size: 17px;
  line-height: 1.95;
}

.content-card p:last-child {
  margin-bottom: 0;
}

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

.compact-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.72);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.compact-card:hover {
  transform: translateY(-3px);
  border-color: rgba(14, 165, 233, 0.42);
}

.compact-card img {
  width: 96px;
  height: 68px;
  border-radius: 14px;
  object-fit: cover;
}

.compact-card span {
  min-width: 0;
}

.compact-card strong,
.compact-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.quick-links {
  margin-top: 18px;
}

.quick-links a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.1);
}

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

.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.8fr) minmax(180px, 0.8fr);
  gap: 32px;
  padding: 46px 0 30px;
}

.footer-brand p,
.footer-links a {
  color: var(--muted);
}

.footer-brand p {
  max-width: 520px;
  line-height: 1.8;
}

.footer-links h2 {
  margin: 0 0 16px;
  font-size: 18px;
}

.footer-links div {
  display: grid;
  gap: 10px;
}

.footer-links a:hover {
  color: var(--ocean);
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

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

  .feature-band {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .mobile-menu-button {
    display: block;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

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

  .nav-link {
    justify-content: center;
    border-radius: 14px;
  }

  .hero-slider,
  .hero-content {
    min-height: 580px;
  }

  .hero-copy {
    padding-top: 82px;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .movie-grid.large,
  .category-grid,
  .compact-grid,
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }

  .detail-main {
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 20px;
  }

  .detail-copy p {
    font-size: 16px;
  }

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

  .ranking-link {
    grid-template-columns: 52px 76px minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }
}

@media (max-width: 560px) {
  .header-inner,
  .footer-inner,
  .page-shell,
  .hero-content,
  .hero-controls,
  .hero-dots,
  .detail-inner,
  .footer-bottom {
    width: min(100% - 24px, 1180px);
  }

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

  .brand-text em {
    display: none;
  }

  .hero-slider,
  .hero-content {
    min-height: 620px;
  }

  .hero-copy h1 {
    font-size: 38px;
  }

  .hero-search {
    flex-direction: column;
  }

  .movie-grid,
  .movie-grid.large,
  .category-grid,
  .compact-grid,
  .footer-inner {
    grid-template-columns: 1fr;
  }

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

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

  .movie-card-body {
    min-height: auto;
  }

  .ranking-link {
    grid-template-columns: 44px 72px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .rank-index {
    font-size: 22px;
  }

  .ranking-link img {
    width: 72px;
    height: 52px;
  }

  .content-card {
    padding: 20px;
  }
}
