* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(15, 23, 42, 0.84);
  --bg-card-solid: #111827;
  --line: rgba(148, 163, 184, 0.2);
  --line-strong: rgba(14, 165, 233, 0.35);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #cbd5e1;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --accent-dark: #0369a1;
  --warn: #facc15;
  --radius: 18px;
  --shadow: 0 24px 60px rgba(2, 6, 23, 0.48);
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  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 16% 8%, rgba(14, 165, 233, 0.2), transparent 28rem),
    radial-gradient(circle at 82% 0%, rgba(56, 189, 248, 0.12), transparent 24rem),
    linear-gradient(180deg, #020617 0%, #0f172a 45%, #020617 100%);
}

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

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

button,
input,
select {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  border-bottom: 1px solid rgba(51, 65, 85, 0.95);
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.96));
  box-shadow: 0 16px 34px rgba(2, 6, 23, 0.36);
  backdrop-filter: blur(18px);
}

.nav-shell {
  width: min(1200px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #02131f;
  background: linear-gradient(135deg, #38bdf8, #f8fafc);
  box-shadow: 0 12px 28px rgba(56, 189, 248, 0.24);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 9px 13px;
  border-radius: 999px;
  color: #cbd5e1;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #ffffff;
  background: rgba(14, 165, 233, 0.18);
  transform: translateY(-1px);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.88);
  cursor: pointer;
}

.mobile-panel {
  display: none;
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto 14px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-panel a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #cbd5e1;
}

.mobile-panel a:hover,
.mobile-panel a.active {
  color: #ffffff;
  background: rgba(14, 165, 233, 0.16);
}

.mobile-panel.open {
  display: block;
}

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

.hero {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.05);
  filter: saturate(1.08) contrast(1.04);
}

.hero-slide.active .hero-bg {
  animation: heroZoom 8s ease forwards;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.96) 0%, rgba(2, 6, 23, 0.76) 42%, rgba(2, 6, 23, 0.45) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.06) 46%, rgba(2, 6, 23, 0.72) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) 360px;
  align-items: center;
  gap: 42px;
  width: min(1200px, calc(100% - 32px));
  min-height: 620px;
  margin: 0 auto;
  padding: 70px 0 82px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px 12px;
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.12);
  box-shadow: inset 0 0 24px rgba(14, 165, 233, 0.08);
}

.hero h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.08em;
}

.hero p {
  margin: 18px 0 0;
  color: #dbeafe;
  font-size: clamp(16px, 2.1vw, 20px);
  line-height: 1.8;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #f8fafc;
  background: rgba(30, 41, 59, 0.88);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
  background: rgba(51, 65, 85, 0.92);
}

.btn-primary {
  color: #00111c;
  font-weight: 800;
  background: linear-gradient(135deg, #7dd3fc, #38bdf8);
  box-shadow: 0 16px 35px rgba(14, 165, 233, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #e0f2fe, #38bdf8);
}

.hero-card {
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card img {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

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

.hero-card-body strong {
  display: block;
  font-size: 20px;
  margin-bottom: 10px;
}

.hero-card-body span {
  color: #cbd5e1;
  line-height: 1.6;
}

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

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

.hero-dot.active {
  background: #38bdf8;
}

.section {
  padding: 54px 0;
}

.section-tight {
  padding: 32px 0;
}

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

.section-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: -0.05em;
}

.section-desc {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted-2);
  line-height: 1.85;
}

.grid {
  display: grid;
  gap: 20px;
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.86));
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.32);
  transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.48);
  box-shadow: 0 28px 58px rgba(2, 6, 23, 0.48);
}

.poster-wrap {
  position: relative;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.9);
}

.poster-wrap img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.movie-card:hover .poster-wrap img {
  transform: scale(1.05);
}

.badge-row {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 999px;
  color: #e0f2fe;
  font-size: 12px;
  background: rgba(2, 6, 23, 0.66);
  backdrop-filter: blur(10px);
}

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

.movie-card h2,
.movie-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.movie-card p {
  margin: 10px 0 0;
  color: #cbd5e1;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.category-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(3, 105, 161, 0.22));
  box-shadow: 0 18px 38px rgba(2, 6, 23, 0.34);
  transition: transform 0.24s ease, border-color 0.24s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56, 189, 248, 0.38);
}

.category-card img {
  height: 100%;
  object-fit: cover;
}

.category-body {
  padding: 22px 22px 22px 0;
}

.category-body h2,
.category-body h3 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.category-body p {
  margin: 12px 0 18px;
  color: #cbd5e1;
  line-height: 1.75;
}

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

.rank-item {
  display: grid;
  grid-template-columns: 56px 78px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.78);
  transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
  transform: translateX(4px);
  background: rgba(30, 41, 59, 0.86);
}

.rank-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: #020617;
  font-weight: 900;
  background: linear-gradient(135deg, #38bdf8, #e0f2fe);
}

.rank-item img {
  width: 78px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
}

.rank-text strong {
  display: block;
  font-size: 18px;
}

.rank-text span {
  display: block;
  margin-top: 6px;
  color: #cbd5e1;
  line-height: 1.5;
}

.filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px 170px;
  gap: 12px;
  margin: 26px 0 28px;
}

.filters input,
.filters select {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  color: #f8fafc;
  outline: none;
  background: rgba(15, 23, 42, 0.9);
}

.filters input:focus,
.filters select:focus {
  border-color: rgba(56, 189, 248, 0.62);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 28px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #bae6fd;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 360px;
  gap: 28px;
  padding: 28px 0 54px;
}

.player-card,
.detail-card,
.side-panel {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
}

.player-box {
  position: relative;
  overflow: hidden;
  background: #000000;
}

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

.play-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #ffffff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.06), rgba(2, 6, 23, 0.56));
  cursor: pointer;
}

.play-layer.hidden {
  display: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  color: #02131f;
  font-size: 32px;
  background: linear-gradient(135deg, #f8fafc, #38bdf8);
  box-shadow: 0 16px 40px rgba(14, 165, 233, 0.34);
}

.detail-card {
  margin-top: 18px;
  padding: 26px;
}

.detail-card h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.07em;
}

.detail-card h2,
.side-panel h2 {
  margin: 28px 0 14px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.detail-card p {
  color: #dbeafe;
  line-height: 1.9;
}

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

.side-panel {
  padding: 18px;
}

.side-panel .movie-card {
  margin-bottom: 16px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.tag-cloud span {
  padding: 7px 10px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.1);
}

.site-footer {
  margin-top: 34px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(2, 6, 23, 0.72);
}

.footer-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 14px;
  color: #94a3b8;
}

.footer-shell strong {
  color: #f8fafc;
}

.empty-filter {
  display: none;
  padding: 18px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 16px;
  color: #cbd5e1;
  background: rgba(14, 165, 233, 0.1);
}

.empty-filter.show {
  display: block;
}

@keyframes heroZoom {
  from {
    transform: scale(1.05);
  }
  to {
    transform: scale(1.12);
  }
}

@media (max-width: 1024px) {
  .grid-movies {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hero-card {
    display: none;
  }
}

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

  .mobile-toggle {
    display: inline-grid;
    place-items: center;
  }

  .hero,
  .hero-content {
    min-height: 560px;
  }

  .hero-content {
    padding: 56px 0 78px;
  }

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

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

  .category-card img {
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .category-body {
    padding: 18px;
  }

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

  .rank-item .btn {
    grid-column: 1 / -1;
  }

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

@media (max-width: 520px) {
  .grid-movies,
  .grid-cats {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .section {
    padding: 38px 0;
  }
}
