:root {
  color-scheme: dark;
  --bg: #030712;
  --bg-soft: #0b1120;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.22);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --blue: #38bdf8;
  --cyan: #22d3ee;
  --purple: #818cf8;
  --pink: #f472b6;
  --green: #34d399;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 34rem),
    radial-gradient(circle at 85% 12%, rgba(129, 140, 248, 0.2), transparent 32rem),
    linear-gradient(180deg, #030712 0%, #08111f 42%, #030712 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(3, 7, 18, 0.88), rgba(3, 7, 18, 0.12));
  backdrop-filter: blur(18px);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  background: rgba(3, 7, 18, 0.94);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.28);
}

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

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.42rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}

.site-logo::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: 0 0 28px rgba(56, 189, 248, 0.42);
}

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

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--soft);
  font-size: 0.95rem;
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: #fff;
  background: rgba(56, 189, 248, 0.16);
  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.72);
  color: #fff;
  cursor: pointer;
}

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

main {
  overflow: hidden;
}

.hero {
  position: relative;
  min-height: 760px;
  padding: 128px 0 70px;
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.62fr);
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  gap: 56px;
  opacity: 0;
  transform: translateX(24px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  opacity: 0;
  filter: blur(28px) saturate(1.2);
  transform: scale(1.08);
  transition: opacity 0.7s ease;
}

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

.hero-slide.is-active::before {
  opacity: 0.28;
}

.hero-shade {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(3, 7, 18, 0.98) 0%, rgba(3, 7, 18, 0.76) 52%, rgba(3, 7, 18, 0.96) 100%),
    radial-gradient(circle at 30% 20%, rgba(56, 189, 248, 0.24), transparent 30rem);
}

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

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

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(2.7rem, 8vw, 6.2rem);
  line-height: 0.96;
  letter-spacing: -0.075em;
  color: #fff;
}

.hero-intro {
  max-width: 660px;
  margin: 24px 0 0;
  color: var(--soft);
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.9;
}

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

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

.hero-tags span,
.tag-row span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 11px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: var(--soft);
  font-size: 0.82rem;
  font-weight: 700;
}

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

.primary-button,
.ghost-button,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #031525;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.24);
}

.ghost-button,
.section-more {
  color: #fff;
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.72);
}

.primary-button:hover,
.ghost-button:hover,
.section-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(56, 189, 248, 0.22);
}

.hero-poster {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.6);
  box-shadow: var(--shadow);
  transform: perspective(1100px) rotateY(-6deg) rotateX(2deg);
}

.hero-poster::after,
.poster-wrap::after,
.detail-poster::after,
.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(3, 7, 18, 0.88) 100%);
  pointer-events: none;
}

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

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 18px;
  transform: translateX(-50%);
}

.hero-control,
.hero-dot {
  border: 0;
  color: #fff;
  cursor: pointer;
}

.hero-control {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid var(--line);
  font-size: 1.8rem;
  line-height: 1;
}

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

.hero-dot {
  width: 26px;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.38);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 46px;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
}

.search-band,
.content-section,
.page-hero,
.detail-layout .breadcrumb,
.detail-hero,
.player-section,
.story-section {
  width: min(1180px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.search-band {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 430px);
  align-items: center;
  gap: 24px;
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.22);
}

.search-band h2,
.section-heading h2,
.player-section h2,
.story-section h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: -0.045em;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(3, 7, 18, 0.56);
}

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

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
}

.content-section {
  margin-top: 72px;
}

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

.section-heading p,
.page-hero p,
.search-band p,
.site-footer p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

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

.movie-card {
  position: relative;
  min-width: 0;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.58);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.28);
}

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

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.88);
}

.poster-wrap img {
  width: 100%;
  aspect-ratio: 0.72;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.score-badge,
.rank-badge,
.detail-poster span {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 900;
}

.score-badge {
  right: 10px;
  bottom: 10px;
  min-width: 46px;
  min-height: 30px;
  color: #061826;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.rank-badge {
  left: 10px;
  top: 10px;
  min-width: 36px;
  min-height: 30px;
  color: #fff;
  background: rgba(3, 7, 18, 0.72);
  border: 1px solid var(--line);
}

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

.movie-title {
  display: -webkit-box;
  overflow: hidden;
  min-height: 3.1em;
  color: #fff;
  font-weight: 900;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-meta,
.movie-line {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

.movie-line {
  display: -webkit-box;
  overflow: hidden;
  min-height: 4.2em;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.tag-row {
  margin-top: 12px;
}

.tag-row span {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 0.74rem;
}

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

.category-card {
  position: relative;
  min-height: 220px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.64);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

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

.category-card:hover img {
  opacity: 0.46;
  transform: scale(1.06);
}

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

.category-card span {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 950;
}

.category-card p {
  margin: 10px 0 0;
  color: var(--soft);
  line-height: 1.75;
}

.inner-page {
  padding-top: 112px;
}

.page-hero {
  min-height: 270px;
  padding: 46px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(129, 140, 248, 0.08)),
    rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.small-hero h1 {
  font-size: clamp(2.4rem, 7vw, 5.2rem);
}

.compact-band {
  margin-top: 28px;
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: 34px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.detail-poster {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 28px;
  background: rgba(3, 7, 18, 0.8);
}

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

.detail-poster span {
  right: 16px;
  bottom: 16px;
  min-width: 58px;
  min-height: 38px;
  color: #031525;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.detail-copy h1 {
  font-size: clamp(2.2rem, 5vw, 4.8rem);
}

.detail-line {
  margin: 22px 0 0;
  color: var(--soft);
  font-size: 1.08rem;
  line-height: 1.9;
}

.detail-meta {
  margin-top: 20px;
}

.large-tags span {
  font-size: 0.82rem;
}

.player-section {
  margin-top: 54px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.26);
  border-radius: 30px;
  background: #000;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.player-shell video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-mask {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #fff;
  background:
    radial-gradient(circle at center, rgba(56, 189, 248, 0.26), transparent 22rem),
    linear-gradient(180deg, rgba(3, 7, 18, 0.12), rgba(3, 7, 18, 0.72));
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-mask.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  color: #031525;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 20px 54px rgba(34, 211, 238, 0.34);
  font-size: 2rem;
}

.story-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 54px;
}

.story-section article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.64);
}

.story-section p:not(.eyebrow) {
  color: var(--soft);
  line-height: 1.95;
}

.related-grid .movie-card.compact .movie-line {
  display: none;
}

.site-footer {
  margin-top: 90px;
  padding: 38px 0;
  border-top: 1px solid var(--line);
  background: rgba(3, 7, 18, 0.72);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 24px;
  align-items: center;
}

.footer-inner strong {
  font-size: 1.2rem;
}

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

.footer-links a {
  color: var(--muted);
  font-size: 0.9rem;
}

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

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

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

  .hero-slide {
    grid-template-columns: 1fr 320px;
    gap: 30px;
  }
}

@media (max-width: 820px) {
  .header-inner {
    min-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 72px;
    left: 16px;
    right: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(3, 7, 18, 0.96);
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 13px 16px;
  }

  .hero {
    min-height: auto;
    padding: 102px 0 72px;
  }

  .hero-slide {
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    width: min(100% - 32px, 560px);
    gap: 28px;
  }

  .hero-slide:not(.is-active) {
    display: none;
  }

  .hero-poster {
    width: min(78vw, 330px);
    margin: 0 auto;
    transform: none;
  }

  .search-band,
  .section-heading,
  .detail-hero,
  .story-section,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: start;
  }

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

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

@media (max-width: 560px) {
  .hero h1,
  .page-hero h1,
  .detail-copy h1 {
    letter-spacing: -0.055em;
  }

  .hero-actions,
  .hero-tags,
  .tag-row,
  .detail-meta {
    gap: 8px;
  }

  .primary-button,
  .ghost-button,
  .section-more {
    width: 100%;
  }

  .search-band,
  .page-hero,
  .detail-hero,
  .story-section article {
    padding: 20px;
    border-radius: 22px;
  }

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

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

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

  .movie-title {
    min-height: auto;
    font-size: 0.95rem;
  }

  .movie-line {
    display: none;
  }

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