:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.96);
  --panel-soft: rgba(30, 41, 59, 0.72);
  --border: rgba(148, 163, 184, 0.18);
  --border-strong: rgba(16, 185, 129, 0.35);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --accent: #10b981;
  --accent-strong: #34d399;
  --accent-deep: #047857;
  --danger: #f97316;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius-lg: 28px;
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.16), transparent 34rem),
    radial-gradient(circle at 85% 8%, rgba(59, 130, 246, 0.12), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

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

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

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 6, 23, 0.82);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(18px);
}

.header-inner {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #022c22;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 36px rgba(16, 185, 129, 0.36);
  font-size: 17px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.18;
}

.brand-copy strong {
  font-size: 21px;
  letter-spacing: 0.02em;
}

.brand-copy small {
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link,
.mobile-nav-link {
  color: var(--soft);
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link {
  padding: 10px 16px;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover {
  color: var(--accent-strong);
  background: rgba(15, 23, 42, 0.86);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.86);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  border-radius: 999px;
  background: var(--text);
}

.mobile-nav {
  display: none;
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.94);
}

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

.mobile-nav-link {
  padding: 11px 14px;
}

main {
  overflow: hidden;
}

.hero-carousel {
  position: relative;
  min-height: 650px;
  isolation: isolate;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

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

.hero-slide::after,
.detail-hero::after,
.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
  z-index: -1;
}

.hero-copy {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 130px 0 96px;
  max-width: 760px;
}

.eyebrow,
.section-heading span,
.page-hero span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
  margin: 14px 0 18px;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.detail-copy p {
  max-width: 760px;
  margin: 0;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
}

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

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

.hero-tags span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 999px;
  color: var(--accent-strong);
  background: rgba(6, 78, 59, 0.22);
  font-size: 12px;
}

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

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  padding: 0 22px;
  color: #022c22;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 18px 48px rgba(16, 185, 129, 0.28);
}

.ghost-button {
  padding: 0 20px;
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.62);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover {
  transform: translateY(-2px);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 56px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.48);
  backdrop-filter: blur(12px);
}

.hero-dots button {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: rgba(203, 213, 225, 0.45);
  cursor: pointer;
}

.hero-dots button.active {
  width: 28px;
  border-radius: 999px;
  background: var(--accent-strong);
}

.page-section {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 54px 0;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 26px;
}

.section-heading.wide {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
  align-items: center;
}

.section-heading.compact {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.18;
}

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

.search-panel {
  margin: 0 auto 32px;
  max-width: 760px;
}

.search-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
}

.search-box span {
  color: var(--accent-strong);
  font-size: 24px;
}

.search-box input {
  width: 100%;
  color: var(--text);
  border: 0;
  outline: 0;
  background: transparent;
}

.search-box input::placeholder {
  color: #64748b;
}

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

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: 0 26px 78px rgba(0, 0, 0, 0.34);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #064e3b);
}

.movie-poster img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.36s ease, filter 0.36s ease;
}

.movie-card:hover .movie-poster img {
  transform: scale(1.06);
  filter: brightness(0.78);
}

.poster-overlay {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 999px;
  color: #022c22;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  font-size: 14px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  min-width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #022c22;
  background: linear-gradient(135deg, #facc15, #fb923c);
  font-weight: 900;
}

.movie-card-body {
  display: flex;
  min-height: 180px;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
}

.movie-card.small .movie-card-body {
  min-height: 160px;
  padding: 14px;
}

.movie-card.large .movie-card-body {
  min-height: 190px;
}

.movie-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

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

.movie-card h3 a:hover {
  color: var(--accent-strong);
}

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

.tag-row {
  margin-top: auto;
}

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

.category-strip a,
.category-card {
  position: relative;
  overflow: hidden;
  min-height: 122px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel-soft);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-strip a:hover,
.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.category-strip strong,
.category-card span {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.category-strip small,
.category-card strong {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.split-showcase {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

.rank-panel,
.content-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.rank-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.compact-list {
  display: grid;
  gap: 12px;
}

.compact-link {
  display: grid;
  grid-template-columns: auto 58px 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.62);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.compact-link:hover {
  transform: translateX(4px);
  border-color: var(--border-strong);
}

.compact-link img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
}

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

.compact-link em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.list-number {
  min-width: 30px;
  color: var(--accent-strong);
  font-weight: 900;
  text-align: center;
}

.text-link {
  min-height: 38px;
  margin-top: 18px;
  color: var(--accent-strong);
}

.page-hero {
  position: relative;
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 110px 16px 76px;
  text-align: center;
  background-size: cover;
  background-position: center;
}

.page-hero.slim {
  min-height: 310px;
}

.page-hero h1 {
  max-width: 920px;
}

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

.category-card {
  min-height: 190px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-size: cover;
  background-position: center;
}

.category-card em {
  margin-top: 18px;
  color: var(--accent-strong);
  font-style: normal;
  font-weight: 800;
}

.stacked-sections {
  display: grid;
  gap: 34px;
}

.category-preview {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--border);
}

.ranking-layout {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 24px;
  align-items: start;
}

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

.ranking-list {
  max-height: 1180px;
  overflow: auto;
  padding-right: 4px;
}

.detail-hero {
  position: relative;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: end;
  gap: 38px;
  min-height: 610px;
  padding: 132px max(16px, calc((100vw - var(--container)) / 2)) 84px;
  background-size: cover;
  background-position: center;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a:hover {
  color: var(--accent-strong);
}

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

.detail-meta span {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.76);
  color: var(--soft);
  font-size: 13px;
}

.player-section {
  padding-top: 26px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: #000;
  box-shadow: var(--shadow);
}

.video-player,
.play-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.video-player {
  z-index: 1;
  object-fit: contain;
  background: #000;
}

.play-poster {
  z-index: 2;
  display: grid;
  place-items: center;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-poster.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.play-button {
  width: 92px;
  height: 92px;
  border: 0;
  border-radius: 50%;
  color: #022c22;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 0 0 14px rgba(16, 185, 129, 0.15), 0 22px 70px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.play-button:hover {
  transform: scale(1.06);
}

.play-button span {
  margin-left: 5px;
  font-size: 34px;
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.content-card {
  padding: 28px;
}

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

.content-card p {
  margin: 0;
  color: var(--soft);
}

.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
}

.footer-inner strong {
  color: var(--text);
  font-size: 18px;
}

.footer-inner p {
  max-width: 680px;
  margin: 6px 0 0;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
}

.footer-links a:hover {
  color: var(--accent-strong);
}

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

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

  .split-showcase,
  .ranking-layout,
  .detail-hero,
  .detail-content {
    grid-template-columns: 1fr;
  }

  .rank-panel {
    position: static;
  }

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

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

  .menu-toggle {
    display: block;
  }

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

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

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

  .movie-grid,
  .featured-grid,
  .compact-grid,
  .all-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .footer-inner {
    flex-direction: column;
  }

  .footer-links {
    flex-wrap: wrap;
  }
}

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

  .brand-copy small {
    display: none;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

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

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .category-strip,
  .category-card-grid,
  .ranking-lead {
    grid-template-columns: 1fr;
  }

  .movie-card-body {
    min-height: 170px;
    padding: 12px;
  }

  .movie-card h3 {
    font-size: 15px;
  }

  .movie-card p {
    font-size: 13px;
  }

  .detail-hero {
    padding-top: 98px;
  }

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

  .play-button {
    width: 76px;
    height: 76px;
  }
}
