:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.72);
  --panel-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --green: #34d399;
  --orange: #fb923c;
  --pink: #f472b6;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(34, 211, 238, 0.12), transparent 32rem),
    radial-gradient(circle at 85% 5%, rgba(59, 130, 246, 0.14), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.04), rgba(2, 6, 23, 0.85));
  z-index: -1;
}

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

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

button,
input,
select {
  font: inherit;
}

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

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

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 72px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

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

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  box-shadow: 0 12px 28px rgba(34, 211, 238, 0.28);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #cbd5e1;
  font-weight: 600;
}

.desktop-nav a,
.mobile-nav a,
.footer-links a,
.text-link {
  transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-links a:hover,
.text-link:hover {
  color: var(--cyan);
}

.menu-btn {
  display: none;
  border: 1px solid var(--line);
  color: #e2e8f0;
  background: rgba(15, 23, 42, 0.72);
  padding: 8px 14px;
  border-radius: 999px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.mobile-nav.open {
  display: grid;
}

.hero {
  position: relative;
  height: min(760px, calc(100vh - 72px));
  min-height: 560px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-bg,
.detail-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #0f172a, #082f49 50%, #020617);
}

.image-hidden {
  opacity: 0;
}

.hero-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.68) 42%, rgba(2, 6, 23, 0.2) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 44%, rgba(2, 6, 23, 0.28) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  padding-bottom: 112px;
  max-width: 1180px;
}

.eyebrow,
.section-kicker {
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 12px;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 8vw, 76px);
  line-height: 1.02;
  font-weight: 900;
  text-shadow: 0 14px 60px rgba(0, 0, 0, 0.5);
}

.hero p {
  max-width: 700px;
  margin: 22px 0 0;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 22px);
}

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

.hero-tags {
  margin-top: 24px;
}

.hero-tags span,
.tag-row span {
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(8, 47, 73, 0.52);
  color: #e0f2fe;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
}

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

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

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

.btn.primary {
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  box-shadow: 0 18px 46px rgba(34, 211, 238, 0.25);
}

.btn.ghost {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.28);
  color: #e2e8f0;
}

.btn.subtle {
  background: rgba(34, 211, 238, 0.12);
  color: #e0f2fe;
  border-color: rgba(34, 211, 238, 0.24);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  right: max(24px, calc((100vw - 1180px) / 2));
  bottom: 54px;
  display: flex;
  gap: 10px;
}

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

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

.feature-search {
  transform: translateY(-42px);
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
  align-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(15, 23, 42, 0.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.feature-search h2,
.section-head h2,
.page-hero h1 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.15;
}

.search-box,
.filter-panel {
  display: flex;
  gap: 12px;
}

.search-box input,
.filter-panel input,
.filter-panel select {
  width: 100%;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(2, 6, 23, 0.72);
  color: var(--text);
  padding: 0 18px;
  outline: none;
}

.search-box input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(34, 211, 238, 0.12);
}

.search-box button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  background: var(--cyan);
  color: #06202a;
  font-weight: 900;
  padding: 0 26px;
  cursor: pointer;
}

.section-block {
  padding-block: 72px;
}

.band {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.58), rgba(2, 6, 23, 0.2), rgba(15, 23, 42, 0.58));
  border-block: 1px solid var(--line);
}

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

.section-head.small {
  margin-bottom: 16px;
}

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

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

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

.poster-grid,
.small-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.movie-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.54);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-5px) scale(1.01);
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow: 0 26px 74px rgba(0, 0, 0, 0.32);
}

.poster {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: linear-gradient(135deg, #0f172a, #082f49 50%, #020617);
}

.movie-card.compact .poster {
  aspect-ratio: 3 / 4;
}

.poster img,
.category-card img,
.rank-cover img,
.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease, opacity 0.2s ease;
}

.movie-card:hover .poster img,
.category-card:hover img,
.rank-item:hover .rank-cover img {
  transform: scale(1.08);
}

.poster::after,
.rank-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.72), transparent 58%);
}

.year-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  background: rgba(2, 6, 23, 0.84);
  color: #e2e8f0;
  font-weight: 800;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
}

.play-hover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  font-size: 34px;
  color: white;
  background: rgba(2, 6, 23, 0.32);
  transition: opacity 0.2s ease;
}

.movie-card:hover .play-hover {
  opacity: 1;
}

.card-body {
  padding: 16px;
}

.card-body h3 {
  margin: 0 0 8px;
  color: white;
  line-height: 1.35;
  font-size: 17px;
}

.movie-card.compact .card-body h3 {
  font-size: 15px;
}

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

.meta-line,
.card-desc,
.rank-info p,
.page-hero p,
.detail-info .lead,
.detail-content p,
.site-footer p {
  color: var(--muted);
}

.meta-line {
  margin: 0 0 10px;
  font-size: 13px;
}

.card-desc {
  margin: 0 0 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
}

.movie-card.compact .card-desc {
  display: none;
}

.category-stack {
  display: grid;
  gap: 48px;
}

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

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

.rank-item {
  display: grid;
  grid-template-columns: 52px 140px 1fr;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.44);
  padding: 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(15, 23, 42, 0.72);
}

.rank-number {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  font-weight: 900;
}

.rank-cover {
  position: relative;
  height: 86px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #082f49);
}

.rank-info h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.rank-info p {
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.rank-meta,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: #cbd5e1;
  font-size: 13px;
}

.rank-meta span,
.detail-meta span {
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.5);
}

.page-hero {
  padding: 86px 0 52px;
  background:
    radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.14), transparent 28rem),
    linear-gradient(180deg, rgba(15, 23, 42, 0.54), rgba(2, 6, 23, 0));
  border-bottom: 1px solid var(--line);
}

.page-hero.simple p {
  max-width: 760px;
  font-size: 18px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  color: #cbd5e1;
  font-size: 14px;
}

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

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

.category-card a {
  position: relative;
  display: grid;
  min-height: 250px;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(8, 47, 73, 0.42));
  box-shadow: var(--shadow);
}

.category-card img {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  background: linear-gradient(135deg, #0f172a, #082f49);
}

.category-card div {
  position: relative;
  z-index: 2;
  align-self: end;
  padding: 28px;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.92), transparent);
}

.category-card p {
  margin: 0 0 8px;
  color: var(--cyan);
  font-weight: 900;
}

.category-card h2 {
  margin: 0 0 18px;
  font-size: 21px;
  line-height: 1.45;
}

.category-card span {
  color: #e0f2fe;
  font-weight: 800;
}

.filter-panel {
  margin-bottom: 24px;
}

.filter-panel select {
  max-width: 180px;
}

.detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 620px;
}

.detail-mask {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.72) 50%, rgba(2, 6, 23, 0.48)),
    linear-gradient(0deg, #020617, rgba(2, 6, 23, 0.22));
}

.detail-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 44px;
  align-items: end;
  padding: 92px 0 70px;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, #0f172a, #082f49);
  box-shadow: var(--shadow);
}

.detail-info h1 {
  margin: 18px 0 18px;
  font-size: clamp(38px, 7vw, 70px);
  line-height: 1.04;
}

.detail-info .lead {
  max-width: 780px;
  font-size: 20px;
  margin-bottom: 22px;
}

.detail-tags {
  margin: 22px 0 28px;
}

.player-section {
  margin-top: -32px;
  position: relative;
  z-index: 4;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(34, 211, 238, 0.2);
  background: #000;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.player-shell video {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), rgba(2, 6, 23, 0.3));
  cursor: pointer;
}

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

.play-overlay span {
  width: 92px;
  height: 92px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: white;
  font-size: 40px;
  box-shadow: 0 20px 60px rgba(34, 211, 238, 0.28);
}

.detail-content {
  padding-block: 64px;
}

.detail-content article {
  max-width: 920px;
}

.detail-content h2 {
  margin: 0 0 14px;
  font-size: 28px;
}

.detail-content p {
  margin: 0 0 30px;
  font-size: 18px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.78);
  padding: 40px 0;
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin-inline: auto;
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

.footer-inner p {
  max-width: 560px;
  margin: 10px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-content: flex-start;
  color: #cbd5e1;
  font-weight: 700;
}

.hidden-by-filter {
  display: none !important;
}

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

  .menu-btn {
    display: inline-flex;
  }

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

  .rank-list,
  .category-grid,
  .feature-search,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-poster {
    width: min(320px, 72vw);
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 620px;
  }

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

  .hero-dots {
    left: 16px;
    right: auto;
  }

  .feature-search {
    transform: none;
    margin-top: 24px;
  }

  .search-box,
  .filter-panel,
  .footer-inner {
    flex-direction: column;
  }

  .filter-panel select {
    max-width: none;
  }

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

  .feature-grid,
  .poster-grid,
  .small-grid {
    grid-template-columns: 1fr;
  }

  .rank-item {
    grid-template-columns: 42px 94px 1fr;
    gap: 10px;
    padding: 10px;
  }

  .rank-cover {
    height: 68px;
  }

  .detail-grid {
    padding-top: 58px;
  }

  .detail-info .lead,
  .detail-content p {
    font-size: 16px;
  }
}
