:root {
  --bg: #f5f7fb;
  --text: #111827;
  --muted: #667085;
  --line: #e5e7eb;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --indigo: #4f46e5;
  --card: #ffffff;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
  --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

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: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.logo-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
  font-size: 16px;
}

.desktop-nav {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-left: auto;
}

.desktop-nav a {
  color: #344054;
  font-weight: 700;
  transition: color 0.2s ease;
}

.desktop-nav a:hover {
  color: var(--blue);
}

.top-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 280px;
  background: #f8fafc;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 4px;
}

.top-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 8px 12px;
  color: #0f172a;
}

.top-search button {
  border: 0;
  border-radius: 999px;
  background: var(--blue);
  color: #ffffff;
  padding: 8px 14px;
  cursor: pointer;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: #eef2ff;
  border-radius: 12px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #1e293b;
  margin: 4px auto;
  border-radius: 999px;
}

.mobile-panel {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 14px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.mobile-panel a {
  display: block;
  padding: 12px 10px;
  color: #344054;
  font-weight: 700;
  border-radius: 12px;
}

.mobile-panel a:hover {
  background: #eff6ff;
  color: var(--blue);
}

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

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  background: linear-gradient(135deg, #1d4ed8, #4f46e5 50%, #0f172a);
}

.hero-stage,
.hero-slide {
  position: absolute;
  inset: 0;
}

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.8s ease, transform 1.4s ease;
  pointer-events: none;
}

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

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.2), transparent 26%),
    linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(37, 99, 235, 0.72), rgba(79, 70, 229, 0.35)),
    linear-gradient(0deg, rgba(15, 23, 42, 0.85), transparent 45%);
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
  max-width: 760px;
  padding-top: 34px;
}

.hero-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
  font-size: 14px;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 22px 0 18px;
  font-size: clamp(42px, 8vw, 78px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-copy p {
  max-width: 680px;
  margin: 0 0 32px;
  color: #dbeafe;
  font-size: clamp(17px, 2vw, 22px);
}

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

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

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

.btn.primary {
  color: var(--blue);
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.24);
}

.btn.ghost {
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

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

.hero-dot {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

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

.category-strip {
  margin-top: -42px;
  position: relative;
  z-index: 5;
}

.category-strip .container {
  padding: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(219, 234, 254, 0.88);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.strip-title,
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.strip-title h2,
.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
}

.strip-title a,
.section-more {
  color: var(--blue);
  font-weight: 800;
}

.category-pills {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.category-pill {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px;
  min-height: 82px;
  border-radius: 18px;
  background: linear-gradient(135deg, #eff6ff, #eef2ff);
  border: 1px solid #dbeafe;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-pill span {
  font-weight: 900;
  color: #172554;
}

.category-pill small {
  color: var(--muted);
}

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

.section-head {
  margin-bottom: 28px;
}

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

.section-kicker {
  display: block;
  width: 7px;
  height: 34px;
  float: left;
  margin: 4px 14px 0 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue), var(--indigo));
}

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

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

.movie-card {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(229, 231, 235, 0.84);
  border-radius: 24px;
  box-shadow: var(--soft-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

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

.poster-shade {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.72), transparent 60%);
  transition: opacity 0.25s ease;
}

.movie-card:hover .poster-shade {
  opacity: 1;
}

.play-chip {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.92);
  color: #ffffff;
  font-weight: 900;
  font-size: 13px;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.movie-card:hover .play-chip {
  transform: translateY(0);
  opacity: 1;
}

.rank-badge {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(239, 68, 68, 0.32);
}

.card-body {
  padding: 18px;
}

.card-meta,
.card-foot,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.card-meta a,
.card-meta span,
.card-foot span,
.detail-meta span,
.tag-cloud span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

.card-foot span {
  color: #475467;
  background: #f2f4f7;
}

.movie-card h2 {
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.28;
}

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

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

.ranking-band {
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
}

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

.compact-card .poster-link {
  aspect-ratio: 16 / 11;
}

.compact-card .card-body {
  padding: 14px;
}

.compact-card h2 {
  font-size: 16px;
}

.compact-card p {
  min-height: 40px;
  font-size: 13px;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  position: relative;
  padding: 90px 0 84px;
  color: #ffffff;
  background:
    radial-gradient(circle at 16% 20%, rgba(255, 255, 255, 0.22), transparent 28%),
    linear-gradient(135deg, #1d4ed8, #4f46e5 58%, #0f172a);
  overflow: hidden;
}

.page-hero h1 {
  max-width: 800px;
  margin: 18px 0 16px;
  font-size: clamp(36px, 6vw, 62px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 760px;
  color: #dbeafe;
  font-size: 18px;
}

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

.category-card-large {
  overflow: hidden;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
  border: 1px solid rgba(229, 231, 235, 0.8);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px;
  height: 180px;
  background: #dbeafe;
}

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

.category-card-info {
  padding: 18px;
}

.category-card-info h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.category-card-info p {
  margin: 0;
  color: var(--muted);
}

.filter-panel {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 18px;
  margin-bottom: 24px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

.filter-search {
  flex: 1;
}

.filter-search input,
.filter-selects select {
  width: 100%;
  height: 46px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  outline: 0;
  background: #f8fafc;
  color: #0f172a;
}

.filter-search input {
  padding: 0 16px;
}

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

.filter-selects select {
  min-width: 140px;
  padding: 0 12px;
}

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

.wide-rank-grid {
  grid-template-columns: repeat(5, 1fr);
}

.detail-main {
  background: #f8fafc;
}

.detail-hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  color: #ffffff;
  background: #0f172a;
}

.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(10px) scale(1.08);
  opacity: 0.42;
}

.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(37, 99, 235, 0.68), rgba(15, 23, 42, 0.82)),
    linear-gradient(0deg, #0f172a, transparent 50%);
}

.detail-layout {
  position: relative;
  z-index: 2;
  min-height: 520px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: center;
  padding: 54px 0;
}

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

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

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #dbeafe;
  font-weight: 800;
}

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

.detail-info h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 820px;
  margin: 0 0 22px;
  color: #dbeafe;
  font-size: 19px;
}

.detail-meta span,
.tag-cloud span {
  color: #eff6ff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.player-section {
  margin-top: -70px;
  position: relative;
  z-index: 4;
}

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

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

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  border: 0;
  color: #ffffff;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.32));
  cursor: pointer;
  font-size: 20px;
  font-weight: 900;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.big-play {
  width: 82px;
  height: 82px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue), var(--indigo));
  box-shadow: 0 18px 46px rgba(37, 99, 235, 0.35);
  font-size: 34px;
  padding-left: 4px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  padding-top: 44px;
}

.story-card {
  padding: 28px;
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--soft-shadow);
}

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

.story-card p {
  margin: 0;
  color: #475467;
  font-size: 16px;
}

.site-footer {
  margin-top: 48px;
  padding: 54px 0 26px;
  color: #cbd5e1;
  background: linear-gradient(135deg, #0f172a, #1e293b);
}

.footer-grid {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 36px;
}

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

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

.site-footer p {
  margin: 0;
  color: #cbd5e1;
}

.footer-links {
  display: grid;
  gap: 8px;
}

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

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

.copyright {
  width: min(1180px, calc(100% - 32px));
  margin: 36px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  font-size: 14px;
}

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

@media (max-width: 1080px) {
  .top-search {
    width: 220px;
  }

  .movie-grid,
  .listing-grid,
  .rank-grid,
  .wide-rank-grid,
  .category-overview-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .category-pills {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 820px) {
  .nav-wrap {
    height: 66px;
  }

  .desktop-nav,
  .top-search {
    display: none;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .hero {
    min-height: 560px;
  }

  .hero-copy h1 {
    font-size: 44px;
  }

  .category-pills,
  .movie-grid,
  .featured-grid,
  .listing-grid,
  .rank-grid,
  .wide-rank-grid,
  .category-overview-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .strip-title,
  .section-head,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-selects {
    width: 100%;
  }

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

  .detail-poster {
    width: min(260px, 80vw);
  }

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

@media (max-width: 560px) {
  .container,
  .nav-wrap,
  .mobile-panel,
  .footer-grid,
  .copyright {
    width: min(100% - 22px, 1180px);
  }

  .logo {
    font-size: 18px;
  }

  .logo-icon {
    width: 34px;
    height: 34px;
  }

  .hero {
    min-height: 530px;
  }

  .hero-copy {
    padding-top: 10px;
  }

  .hero-copy h1,
  .detail-info h1,
  .page-hero h1 {
    font-size: 34px;
  }

  .hero-copy p,
  .page-hero p,
  .detail-one-line {
    font-size: 16px;
  }

  .category-pills,
  .movie-grid,
  .featured-grid,
  .listing-grid,
  .rank-grid,
  .wide-rank-grid,
  .category-overview-grid {
    grid-template-columns: 1fr;
  }

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

  .filter-selects {
    flex-direction: column;
  }

  .story-card {
    padding: 22px;
  }
}
