:root {
  --blue-950: #172554;
  --blue-900: #1e3a8a;
  --blue-800: #1e40af;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --indigo-700: #4338ca;
  --purple-700: #7e22ce;
  --pink-500: #ec4899;
  --amber-500: #f59e0b;
  --orange-600: #ea580c;
  --emerald-500: #10b981;
  --cyan-500: #06b6d4;
  --stone-950: #0c0a09;
  --stone-900: #1c1917;
  --stone-800: #292524;
  --stone-700: #44403c;
  --stone-600: #57534e;
  --stone-500: #78716c;
  --stone-200: #e7e5e4;
  --stone-100: #f5f5f4;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.13);
  --shadow-soft: 0 10px 28px rgba(30, 64, 175, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--stone-800);
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 44%, #faf5ff 100%);
}

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

img {
  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: 50;
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.96), rgba(238, 242, 255, 0.96), rgba(250, 245, 255, 0.96));
  border-bottom: 1px solid rgba(37, 99, 235, 0.18);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
  backdrop-filter: blur(14px);
}

.nav-shell {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-icon,
.footer-brand span {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--purple-700));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.brand-text strong {
  display: block;
  font-size: 22px;
  line-height: 1;
  color: transparent;
  background: linear-gradient(90deg, var(--blue-800), var(--purple-700));
  -webkit-background-clip: text;
  background-clip: text;
}

.brand-text em {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-style: normal;
  color: var(--blue-700);
}

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

.nav-link {
  padding: 10px 15px;
  border-radius: 12px;
  color: var(--blue-900);
  font-weight: 700;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  background: rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, var(--blue-600), var(--indigo-700));
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.26);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--purple-700));
  cursor: pointer;
}

.mobile-panel {
  display: none;
  border-top: 1px solid rgba(37, 99, 235, 0.14);
}

.mobile-links {
  display: grid;
  gap: 8px;
  padding-block: 12px;
}

.category-strip {
  background: rgba(255, 255, 255, 0.72);
  border-top: 1px solid rgba(37, 99, 235, 0.08);
}

.category-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 0;
}

.category-scroll a {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--blue-700);
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s ease, color 0.2s ease;
}

.category-scroll a:hover {
  color: var(--blue-950);
  background: rgba(37, 99, 235, 0.09);
}

.hero-wrap {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: radial-gradient(circle at top left, rgba(59, 130, 246, 0.4), transparent 36%), linear-gradient(135deg, #172554 0%, #3730a3 48%, #581c87 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0.18;
  background-image: radial-gradient(circle at 18px 18px, #ffffff 2px, transparent 2px);
  background-size: 54px 54px;
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  display: flex;
  align-items: center;
  padding: 56px 0 86px;
}

.hero-slide {
  position: absolute;
  inset: 56px 0 86px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 42px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hero-slide.active {
  position: relative;
  inset: auto;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

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

.hero-kicker,
.section-heading span,
.page-hero span {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(147, 197, 253, 0.28);
  font-size: 14px;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  color: transparent;
  background: linear-gradient(90deg, #dbeafe, #faf5ff, #fbcfe8);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-copy p {
  margin: 0 0 24px;
  max-width: 620px;
  color: rgba(219, 234, 254, 0.86);
  font-size: 19px;
  line-height: 1.78;
}

.hero-tags,
.movie-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tags span,
.detail-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 700;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border-radius: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
  color: #fff;
  background: linear-gradient(90deg, var(--blue-600), var(--indigo-700));
  box-shadow: 0 16px 32px rgba(37, 99, 235, 0.28);
}

.btn.ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(12px);
}

.hero-poster {
  position: relative;
  justify-self: end;
  width: min(420px, 100%);
  aspect-ratio: 3 / 4;
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
  transform: rotate(1.5deg);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 22px;
  z-index: 2;
}

.hero-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

.hero-poster:hover img {
  transform: scale(1.06);
}

.hero-poster span,
.play-dot {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--purple-700));
  box-shadow: 0 15px 30px rgba(37, 99, 235, 0.32);
}

.hero-poster span {
  left: 26px;
  bottom: 26px;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  z-index: 3;
}

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

.hero-dot {
  width: 42px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  cursor: pointer;
}

.hero-dot.active {
  background: #fff;
}

.section-block {
  padding: 64px 0;
}

.soft-section {
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.62), rgba(250, 245, 255, 0.78));
}

.section-heading {
  margin-bottom: 32px;
}

.section-heading.centered {
  text-align: center;
}

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

.section-heading h2,
.page-hero h1 {
  margin: 12px 0 8px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.15;
  color: var(--stone-800);
}

.section-heading p,
.page-hero p {
  margin: 0;
  color: var(--stone-600);
  line-height: 1.7;
}

.more-link {
  color: var(--blue-600);
  font-weight: 900;
}

.movie-grid,
.featured-grid {
  display: grid;
  gap: 24px;
}

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

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

.movie-card {
  overflow: hidden;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.08), transparent);
}

.card-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.62);
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(10px);
}

.card-badge b {
  font-style: normal;
}

.play-dot {
  left: 14px;
  bottom: 14px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

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

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

.movie-card h3 a:hover {
  color: var(--blue-600);
}

.movie-card p {
  margin: 0 0 14px;
  color: var(--stone-600);
  font-size: 14px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta span {
  color: var(--stone-600);
  background: var(--stone-100);
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 800;
}

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

.category-grid.large {
  gap: 24px;
}

.category-tile {
  position: relative;
  min-height: 146px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 24px;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  transition: opacity 0.2s ease;
}

.category-tile:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--shadow);
}

.category-tile:hover::before {
  opacity: 0.22;
}

.category-tile strong,
.category-tile em,
.category-tile span {
  position: relative;
  z-index: 1;
}

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

.category-tile em {
  color: var(--stone-600);
  font-style: normal;
  line-height: 1.6;
}

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

.category-tile.blue::before,
.page-hero.blue {
  background: linear-gradient(135deg, var(--blue-600), var(--indigo-700));
}

.category-tile.purple::before,
.page-hero.purple {
  background: linear-gradient(135deg, var(--purple-700), #a855f7);
}

.category-tile.indigo::before,
.page-hero.indigo {
  background: linear-gradient(135deg, var(--indigo-700), var(--blue-600));
}

.category-tile.pink::before,
.page-hero.pink {
  background: linear-gradient(135deg, var(--pink-500), #fb7185);
}

.category-tile.amber::before,
.page-hero.amber {
  background: linear-gradient(135deg, var(--amber-500), var(--orange-600));
}

.category-tile.cyan::before,
.page-hero.cyan {
  background: linear-gradient(135deg, var(--cyan-500), var(--blue-600));
}

.category-tile.emerald::before,
.page-hero.emerald {
  background: linear-gradient(135deg, var(--emerald-500), #15803d);
}

.category-tile.stone::before,
.page-hero.stone {
  background: linear-gradient(135deg, var(--stone-900), var(--blue-950));
}

.ranking-grid,
.ranking-page-grid {
  display: grid;
  gap: 16px;
}

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

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

.compact-card {
  position: relative;
  display: flex;
  gap: 16px;
  align-items: center;
  min-height: 124px;
  padding: 12px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.compact-poster {
  flex: 0 0 76px;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: var(--stone-200);
}

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

.rank-num {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-600), var(--purple-700));
  font-weight: 900;
}

.compact-info {
  min-width: 0;
}

.compact-info strong,
.compact-info em {
  display: block;
}

.compact-info strong {
  color: var(--stone-800);
  line-height: 1.35;
  margin-bottom: 8px;
}

.compact-info em {
  color: var(--stone-500);
  font-size: 13px;
  font-style: normal;
}

.center-actions {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.page-hero {
  color: #fff;
  background: linear-gradient(135deg, var(--blue-900), var(--indigo-700), var(--purple-700));
}

.page-hero.compact .container {
  padding: 72px 0;
}

.page-hero h1 {
  color: #fff;
}

.page-hero p {
  max-width: 760px;
  color: rgba(239, 246, 255, 0.86);
}

.filter-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 30px;
  padding: 20px;
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.search-box input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 2px solid var(--stone-200);
  border-radius: 14px;
  color: var(--stone-800);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

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

.filter-chip {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  color: var(--stone-700);
  background: var(--stone-100);
  cursor: pointer;
  font-weight: 800;
}

.filter-chip.active,
.filter-chip:hover {
  color: #fff;
  background: linear-gradient(90deg, var(--blue-600), var(--indigo-700));
}

.detail-hero {
  padding: 42px 0;
  color: #fff;
  background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.3), transparent 35%), linear-gradient(135deg, var(--stone-950), var(--blue-950), #312e81);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
  gap: 30px;
  align-items: center;
}

.video-shell {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 24px;
  background: #000;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4);
}

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

.play-overlay {
  position: absolute;
  inset: 0;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.08));
  cursor: pointer;
}

.play-overlay span {
  width: 88px;
  height: 88px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  font-size: 34px;
  background: linear-gradient(135deg, var(--blue-600), var(--purple-700));
  box-shadow: 0 20px 45px rgba(37, 99, 235, 0.36);
  transition: transform 0.2s ease;
}

.play-overlay:hover span {
  transform: scale(1.08);
}

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

.detail-side h1 {
  margin: 16px 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
}

.lead {
  color: rgba(239, 246, 255, 0.84);
  line-height: 1.75;
  font-size: 17px;
}

.breadcrumb {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.18);
  border: 1px solid rgba(147, 197, 253, 0.22);
  font-weight: 900;
}

.detail-tags {
  margin-top: 20px;
}

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

.article-card,
.side-card {
  padding: 30px;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.article-card h2,
.side-card h2 {
  margin: 0 0 18px;
  color: var(--stone-800);
  font-size: 24px;
}

.article-card p {
  color: var(--stone-700);
  line-height: 1.92;
  font-size: 16px;
}

.side-list {
  display: grid;
  gap: 14px;
}

.site-footer {
  color: #bfdbfe;
  background: linear-gradient(135deg, var(--stone-950), var(--blue-950), var(--stone-950));
  border-top: 4px solid var(--blue-700);
}

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

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #dbeafe;
  font-size: 20px;
}

.site-footer p {
  max-width: 520px;
  color: #93c5fd;
  line-height: 1.7;
}

.site-footer h3 {
  color: #dbeafe;
  margin: 0 0 12px;
}

.site-footer a {
  display: block;
  color: #93c5fd;
  padding: 5px 0;
}

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

.footer-bottom {
  text-align: center;
  padding: 18px 0;
  border-top: 1px solid rgba(147, 197, 253, 0.15);
  color: #93c5fd;
  font-size: 14px;
}

.hidden-by-filter {
  display: none !important;
}

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

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

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

  .hero-carousel {
    min-height: 820px;
  }

  .hero-slide,
  .hero-slide.active {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-poster {
    justify-self: start;
    width: min(360px, 100%);
  }

  .featured-grid,
  .movie-grid.four,
  .category-grid,
  .ranking-grid,
  .ranking-page-grid,
  .footer-grid,
  .detail-layout,
  .detail-content {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 640px) {
  .container {
    width: min(100% - 22px, 1180px);
  }

  .brand-text strong {
    font-size: 18px;
  }

  .brand-text em {
    display: none;
  }

  .hero-carousel {
    min-height: 760px;
    padding: 36px 0 70px;
  }

  .hero-copy p {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-poster {
    width: min(300px, 100%);
    border-radius: 22px;
  }

  .hero-dots {
    bottom: 24px;
  }

  .featured-grid,
  .movie-grid.four,
  .category-grid,
  .ranking-grid,
  .ranking-page-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .compact-card {
    min-height: 112px;
  }
}
