:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(148, 163, 184, 0.18);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --dim: #64748b;
  --cyan: #22d3ee;
  --cyan-strong: #06b6d4;
  --cyan-soft: rgba(34, 211, 238, 0.14);
  --amber: #f59e0b;
  --rose: #fb7185;
  --radius: 24px;
  --shadow: 0 24px 80px rgba(2, 8, 23, 0.48);
  --container: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 10%, rgba(34, 211, 238, 0.16), transparent 28rem),
    radial-gradient(circle at 88% 0%, rgba(14, 165, 233, 0.16), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 48%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 80%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, transparent 0%, rgba(2, 6, 23, 0.6) 100%);
}

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

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.94));
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px rgba(2, 8, 23, 0.38);
}

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

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

.brand-mark {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.34);
}

.brand-mark::after {
  position: absolute;
  inset: -7px;
  content: "";
  border-radius: 22px;
  background: rgba(34, 211, 238, 0.14);
  filter: blur(12px);
  z-index: -1;
}

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

.brand-text strong {
  color: #ffffff;
  font-size: 1.28rem;
  letter-spacing: 0.02em;
}

.brand-text em {
  color: rgba(103, 232, 249, 0.78);
  font-size: 0.76rem;
  font-style: normal;
}

.nav-panel {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links,
.nav-cats,
.footer-links,
.footer-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.nav-link,
.nav-cats a,
.footer-links a,
.footer-tags a {
  color: var(--muted);
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.nav-cats a:hover,
.footer-links a:hover,
.footer-tags a:hover {
  color: var(--cyan);
}

.nav-link:hover,
.nav-cats a:hover {
  transform: translateY(-1px);
}

.nav-cats {
  font-size: 0.9rem;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(15, 23, 42, 0.8);
}

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

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

.hero-carousel {
  position: relative;
  overflow: hidden;
  min-height: 640px;
  border-bottom: 1px solid var(--line);
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.72) 46%, rgba(2, 6, 23, 0.22) 100%),
    linear-gradient(180deg, rgba(2, 6, 23, 0.2) 0%, #020617 100%);
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.65s ease;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.04);
  filter: saturate(1.04) contrast(1.02);
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  min-height: 640px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.65fr);
  align-items: center;
  gap: 42px;
  padding: 62px 0;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.12);
}

.hero-copy h1 {
  margin: 20px 0 16px;
  color: #ffffff;
  font-size: clamp(2.45rem, 6vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
}

.hero-copy p {
  max-width: 650px;
  margin: 0;
  color: rgba(226, 232, 240, 0.86);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-actions,
.detail-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn,
.btn-soft,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn {
  color: #03131b;
  background: linear-gradient(135deg, #67e8f9, #22d3ee 48%, #38bdf8);
  box-shadow: 0 18px 45px rgba(34, 211, 238, 0.26);
}

.btn-soft {
  color: var(--cyan);
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(15, 23, 42, 0.72);
}

.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(15, 23, 42, 0.54);
}

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

.hero-card {
  align-self: stretch;
  min-height: 440px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 32px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

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

.hero-card-body {
  padding: 22px;
}

.hero-card-body strong {
  display: block;
  color: #ffffff;
  font-size: 1.36rem;
  margin-bottom: 8px;
}

.hero-card-body span {
  color: var(--muted);
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 34px;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(16px);
}

.hero-dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.55);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
  width: 36px;
  background: var(--cyan);
}

.section {
  padding: 64px 0;
}

.section.compact {
  padding: 42px 0;
}

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

.section-head h2,
.page-title h1,
.detail-copy h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.section-head p,
.page-title p,
.category-card p,
.detail-copy p,
.synopsis p,
.review-box p {
  color: var(--muted);
}

.section-more {
  color: var(--cyan);
  font-weight: 700;
  white-space: nowrap;
}

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

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

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(15, 23, 42, 0.62);
  box-shadow: 0 12px 38px rgba(2, 8, 23, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(34, 211, 238, 0.36);
  background: rgba(15, 23, 42, 0.88);
  box-shadow: 0 24px 70px rgba(2, 8, 23, 0.44);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.84);
}

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

.movie-card:hover .poster img {
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.05);
}

.poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.88) 100%);
}

.poster-glow {
  position: absolute;
  inset: auto 14px 14px 14px;
  height: 54px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.22);
  filter: blur(28px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

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

.play-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%) scale(0.9);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(34, 211, 238, 0.86);
  box-shadow: 0 0 0 10px rgba(34, 211, 238, 0.14);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.poster-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 800;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(10px);
}

.card-body {
  padding: 17px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: #ffffff;
  font-size: 1.02rem;
  line-height: 1.35;
}

.card-body h3 a:hover {
  color: var(--cyan);
}

.card-meta,
.card-desc {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.card-desc {
  min-height: 2.9em;
}

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

.tag-row span,
.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: rgba(226, 232, 240, 0.82);
  background: rgba(15, 23, 42, 0.62);
  font-size: 0.78rem;
}

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

.category-card {
  position: relative;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 82% 18%, rgba(34, 211, 238, 0.18), transparent 10rem),
    rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 54px rgba(2, 8, 23, 0.24);
}

.category-card::after {
  position: absolute;
  right: -40px;
  bottom: -60px;
  width: 180px;
  height: 180px;
  content: "";
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.11);
  filter: blur(12px);
}

.category-card h3 {
  margin: 0 0 10px;
  color: #ffffff;
  font-size: 1.34rem;
}

.category-card p {
  margin: 0;
}

.category-card .btn-soft {
  align-self: flex-start;
  margin-top: 22px;
}

.rank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
  gap: 28px;
}

.rank-panel,
.glass-panel,
.synopsis,
.review-box {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.68);
  box-shadow: 0 18px 60px rgba(2, 8, 23, 0.24);
  backdrop-filter: blur(14px);
}

.rank-panel {
  padding: 18px;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 42px 58px minmax(0, 1fr) 46px;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.22);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  border-color: rgba(34, 211, 238, 0.24);
  background: rgba(2, 6, 23, 0.38);
}

.rank-item img {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(15, 23, 42, 0.84);
}

.rank-num {
  color: var(--cyan);
  font-size: 1.3rem;
  font-weight: 900;
  text-align: center;
}

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

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

.rank-text strong {
  color: #ffffff;
}

.rank-text em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.86rem;
}

.rank-score {
  color: var(--amber);
  font-weight: 900;
  text-align: right;
}

.filter-scope {
  display: grid;
  gap: 22px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(14px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.36);
}

.search-box span {
  color: var(--cyan);
  font-weight: 800;
}

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

.search-box input::placeholder {
  color: var(--dim);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}

.filter-chip {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(2, 6, 23, 0.24);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.filter-chip:hover,
.filter-chip.active {
  color: #03131b;
  border-color: transparent;
  background: var(--cyan);
}

.no-results {
  display: none;
  padding: 24px;
  border: 1px dashed rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
}

.no-results.is-visible {
  display: block;
}

.page-title {
  padding: 56px 0 28px;
}

.page-title p {
  max-width: 860px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 26px 0;
  color: var(--muted);
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(300px, 0.58fr);
  gap: 30px;
  align-items: stretch;
  margin-bottom: 42px;
}

.player-shell {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 32px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-shell video {
  width: 100%;
  height: 100%;
  min-height: 420px;
  display: block;
  object-fit: cover;
  background: #000000;
}

.player-start {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 45%, rgba(34, 211, 238, 0.22), transparent 13rem),
    linear-gradient(180deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.72));
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-start span {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  font-size: 1.8rem;
  background: rgba(34, 211, 238, 0.9);
  box-shadow: 0 0 0 14px rgba(34, 211, 238, 0.16), 0 24px 70px rgba(2, 8, 23, 0.44);
}

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

.detail-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 80% 20%, rgba(34, 211, 238, 0.16), transparent 12rem),
    rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(14px);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0;
}

.synopsis,
.review-box {
  padding: 26px;
  margin-bottom: 24px;
}

.synopsis h2,
.review-box h2 {
  margin: 0 0 12px;
  color: #ffffff;
}

.text-block p {
  margin: 0 0 1em;
}

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

.footer-inner {
  width: min(100% - 32px, var(--container));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(160px, 0.55fr) minmax(220px, 0.9fr);
  gap: 28px;
  padding: 38px 0;
}

.footer-brand {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 900;
}

.footer-inner p {
  color: var(--muted);
}

.footer-links,
.footer-tags {
  align-content: start;
}

.hide-card {
  display: none;
}

@media (max-width: 1024px) {
  .hero-inner,
  .detail-hero,
  .rank-layout {
    grid-template-columns: 1fr;
  }

  .hero-card {
    display: none;
  }

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

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

@media (max-width: 760px) {
  .site-nav {
    min-height: 66px;
  }

  .brand-text strong {
    font-size: 1.05rem;
  }

  .brand-text em,
  .nav-cats {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .nav-panel {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 74px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: var(--shadow);
  }

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

  .nav-links {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-link {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.24);
  }

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

  .hero-inner {
    padding: 44px 0 86px;
  }

  .hero-copy h1 {
    font-size: clamp(2.25rem, 13vw, 4rem);
  }

  .section {
    padding: 44px 0;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

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

  .card-body {
    padding: 14px;
  }

  .card-desc {
    display: none;
  }

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

  .filter-chips {
    justify-content: flex-start;
  }

  .player-shell,
  .player-shell video {
    min-height: 260px;
  }

  .detail-copy {
    padding: 22px;
  }

  .rank-item {
    grid-template-columns: 34px 48px minmax(0, 1fr) 40px;
  }

  .rank-item img {
    width: 48px;
    height: 64px;
  }
}

@media (max-width: 460px) {
  .movie-grid,
  .movie-grid.dense,
  .category-grid {
    grid-template-columns: 1fr;
  }

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

  .btn,
  .btn-soft,
  .btn-ghost {
    width: 100%;
  }
}
