:root {
  color-scheme: light;
  --bg-deep: #0f172a;
  --bg-mid: #1e293b;
  --bg-soft: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --line: rgba(148, 163, 184, 0.28);
  --brand: #06b6d4;
  --brand-2: #8b5cf6;
  --hot: #f97316;
  --card: #ffffff;
  --shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text-main);
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 48%, #f8fafc 100%);
  line-height: 1.65;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(90deg, #0f172a, #1e293b, #0f172a);
  border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
}

.site-nav {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 76px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 35px rgba(6, 182, 212, 0.26);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e2e8f0;
}

.nav-link,
.mobile-link {
  border-radius: 999px;
  padding: 10px 14px;
  color: #e2e8f0;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.11);
  transform: translateY(-1px);
}

.nav-link.compact {
  display: none;
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

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

.mobile-nav {
  display: none;
}

.hero {
  color: #ffffff;
  background: #0f172a;
}

.hero-stage {
  position: relative;
  min-height: 680px;
  overflow: hidden;
}

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

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

.hero-bg {
  position: absolute;
  inset: 0;
  filter: saturate(1.1);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 75% 24%, rgba(6, 182, 212, 0.24), transparent 30%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.78) 45%, rgba(15, 23, 42, 0.36) 100%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.18), rgba(15, 23, 42, 0.92));
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  min-height: 680px;
  padding: 110px 7vw 130px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 6px 12px;
  color: #cffafe;
  background: rgba(6, 182, 212, 0.16);
  border: 1px solid rgba(103, 232, 249, 0.26);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.hero h1,
.page-hero h1,
.detail-intro h1 {
  margin: 18px 0 8px;
  font-size: clamp(2.3rem, 7vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
}

.hero h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 3.1rem);
  line-height: 1.15;
}

.hero-text,
.hero-meta,
.page-hero p,
.detail-line {
  max-width: 680px;
  color: #dbeafe;
  font-size: 1.08rem;
}

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

.hero-tags span,
.tag-row span,
.detail-tags span {
  border-radius: 999px;
  padding: 5px 10px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.82rem;
}

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

.btn,
.section-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary,
.section-more {
  color: #ffffff;
  background: linear-gradient(135deg, var(--hot), #ef4444);
  box-shadow: 0 16px 36px rgba(239, 68, 68, 0.24);
}

.btn.ghost {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
}

.btn.small {
  min-height: 38px;
  padding: 0 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.btn:hover,
.section-more:hover {
  transform: translateY(-2px);
}

.hero-controls {
  position: absolute;
  z-index: 4;
  left: 7vw;
  bottom: 42px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-arrow,
.hero-dot {
  border: 0;
  cursor: pointer;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
  font-size: 1.8rem;
  line-height: 1;
}

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

.hero-dot {
  width: 28px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.hero-dot.is-active {
  background: #67e8f9;
}

.hero-rail {
  max-width: 1280px;
  margin: -92px auto 0;
  padding: 0 24px 32px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

.hero-thumb {
  min-height: 130px;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background: #111827;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.34);
}

.hero-thumb span {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  color: #ffffff;
  font-weight: 900;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

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

.content-section,
.filter-panel,
.detail-content,
.category-overview-card {
  margin-top: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.content-section,
.detail-content {
  padding: 26px;
}

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

.section-heading h2,
.filter-panel h2,
.detail-content h2 {
  margin: 8px 0;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  line-height: 1.18;
}

.section-heading p,
.filter-panel p,
.detail-content p,
.category-overview-card p {
  color: var(--text-muted);
  margin: 0;
}

.filter-panel {
  padding: 22px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 20px;
  align-items: center;
}

.filter-controls {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 12px;
}

.filter-controls input,
.filter-controls select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 14px;
  background: #ffffff;
  color: var(--text-main);
  outline: none;
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: rgba(6, 182, 212, 0.9);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

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

.movie-card {
  border-radius: 22px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.18);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  transition: transform 0.28s ease;
}

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

.rank-badge {
  position: absolute;
  z-index: 2;
  left: 10px;
  top: 10px;
  min-width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--hot), #ef4444);
  font-weight: 900;
}

.card-body {
  padding: 14px;
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.card-topline strong {
  color: #ea580c;
  font-size: 1rem;
}

.movie-card h3 {
  margin: 8px 0 4px;
  font-size: 1.05rem;
  line-height: 1.3;
}

.movie-meta,
.movie-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.movie-desc {
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

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

.tag-row span {
  color: #0f766e;
  background: #ccfbf1;
  border: 0;
}

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

.category-card {
  min-height: 220px;
  border-radius: 22px;
  overflow: hidden;
  position: relative;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: #ffffff;
  isolation: isolate;
}

.category-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.9));
  z-index: -1;
}

.category-card img {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.category-card span {
  font-weight: 900;
  font-size: 1.35rem;
}

.category-card strong {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 58px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

.rank-num {
  color: #ea580c;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  height: 76px;
  border-radius: 12px;
}

.rank-title {
  font-weight: 850;
}

.rank-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.page-hero,
.detail-hero {
  min-height: 360px;
  padding: 84px max(24px, 7vw);
  color: #ffffff;
  background:
    radial-gradient(circle at 72% 20%, rgba(139, 92, 246, 0.28), transparent 32%),
    linear-gradient(135deg, #0f172a, #1e293b 58%, #164e63);
}

.page-hero.small-hero {
  min-height: 300px;
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(230px, 320px) 1fr;
  gap: 34px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.38);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #cbd5e1;
  margin-bottom: 18px;
}

.detail-tags span {
  color: #ffffff;
}

.detail-shell {
  margin-top: -46px;
}

.player-section {
  margin-top: 0;
}

.player-card {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  overflow: hidden;
  background: #020617;
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.35);
}

.movie-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: #020617;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  align-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
  cursor: pointer;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.play-overlay span {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 20px 46px rgba(6, 182, 212, 0.32);
  font-size: 2rem;
  padding-left: 4px;
}

.play-overlay strong {
  font-size: 1.1rem;
}

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

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.detail-content article {
  padding: 20px;
  border-radius: 22px;
  background: #ffffff;
  border: 1px solid var(--line);
}

.category-overview-list {
  display: grid;
  gap: 24px;
}

.category-overview-card {
  padding: 24px;
  display: grid;
  grid-template-columns: 0.95fr 1.2fr;
  gap: 22px;
  align-items: center;
}

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

.category-mini-grid a {
  position: relative;
  min-height: 164px;
  border-radius: 18px;
  overflow: hidden;
  color: #ffffff;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  font-weight: 850;
}

.category-mini-grid a::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.78));
}

.category-mini-grid img {
  position: absolute;
  inset: 0;
}

.category-mini-grid span {
  position: relative;
  z-index: 2;
}

.ranking-grid .card-wide {
  display: grid;
  grid-template-columns: 140px 1fr;
}

.ranking-grid .card-wide .poster-link {
  aspect-ratio: 3 / 4;
}

.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 40px 24px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

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

.footer-links a {
  color: #e2e8f0;
}

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

@media (min-width: 1120px) {
  .nav-link.compact {
    display: inline-flex;
  }
}

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

  .hero-rail {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 0;
    background: #0f172a;
  }

  .filter-panel,
  .detail-hero,
  .category-overview-card {
    grid-template-columns: 1fr;
  }

  .rank-list {
    grid-template-columns: 1fr;
  }
}

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

  .menu-button {
    display: block;
  }

  .mobile-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(100% + 10px);
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 14px;
    border-radius: 20px;
    background: #0f172a;
    box-shadow: 0 22px 60px rgba(2, 6, 23, 0.38);
  }

  .mobile-nav.is-open {
    display: grid;
  }

  .hero-stage,
  .hero-content {
    min-height: 620px;
  }

  .hero-content {
    padding: 86px 24px 120px;
  }

  .hero-controls {
    left: 24px;
  }

  .filter-controls,
  .detail-content,
  .category-mini-grid,
  .ranking-grid .card-wide {
    grid-template-columns: 1fr;
  }

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

  .section-heading,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

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

@media (max-width: 560px) {
  .site-nav {
    min-height: 68px;
    padding: 0 16px;
  }

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

  .hero h1,
  .page-hero h1,
  .detail-intro h1 {
    font-size: 2.4rem;
  }

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

  .content-section,
  .filter-panel,
  .detail-content {
    padding: 18px;
  }

  .rank-row {
    grid-template-columns: 34px 52px 1fr;
  }

  .rank-meta {
    grid-column: 3;
  }

  .page-hero,
  .detail-hero {
    padding: 62px 20px;
  }
}
