:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --muted: #94a3b8;
  --muted-strong: #64748b;
  --text: #f8fafc;
  --soft: #cbd5e1;
  --line: rgba(148, 163, 184, 0.16);
  --brand: #10b981;
  --brand-strong: #059669;
  --brand-soft: rgba(16, 185, 129, 0.16);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.16), transparent 30rem), var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

img.image-hidden {
  opacity: 0;
}

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

button,
input {
  font: inherit;
}

.container {
  width: min(100% - 32px, var(--container));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: rgba(2, 6, 23, 0.78);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
}

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

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), #34d399);
  color: white;
  font-size: 14px;
  box-shadow: 0 0 28px rgba(16, 185, 129, 0.42);
}

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

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

.nav-link,
.mobile-link {
  color: var(--soft);
  font-size: 14px;
  transition: color 0.24s ease, background 0.24s ease;
}

.nav-link:hover,
.mobile-link:hover,
.text-link:hover {
  color: #34d399;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.84);
  color: white;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: min(100% - 32px, var(--container));
  margin: 0 auto 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.94);
}

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

.mobile-link {
  padding: 10px 12px;
  border-radius: 10px;
}

.mobile-link:hover {
  background: rgba(16, 185, 129, 0.10);
}

main {
  min-height: 70vh;
}

.hero {
  position: relative;
  height: 72vh;
  min-height: 560px;
  overflow: hidden;
  background: #0f172a;
}

.hero-track,
.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,
.detail-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.60) 46%, #020617 100%), linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(2, 6, 23, 0.36), rgba(2, 6, 23, 0.10));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  height: 100%;
  padding-bottom: 72px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  padding: 6px 14px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: 999px;
  background: var(--brand-soft);
  color: #6ee7b7;
  font-size: 14px;
  font-weight: 700;
}

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

.hero p,
.page-hero p,
.detail-copy p {
  max-width: 720px;
  margin: 0 0 24px;
  color: var(--soft);
  font-size: 18px;
}

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

.hero-tags span,
.tag-cloud span,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.66);
  border: 1px solid var(--line);
  color: #d1fae5;
  font-size: 13px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

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

.primary-button {
  background: var(--brand);
  color: white;
  box-shadow: 0 14px 32px rgba(16, 185, 129, 0.28);
}

.primary-button:hover {
  background: var(--brand-strong);
  transform: translateY(-2px);
}

.ghost-button {
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.54);
  color: var(--soft);
}

.ghost-button:hover {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(16, 185, 129, 0.14);
  color: #a7f3d0;
  transform: translateY(-2px);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.52);
  color: white;
  cursor: pointer;
  font-size: 34px;
  transform: translateY(-50%);
  transition: background 0.24s ease, transform 0.24s ease;
}

.hero-arrow:hover {
  background: rgba(15, 23, 42, 0.82);
  transform: translateY(-50%) scale(1.06);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

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

.hero-dot {
  width: 9px;
  height: 9px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.48);
  cursor: pointer;
  transition: width 0.24s ease, background 0.24s ease;
}

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

.section {
  padding: 72px 0;
}

.slate-band {
  background: rgba(15, 23, 42, 0.48);
  border-block: 1px solid rgba(148, 163, 184, 0.08);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.section-head h2,
.prose-section h2,
.watch-copy h2,
.site-footer h2 {
  margin: 0 0 6px;
  color: white;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.18;
}

.section-head p,
.prose-section p,
.watch-copy p,
.site-footer p,
.category-card-body em,
.category-tile em {
  margin: 0;
  color: var(--muted);
}

.text-link {
  color: #34d399;
  font-weight: 800;
  white-space: nowrap;
}

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

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

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

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

.movie-card {
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.10);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.54);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  transition: border-color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.28);
  transform: translateY(-4px);
}

.cover-wrap {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

.cover-wrap img,
.poster-card img,
.category-card img,
.rank-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .cover-wrap img {
  transform: scale(1.06);
}

.cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 24%, rgba(2, 6, 23, 0.72));
  opacity: 0;
  transition: opacity 0.24s ease;
}

.movie-card:hover .cover-gradient {
  opacity: 1;
}

.play-mark,
.year-badge {
  position: absolute;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: white;
  font-weight: 800;
}

.play-mark {
  left: 50%;
  top: 50%;
  width: 48px;
  height: 48px;
  background: rgba(16, 185, 129, 0.88);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

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

.year-badge {
  top: 10px;
  right: 10px;
  min-width: 54px;
  min-height: 26px;
  padding: 0 10px;
  background: rgba(16, 185, 129, 0.9);
  font-size: 12px;
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.card-body strong {
  overflow: hidden;
  color: #f8fafc;
  font-size: 16px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.24s ease;
}

.movie-card:hover .card-body strong {
  color: #34d399;
}

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

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-meta em,
.rank-pill {
  overflow: hidden;
  max-width: 50%;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(51, 65, 85, 0.60);
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-card {
  display: grid;
  grid-template-columns: minmax(180px, 40%) 1fr;
}

.compact-card .cover-wrap {
  height: 100%;
  aspect-ratio: auto;
}

.movie-scroller {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 0 18px;
  scroll-snap-type: x mandatory;
}

.scroll-card {
  flex: 0 0 310px;
  scroll-snap-align: start;
}

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

.category-tile,
.category-card {
  display: block;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.60);
  transition: border-color 0.24s ease, transform 0.24s ease, background 0.24s ease;
}

.category-tile {
  padding: 22px;
}

.category-tile:hover,
.category-card:hover {
  border-color: rgba(16, 185, 129, 0.50);
  background: rgba(16, 185, 129, 0.10);
  transform: translateY(-3px);
}

.category-tile span,
.category-card-body strong {
  display: block;
  margin-bottom: 8px;
  color: white;
  font-size: 20px;
  font-weight: 800;
}

.category-card {
  overflow: hidden;
}

.category-covers {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 150px;
  background: #0f172a;
}

.category-card-body {
  display: block;
  padding: 20px;
}

.rank-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.full-rank-list {
  grid-template-columns: 1fr;
}

.rank-row {
  display: grid;
  grid-template-columns: 54px 96px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.10);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.58);
  transition: border-color 0.24s ease, transform 0.24s ease;
}

.rank-row:hover {
  border-color: rgba(16, 185, 129, 0.52);
  transform: translateX(4px);
}

.rank-row img {
  width: 96px;
  height: 54px;
  border-radius: 10px;
  background: #0f172a;
}

.rank-num {
  color: #34d399;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

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

.rank-info strong,
.rank-info em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-info strong {
  color: white;
}

.rank-info em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.filter-panel {
  position: sticky;
  top: 66px;
  z-index: 20;
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 0 0 var(--radius) var(--radius);
  background: rgba(2, 6, 23, 0.86);
  backdrop-filter: blur(16px);
}

.single-search {
  position: static;
  margin-top: -24px;
  border-radius: var(--radius);
}

.search-box input {
  width: 100%;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  outline: none;
  background: rgba(15, 23, 42, 0.82);
  color: white;
}

.search-box input:focus {
  border-color: rgba(16, 185, 129, 0.62);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

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

.filter-button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.58);
  color: var(--soft);
  cursor: pointer;
  transition: border-color 0.24s ease, background 0.24s ease, color 0.24s ease;
}

.filter-button:hover,
.filter-button.is-active {
  border-color: rgba(16, 185, 129, 0.55);
  background: var(--brand-soft);
  color: #a7f3d0;
}

.movie-card.is-hidden,
.rank-row.is-hidden {
  display: none;
}

.page-hero {
  padding: 136px 0 74px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(2, 6, 23, 0.96));
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.breadcrumb {
  display: inline-flex;
  margin-bottom: 18px;
  color: #34d399;
  font-weight: 800;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 136px 0 78px;
}

.detail-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
}

.detail-bg span {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.56), #020617 88%), linear-gradient(90deg, #020617 0%, rgba(2, 6, 23, 0.40) 60%, #020617 100%);
}

.detail-layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 34px;
  align-items: end;
}

.poster-card {
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: #0f172a;
  box-shadow: var(--shadow);
}

.detail-copy {
  max-width: 820px;
}

.detail-copy .primary-button {
  margin-top: 28px;
}

.watch-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: stretch;
}

.player-box {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: #000;
  box-shadow: var(--shadow);
}

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

.player-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  border: 0;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.64));
  color: white;
  cursor: pointer;
}

.player-overlay.is-hidden {
  display: none;
}

.player-symbol {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.92);
  box-shadow: 0 0 44px rgba(16, 185, 129, 0.38);
  font-size: 26px;
}

.watch-copy {
  padding: 26px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
}

.prose-section {
  max-width: 960px;
}

.prose-section p {
  margin-bottom: 26px;
  color: #cbd5e1;
  font-size: 17px;
}

.site-footer {
  padding: 56px 0 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.10);
  background: rgba(2, 6, 23, 0.92);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
}

.footer-brand {
  margin-bottom: 10px;
  color: white;
  font-size: 22px;
  font-weight: 900;
}

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

.footer-links a {
  color: var(--muted);
  transition: color 0.24s ease;
}

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

.footer-bottom {
  width: min(100% - 32px, var(--container));
  margin: 34px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(148, 163, 184, 0.10);
  color: var(--muted-strong);
  text-align: center;
  font-size: 14px;
}

@media (max-width: 1120px) {
  .four-cols,
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 620px;
  }

  .hero-content {
    padding-bottom: 88px;
  }

  .hero-arrow {
    display: none;
  }

  .three-cols,
  .two-cols,
  .four-cols,
  .catalog-grid,
  .category-grid,
  .category-card-grid,
  .rank-list,
  .footer-grid,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .poster-card {
    width: min(100%, 320px);
  }

  .compact-card {
    grid-template-columns: 1fr;
  }

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

  .rank-pill {
    display: none;
  }
}

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

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

  .hero {
    height: auto;
    min-height: 660px;
  }

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

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

  .section {
    padding: 52px 0;
  }

  .section-head {
    display: block;
  }

  .section-head .text-link {
    display: inline-flex;
    margin-top: 12px;
  }

  .scroll-card {
    flex-basis: 260px;
  }

  .filter-panel {
    top: 66px;
    width: 100%;
    border-radius: 0;
  }

  .rank-row {
    grid-template-columns: 36px 74px 1fr;
    gap: 10px;
    padding: 10px;
  }

  .rank-row img {
    width: 74px;
    height: 46px;
  }

  .detail-hero,
  .page-hero {
    padding-top: 112px;
  }
}
