:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.88);
  --panel-strong: #0f172a;
  --muted: #94a3b8;
  --text: #e2e8f0;
  --white: #ffffff;
  --line: rgba(148, 163, 184, 0.18);
  --accent: #34d399;
  --accent-strong: #10b981;
  --accent-soft: rgba(52, 211, 153, 0.16);
  --gold: #facc15;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(16, 185, 129, 0.18), transparent 32rem),
    radial-gradient(circle at 86% 18%, rgba(14, 165, 233, 0.15), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
}

body.is-menu-open {
  overflow: hidden;
}

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

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #111827;
}

button,
input,
select {
  font: inherit;
}

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

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

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  gap: 22px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  color: #022c22;
  background: linear-gradient(135deg, #6ee7b7, #22d3ee);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.28);
}

.brand-text {
  font-size: 1.1rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: #cbd5e1;
  transition: 0.2s ease;
}

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

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

.hero {
  position: relative;
  overflow: hidden;
  min-height: 680px;
  padding: 80px 0 70px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% 0 auto 0;
  height: 75%;
  background: radial-gradient(circle at 50% 0%, rgba(52, 211, 153, 0.26), transparent 58%);
  pointer-events: none;
}

.hero-slider {
  position: relative;
}

.hero-slide {
  display: none;
  align-items: center;
  gap: 46px;
}

.hero-slide.is-active {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  animation: fadeUp 0.55s ease both;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px 13px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(6, 78, 59, 0.28);
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.4rem, 6vw, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.08em;
  color: var(--white);
}

.hero h1 span {
  display: block;
  color: var(--accent);
}

.hero-desc {
  max-width: 650px;
  margin: 0 0 28px;
  font-size: 1.08rem;
  line-height: 1.9;
  color: #cbd5e1;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--white);
  background: rgba(15, 23, 42, 0.72);
  transition: 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(52, 211, 153, 0.52);
}

.btn-primary {
  color: #022c22;
  border-color: transparent;
  background: linear-gradient(135deg, #6ee7b7, #22d3ee);
  box-shadow: 0 14px 30px rgba(16, 185, 129, 0.24);
  font-weight: 800;
}

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

.hero-tags span,
.tag-row span {
  padding: 6px 10px;
  border-radius: 999px;
  color: #a7f3d0;
  background: rgba(15, 118, 110, 0.18);
  border: 1px solid rgba(45, 212, 191, 0.16);
  font-size: 0.82rem;
}

.hero-visual {
  position: relative;
  z-index: 2;
}

.hero-poster {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5.2;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

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

.hero-card-float {
  position: absolute;
  left: -36px;
  bottom: 34px;
  max-width: 280px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(14px);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.36);
}

.hero-card-float strong {
  display: block;
  color: var(--white);
  font-size: 1.05rem;
}

.hero-card-float p {
  margin: 8px 0 0;
  color: #cbd5e1;
  line-height: 1.6;
  font-size: 0.92rem;
}

.hero-controls {
  display: flex;
  gap: 10px;
  margin-top: 34px;
}

.hero-dot {
  width: 36px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.32);
  cursor: pointer;
}

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

.search-panel {
  position: relative;
  z-index: 3;
  margin-top: -34px;
}

.search-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.search-box input,
.filter-row input,
.filter-row select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0 16px;
  color: var(--white);
  background: rgba(2, 6, 23, 0.76);
  outline: none;
}

.search-box input:focus,
.filter-row input:focus,
.filter-row select:focus {
  border-color: rgba(52, 211, 153, 0.65);
}

main {
  padding-bottom: 64px;
}

.section-block,
.page-hero,
.detail-layout,
.category-cloud,
.filter-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 54px auto 0;
}

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

.section-head h2,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  color: var(--white);
  letter-spacing: -0.04em;
}

.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.section-head p,
.page-hero p,
.category-card p,
.detail-info p,
.footer-grid p {
  color: var(--muted);
  line-height: 1.8;
}

.section-more {
  color: var(--accent);
  font-weight: 700;
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 211, 153, 0.42);
}

.poster-link {
  position: relative;
  display: block;
  aspect-ratio: 16 / 22;
  overflow: hidden;
}

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

.score,
.rank-num {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.score {
  right: 12px;
  top: 12px;
  min-width: 44px;
  height: 30px;
  border-radius: 999px;
  color: #422006;
  background: linear-gradient(135deg, #fde68a, #f59e0b);
}

.rank-num {
  left: 12px;
  top: 12px;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  color: #022c22;
  background: linear-gradient(135deg, #6ee7b7, #22d3ee);
}

.card-body {
  padding: 16px;
}

.card-meta,
.detail-meta,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #a7f3d0;
  font-size: 0.86rem;
}

.card-meta span,
.detail-meta span,
.breadcrumb a,
.breadcrumb span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.12);
}

.card-body h3 {
  margin: 12px 0 8px;
  color: var(--white);
  font-size: 1.08rem;
  line-height: 1.35;
}

.card-body p {
  min-height: 72px;
  margin: 0 0 14px;
  color: #cbd5e1;
  line-height: 1.65;
  font-size: 0.92rem;
}

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

.category-card {
  display: block;
  min-height: 174px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.14), transparent),
    rgba(15, 23, 42, 0.74);
  transition: 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(52, 211, 153, 0.45);
}

.category-card h2,
.category-card h3 {
  margin: 0 0 10px;
  color: var(--white);
}

.category-count {
  display: inline-flex;
  margin-top: 12px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #022c22;
  background: var(--accent);
  font-weight: 800;
}

.page-hero {
  padding: 64px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 35%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.86));
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 4.8rem);
}

.page-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  font-size: 1.05rem;
}

.filter-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.78);
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 180px 180px;
  gap: 12px;
}

.empty-state {
  display: none;
  margin-top: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.72);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: start;
}

.player-panel,
.detail-info,
.related-panel {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: var(--shadow);
}

.player-panel {
  overflow: hidden;
}

.player {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}

.player-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.play-trigger {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border: 0;
  color: var(--white);
  background: rgba(2, 6, 23, 0.3);
  cursor: pointer;
}

.play-trigger span {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  color: #022c22;
  background: linear-gradient(135deg, #6ee7b7, #22d3ee);
  font-size: 2rem;
  box-shadow: 0 18px 46px rgba(16, 185, 129, 0.36);
}

.player.is-playing .play-trigger {
  display: none;
}

.detail-copy {
  padding: 24px;
}

.detail-copy h2 {
  margin: 0 0 12px;
  color: var(--white);
}

.detail-copy p {
  color: #cbd5e1;
  line-height: 1.9;
}

.detail-info {
  overflow: hidden;
}

.detail-poster {
  aspect-ratio: 4 / 5.2;
}

.detail-info-body {
  padding: 24px;
}

.detail-info h1 {
  margin-top: 16px;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.08;
}

.detail-info .tag-row {
  margin-top: 18px;
}

.related-panel {
  grid-column: 1 / -1;
  padding: 24px;
}

.related-panel h2 {
  margin: 0 0 18px;
  color: var(--white);
}

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

.related-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(2, 6, 23, 0.5);
}

.related-card img {
  aspect-ratio: 16 / 22;
}

.related-card strong {
  display: block;
  padding: 10px;
  color: var(--white);
  font-size: 0.9rem;
  line-height: 1.4;
}

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

.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 32px 0;
}

.footer-grid strong {
  color: var(--white);
  font-size: 1.1rem;
}

.footer-grid p {
  margin: 8px 0 0;
}

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

.footer-links a {
  color: #cbd5e1;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero-slide.is-active,
  .detail-layout {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 720px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-nav {
    position: fixed;
    inset: 72px 16px auto 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(2, 6, 23, 0.96);
    box-shadow: var(--shadow);
  }

  body.is-menu-open .site-nav {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding: 54px 0 46px;
  }

  .hero-card-float {
    left: 18px;
    right: 18px;
    bottom: 18px;
    max-width: none;
  }

  .search-box,
  .filter-row {
    grid-template-columns: 1fr;
  }

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

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

  .page-hero {
    padding: 32px 22px;
    border-radius: 24px;
  }

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

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