:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: #0f172a;
  --panel-soft: rgba(15, 23, 42, 0.78);
  --panel-border: rgba(148, 163, 184, 0.18);
  --text: #e5e7eb;
  --muted: #94a3b8;
  --cyan: #06b6d4;
  --cyan-soft: rgba(6, 182, 212, 0.14);
  --blue: #2563eb;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(6, 182, 212, 0.18), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(37, 99, 235, 0.18), transparent 28rem),
    linear-gradient(180deg, #020617 0%, #0f172a 50%, #020617 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(6, 182, 212, 0.12));
}

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

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

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

.header-inner {
  width: min(1280px, calc(100% - 32px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #020617;
  background: linear-gradient(135deg, #22d3ee, #60a5fa);
  box-shadow: 0 10px 35px rgba(6, 182, 212, 0.28);
}

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

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.desktop-nav a,
.mobile-nav a {
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: #fff;
  background: rgba(148, 163, 184, 0.12);
}

.header-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  padding: 4px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
}

.header-search input,
.hero-search input,
.filter-panel input,
.filter-panel select {
  color: var(--text);
  outline: 0;
  border: 0;
  background: transparent;
}

.header-search input {
  width: 240px;
  padding: 8px 14px;
}

.header-search button,
.hero-search button,
.filter-panel select {
  color: #001018;
  border-radius: 999px;
  padding: 8px 16px;
  background: var(--cyan);
  cursor: pointer;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.12);
}

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

.mobile-nav {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
}

.mobile-nav a {
  display: block;
}

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

.hero-slide {
  display: none;
  min-height: 600px;
  background-size: cover;
  background-position: center;
}

.hero-slide.is-active {
  display: block;
  animation: fadeIn 0.6s ease;
}

.hero-inner,
.detail-hero-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.hero-inner {
  min-height: 600px;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 54px;
  align-items: center;
  padding: 64px 0 86px;
}

.eyebrow,
.detail-meta,
.tag-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.eyebrow span,
.tag-row span,
.tag-row a,
.detail-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(6, 182, 212, 0.18);
  border-radius: 999px;
  color: #bae6fd;
  background: var(--cyan-soft);
  font-size: 0.84rem;
}

.hero-copy h1,
.hero-copy h2 {
  margin: 18px 0 8px;
  max-width: 820px;
  font-size: clamp(2.15rem, 6vw, 4.7rem);
  line-height: 1.08;
  letter-spacing: -0.06em;
}

.hero-copy h3 {
  margin: 0 0 16px;
  color: #67e8f9;
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  font-weight: 800;
}

.hero-copy p {
  max-width: 720px;
  margin: 0;
  color: #cbd5e1;
  font-size: 1.08rem;
}

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

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

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

.btn.primary {
  color: #001018;
  background: linear-gradient(135deg, #22d3ee, #60a5fa);
  box-shadow: 0 16px 40px rgba(6, 182, 212, 0.25);
}

.btn.ghost {
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.72);
}

.btn.text {
  color: #67e8f9;
}

.hero-poster {
  position: relative;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, transparent 50%, rgba(2, 6, 23, 0.58));
  pointer-events: none;
}

.hero-control-bar {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(18px);
}

.hero-prev,
.hero-next {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(148, 163, 184, 0.16);
  cursor: pointer;
}

.hero-dots {
  display: flex;
  gap: 8px;
}

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

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

.hero-search {
  position: absolute;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  width: min(640px, calc(100% - 32px));
  display: flex;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(18px);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  padding: 10px 16px;
}

.section-wrap {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.content-card h2 {
  margin: 0;
  line-height: 1.15;
}

.section-heading h2,
.page-hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.65rem);
}

.section-heading a {
  color: #67e8f9;
  font-weight: 800;
}

.section-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: #22d3ee;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

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

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

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

.movie-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  transition: transform 0.24s ease, border-color 0.24s ease, background 0.24s ease;
}

.movie-card:hover {
  transform: translateY(-7px);
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(15, 23, 42, 0.95);
}

.poster-wrap {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

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

.play-badge,
.rank-badge {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.play-badge {
  right: 12px;
  bottom: 12px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #001018;
  background: var(--cyan);
}

.rank-badge {
  top: 10px;
  left: 10px;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  color: #001018;
  background: linear-gradient(135deg, #facc15, #22d3ee);
}

.card-body {
  padding: 14px;
}

.card-title {
  display: -webkit-box;
  min-height: 3em;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-weight: 900;
  line-height: 1.5;
}

.card-meta,
.card-desc,
.horizontal-card p,
.site-footer p,
.page-hero p,
.detail-one-line {
  color: var(--muted);
}

.card-meta {
  margin: 6px 0;
  font-size: 0.86rem;
}

.card-desc {
  display: -webkit-box;
  min-height: 3.2em;
  margin: 0 0 12px;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.92rem;
}

.tag-row {
  gap: 6px;
}

.tag-row span,
.tag-row a {
  min-height: 24px;
  padding: 2px 8px;
  font-size: 0.75rem;
}

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

.category-tile {
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  background:
    radial-gradient(circle at 20% 10%, rgba(34, 211, 238, 0.16), transparent 10rem),
    rgba(15, 23, 42, 0.76);
}

.category-tile > a {
  display: block;
  min-height: 150px;
  padding: 22px;
}

.category-tile span {
  display: block;
  margin-bottom: 14px;
  color: #67e8f9;
  font-weight: 900;
}

.category-tile strong {
  font-size: 1.05rem;
  line-height: 1.5;
}

.category-mini-links {
  display: grid;
  gap: 8px;
  padding: 0 22px 22px;
}

.category-mini-links a {
  color: var(--muted);
  font-size: 0.9rem;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 30px;
  align-items: start;
}

.ranking-panel,
.content-card,
.player-block {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.2);
}

.ranking-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

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

.horizontal-card {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.horizontal-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 14px;
}

.horizontal-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  font-weight: 900;
}

.horizontal-card p {
  display: -webkit-box;
  margin: 4px 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 0.84rem;
}

.horizontal-card span {
  color: #67e8f9;
  font-size: 0.78rem;
}

.page-main {
  min-height: 70vh;
}

.page-hero {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 70px 0 10px;
}

.small-hero > div {
  overflow: hidden;
  padding: 36px;
  border: 1px solid var(--panel-border);
  border-radius: 28px;
  background:
    radial-gradient(circle at 20% 10%, rgba(6, 182, 212, 0.2), transparent 22rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(2, 6, 23, 0.72));
  box-shadow: var(--shadow);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 180px;
  gap: 12px;
  margin-bottom: 24px;
}

.filter-panel input,
.filter-panel select {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--panel-border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
}

.filter-panel select {
  color: var(--text);
  background-color: rgba(15, 23, 42, 0.94);
}

.empty-state {
  padding: 42px;
  border: 1px dashed var(--panel-border);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.category-overviews {
  display: grid;
  gap: 42px;
}

.detail-hero {
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--panel-border);
}

.detail-hero-inner {
  padding: 42px 0 58px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 0.92rem;
}

.breadcrumb a {
  color: #67e8f9;
}

.detail-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.detail-poster {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.detail-info h1 {
  max-width: 900px;
  margin: 10px 0 16px;
  font-size: clamp(2rem, 5vw, 4rem);
  letter-spacing: -0.05em;
}

.detail-one-line {
  max-width: 860px;
  font-size: 1.1rem;
}

.detail-meta {
  margin: 20px 0 14px;
}

.detail-tags {
  margin-bottom: 24px;
}

.player-block {
  padding: 18px;
}

.movie-player {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: #000;
  aspect-ratio: 16 / 9;
}

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

.player-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #fff;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.2), rgba(2, 6, 23, 0.76));
  cursor: pointer;
}

.player-icon {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #001018;
  background: linear-gradient(135deg, #22d3ee, #60a5fa);
  box-shadow: 0 18px 45px rgba(6, 182, 212, 0.28);
  font-size: 2rem;
}

.movie-player.is-playing .player-cover {
  display: none;
}

.prose-section {
  display: grid;
  gap: 20px;
  padding-top: 0;
}

.content-card {
  padding: 28px;
}

.content-card h2 {
  margin-bottom: 14px;
  font-size: 1.5rem;
}

.content-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 1rem;
}

.site-footer {
  border-top: 1px solid var(--panel-border);
  background: rgba(2, 6, 23, 0.74);
}

.footer-inner {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0;
  display: grid;
  gap: 22px;
}

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

.footer-links a {
  color: #67e8f9;
}

.copyright {
  font-size: 0.88rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(1.015);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

  .split-layout {
    grid-template-columns: 1fr;
  }

  .ranking-panel {
    position: static;
  }
}

@media (max-width: 900px) {
  .desktop-nav,
  .header-search {
    display: none;
  }

  .nav-toggle {
    display: block;
    margin-left: auto;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 42px;
  }

  .hero-poster {
    width: min(320px, 72vw);
    margin: 0 auto;
    transform: none;
  }

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

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

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

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

@media (max-width: 680px) {
  .header-inner {
    height: 64px;
  }

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

  .hero-carousel,
  .hero-slide {
    min-height: 720px;
  }

  .hero-search {
    bottom: 84px;
  }

  .hero-control-bar {
    bottom: 24px;
  }

  .hero-actions {
    gap: 10px;
  }

  .btn {
    min-height: 42px;
    padding: 0 15px;
  }

  .section-wrap {
    padding: 42px 0;
  }

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

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

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

  .small-hero > div,
  .content-card {
    padding: 24px;
  }

  .player-block {
    padding: 8px;
    border-radius: 18px;
  }

  .movie-player {
    border-radius: 14px;
  }
}

@media (max-width: 420px) {
  .movie-grid,
  .catalog-grid,
  .compact-grid {
    grid-template-columns: 1fr;
  }

  .hero-search {
    border-radius: 20px;
  }

  .hero-search button {
    padding: 8px 12px;
  }
}
