:root {
  color-scheme: light;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --cyan: #0891b2;
  --teal: #0f766e;
  --purple: #7c3aed;
  --pink: #db2777;
  --orange: #f97316;
  --green: #16a34a;
  --slate-950: #020617;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--slate-50);
  color: var(--slate-800);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Microsoft YaHei",
    sans-serif;
}

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

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

button,
input {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(90deg, var(--blue), var(--cyan), var(--teal));
  color: var(--white);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.22);
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.brand-name {
  font-size: 20px;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-weight: 650;
}

.main-nav a,
.mobile-panel a {
  transition:
    color 0.2s ease,
    opacity 0.2s ease;
}

.main-nav a:hover,
.mobile-panel a:hover {
  color: #fef08a;
}

.nav-search {
  display: flex;
  align-items: center;
  overflow: hidden;
  width: min(320px, 32vw);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.nav-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 11px 14px;
  color: var(--white);
  background: transparent;
}

.nav-search input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.nav-search button {
  border: 0;
  padding: 11px 16px;
  color: var(--blue-dark);
  background: var(--white);
  cursor: pointer;
  font-weight: 700;
}

.menu-toggle {
  display: none;
  border: 0;
  border-radius: 12px;
  padding: 9px 12px;
  color: var(--white);
  background: rgba(0, 0, 0, 0.16);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  justify-content: space-around;
  gap: 10px;
  padding: 10px 18px 14px;
  background: rgba(0, 0, 0, 0.12);
}

.hero-slider {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background: var(--slate-950);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.65s ease,
    visibility 0.65s ease;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 18% 30%,
      rgba(37, 99, 235, 0.56),
      transparent 34%
    ),
    linear-gradient(
      90deg,
      rgba(2, 6, 23, 0.95),
      rgba(15, 23, 42, 0.74),
      rgba(15, 23, 42, 0.18)
    ),
    linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent 48%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  max-width: 780px;
  color: var(--white);
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-content .eyebrow {
  color: #bfdbfe;
}

.section-kicker.light {
  color: #bfdbfe;
}

.hero-content h1 {
  max-width: 720px;
  margin: 0 0 10px;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-content h2 {
  margin: 0 0 18px;
  color: #fef08a;
  font-size: clamp(24px, 3.6vw, 40px);
  font-weight: 850;
}

.hero-content p {
  max-width: 650px;
  margin: 0 0 30px;
  color: #e2e8f0;
  font-size: 18px;
  line-height: 1.85;
}

.hero-actions,
.search-band form,
.section-title-row,
.category-showcase-head,
.prev-next {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

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

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

.primary-btn.bright {
  color: var(--blue-dark);
  background: var(--white);
}

.ghost-btn {
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.primary-btn:hover,
.ghost-btn:hover,
.category-card:hover,
.movie-card:hover {
  transform: translateY(-3px);
}

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

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

.hero-dot.is-active {
  background: var(--white);
}

.search-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: -44px;
  margin-bottom: 54px;
  padding: 26px;
  border-radius: var(--radius-xl);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  position: relative;
  z-index: 5;
}

.search-band strong {
  display: block;
  margin-bottom: 6px;
  color: var(--slate-900);
  font-size: 22px;
}

.search-band span {
  color: var(--slate-500);
}

.search-band form {
  flex: 1;
  max-width: 620px;
  justify-content: flex-end;
}

.search-band input,
.filter-panel input {
  flex: 1;
  min-width: 220px;
  border: 1px solid var(--slate-200);
  border-radius: 999px;
  outline: 0;
  padding: 14px 18px;
  background: var(--slate-50);
}

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

.search-band button {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  color: var(--white);
  background: var(--blue);
  cursor: pointer;
  font-weight: 800;
}

.section-block,
.category-showcase {
  margin-bottom: 64px;
}

.section-title-row,
.category-showcase-head {
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-title-row h2,
.category-showcase-head h2,
.ranking-copy h2 {
  margin: 0;
  color: var(--slate-900);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 900;
  letter-spacing: -0.03em;
}

.section-title-row a,
.category-showcase-head a {
  color: var(--blue);
  font-weight: 800;
}

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

.category-card {
  display: block;
  min-height: 160px;
  padding: 24px;
  border-radius: var(--radius-lg);
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--purple));
  box-shadow: var(--shadow-card);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.category-card:nth-child(2n) {
  background: linear-gradient(135deg, var(--cyan), var(--teal));
}

.category-card:nth-child(3n) {
  background: linear-gradient(135deg, var(--pink), var(--purple));
}

.category-card span {
  display: block;
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 900;
}

.category-card p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.65;
}

.category-card small {
  color: rgba(255, 255, 255, 0.74);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.movie-card:hover {
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
}

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

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

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

.movie-type,
.rank-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--white);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
}

.movie-type {
  right: 12px;
  background: linear-gradient(90deg, var(--blue), var(--purple));
}

.rank-badge {
  left: 12px;
  min-width: 38px;
  text-align: center;
  background: linear-gradient(90deg, var(--orange), var(--pink));
}

.play-chip {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 42px;
  background: rgba(2, 6, 23, 0.22);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
}

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

.movie-card-body h3 {
  display: -webkit-box;
  min-height: 54px;
  margin: 0 0 10px;
  overflow: hidden;
  color: var(--slate-900);
  font-size: 18px;
  line-height: 1.5;
  font-weight: 900;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-card-body p {
  display: -webkit-box;
  min-height: 48px;
  margin: 0 0 14px;
  overflow: hidden;
  color: var(--slate-500);
  line-height: 1.7;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.movie-meta span,
.movie-tags span,
.detail-meta span,
.detail-tags a {
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--slate-100);
  color: var(--slate-600);
  font-size: 13px;
  font-weight: 700;
}

.movie-tags span,
.detail-tags a {
  color: var(--blue-dark);
  background: #dbeafe;
}

.ranking-band {
  margin: 76px 0;
  padding: 72px 0;
  color: var(--white);
  background:
    radial-gradient(
      circle at 12% 20%,
      rgba(96, 165, 250, 0.38),
      transparent 32%
    ),
    linear-gradient(135deg, var(--blue), var(--purple));
}

.ranking-layout {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 34px;
  align-items: center;
}

.ranking-copy h2 {
  color: var(--white);
}

.ranking-copy p {
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.9;
  font-size: 18px;
}

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

.side-card {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--slate-900);
  box-shadow: var(--shadow-card);
}

.side-poster {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16 / 10;
  background: #dbeafe;
}

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

.side-poster span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  background: rgba(2, 6, 23, 0.24);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.side-card:hover .side-poster span {
  opacity: 1;
}

.side-card strong {
  display: -webkit-box;
  overflow: hidden;
  font-weight: 900;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.side-card small {
  display: block;
  margin-top: 8px;
  color: var(--slate-500);
}

.page-main {
  padding: 42px 0 70px;
}

.page-hero {
  margin-bottom: 30px;
  padding: 40px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(
      circle at top right,
      rgba(59, 130, 246, 0.18),
      transparent 42%
    ),
    var(--white);
  box-shadow: var(--shadow-card);
}

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

.page-hero h1 {
  margin: 0 0 12px;
  color: var(--slate-900);
  font-size: clamp(30px, 4.6vw, 48px);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.page-hero p {
  max-width: 830px;
  margin: 0;
  color: var(--slate-600);
  font-size: 17px;
  line-height: 1.85;
}

.large-category-grid {
  margin-bottom: 54px;
}

.filter-panel {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.filter-panel label {
  color: var(--slate-900);
  font-weight: 900;
  white-space: nowrap;
}

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

.empty-state {
  display: none;
  padding: 40px;
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--slate-500);
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.empty-state.is-visible {
  display: block;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--slate-500);
  font-size: 14px;
}

.crumbs a {
  color: var(--blue);
  font-weight: 800;
}

.crumbs.dark {
  color: rgba(255, 255, 255, 0.7);
}

.crumbs.dark a {
  color: #bfdbfe;
}

.player-section {
  padding: 26px 0 42px;
  background:
    radial-gradient(
      circle at 20% 10%,
      rgba(37, 99, 235, 0.38),
      transparent 38%
    ),
    var(--slate-950);
}

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

.movie-player video {
  width: 100%;
  height: 100%;
  background: #000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  color: var(--white);
  background: var(--slate-950);
  cursor: pointer;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.85), rgba(2, 6, 23, 0.2));
}

.player-cover strong,
.big-play {
  position: relative;
  z-index: 2;
}

.big-play {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.42);
  font-size: 42px;
  text-indent: 5px;
}

.player-cover strong {
  max-width: min(760px, 86%);
  font-size: clamp(22px, 4vw, 42px);
  line-height: 1.2;
  text-align: center;
}

.movie-player.is-playing .player-cover {
  display: none;
}

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

.detail-card,
.side-panel {
  border-radius: var(--radius-xl);
  padding: 28px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.detail-card + .detail-card {
  margin-top: 20px;
}

.detail-card h1 {
  margin: 0 0 16px;
  color: var(--slate-900);
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 950;
  letter-spacing: -0.04em;
}

.detail-card h2,
.side-panel h2 {
  margin: 28px 0 12px;
  color: var(--slate-900);
  font-size: 22px;
  font-weight: 900;
}

.detail-card p {
  margin: 0 0 14px;
  color: var(--slate-700);
  line-height: 2;
  font-size: 16px;
}

.lead-text {
  padding: 18px 20px;
  border-radius: 18px;
  color: var(--slate-800) !important;
  background: #eff6ff;
  font-weight: 700;
}

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

.detail-side {
  min-width: 0;
}

.side-panel {
  position: sticky;
  top: 92px;
}

.prev-next {
  justify-content: space-between;
}

.prev-next a {
  color: var(--blue);
  font-weight: 800;
}

.site-footer {
  color: #cbd5e1;
  background: var(--slate-900);
}

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

.footer-brand {
  margin-bottom: 12px;
  color: var(--white);
  font-size: 22px;
}

.site-footer p {
  max-width: 420px;
  margin: 0;
  line-height: 1.8;
}

.site-footer strong {
  display: block;
  margin-bottom: 14px;
  color: var(--white);
}

.site-footer a,
.site-footer span {
  display: block;
  margin: 9px 0;
  color: #cbd5e1;
}

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

.footer-bottom {
  padding: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  text-align: center;
}

@media (max-width: 1120px) {
  .movie-grid,
  .page-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .detail-side .side-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  .main-nav,
  .nav-search {
    display: none;
  }

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

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

  .hero-slider {
    min-height: 580px;
  }

  .hero-content {
    padding: 0 16px;
  }

  .search-band,
  .filter-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .search-band form {
    max-width: none;
    justify-content: stretch;
  }

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

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

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

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

  .hero-slider {
    min-height: 610px;
  }

  .hero-content h1 {
    font-size: 34px;
  }

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

  .search-band,
  .page-hero,
  .detail-card,
  .side-panel {
    padding: 22px;
  }

  .movie-grid,
  .page-grid,
  .compact-grid,
  .category-grid {
    grid-template-columns: 1fr;
  }

  .side-card {
    grid-template-columns: 112px 1fr;
  }

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