:root {
  color-scheme: dark;
  --deep-950: #050816;
  --deep-900: #0a1022;
  --deep-850: #10172a;
  --deep-800: #151f34;
  --cloud-600: #22d3ee;
  --cloud-500: #38bdf8;
  --cloud-400: #67e8f9;
  --cyber-500: #60a5fa;
  --violet-500: #a78bfa;
  --text-main: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;
  --line: rgba(148, 163, 184, 0.22);
  --glass: rgba(15, 23, 42, 0.72);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 20% 0%, rgba(34, 211, 238, 0.18), transparent 30rem),
    radial-gradient(circle at 90% 10%, rgba(96, 165, 250, 0.15), transparent 24rem),
    var(--deep-950);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(5, 8, 22, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.nav-shell {
  max-width: 1440px;
  height: 76px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 22px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-weight: 900;
  color: #06111f;
  background: linear-gradient(135deg, var(--cloud-400), var(--cyber-500), var(--violet-500));
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.25);
}

.brand-text,
.footer-brand {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--cloud-400), var(--cyber-500));
  -webkit-background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
}

.nav-link {
  padding: 10px 13px;
  border-radius: 12px;
  color: var(--text-soft);
  font-size: 14px;
  white-space: nowrap;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--cloud-400);
  background: rgba(34, 211, 238, 0.08);
}

.nav-search,
.hero-search,
.inline-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input,
.hero-search input,
.inline-search input,
.local-filter,
.search-tools input,
.search-tools select {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.78);
  outline: none;
  transition: 0.2s ease;
}

.nav-search input {
  width: 220px;
  padding: 10px 14px;
}

.nav-search button,
.hero-search button,
.inline-search button {
  border: 0;
  border-radius: 14px;
  padding: 10px 16px;
  color: #06111f;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cloud-400), var(--cyber-500));
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.72);
  padding: 8px 12px;
  cursor: pointer;
}

main {
  overflow: hidden;
}

.hero-section {
  max-width: 1440px;
  min-height: 650px;
  margin: 0 auto;
  padding: 34px 28px 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
}

.hero-carousel {
  position: relative;
  min-height: 592px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--deep-900);
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
  transform: scale(1.02);
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 8, 22, 0.96) 0%, rgba(5, 8, 22, 0.74) 42%, rgba(5, 8, 22, 0.15) 100%),
    linear-gradient(0deg, rgba(5, 8, 22, 0.88) 0%, transparent 48%);
}

.hero-copy {
  position: absolute;
  left: clamp(24px, 6vw, 76px);
  bottom: clamp(36px, 7vw, 82px);
  width: min(680px, calc(100% - 48px));
}

.eyebrow,
.hero-kicker {
  display: inline-flex;
  align-items: center;
  margin-bottom: 12px;
  color: var(--cloud-400);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.inner-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(34px, 5.4vw, 72px);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.hero-copy h2 {
  margin: 18px 0 12px;
  font-size: clamp(24px, 3vw, 42px);
  letter-spacing: -0.04em;
}

.hero-copy p,
.inner-hero p,
.detail-copy p {
  max-width: 680px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span,
.detail-tags a,
.detail-meta span,
.type-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(34, 211, 238, 0.08);
}

.hero-tags span,
.detail-tags a,
.detail-meta span {
  padding: 8px 12px;
  font-size: 13px;
}

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

.btn-primary,
.btn-ghost,
.btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  min-height: 46px;
  padding: 0 20px;
  font-weight: 900;
  transition: 0.2s ease;
}

.btn-primary {
  color: #06111f;
  background: linear-gradient(135deg, var(--cloud-400), var(--cyber-500));
  box-shadow: 0 12px 34px rgba(34, 211, 238, 0.22);
}

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text-main);
  background: rgba(15, 23, 42, 0.65);
}

.btn-link {
  color: var(--cloud-400);
}

.btn-primary:hover,
.btn-ghost:hover,
.btn-link:hover,
.movie-card:hover,
.category-tile:hover,
.category-page-card:hover,
.rank-row:hover {
  transform: translateY(-3px);
}

.hero-dots {
  position: absolute;
  left: clamp(24px, 6vw, 76px);
  bottom: 24px;
  display: flex;
  gap: 8px;
  z-index: 3;
}

.hero-dot {
  width: 34px;
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--cloud-400);
}

.hero-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
}

.hero-search-card,
.hero-mini-list,
.category-tile,
.movie-card,
.category-page-card,
.rank-list,
.detail-section,
.player-wrap,
.related-categories,
.search-tools {
  border: 1px solid var(--line);
  background: var(--glass);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.hero-search-card,
.hero-mini-list {
  border-radius: 28px;
  padding: 22px;
}

.hero-search-card span,
.category-tile span,
.category-page-card span {
  color: var(--cloud-400);
  font-size: 13px;
  font-weight: 800;
}

.hero-search-card h2,
.hero-mini-list h2,
.section-heading h2,
.related-categories h2,
.detail-section h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  letter-spacing: -0.05em;
}

.hero-search {
  margin-top: 18px;
}

.hero-search input {
  width: 100%;
  padding: 13px 14px;
}

.hero-mini-list {
  overflow: hidden;
}

.hero-mini {
  display: grid;
  grid-template-columns: 64px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--text-soft);
}

.hero-mini:last-child {
  border-bottom: 0;
}

.hero-mini img {
  width: 64px;
  height: 80px;
  border-radius: 14px;
  object-fit: cover;
}

.category-strip,
.content-section,
.rank-section,
.search-shell,
.related-categories {
  max-width: 1440px;
  margin: 0 auto;
  padding: 62px 28px;
}

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

.inline-heading > a {
  color: var(--cloud-400);
  font-weight: 800;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border-radius: 26px;
  transition: 0.2s ease;
}

.category-tile img,
.category-page-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
}

.category-tile::after,
.category-page-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5, 8, 22, 0.95), rgba(5, 8, 22, 0.25));
}

.category-tile > div,
.category-page-card > div {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: end;
}

.category-tile h3,
.category-page-card h2 {
  margin: 8px 0;
  font-size: 24px;
}

.category-tile p,
.category-page-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.6;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  transition: 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(96, 165, 250, 0.1));
}

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

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

.type-pill {
  position: absolute;
  right: 10px;
  top: 10px;
  padding: 6px 10px;
  font-size: 12px;
  background: rgba(5, 8, 22, 0.72);
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #06111f;
  background: linear-gradient(135deg, var(--cloud-400), var(--cyber-500));
}

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

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

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

.movie-card p {
  min-height: 3.2em;
  margin: 0 0 12px;
  color: var(--text-soft);
  line-height: 1.62;
  font-size: 14px;
}

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

.tag-row span {
  padding: 5px 8px;
  font-size: 12px;
}

.inner-hero {
  max-width: 1440px;
  margin: 0 auto;
  padding: 88px 28px 54px;
  background:
    radial-gradient(circle at 24% 8%, rgba(34, 211, 238, 0.12), transparent 30rem),
    radial-gradient(circle at 78% 12%, rgba(167, 139, 250, 0.12), transparent 25rem);
}

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

.inline-search {
  margin-top: 24px;
  max-width: 520px;
}

.inline-search input {
  flex: 1 1 auto;
  padding: 13px 14px;
}

.local-filter {
  width: 280px;
  padding: 13px 14px;
}

.related-categories {
  padding-top: 20px;
}

.related-categories > div {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.related-categories a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text-soft);
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid var(--line);
}

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

.category-page-card {
  position: relative;
  min-height: 270px;
  overflow: hidden;
  border-radius: 30px;
  transition: 0.2s ease;
}

.rank-section {
  padding-top: 36px;
}

.rank-list {
  border-radius: 28px;
  overflow: hidden;
}

.rank-row {
  display: grid;
  grid-template-columns: 54px 70px minmax(0, 1fr) 90px 120px 1.4fr;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--text-soft);
  transition: 0.2s ease;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row strong {
  color: var(--cloud-400);
  font-size: 22px;
}

.rank-row img {
  width: 54px;
  height: 74px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-title {
  color: var(--text-main);
  font-weight: 900;
}

.search-shell {
  padding-top: 34px;
}

.search-tools {
  position: sticky;
  top: 88px;
  z-index: 8;
  margin-bottom: 26px;
  padding: 16px;
  border-radius: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
}

.search-tools input,
.search-tools select {
  padding: 13px 14px;
}

.breadcrumb {
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px 28px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--text-muted);
  font-size: 14px;
}

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

.detail-hero {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 28px;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}

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

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

.detail-copy h1 {
  margin-bottom: 18px;
}

.detail-meta,
.detail-tags {
  margin-top: 18px;
}

.player-wrap {
  position: relative;
  max-width: 1180px;
  aspect-ratio: 16 / 9;
  margin: 22px auto 54px;
  overflow: hidden;
  border-radius: 34px;
  background: #000;
}

.movie-player {
  width: 100%;
  height: 100%;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-main);
  background: linear-gradient(180deg, rgba(5, 8, 22, 0.18), rgba(5, 8, 22, 0.82));
  cursor: pointer;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}

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

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  padding-left: 6px;
  border-radius: 999px;
  color: #06111f;
  font-size: 34px;
  background: linear-gradient(135deg, var(--cloud-400), var(--cyber-500));
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.34);
}

.play-overlay strong {
  font-size: clamp(22px, 3vw, 38px);
}

.detail-section {
  max-width: 1180px;
  margin: 0 auto 26px;
  padding: 32px;
  border-radius: 30px;
}

.detail-section p {
  color: var(--text-soft);
  font-size: 17px;
  line-height: 1.95;
}

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

.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: rgba(5, 8, 22, 0.82);
}

.footer-grid {
  max-width: 1440px;
  margin: 0 auto;
  padding: 46px 28px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 26px;
}

.footer-grid p {
  max-width: 540px;
  color: var(--text-muted);
  line-height: 1.8;
}

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

.footer-grid a:not(.footer-brand) {
  display: block;
  margin: 10px 0;
  color: var(--text-soft);
}

.footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  padding: 18px 28px;
  text-align: center;
  color: var(--text-muted);
}

.is-filtered-out {
  display: none !important;
}

@media (max-width: 1180px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 18px;
    right: 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(5, 8, 22, 0.96);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero-section {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }

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

@media (max-width: 880px) {
  .nav-shell {
    height: auto;
    min-height: 70px;
    padding: 12px 18px;
    flex-wrap: wrap;
  }

  .nav-search {
    order: 4;
    width: 100%;
  }

  .nav-search input {
    width: 100%;
  }

  .hero-section,
  .content-section,
  .category-strip,
  .rank-section,
  .search-shell,
  .related-categories,
  .inner-hero,
  .detail-hero,
  .breadcrumb {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-carousel {
    min-height: 560px;
  }

  .hero-panel,
  .footer-grid,
  .detail-hero,
  .category-page-grid,
  .search-tools {
    grid-template-columns: 1fr;
  }

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

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

  .rank-row {
    grid-template-columns: 42px 58px minmax(0, 1fr);
  }

  .rank-row span:nth-child(n+4) {
    display: none;
  }

  .local-filter {
    width: 100%;
  }

  .section-heading {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .brand-text {
    font-size: 20px;
  }

  .hero-section {
    padding-top: 18px;
  }

  .hero-carousel {
    min-height: 590px;
    border-radius: 24px;
  }

  .hero-copy {
    left: 20px;
    bottom: 58px;
    width: calc(100% - 40px);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .btn-primary,
  .btn-ghost,
  .btn-link {
    width: 100%;
  }

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

  .movie-card.compact-card {
    display: grid;
    grid-template-columns: 120px 1fr;
  }

  .movie-card.compact-card .poster-link {
    height: 100%;
  }

  .player-wrap {
    border-radius: 20px;
  }
}
