:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.86);
  --panel-solid: #0f172a;
  --panel-light: rgba(30, 41, 59, 0.78);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(34, 211, 238, 0.28);
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-strong: #cbd5e1;
  --accent: #22d3ee;
  --accent-dark: #0891b2;
  --green: #22c55e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  --radius: 22px;
  --radius-sm: 14px;
  --container: 1200px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(34, 211, 238, 0.16), transparent 26rem),
    radial-gradient(circle at 90% 10%, rgba(34, 197, 94, 0.12), transparent 30rem),
    linear-gradient(180deg, #020617 0%, #0b1120 48%, #020617 100%);
  color: var(--text);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

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

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

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

.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 50%;
  background: rgba(8, 145, 178, 0.16);
  color: var(--accent);
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.2);
  transition: transform 0.7s ease;
}

.brand:hover .brand-mark {
  transform: rotate(180deg);
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  overflow: hidden;
  max-width: 220px;
  color: #ffffff;
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  color: rgba(103, 232, 249, 0.78);
  font-size: 0.74rem;
}

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

.nav-link {
  color: #cbd5e1;
  font-weight: 650;
  transition: color 0.2s ease;
}

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

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

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  border-radius: 99px;
  background: currentColor;
}

.mobile-nav {
  display: none;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.95);
}

.mobile-nav.is-open {
  display: grid;
  gap: 6px;
  padding: 12px 16px 18px;
}

.mobile-nav-link {
  border-radius: 14px;
  padding: 12px 14px;
  color: #cbd5e1;
  font-weight: 700;
}

.mobile-nav-link:hover,
.mobile-nav-link.is-active {
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent);
}

.hero-carousel {
  position: relative;
  min-height: 70vh;
  overflow: hidden;
  background: #020617;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.hero-background,
.hero-background img,
.hero-background::before {
  position: absolute;
  inset: 0;
}

.hero-background {
  background:
    linear-gradient(135deg, rgba(8, 145, 178, 0.22), rgba(15, 23, 42, 0.88)),
    #0f172a;
}

.hero-background::before {
  content: attr(data-title);
  display: grid;
  place-items: center;
  padding: 24px;
  color: rgba(226, 232, 240, 0.12);
  font-size: clamp(2rem, 8vw, 7rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
}

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

.hero-gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-gradient-bottom {
  background: linear-gradient(to top, #020617 0%, rgba(2, 6, 23, 0.66) 48%, rgba(2, 6, 23, 0.26) 100%);
}

.hero-gradient-side {
  background: linear-gradient(to right, rgba(2, 6, 23, 0.86), rgba(2, 6, 23, 0.18) 58%, rgba(2, 6, 23, 0.54));
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 70vh;
  align-items: flex-end;
  padding-bottom: 84px;
}

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

.hero-badges,
.detail-badges,
.tag-row,
.stat-row,
.category-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.hero-badges span,
.detail-badges span,
.tag-row span,
.category-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  padding: 4px 12px;
  background: rgba(15, 23, 42, 0.64);
  color: #cffafe;
  font-size: 0.82rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.hero-copy h1 {
  margin: 20px 0 14px;
  font-size: clamp(2.6rem, 7vw, 5.9rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero-copy p {
  max-width: 660px;
  margin: 0;
  color: #cbd5e1;
  font-size: clamp(1rem, 1.8vw, 1.22rem);
}

.hero-actions,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0 22px;
  font-weight: 800;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px) scale(1.02);
}

.btn-primary {
  background: var(--accent-dark);
  color: #ffffff;
  box-shadow: 0 18px 38px rgba(8, 145, 178, 0.35);
}

.btn-primary:hover {
  background: #06b6d4;
  box-shadow: 0 18px 44px rgba(34, 211, 238, 0.36);
}

.btn-glass {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.74);
  color: #ffffff;
  backdrop-filter: blur(10px);
}

.btn-glass:hover {
  border-color: rgba(34, 211, 238, 0.3);
  background: rgba(30, 41, 59, 0.9);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.68);
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
  transition: background 0.2s ease;
}

.hero-arrow:hover {
  background: rgba(30, 41, 59, 0.92);
}

.hero-arrow-left {
  left: 18px;
}

.hero-arrow-right {
  right: 18px;
}

.hero-dots {
  position: absolute;
  right: 0;
  bottom: 34px;
  left: 0;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 9px;
}

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

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

.main-content {
  padding: 56px 0 76px;
}

.section-block {
  margin-top: 64px;
}

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

.section-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-heading h2,
.filter-panel h1,
.category-hero h1,
.detail-title h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.section-heading p,
.category-hero p,
.filter-panel p,
.detail-title p,
.footer-grid p {
  margin: 10px 0 0;
  color: var(--muted);
}

.section-link {
  flex: 0 0 auto;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 999px;
  padding: 9px 16px;
  color: #cffafe;
  font-weight: 800;
}

.section-link:hover {
  background: rgba(34, 211, 238, 0.1);
}

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

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

.movie-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.76);
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.22);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.movie-card:hover {
  border-color: rgba(34, 211, 238, 0.34);
  box-shadow: 0 24px 50px rgba(2, 6, 23, 0.38);
  transform: translateY(-5px);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 20%, rgba(34, 211, 238, 0.22), transparent 12rem),
    linear-gradient(135deg, #0f172a, #1e293b);
}

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

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

.poster-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  color: rgba(226, 232, 240, 0.45);
  font-size: 1.1rem;
  font-weight: 900;
  line-height: 1.3;
  text-align: center;
}

.card-badge,
.rank-badge,
.play-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  backdrop-filter: blur(8px);
}

.card-badge {
  top: 12px;
  right: 12px;
  padding: 5px 9px;
  background: rgba(2, 6, 23, 0.7);
  color: #ffffff;
}

.rank-badge {
  top: 12px;
  left: 12px;
  padding: 5px 9px;
  background: rgba(34, 211, 238, 0.22);
  color: #cffafe;
}

.play-chip {
  right: 12px;
  bottom: 12px;
  min-height: 30px;
  padding: 5px 11px;
  background: rgba(8, 145, 178, 0.88);
  color: #ffffff;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.movie-card:hover .play-chip {
  opacity: 1;
  transform: translateY(0);
}

.movie-card-body {
  display: grid;
  gap: 10px;
  padding: 15px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #67e8f9;
  font-size: 0.78rem;
  font-weight: 800;
}

.movie-card h2 {
  display: -webkit-box;
  overflow: hidden;
  min-height: 2.8em;
  margin: 0;
  color: #ffffff;
  font-size: 1.02rem;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.movie-card h2 a:hover {
  color: var(--accent);
}

.movie-card p {
  display: -webkit-box;
  overflow: hidden;
  min-height: 4.8em;
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tag-row span {
  min-height: 24px;
  padding: 2px 8px;
  color: #cbd5e1;
  font-size: 0.72rem;
}

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

.category-card {
  position: relative;
  overflow: hidden;
  min-height: 210px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius);
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 11rem),
    rgba(15, 23, 42, 0.8);
  box-shadow: 0 18px 38px rgba(2, 6, 23, 0.18);
}

.category-card::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -34px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.14);
  filter: blur(8px);
}

.category-card:hover {
  border-color: rgba(34, 211, 238, 0.32);
  transform: translateY(-3px);
}

.category-card strong {
  display: block;
  color: #ffffff;
  font-size: 1.32rem;
}

.category-card p {
  position: relative;
  z-index: 1;
  color: var(--muted);
}

.category-count {
  display: inline-flex;
  margin-top: 18px;
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(34, 211, 238, 0.12);
  color: #cffafe;
  font-size: 0.82rem;
  font-weight: 900;
}

.category-hero,
.filter-panel,
.detail-hero,
.player-shell,
.content-panel,
.side-panel {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: calc(var(--radius) + 4px);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.12), transparent 20rem),
    rgba(15, 23, 42, 0.76);
  box-shadow: var(--shadow);
}

.category-hero,
.filter-panel,
.detail-hero {
  padding: clamp(24px, 4vw, 44px);
}

.filter-panel {
  display: grid;
  gap: 22px;
  margin-bottom: 28px;
}

.filter-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, 190px));
  gap: 14px;
}

.filter-controls label {
  display: grid;
  gap: 7px;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.filter-controls input,
.filter-controls select {
  min-height: 46px;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(2, 6, 23, 0.46);
  color: #ffffff;
  outline: none;
}

.filter-controls input:focus,
.filter-controls select:focus {
  border-color: rgba(34, 211, 238, 0.55);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.08);
}

.filter-result {
  min-height: 24px;
  color: #cbd5e1;
}

.ranking-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
}

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

.ranking-item {
  display: grid;
  grid-template-columns: 48px 62px 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  padding: 11px;
  background: rgba(15, 23, 42, 0.74);
}

.ranking-item:hover {
  border-color: rgba(34, 211, 238, 0.34);
  background: rgba(30, 41, 59, 0.78);
}

.ranking-number {
  color: var(--accent);
  font-size: 1.2rem;
  font-weight: 900;
  text-align: center;
}

.ranking-item img {
  width: 62px;
  height: 86px;
  border-radius: 12px;
  object-fit: cover;
  background: #1e293b;
}

.ranking-copy {
  min-width: 0;
}

.ranking-copy strong {
  display: block;
  overflow: hidden;
  color: #ffffff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-copy small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ranking-score {
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(34, 211, 238, 0.12);
  color: #cffafe;
  font-size: 0.82rem;
  font-weight: 900;
}

.detail-hero {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(20px, 4vw, 36px);
  align-items: end;
  margin-bottom: 28px;
}

.detail-poster {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: var(--radius);
  aspect-ratio: 2 / 3;
  background: rgba(30, 41, 59, 0.8);
  box-shadow: 0 28px 60px rgba(2, 6, 23, 0.32);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  color: #94a3b8;
  font-size: 0.9rem;
}

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

.detail-badges {
  margin: 18px 0 0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.player-shell {
  overflow: hidden;
  padding: 0;
}

.player-frame {
  position: relative;
  overflow: hidden;
  background: #000000;
  aspect-ratio: 16 / 9;
}

.video-player {
  width: 100%;
  height: 100%;
  background: #000000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  background: radial-gradient(circle, rgba(2, 6, 23, 0.12), rgba(2, 6, 23, 0.58));
  color: #ffffff;
  transition: opacity 0.2s ease;
}

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

.player-overlay span {
  display: inline-grid;
  width: 78px;
  height: 78px;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.5);
  border-radius: 999px;
  background: rgba(8, 145, 178, 0.82);
  font-size: 2.2rem;
  box-shadow: 0 22px 48px rgba(8, 145, 178, 0.35);
}

.player-meta {
  padding: 18px;
  color: #cbd5e1;
}

.content-panel,
.side-panel {
  padding: 24px;
}

.content-panel + .content-panel {
  margin-top: 20px;
}

.content-panel h2,
.side-panel h2 {
  margin: 0 0 14px;
  color: #ffffff;
  font-size: 1.35rem;
}

.content-panel p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.9;
}

.content-panel p + p {
  margin-top: 14px;
}

.side-panel {
  position: sticky;
  top: 96px;
}

.side-panel .ranking-list {
  gap: 10px;
}

.side-panel .ranking-item {
  grid-template-columns: 42px 54px 1fr;
}

.side-panel .ranking-score {
  display: none;
}

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 6, 23, 0.68);
  padding: 44px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
  gap: 28px;
}

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

.footer-grid h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: 1rem;
}

.footer-grid a {
  display: block;
  width: fit-content;
  margin-top: 8px;
  color: #94a3b8;
}

.footer-grid a:hover {
  color: var(--accent);
}

.empty-state {
  display: none;
  border: 1px dashed rgba(148, 163, 184, 0.25);
  border-radius: var(--radius);
  padding: 30px;
  color: #94a3b8;
  text-align: center;
}

[data-filter-scope].is-empty .empty-state {
  display: block;
}

[data-card][hidden] {
  display: none !important;
}

@media (min-width: 768px) {
  .hero-carousel,
  .hero-content {
    min-height: 80vh;
  }
}

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

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

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

  .side-panel {
    position: static;
  }
}

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

  .nav-toggle {
    display: block;
  }

  .hero-arrow {
    display: none;
  }

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

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

  .detail-hero {
    grid-template-columns: 150px 1fr;
  }

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

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

  .brand-copy strong {
    max-width: 160px;
    font-size: 1.05rem;
  }

  .hero-copy h1 {
    font-size: 2.8rem;
  }

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

  .section-heading {
    display: grid;
  }

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

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

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

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

  .detail-poster {
    width: min(100%, 220px);
  }

  .ranking-item {
    grid-template-columns: 42px 54px 1fr;
  }

  .ranking-score {
    display: none;
  }
}
