:root {
  color-scheme: dark;
  --bg: #070b18;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --cyan: #22d3ee;
  --blue: #38bdf8;
  --purple: #a855f7;
  --pink: #ec4899;
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
  --radius: 26px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 36rem),
    radial-gradient(circle at top right, rgba(168, 85, 247, 0.18), transparent 34rem),
    linear-gradient(180deg, #07111f 0%, #0f172a 46%, #070b18 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(7, 11, 24, 0.78);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(1280px, calc(100% - 32px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: white;
  box-shadow: 0 14px 34px rgba(34, 211, 238, 0.26);
}

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

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

.nav-link,
.mobile-link {
  color: var(--muted-strong);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: white;
  background: rgba(34, 211, 238, 0.13);
}

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

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.82);
  color: white;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 99px;
}

.mobile-nav {
  display: none;
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.94);
}

.mobile-link {
  display: block;
  padding: 12px 14px;
}

main {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-shell {
  padding: 36px 0 18px;
}

.hero-title-block {
  max-width: 840px;
  margin-bottom: 26px;
}

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

.hero-title-block h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.15rem, 5vw, 4.6rem);
  line-height: 1.05;
  letter-spacing: -0.06em;
}

.hero-title-block p:not(.eyebrow),
.page-hero p:not(.eyebrow),
.detail-line {
  color: var(--muted-strong);
  font-size: 1.06rem;
}

.hero-search,
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.hero-search {
  margin-top: 24px;
  padding: 8px;
  width: min(720px, 100%);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.hero-search input,
.filter-bar input,
.filter-bar select {
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.2);
  outline: none;
  color: white;
  background: rgba(2, 6, 23, 0.72);
}

.hero-search input {
  flex: 1;
  padding: 14px 18px;
  border-color: transparent;
  background: transparent;
}

.hero-search button,
.primary-btn,
.ghost-btn,
.text-link,
.card-foot a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hero-search button,
.primary-btn {
  padding: 13px 22px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  box-shadow: 0 18px 40px rgba(34, 211, 238, 0.24);
}

.ghost-btn {
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.hero-search button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.card-foot a:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-stage {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 36px;
  background: #020617;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.62fr);
  gap: 40px;
  align-items: center;
  padding: clamp(28px, 5vw, 68px);
  opacity: 0;
  transform: scale(1.02);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.1);
}

.hero-shade,
.detail-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.72) 48%, rgba(2, 6, 23, 0.24)),
    radial-gradient(circle at 20% 15%, rgba(34, 211, 238, 0.24), transparent 34rem),
    radial-gradient(circle at 80% 82%, rgba(168, 85, 247, 0.22), transparent 28rem);
}

.hero-copy,
.hero-poster,
.detail-copy,
.detail-poster {
  position: relative;
  z-index: 1;
}

.hero-copy h2 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 6vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.hero-desc {
  max-width: 700px;
  color: #dbeafe;
  font-size: 1.05rem;
}

.hero-tags,
.detail-meta,
.tag-row,
.ranking-meta,
.card-meta,
.card-foot,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
}

.hero-tags span,
.detail-meta span,
.tag-row span,
.ranking-meta span,
.card-meta span {
  padding: 6px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: #dbeafe;
  background: rgba(15, 23, 42, 0.64);
  font-size: 0.82rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.hero-poster {
  justify-self: end;
  width: min(340px, 100%);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.52);
  transform: rotate(2deg);
}

.hero-poster img,
.detail-poster img,
.poster-link img,
.ranking-poster img,
.overview-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-dots {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.hero-dot {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--muted-strong);
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}

.hero-dot.active {
  color: white;
  border-color: rgba(34, 211, 238, 0.6);
  background: rgba(34, 211, 238, 0.14);
}

.section-panel,
.page-hero,
.detail-hero {
  margin: 28px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.section-panel {
  padding: clamp(20px, 3.8vw, 34px);
}

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

.section-head h2,
.prose-panel h2 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  letter-spacing: -0.04em;
}

.text-link {
  color: var(--cyan);
}

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

.category-card,
.overview-main {
  min-height: 150px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.12), rgba(168, 85, 247, 0.1)),
    rgba(15, 23, 42, 0.8);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover,
.overview-card:hover,
.movie-card:hover,
.ranking-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.42);
}

.category-card span,
.overview-main span {
  display: block;
  color: white;
  font-size: 1.2rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.category-card strong,
.overview-main p {
  color: var(--muted-strong);
  font-size: 0.92rem;
  font-weight: 500;
}

.movie-grid,
.mini-grid,
.ranking-grid,
.overview-grid {
  display: grid;
  gap: 18px;
}

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

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

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

.movie-card,
.ranking-card,
.overview-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.76);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(2, 6, 23, 0.78);
}

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

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

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

.card-body {
  padding: 15px;
}

.card-meta {
  gap: 6px;
  margin-bottom: 10px;
}

.card-meta span {
  padding: 4px 8px;
  font-size: 0.72rem;
}

.card-body h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  line-height: 1.35;
}

.card-body h2 a:hover,
.ranking-body h2 a:hover {
  color: var(--cyan);
}

.card-body p {
  min-height: 48px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
}

.card-foot {
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.8rem;
}

.card-foot a {
  padding: 6px 10px;
  border-radius: 999px;
  color: #06111c;
  background: var(--cyan);
}

.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 26px;
}

.section-head.narrow {
  margin-bottom: 16px;
}

.rank-list {
  display: grid;
  gap: 12px;
}

.rank-item {
  display: grid;
  grid-template-columns: 46px 62px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.34);
}

.rank-number {
  color: var(--cyan);
  font-weight: 900;
  font-size: 1.2rem;
}

.rank-item img {
  width: 62px;
  height: 82px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-copy strong,
.rank-copy em {
  display: block;
}

.rank-copy em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.82rem;
}

.page-hero {
  padding: clamp(28px, 6vw, 64px);
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.18), transparent 32rem),
    radial-gradient(circle at 90% 70%, rgba(168, 85, 247, 0.18), transparent 30rem),
    rgba(15, 23, 42, 0.78);
}

.small-hero {
  min-height: 260px;
  display: grid;
  align-content: center;
}

.breadcrumb {
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.filter-bar {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(2, 6, 23, 0.36);
}

.filter-bar input {
  flex: 1;
  min-width: 240px;
}

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

.filter-state {
  min-height: 24px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

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

.overview-card {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 14px;
  padding: 14px;
}

.overview-main {
  display: block;
  min-height: 100%;
}

.overview-thumbs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.overview-thumbs img {
  aspect-ratio: 2 / 3;
  border-radius: 12px;
}

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

.ranking-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  min-height: 214px;
}

.ranking-poster {
  position: relative;
  overflow: hidden;
}

.ranking-poster span {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
}

.ranking-body {
  padding: 18px;
}

.ranking-body h2 {
  margin: 0 0 10px;
}

.ranking-body p {
  color: var(--muted-strong);
}

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

.detail-grid {
  position: relative;
  z-index: 1;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 54px);
  align-items: end;
  padding: clamp(28px, 6vw, 70px);
}

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

.detail-copy {
  max-width: 820px;
}

.detail-line {
  max-width: 780px;
}

.detail-meta,
.tag-row {
  margin: 18px 0;
}

.watch-section {
  scroll-margin-top: 96px;
}

.watch-meta {
  color: var(--muted);
}

.player-frame {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: #000;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

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

.play-shield {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 14px;
  border: 0;
  color: white;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.38) 36%, rgba(2, 6, 23, 0.72)),
    linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.72));
  cursor: pointer;
}

.play-icon {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  box-shadow: 0 20px 50px rgba(34, 211, 238, 0.28);
  font-size: 2rem;
}

.play-shield strong {
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
}

.player-frame.is-playing .play-shield {
  display: none;
}

.prose-panel {
  color: var(--muted-strong);
}

.prose-panel h2 + p {
  margin-top: 10px;
}

.prose-panel p {
  font-size: 1.03rem;
}

.site-footer {
  width: min(1280px, calc(100% - 32px));
  margin: 48px auto 0;
  padding: 34px 0 28px;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.62);
}

.footer-brand {
  margin-bottom: 12px;
  color: white;
  font-size: 1.1rem;
}

.footer-grid h2 {
  margin: 0 0 12px;
  color: white;
  font-size: 1rem;
}

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

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

.footer-bottom {
  padding: 18px 4px 0;
  text-align: center;
}

[hidden] {
  display: none !important;
}

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

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

  .split-panel,
  .ranking-grid,
  .overview-grid {
    grid-template-columns: 1fr;
  }
}

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

  .nav-toggle {
    display: block;
  }

  .site-header.nav-open .mobile-nav {
    display: block;
  }

  .hero-stage,
  .hero-slide,
  .detail-hero,
  .detail-grid {
    min-height: auto;
  }

  .hero-slide {
    position: relative;
    display: none;
    grid-template-columns: 1fr;
  }

  .hero-slide.active {
    display: grid;
  }

  .hero-poster {
    justify-self: start;
    width: min(260px, 72vw);
    transform: none;
  }

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

  .detail-poster {
    width: min(260px, 78vw);
  }

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

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

  .overview-card,
  .ranking-card,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  main,
  .header-inner,
  .mobile-nav,
  .site-footer {
    width: min(100% - 22px, 1280px);
  }

  .hero-search,
  .filter-bar,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-search {
    border-radius: 24px;
  }

  .hero-search input,
  .hero-search button,
  .filter-bar input,
  .filter-bar select {
    width: 100%;
  }

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

  .hero-stage {
    border-radius: 26px;
  }

  .hero-slide,
  .detail-grid,
  .section-panel,
  .page-hero {
    padding: 20px;
  }

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