:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #0284c7;
  --primary-dark: #075985;
  --primary-soft: #e0f2fe;
  --accent: #38bdf8;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.22), transparent 34rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 42%, #ffffff 100%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.7;
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid rgba(226, 232, 240, 0.78);
  backdrop-filter: blur(16px);
}

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

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 12px 28px rgba(2, 132, 199, 0.32);
}

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

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

.nav-link,
.mobile-link {
  color: #334155;
  font-weight: 700;
  border-radius: 999px;
  transition: 0.2s ease;
}

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.menu-button {
  display: none;
  border: 0;
  color: #ffffff;
  background: var(--primary);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

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

.hero-section {
  padding: 38px 0 24px;
}

.hero-shell {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  border-radius: 34px;
  background: #082f49;
  box-shadow: var(--shadow);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
  gap: 28px;
  align-items: center;
  padding: clamp(28px, 5vw, 64px);
  color: #ffffff;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 22% 24%, rgba(14, 165, 233, 0.5), transparent 26rem),
    linear-gradient(120deg, rgba(8, 47, 73, 0.96), rgba(12, 74, 110, 0.82) 50%, rgba(2, 132, 199, 0.5));
  z-index: 1;
}

.hero-content,
.hero-media {
  position: relative;
  z-index: 2;
}

.kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #0369a1;
  background: #e0f2fe;
}

.hero-content .kicker {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-content h1,
.hero-content h2 {
  margin: 18px 0 14px;
  font-size: clamp(2.2rem, 6vw, 4.9rem);
  line-height: 0.96;
  letter-spacing: -0.07em;
}

.hero-content p {
  max-width: 680px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.08rem;
}

.hero-meta,
.info-list,
.detail-meta,
.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-meta span,
.info-list span,
.detail-meta span,
.card-meta span {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 0.82rem;
  font-weight: 800;
}

.hero-meta span {
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.14);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.btn-primary,
.btn-secondary,
.btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 0 20px;
  font-weight: 900;
  transition: 0.2s ease;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 14px 30px rgba(2, 132, 199, 0.26);
}

.btn-secondary {
  color: var(--primary-dark);
  background: var(--primary-soft);
}

.btn-light {
  color: #075985;
  background: #ffffff;
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-light:hover,
.movie-card:hover,
.rank-card:hover,
.category-tile:hover {
  transform: translateY(-3px);
}

.hero-media {
  align-self: stretch;
  min-height: 410px;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

.hero-float {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 3;
  padding: 14px 18px;
  border-radius: 20px;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(16px);
}

.hero-controls {
  position: absolute;
  z-index: 5;
  left: clamp(28px, 5vw, 64px);
  bottom: 32px;
  display: flex;
  gap: 10px;
}

.hero-dot {
  width: 34px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.active {
  width: 54px;
  background: #ffffff;
}

.page-hero {
  padding: 54px 0 28px;
}

.page-hero-card {
  padding: clamp(26px, 5vw, 54px);
  border-radius: 32px;
  background:
    radial-gradient(circle at 88% 20%, rgba(56, 189, 248, 0.25), transparent 22rem),
    linear-gradient(135deg, #ffffff, #eff6ff);
  border: 1px solid rgba(226, 232, 240, 0.84);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.09);
}

.page-hero h1,
.section-title h2,
.detail-title {
  margin: 12px 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.page-hero p,
.section-title p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.02rem;
}

.section {
  padding: 34px 0;
}

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

.grid,
.movie-grid,
.category-grid,
.rank-grid {
  display: grid;
  gap: 18px;
}

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

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

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

.movie-card,
.category-tile,
.panel,
.player-card,
.detail-card,
.rank-row {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.07);
}

.movie-card {
  overflow: hidden;
  transition: 0.22s ease;
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #e0f2fe, #f8fafc);
}

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

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

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 2;
  padding: 5px 10px;
  color: #ffffff;
  font-weight: 900;
  border-radius: 999px;
  background: rgba(2, 132, 199, 0.88);
  box-shadow: 0 10px 20px rgba(2, 132, 199, 0.2);
}

.card-body {
  padding: 16px;
}

.card-meta span,
.detail-meta span,
.info-list span {
  color: #075985;
  background: var(--primary-soft);
}

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

.card-body h3 a:hover,
.text-link:hover,
.footer-links a:hover {
  color: var(--primary);
}

.card-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.tag-row span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #475569;
  background: #f1f5f9;
  font-size: 0.78rem;
  font-weight: 700;
}

.category-tile {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  transition: 0.22s ease;
}

.category-tile strong {
  font-size: 1.25rem;
}

.category-tile p {
  color: var(--muted);
  margin: 10px 0 18px;
}

.category-tile span {
  color: var(--primary-dark);
  font-weight: 900;
}

.shelf {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}

.rank-card {
  scroll-snap-align: start;
  min-height: 270px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  color: #ffffff;
  background: #0f172a;
  transition: 0.22s ease;
}

.rank-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: 0.3s ease;
}

.rank-card:hover img {
  transform: scale(1.06);
}

.rank-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 28%, rgba(15, 23, 42, 0.95));
}

.rank-title,
.rank-meta {
  position: relative;
  z-index: 2;
  padding: 0 18px;
}

.rank-title {
  font-size: 1.1rem;
  font-weight: 900;
}

.rank-meta {
  padding-bottom: 18px;
  color: #bae6fd;
  font-size: 0.9rem;
  font-weight: 800;
}

.rank-row {
  display: grid;
  grid-template-columns: 72px minmax(90px, 120px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
}

.rank-num {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-weight: 900;
}

.rank-row img {
  width: 86px;
  height: 116px;
  object-fit: cover;
  border-radius: 16px;
}

.rank-row h3 {
  margin: 0 0 6px;
}

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

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 180px;
  gap: 12px;
  margin: 20px 0 26px;
}

.search-panel input,
.search-panel select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  color: var(--text);
  background: #ffffff;
  font: inherit;
  outline: none;
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.14);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) 360px;
  gap: 24px;
  padding: 42px 0 34px;
}

.detail-card,
.player-card,
.panel {
  padding: clamp(18px, 3vw, 28px);
}

.detail-title {
  margin-top: 16px;
}

.detail-lead {
  color: var(--muted);
  font-size: 1.08rem;
}

.detail-content h2,
.panel h2 {
  margin: 26px 0 10px;
  font-size: 1.45rem;
}

.detail-content p {
  margin: 0 0 18px;
  color: #334155;
}

.player-card {
  margin-bottom: 24px;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  background: #020617;
  aspect-ratio: 16 / 9;
}

.video-frame video {
  width: 100%;
  height: 100%;
  display: block;
  background: #020617;
}

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.64));
  cursor: pointer;
}

.player-overlay span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 142px;
  height: 54px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  font-size: 1.05rem;
  font-weight: 900;
  box-shadow: 0 18px 36px rgba(2, 132, 199, 0.35);
}

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

.sidebar-poster {
  overflow: hidden;
  border-radius: 28px;
  margin-bottom: 18px;
  background: #e0f2fe;
}

.sidebar-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

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

.related-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

.related-item img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
}

.related-item strong {
  display: block;
  line-height: 1.28;
}

.related-item span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
  margin-top: 3px;
}

.site-footer {
  margin-top: 34px;
  padding: 34px 0 28px;
  border-top: 1px solid var(--line);
  background: #ffffff;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 24px;
}

.footer-inner p,
.copyright {
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-weight: 800;
}

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

.empty-state {
  display: none;
  padding: 26px;
  border-radius: var(--radius);
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
}

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

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

  .hero-shell {
    min-height: 760px;
  }

  .hero-media {
    min-height: 340px;
  }
}

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

  .menu-button {
    display: inline-flex;
  }

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

  .hero-section {
    padding-top: 20px;
  }

  .hero-shell {
    min-height: 780px;
    border-radius: 24px;
  }

  .hero-slide {
    padding: 24px;
  }

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

  .hero-media {
    min-height: 300px;
  }

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

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

  .search-panel {
    grid-template-columns: 1fr;
  }

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

  .rank-row .btn-secondary {
    grid-column: 1 / -1;
  }

  .rank-row img {
    width: 72px;
    height: 96px;
  }
}

@media (max-width: 480px) {
  .movie-grid,
  .category-grid,
  .rank-grid {
    grid-template-columns: 1fr;
  }

  .header-inner,
  .footer-inner,
  .section,
  .hero-section,
  .page-hero,
  .detail-layout {
    width: min(100% - 20px, 1180px);
  }

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