:root {
  color-scheme: dark;
  --page-bg: #020617;
  --panel-bg: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --muted: #94a3b8;
  --text: #f8fafc;
  --cyan: #22d3ee;
  --blue: #2563eb;
  --purple: #a855f7;
  --amber: #f59e0b;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.20), transparent 32rem),
    radial-gradient(circle at 88% 12%, rgba(168, 85, 247, 0.18), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

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

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

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

.header-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.logo-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--cyan), var(--blue), var(--purple));
  box-shadow: 0 14px 35px rgba(34, 211, 238, 0.22);
  font-size: 16px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  font-size: 14px;
  transition: color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  cursor: pointer;
}

.menu-button span {
  width: 18px;
  height: 2px;
  margin: 4px auto;
  display: block;
  background: #ffffff;
  border-radius: 999px;
}

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

.hero {
  position: relative;
  min-height: 72vh;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

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

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

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.94) 0%, transparent 46%);
}

.hero-inner {
  position: relative;
  z-index: 2;
  min-height: 72vh;
  display: flex;
  align-items: center;
  padding: 76px 0 86px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(34, 211, 238, 0.26);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: #a5f3fc;
  font-size: 14px;
}

.hero h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.06em;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, #a5f3fc 44%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  max-width: 660px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.8;
}

.hero-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

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

.button-primary,
.play-button {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.28);
}

.button-secondary {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.button-primary:hover,
.button-secondary:hover,
.play-button:hover {
  transform: translateY(-2px);
}

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

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

.hero-tags span,
.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  color: #e2e8f0;
  font-size: 13px;
}

.hero-switch {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

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

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

.page-shell {
  padding: 46px 0 72px;
}

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

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

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-heading p,
.category-card p,
.movie-card p,
.detail-intro,
.detail-text p,
.site-footer p {
  color: var(--muted);
  line-height: 1.75;
}

.section-heading p {
  margin: 10px 0 0;
  max-width: 780px;
}

.section-more {
  flex-shrink: 0;
  color: #67e8f9;
  font-weight: 800;
}

.search-panel {
  display: grid;
  gap: 18px;
  margin: 26px 0 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel-bg);
  box-shadow: var(--shadow);
}

.search-panel label {
  display: grid;
  gap: 10px;
  color: #cbd5e1;
  font-weight: 700;
}

.search-panel input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.66);
  color: #ffffff;
  outline: none;
}

.search-panel input:focus {
  border-color: rgba(34, 211, 238, 0.70);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

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

.filter-chip {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  cursor: pointer;
}

.filter-chip.is-active {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.16);
  color: #a5f3fc;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.70);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.44);
  background: rgba(15, 23, 42, 0.94);
}

.poster-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.20), rgba(168, 85, 247, 0.18)),
    #0f172a;
}

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

.movie-card:hover .poster-frame img {
  transform: scale(1.05);
}

.poster-year {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.76);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

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

.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #a5f3fc;
  font-size: 13px;
}

.movie-meta a {
  color: #67e8f9;
}

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

.movie-card p {
  min-height: 72px;
  margin: 0 0 14px;
  font-size: 14px;
}

.movie-card.is-compact p {
  min-height: 48px;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.18), transparent 50%),
    rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.category-card h3 {
  margin: 0 0 10px;
  font-size: 24px;
}

.category-card p {
  margin: 0 0 20px;
}

.category-card a {
  color: #a5f3fc;
  font-weight: 800;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.68);
}

.rank-number {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.24), rgba(168, 85, 247, 0.24));
  color: #ffffff;
  font-weight: 900;
}

.rank-item h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.rank-item p {
  margin: 0;
  color: var(--muted);
}

.detail-hero {
  padding: 46px 0 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
  gap: 28px;
  align-items: start;
}

.player-card,
.detail-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.player-card {
  overflow: hidden;
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000000;
  cursor: pointer;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    linear-gradient(0deg, rgba(2, 6, 23, 0.72), rgba(2, 6, 23, 0.18)),
    transparent;
  pointer-events: auto;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-button {
  font-size: 18px;
}

.detail-info {
  padding: 26px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #93c5fd;
  font-size: 14px;
}

.detail-info h1 {
  margin: 0 0 16px;
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-intro {
  margin: 18px 0 0;
  font-size: 17px;
}

.detail-panel {
  padding: 24px;
}

.detail-panel h2,
.detail-text h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.detail-poster {
  overflow: hidden;
  margin-bottom: 20px;
  border-radius: 20px;
  aspect-ratio: 2 / 3;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.20), rgba(168, 85, 247, 0.18)),
    #0f172a;
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-text {
  margin-top: 34px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(15, 23, 42, 0.72);
}

.detail-text p {
  margin: 0 0 18px;
}

.no-result {
  display: none;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.68);
}

.no-result.is-visible {
  display: block;
}

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 34px 0;
}

.site-footer p {
  margin: 8px 0 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-content: start;
}

.site-footer a {
  color: #cbd5e1;
}

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

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

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

  .menu-button {
    display: block;
    margin-left: auto;
  }

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

  .hero-inner {
    min-height: 66vh;
    padding: 64px 0 88px;
  }

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

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

@media (max-width: 640px) {
  .header-shell,
  .footer-inner,
  .page-shell,
  .hero-inner {
    width: min(100% - 22px, 1200px);
  }

  .site-logo {
    font-size: 18px;
  }

  .logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero-lead {
    font-size: 16px;
  }

  .hero-actions,
  .detail-actions {
    gap: 10px;
  }

  .button-primary,
  .button-secondary,
  .play-button {
    width: 100%;
  }

  .section-heading {
    display: block;
  }

  .section-more {
    display: inline-flex;
    margin-top: 12px;
  }

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

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

  .movie-card p {
    min-height: 64px;
    font-size: 13px;
  }

  .rank-item {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .rank-item .button-secondary {
    grid-column: 1 / -1;
  }

  .footer-inner {
    display: block;
  }

  .site-footer nav {
    margin-top: 18px;
  }
}
