:root {
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --line: rgba(59, 130, 246, 0.18);
  --line-strong: rgba(56, 189, 248, 0.38);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --blue: #3b82f6;
  --cyan: #22d3ee;
  --blue-deep: #1d4ed8;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(59, 130, 246, 0.22), transparent 34rem),
    radial-gradient(circle at 85% 18%, rgba(34, 211, 238, 0.12), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.98), rgba(15, 23, 42, 0.9));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(2, 6, 23, 0.45);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 32px));
  height: 76px;
  margin: 0 auto;
}

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #dbeafe;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 12px;
  box-shadow: 0 0 28px rgba(59, 130, 246, 0.45);
}

.brand-name,
.footer-brand {
  font-size: 1.35rem;
  background: linear-gradient(90deg, #60a5fa, #67e8f9, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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

.nav-link,
.mobile-link {
  display: inline-flex;
  align-items: center;
  border-radius: 12px;
  color: var(--muted-strong);
  transition: 0.25s ease;
}

.nav-link {
  padding: 10px 14px;
  font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: #e0f2fe;
  background: rgba(59, 130, 246, 0.16);
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.2);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.mobile-nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 10px;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid var(--line);
  border-radius: 16px;
}

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

.hero {
  position: relative;
  min-height: 78vh;
  overflow: hidden;
  background: #020617;
}

.hero-stage {
  position: relative;
  height: 78vh;
  min-height: 620px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease;
  pointer-events: none;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.04);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.58) 48%, rgba(2, 6, 23, 0.18)),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.72) 22%, transparent 58%);
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: min(1180px, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 0 0 92px;
}

.eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.eyebrow-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.22);
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 999px;
  font-size: 0.86rem;
  backdrop-filter: blur(10px);
}

.hero h1 {
  max-width: 820px;
  margin: 0 0 20px;
  font-size: clamp(2.7rem, 6vw, 6rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
  text-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
}

.hero p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #d1d5db;
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.8;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
}

.hero-meta,
.movie-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted-strong);
}

.hero-meta {
  margin-bottom: 28px;
}

.hero-meta span,
.movie-meta span {
  display: inline-flex;
  padding: 6px 10px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  font-size: 0.86rem;
}

.hero-actions,
.page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.38);
}

.ghost-btn {
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--line-strong);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px rgba(37, 99, 235, 0.32);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: #fff;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(12px);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  right: 0;
  bottom: 36px;
  left: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  background: rgba(255, 255, 255, 0.42);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.25s ease;
}

.hero-dot.is-active {
  width: 34px;
  background: var(--blue);
}

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

.home-shell {
  padding: 54px 0 72px;
}

.top-page {
  padding-top: 112px;
  padding-bottom: 72px;
}

.search-strip,
.page-hero,
.filter-bar,
.side-card,
.movie-detail-copy,
.video-box {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.66));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.search-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 60px;
  padding: 28px;
}

.search-strip h2,
.page-hero h1,
.section-head h2,
.movie-detail-copy h1,
.movie-detail-copy h2,
.side-card h2,
.site-footer h2 {
  margin: 0;
}

.search-strip p,
.page-hero p,
.section-head p,
.movie-card p,
.movie-detail-copy p,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

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

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

.section-kicker {
  display: inline-block;
  width: 5px;
  height: 32px;
  margin-right: 12px;
  vertical-align: middle;
  background: linear-gradient(180deg, var(--blue), var(--cyan));
  border-radius: 999px;
}

.section-head h2 {
  display: inline-block;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.section-head p {
  margin: 10px 0 0 18px;
}

.section-more {
  color: #93c5fd;
  font-weight: 700;
}

.rail-scroll {
  margin-right: -16px;
  margin-left: -16px;
  padding: 0 16px 18px;
  overflow-x: auto;
}

.rail-track {
  display: flex;
  gap: 18px;
  min-width: max-content;
}

.rail-item {
  width: 258px;
}

.movie-grid,
.category-grid,
.ranking-card-grid {
  display: grid;
  gap: 20px;
}

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

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

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

.movie-card,
.category-card,
.ranking-row {
  position: relative;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.74);
  border: 1px solid rgba(59, 130, 246, 0.13);
  border-radius: 18px;
  transition: 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.ranking-row:hover {
  transform: translateY(-5px);
  border-color: rgba(96, 165, 250, 0.42);
  box-shadow: 0 18px 46px rgba(2, 6, 23, 0.52);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.18;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(15, 23, 42, 0.9));
}

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

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

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

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 12px;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.35);
}

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

.movie-title {
  display: block;
  min-height: 44px;
  color: #fff;
  font-weight: 800;
  line-height: 1.35;
}

.movie-card p {
  display: -webkit-box;
  min-height: 48px;
  margin: 8px 0 12px;
  overflow: hidden;
  font-size: 0.9rem;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-meta {
  gap: 6px;
  margin-bottom: 12px;
}

.movie-meta span {
  padding: 4px 8px;
  font-size: 0.75rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-row span {
  padding: 4px 8px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 999px;
  font-size: 0.75rem;
}

.category-card {
  min-height: 156px;
  padding: 22px;
}

.category-card span {
  display: block;
  margin-bottom: 12px;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 900;
}

.category-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.feature-card {
  padding: 0;
}

.feature-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.feature-card span,
.feature-card p {
  margin-right: 18px;
  margin-left: 18px;
}

.feature-card span {
  margin-top: 18px;
}

.feature-card p {
  margin-bottom: 20px;
}

.ranking-section {
  display: grid;
  gap: 22px;
}

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

.ranking-row {
  display: grid;
  grid-template-columns: 56px 64px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
}

.ranking-row span {
  color: #60a5fa;
  font-size: 1.25rem;
  font-weight: 900;
}

.ranking-row img {
  width: 64px;
  height: 84px;
  object-fit: cover;
  border-radius: 12px;
}

.ranking-row strong {
  color: #fff;
}

.ranking-row em {
  color: var(--muted);
  font-style: normal;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: #93c5fd;
}

.breadcrumb span::before,
.breadcrumb a + a::before,
.breadcrumb a + span::before {
  content: "/";
  margin-right: 8px;
  color: #475569;
}

.page-hero {
  padding: 34px;
}

.page-hero > span {
  display: inline-flex;
  margin-bottom: 14px;
  padding: 6px 12px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.16);
  border-radius: 999px;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 24px;
  font-size: 1.05rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
  padding: 18px;
}

.local-filter-input,
.global-search-input {
  width: min(520px, 100%);
  min-height: 46px;
  padding: 0 16px;
  color: #fff;
  background: rgba(2, 6, 23, 0.66);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  outline: 0;
}

.local-filter-input:focus,
.global-search-input:focus {
  border-color: rgba(96, 165, 250, 0.66);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-chips button {
  min-height: 42px;
  padding: 0 14px;
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.filter-chips button.is-active {
  color: #fff;
  background: rgba(59, 130, 246, 0.26);
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
}

.video-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000;
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.18), rgba(2, 6, 23, 0.48));
  border: 0;
  cursor: pointer;
  transition: opacity 0.25s ease;
}

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

.play-button {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  padding-left: 6px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  border-radius: 999px;
  font-size: 2.2rem;
  box-shadow: 0 18px 46px rgba(59, 130, 246, 0.52);
}

.movie-detail-copy {
  margin-top: 22px;
  padding: 30px;
}

.detail-eyebrow {
  margin-bottom: 18px;
}

.movie-detail-copy h1 {
  font-size: clamp(2rem, 4vw, 3.8rem);
  letter-spacing: -0.05em;
}

.lead-text {
  color: #dbeafe !important;
  font-size: 1.13rem;
}

.movie-detail-copy h2 {
  margin-top: 30px;
  font-size: 1.35rem;
}

.detail-side {
  position: sticky;
  top: 100px;
  align-self: start;
}

.detail-side > img {
  width: 100%;
  aspect-ratio: 3 / 4.2;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.side-card {
  margin-top: 18px;
  padding: 22px;
}

.side-card dl {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 10px 12px;
  margin: 18px 0;
}

.side-card dt {
  color: var(--muted);
}

.side-card dd {
  margin: 0;
  color: #fff;
}

.full-link {
  width: 100%;
  margin-top: 20px;
}

.search-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: start center;
  padding: 108px 16px 24px;
  background: rgba(2, 6, 23, 0.78);
  backdrop-filter: blur(10px);
}

.search-panel[hidden] {
  display: none;
}

.search-panel-card {
  position: relative;
  width: min(720px, 100%);
  padding: 24px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.search-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.search-label {
  display: block;
  margin-bottom: 10px;
  color: #dbeafe;
  font-weight: 800;
}

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

.search-results {
  display: grid;
  max-height: 55vh;
  margin-top: 18px;
  overflow: auto;
  gap: 10px;
}

.search-result-item {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 12px;
  padding: 10px;
  background: rgba(2, 6, 23, 0.46);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
}

.search-result-item img {
  width: 54px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
}

.search-result-item strong {
  display: block;
  margin-bottom: 4px;
}

.search-result-item span,
.search-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer {
  margin-top: 70px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.5), #020617);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.site-footer p {
  max-width: 520px;
}

.site-footer h2 {
  margin-bottom: 16px;
  color: #fff;
  font-size: 1rem;
}

.site-footer a:not(.footer-brand) {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
}

.site-footer a:hover {
  color: #93c5fd;
}

.footer-bottom {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 34px;
  color: var(--muted);
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

[hidden],
.is-card-hidden {
  display: none !important;
}

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

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

  .player-layout {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
  }

  .side-card {
    margin-top: 0;
  }
}

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

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .nav-wrap {
    height: 68px;
  }

  .hero,
  .hero-stage {
    min-height: 660px;
    height: 82vh;
  }

  .hero-content {
    padding-bottom: 86px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .ranking-row {
    grid-template-columns: 42px 52px 1fr;
  }

  .ranking-row em {
    grid-column: 3;
  }

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

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

@media (max-width: 520px) {
  .page-shell,
  .nav-wrap,
  .mobile-nav,
  .footer-grid,
  .footer-bottom {
    width: min(100% - 22px, 1180px);
  }

  .brand-name {
    font-size: 1.08rem;
  }

  .hero h1 {
    font-size: 2.55rem;
  }

  .hero-content {
    width: min(100% - 22px, 1180px);
  }

  .page-hero,
  .movie-detail-copy,
  .search-strip {
    padding: 22px;
  }

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