:root {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-soft: #eff6ff;
  --ink: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --paper: #ffffff;
  --soft: #f8fafc;
  --shadow: 0 22px 60px rgba(15, 23, 42, 0.12);
  --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(--ink);
  background: linear-gradient(180deg, #ffffff 0%, #f6f8fc 46%, #ffffff 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.header-inner {
  max-width: 1180px;
  height: 72px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--primary), #7c3aed);
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.35);
}

.brand-name {
  font-size: 20px;
  letter-spacing: -0.02em;
}

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

.nav-link {
  padding: 10px 14px;
  border-radius: 14px;
  color: #4b5563;
  font-weight: 650;
  transition: 0.2s ease;
}

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

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--primary-soft);
  cursor: pointer;
}

.menu-button span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 4px auto;
  background: var(--primary-dark);
}

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

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

.hero-wrap {
  position: relative;
  overflow: hidden;
  min-height: 720px;
  background: radial-gradient(circle at 20% 10%, rgba(59, 130, 246, 0.28), transparent 32%), linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #4c1d95 100%);
  color: white;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.78), rgba(76, 29, 149, 0.84));
}

.hero-inner {
  position: relative;
  max-width: 1180px;
  min-height: 720px;
  margin: 0 auto;
  padding: 70px 20px 42px;
  display: grid;
  align-items: center;
}

.hero-slide {
  display: none;
  grid-template-columns: minmax(0, 1.05fr) 420px;
  gap: 50px;
  align-items: center;
}

.hero-slide.active {
  display: grid;
  animation: fadeUp 0.5s ease both;
}

.hero-kicker,
.section-kicker,
.sub-hero span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: #dbeafe;
  background: rgba(59, 130, 246, 0.22);
  border: 1px solid rgba(147, 197, 253, 0.38);
}

.hero-copy h1 {
  max-width: 760px;
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 720px;
  margin: 0 0 24px;
  color: #dbeafe;
  font-size: 18px;
  line-height: 1.8;
}

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

.hero-tags span,
.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: #1d4ed8;
  background: #dbeafe;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  font-weight: 800;
  transition: 0.2s ease;
}

.btn.primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.36);
}

.btn.ghost {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

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

.hero-art {
  position: relative;
  min-height: 560px;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(124, 58, 237, 0.4));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
}

.hero-art img {
  height: 560px;
  object-fit: cover;
}

.hero-art img.image-missing,
.poster-shell img.image-missing,
.rank-poster img.image-missing,
.detail-cover img.image-missing {
  display: none;
}

.hero-dots {
  position: absolute;
  left: 20px;
  bottom: 136px;
  display: flex;
  gap: 10px;
}

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

.hero-dot.active {
  background: white;
}

.hero-search {
  align-self: end;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
}

.hero-search form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.hero-search input,
.filter-bar input,
.filter-bar select {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  font: inherit;
  background: white;
}

.hero-search button {
  border: 0;
  border-radius: 16px;
  padding: 0 22px;
  color: white;
  font-weight: 800;
  background: var(--primary);
  cursor: pointer;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.hero-links a {
  padding: 8px 12px;
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 64px 20px;
}

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

.section-head h2,
.sub-hero h1,
.detail-info h1 {
  margin: 12px 0 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.section-kicker {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: #bfdbfe;
}

.more-link {
  color: var(--primary-dark);
  font-weight: 800;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
  transition: 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.poster-link,
.poster-shell {
  display: block;
}

.poster-shell {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
}

.poster-shell img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.movie-card:hover .poster-shell img {
  transform: scale(1.04);
}

.poster-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.72);
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.card-meta a {
  color: var(--primary-dark);
  font-weight: 800;
}

.movie-card h3 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.movie-card p {
  min-height: 68px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

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

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

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

.category-tile {
  display: grid;
  gap: 10px;
  min-height: 172px;
  padding: 22px;
  border-radius: 26px;
  color: white;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  box-shadow: 0 18px 45px rgba(59, 130, 246, 0.24);
  transition: 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-4px);
}

.category-tile span {
  font-size: 13px;
  opacity: 0.82;
}

.category-tile strong {
  font-size: 22px;
}

.category-tile em {
  color: #dbeafe;
  font-style: normal;
  line-height: 1.6;
}

.ranking-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ranking-list a {
  display: grid;
  gap: 4px;
  height: 100%;
  padding: 16px;
  border-radius: 18px;
  background: white;
  border: 1px solid var(--line);
}

.ranking-list span {
  color: var(--primary-dark);
  font-size: 20px;
  font-weight: 900;
}

.ranking-list strong {
  line-height: 1.35;
}

.ranking-list em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.sub-hero {
  min-height: 320px;
  padding: 84px 20px;
  display: grid;
  place-items: center;
  text-align: center;
  color: white;
  background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.35), transparent 30%), linear-gradient(135deg, #0f172a, #1d4ed8 58%, #6d28d9);
}

.sub-hero div {
  max-width: 820px;
}

.sub-hero p {
  margin: 18px auto 0;
  max-width: 720px;
  color: #dbeafe;
  font-size: 17px;
  line-height: 1.8;
}

.toolbar-section {
  padding-top: 38px;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 14px;
  margin-bottom: 26px;
}

.rank-grid {
  display: grid;
  gap: 16px;
}

.rank-card {
  display: grid;
  grid-template-columns: 70px 104px 1fr;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.05);
}

.rank-number {
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: var(--primary-dark);
  font-size: 28px;
  font-weight: 900;
  background: var(--primary-soft);
}

.rank-poster {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
}

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

.rank-card h2 {
  margin: 8px 0 8px;
  font-size: 22px;
}

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

.detail-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 20px 30px;
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 38px;
  align-items: center;
}

.detail-cover {
  overflow: hidden;
  border-radius: 32px;
  aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: var(--primary-dark);
  font-weight: 800;
}

.detail-line {
  max-width: 760px;
  margin: 18px 0;
  color: #374151;
  font-size: 18px;
  line-height: 1.8;
}

.detail-tags {
  margin: 18px 0 24px;
}

.player-section {
  padding-top: 24px;
  padding-bottom: 36px;
}

.player-card {
  position: relative;
  overflow: hidden;
  border-radius: 32px;
  background: #020617;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.3);
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 0;
  color: white;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.2), rgba(2, 6, 23, 0.74));
  cursor: pointer;
}

.play-layer.hidden {
  display: none;
}

.play-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 18px 40px rgba(59, 130, 246, 0.35);
}

.play-layer strong {
  font-size: 24px;
}

.play-layer em {
  color: #dbeafe;
  font-style: normal;
}

.detail-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.content-block {
  padding: 26px;
  border-radius: 26px;
  background: white;
  border: 1px solid var(--line);
}

.content-block h2 {
  margin: 0 0 12px;
}

.content-block p {
  margin: 0;
  color: #374151;
  line-height: 1.9;
}

.next-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.next-links a {
  padding: 18px;
  border-radius: 20px;
  background: white;
  border: 1px solid var(--line);
  color: var(--primary-dark);
  font-weight: 800;
}

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

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 20px;
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 28px;
}

.footer-brand {
  color: white;
  font-size: 22px;
  font-weight: 900;
}

.footer-inner p {
  max-width: 520px;
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-content: start;
}

.footer-links a {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

[data-card].hidden {
  display: none;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .menu-button {
    display: block;
  }

  .hero-slide,
  .hero-slide.active,
  .detail-hero,
  .detail-text,
  .next-links,
  .footer-inner {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 360px;
  }

  .hero-art img {
    height: 360px;
  }

  .hero-dots {
    bottom: 160px;
  }

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

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

@media (max-width: 620px) {
  .header-inner {
    height: 66px;
  }

  .brand-name {
    font-size: 18px;
  }

  .hero-wrap,
  .hero-inner {
    min-height: auto;
  }

  .hero-inner {
    padding-top: 42px;
  }

  .hero-search form,
  .filter-bar,
  .rank-card {
    grid-template-columns: 1fr;
  }

  .hero-dots {
    position: static;
    margin: 16px 0;
  }

  .movie-grid,
  .category-grid,
  .category-grid.wide,
  .ranking-list {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 42px 16px;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .rank-number {
    min-height: 62px;
  }
}
