:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.84);
  --panel-strong: #0f172a;
  --card: rgba(15, 23, 42, 0.72);
  --card-hover: rgba(30, 41, 59, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --brand: #10b981;
  --brand-strong: #059669;
  --brand-soft: rgba(16, 185, 129, 0.16);
  --accent: #22d3ee;
  --radius: 20px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(16, 185, 129, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.10), transparent 34rem),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.35);
  color: white;
}

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

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

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

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
  color: white;
  background: var(--brand-soft);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.mini-search {
  position: relative;
  display: flex;
  align-items: center;
}

.mini-search span {
  position: absolute;
  left: 14px;
  color: var(--brand);
  font-size: 13px;
  pointer-events: none;
}

.mini-search input {
  width: 240px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: white;
  padding: 0 16px 0 52px;
  outline: none;
}

.mini-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.82);
  color: white;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.menu-button span {
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 14px;
  gap: 8px;
  flex-wrap: wrap;
}

.hero {
  position: relative;
  min-height: clamp(560px, 76vh, 820px);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

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

.hero-slide {
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 1.2s 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-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.70) 44%, rgba(2, 6, 23, 0.24) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, transparent 48%);
}

.hero-content {
  position: relative;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: clamp(110px, 18vh, 180px);
  max-width: 1180px;
}

.hero-content h1 {
  max-width: 780px;
  margin: 16px 0 12px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.hero-meta,
.movie-meta {
  color: var(--muted);
}

.hero-copy {
  max-width: 700px;
  color: var(--soft);
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #a7f3d0;
  background: var(--brand-soft);
  border: 1px solid rgba(16, 185, 129, 0.26);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 700;
}

.hero-actions,
.detail-info .primary-button {
  margin-top: 28px;
}

.primary-button,
.ghost-button,
.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 16px 42px rgba(16, 185, 129, 0.26);
}

.ghost-button {
  margin-left: 10px;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(15, 23, 42, 0.68);
}

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

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

.hero-dot {
  width: 36px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
}

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

.quick-cats {
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.56);
}

.quick-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 18px 0;
}

.quick-shell a {
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--soft);
  background: rgba(15, 23, 42, 0.56);
}

.quick-shell a:hover {
  color: white;
  border-color: rgba(16, 185, 129, 0.52);
}

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

.inner-page {
  padding: 56px 0 80px;
}

.intro-block,
.page-title {
  margin: 56px 0 34px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.56));
  box-shadow: var(--shadow);
}

.intro-block h2,
.page-title h1 {
  margin: 16px 0 10px;
  font-size: clamp(32px, 5vw, 52px);
  letter-spacing: -0.04em;
}

.intro-block p,
.page-title p {
  max-width: 820px;
  color: var(--soft);
  line-height: 1.8;
}

.content-section {
  margin: 56px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-heading h2 {
  position: relative;
  margin: 0;
  padding-left: 16px;
  font-size: 28px;
}

.section-heading h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 5px;
  height: 28px;
  border-radius: 99px;
  background: var(--brand);
}

.section-heading a,
.text-link {
  color: #a7f3d0;
}

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

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

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

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

.movie-card:hover {
  transform: translateY(-5px);
  background: var(--card-hover);
  border-color: rgba(16, 185, 129, 0.36);
}

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

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

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

.poster-shade,
.tile-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), transparent 58%);
}

.card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.92);
  color: white;
  transform: translate(-50%, -50%) scale(0.86);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.rank-badge {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  font-weight: 900;
}

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

.movie-card-body h3 {
  min-height: 44px;
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.35;
}

.movie-card-body h3 a:hover {
  color: #a7f3d0;
}

.movie-meta {
  margin: 0 0 8px;
  font-size: 13px;
}

.movie-line {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 42px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--soft);
  font-size: 14px;
  line-height: 1.5;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-row span {
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.10);
  padding: 4px 8px;
  font-size: 12px;
}

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

.category-tile {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.category-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

.category-tile strong,
.category-tile em {
  position: absolute;
  left: 18px;
  right: 18px;
  z-index: 2;
}

.category-tile strong {
  bottom: 62px;
  font-size: 24px;
  font-style: normal;
}

.category-tile em {
  bottom: 18px;
  color: var(--soft);
  font-size: 14px;
  font-style: normal;
  line-height: 1.5;
}

.overview-grid {
  display: grid;
  gap: 22px;
}

.overview-card {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 26px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 18px;
}

.overview-cover {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.overview-cover img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 14px;
  background: #0f172a;
}

.overview-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.overview-card p {
  color: var(--soft);
  line-height: 1.8;
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 220px;
  gap: 16px;
  margin-top: 28px;
}

.single-filter {
  grid-template-columns: minmax(240px, 520px);
}

.filter-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.filter-panel input,
.filter-panel select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.62);
  color: white;
  padding: 0 14px;
  outline: none;
}

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

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(220px, 330px) 1fr;
  gap: clamp(24px, 5vw, 48px);
  align-items: center;
  margin: 34px 0 42px;
  padding: clamp(20px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.64)),
    radial-gradient(circle at right top, rgba(16, 185, 129, 0.16), transparent 28rem);
  box-shadow: var(--shadow);
}

.detail-poster img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #0f172a;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.38);
}

.detail-info h1 {
  margin: 16px 0;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.detail-one-line {
  max-width: 780px;
  color: var(--soft);
  font-size: 18px;
  line-height: 1.8;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.detail-meta span {
  color: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.45);
  padding: 8px 12px;
}

.watch-section,
.detail-copy article,
.rank-list-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.watch-section {
  margin: 42px 0;
  padding: clamp(18px, 3vw, 28px);
}

.watch-section h2,
.detail-copy h2 {
  margin: 0 0 18px;
  font-size: 26px;
}

.player-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: black;
  aspect-ratio: 16 / 9;
}

.movie-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: black;
  cursor: pointer;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.52), rgba(2, 6, 23, 0.18));
  cursor: pointer;
}

.play-overlay span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.94);
  color: white;
  font-size: 34px;
  box-shadow: 0 20px 60px rgba(16, 185, 129, 0.36);
}

.player-wrap.is-playing .play-overlay {
  opacity: 0;
  pointer-events: none;
}

.detail-copy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.detail-copy article {
  padding: clamp(20px, 3vw, 30px);
}

.detail-copy p {
  color: var(--soft);
  line-height: 1.9;
  margin: 0;
}

.movie-card.compact .movie-card-body h3 {
  min-height: auto;
}

.rank-list-block {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin: 28px 0 42px;
}

.rank-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  background: rgba(15, 23, 42, 0.56);
}

.rank-row:hover {
  background: rgba(16, 185, 129, 0.12);
}

.rank-row span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: #a7f3d0;
  font-weight: 900;
}

.rank-row em {
  color: var(--muted);
  font-style: normal;
}

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

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

.footer-shell p {
  max-width: 660px;
  color: var(--muted);
  line-height: 1.8;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.footer-links a {
  color: var(--soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 13px;
}

.footer-links a:hover {
  color: #a7f3d0;
  border-color: rgba(16, 185, 129, 0.36);
}

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

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

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

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

  .menu-button {
    display: flex;
  }

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

  .hero {
    min-height: 660px;
  }

  .hero-vignette {
    background:
      linear-gradient(0deg, rgba(2, 6, 23, 1) 0%, rgba(2, 6, 23, 0.72) 58%, rgba(2, 6, 23, 0.36) 100%);
  }

  .hero-content {
    padding-top: 120px;
  }

  .hero-actions {
    display: grid;
    gap: 10px;
    max-width: 280px;
  }

  .ghost-button {
    margin-left: 0;
  }

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

  .overview-card,
  .detail-hero,
  .detail-copy,
  .footer-shell {
    grid-template-columns: 1fr;
  }

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

  .filter-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .nav-shell,
  .page-shell,
  .quick-shell,
  .footer-shell,
  .mobile-nav {
    width: min(100% - 24px, 1180px);
  }

  .movie-grid,
  .wide-grid,
  .related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

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

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

  .movie-line {
    display: none;
  }

  .rank-row {
    grid-template-columns: 42px 1fr;
  }

  .rank-row em {
    grid-column: 2;
  }

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

  .play-overlay span {
    width: 68px;
    height: 68px;
    font-size: 28px;
  }
}
