:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eff6ff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --cyan: #06b6d4;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 46%, #f1f5f9 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  border-radius: 50%;
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.28);
}

.brand-text strong {
  display: block;
  font-size: 22px;
  line-height: 1;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link,
.mobile-link {
  padding: 10px 16px;
  border-radius: 12px;
  color: #334155;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-link:hover,
.mobile-link.is-active {
  color: var(--primary);
  background: #dbeafe;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: transparent;
  border-radius: 12px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: #334155;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
}

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

.hero {
  position: relative;
  height: 620px;
  overflow: hidden;
  background: #020617;
}

.hero-track,
.hero-slide,
.hero-slide > img,
.hero-mask {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 900ms ease;
}

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

.hero-slide > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
}

.hero-mask {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.2)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.08) 62%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 320px;
  gap: 48px;
  align-items: end;
  height: 100%;
  padding-bottom: 84px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: #93c5fd;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-copy h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.045em;
}

.hero p,
.page-hero p,
.detail-copy p {
  max-width: 760px;
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

.hero-tags,
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-tags span,
.tag-cloud span {
  padding: 7px 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  font-size: 13px;
}

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

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

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.32);
}

.button.ghost {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px);
}

.button.ghost.light {
  color: var(--primary);
  background: #ffffff;
  border-color: var(--line);
}

.button.wide {
  width: 100%;
}

.hero-poster {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  transform: translateY(16px);
}

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

.hero-control {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  transform: translateY(-50%);
}

.hero-control.prev {
  left: 24px;
}

.hero-control.next {
  right: 24px;
}

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

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

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

.section {
  padding: 44px 0;
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.035em;
}

.section-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-more {
  flex: none;
  color: var(--primary);
  font-weight: 800;
}

.intro-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  transform: translateY(-32px);
}

.intro-strip > div,
.side-panel,
.content-card,
.filter-panel,
.player-card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.intro-strip > div {
  padding: 24px;
}

.intro-strip strong {
  display: block;
  font-size: 36px;
  line-height: 1;
}

.intro-strip p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.movie-grid {
  display: grid;
  gap: 22px;
}

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

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

.movie-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
  border-color: #bfdbfe;
  box-shadow: 0 18px 46px rgba(37, 99, 235, 0.18);
  transform: translateY(-5px);
}

.poster-link {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0f172a;
}

.poster-link img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.play-chip,
.rank-badge {
  position: absolute;
  z-index: 2;
  border-radius: 999px;
  font-weight: 900;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  padding: 7px 11px;
  color: #ffffff;
  background: rgba(37, 99, 235, 0.88);
  backdrop-filter: blur(10px);
  font-size: 13px;
}

.rank-badge {
  left: 12px;
  top: 12px;
  display: grid;
  min-width: 38px;
  height: 30px;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(135deg, #f97316, #ef4444);
  font-size: 13px;
}

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

.movie-title {
  display: -webkit-box;
  min-height: 48px;
  overflow: hidden;
  font-weight: 900;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-title:hover {
  color: var(--primary);
}

.movie-meta,
.movie-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 44px;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.65;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-stats {
  align-items: center;
  justify-content: space-between;
  color: #475569;
}

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

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

.category-tile {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
  box-shadow: 0 22px 46px rgba(37, 99, 235, 0.16);
  transform: translateY(-4px);
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 132px;
  background: #0f172a;
}

.category-covers img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-info {
  padding: 20px;
}

.category-info h3 {
  margin: 0;
  font-size: 22px;
}

.category-info p {
  min-height: 48px;
  margin: 10px 0 12px;
  color: var(--muted);
  line-height: 1.6;
}

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

.split-section,
.detail-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  align-items: start;
}

.side-panel {
  padding: 24px;
}

.side-panel h2 {
  margin: 0 0 12px;
  font-size: 24px;
}

.side-panel p {
  color: var(--muted);
  line-height: 1.8;
}

.subpage {
  padding-top: 28px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 58px;
  color: #ffffff;
  border-radius: 30px;
  background:
    radial-gradient(circle at 82% 12%, rgba(6, 182, 212, 0.34), transparent 34%),
    linear-gradient(135deg, #0f172a, #1d4ed8);
  box-shadow: var(--shadow);
}

.page-hero p {
  color: #dbeafe;
}

.category-hero {
  background:
    radial-gradient(circle at 78% 20%, rgba(255, 255, 255, 0.22), transparent 32%),
    linear-gradient(135deg, #1e3a8a, #0284c7);
}

.ranking-hero {
  background:
    radial-gradient(circle at 78% 20%, rgba(249, 115, 22, 0.28), transparent 32%),
    linear-gradient(135deg, #111827, #7c2d12);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 24px;
  padding: 18px;
}

.search-field {
  display: grid;
  gap: 7px;
  color: #334155;
  font-weight: 800;
}

.search-field input,
.filter-selects select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  outline: none;
}

.search-field input {
  padding: 0 14px;
}

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

.filter-selects select {
  padding: 0 32px 0 12px;
}

.filter-result {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.empty-state {
  padding: 36px;
  color: var(--muted);
  text-align: center;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
}

.detail-hero {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  color: #ffffff;
  background: #020617;
}

.detail-bg,
.detail-overlay {
  position: absolute;
  inset: 0;
}

.detail-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(4px);
  transform: scale(1.06);
}

.detail-overlay {
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(15, 23, 42, 0.7), rgba(2, 6, 23, 0.62)),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.12));
}

.detail-hero-inner {
  position: relative;
  z-index: 2;
  padding: 34px 0 62px;
}

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

.breadcrumb a:hover {
  color: #ffffff;
}

.detail-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 42px;
  align-items: end;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

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

.detail-copy {
  max-width: 780px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.detail-meta span {
  padding: 9px 13px;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.player-card {
  overflow: hidden;
}

.video-frame {
  position: relative;
  overflow: hidden;
  background: #020617;
  border-radius: var(--radius) var(--radius) 0 0;
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 10px;
  color: #ffffff;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22), rgba(2, 6, 23, 0.54));
  border: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-overlay span {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  padding-left: 5px;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  border-radius: 50%;
  box-shadow: 0 22px 52px rgba(37, 99, 235, 0.42);
  font-size: 30px;
}

.player-info {
  padding: 22px;
}

.player-info h2 {
  margin: 0;
  font-size: 24px;
}

.player-info p {
  margin: 8px 0 0;
  color: var(--muted);
}

.content-card {
  padding: 30px;
}

.content-card h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.content-card h2:not(:first-child) {
  margin-top: 30px;
}

.content-card p {
  margin: 0;
  color: #334155;
  font-size: 17px;
  line-height: 1.95;
}

.info-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.info-list dt {
  color: var(--muted);
  font-weight: 800;
}

.info-list dd {
  margin: 0;
}

.sticky-panel {
  position: sticky;
  top: 100px;
}

.mini-rank {
  display: grid;
  gap: 10px;
}

.mini-rank a {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.mini-rank strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-rank span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #ffffff;
  background: var(--primary);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}

.mini-rank em {
  color: #f59e0b;
  font-style: normal;
  font-weight: 900;
}

.site-footer {
  margin-top: 56px;
  color: #dbeafe;
  background: #0f172a;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  padding: 46px 0;
}

.footer-logo {
  margin-bottom: 12px;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.site-footer p {
  max-width: 520px;
  color: #cbd5e1;
  line-height: 1.8;
}

.site-footer h2 {
  margin: 0 0 14px;
  color: #93c5fd;
  font-size: 18px;
}

.site-footer ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 14px;
}

@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 28px;
  }

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

  .category-grid.large,
  .split-section,
  .detail-content-grid {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
  }
}

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

  .menu-toggle {
    display: block;
  }

  .brand-text small {
    display: none;
  }

  .hero {
    height: 660px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    align-items: end;
    padding-bottom: 76px;
  }

  .hero-poster {
    display: none;
  }

  .hero-control {
    display: none;
  }

  .intro-strip,
  .featured-grid,
  .compact-grid,
  .listing-grid,
  .rank-grid,
  .category-grid,
  .category-grid.large,
  .footer-grid,
  .detail-layout,
  .filter-panel {
    grid-template-columns: 1fr;
  }

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

  .page-hero {
    padding: 34px 24px;
    border-radius: 22px;
  }

  .detail-hero {
    min-height: auto;
  }

  .detail-layout {
    gap: 24px;
  }

  .detail-poster {
    max-width: 240px;
  }

  .content-card,
  .side-panel {
    padding: 22px;
  }

  .info-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
