:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.72);
  --line: rgba(100, 116, 139, 0.35);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --faint: #64748b;
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --blue: #2563eb;
  --green: #22c55e;
  --shadow: 0 24px 80px rgba(8, 145, 178, 0.16);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #0f172a 46%, #020617 100%);
  color: var(--text);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(51, 65, 85, 0.8);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}

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

.logo-text {
  font-size: 24px;
  background: linear-gradient(90deg, var(--cyan), #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.36);
  color: var(--cyan);
  font-size: 14px;
  box-shadow: 0 0 32px rgba(34, 211, 238, 0.18);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-left: auto;
}

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

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

.top-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 260px;
}

.top-search input,
.mobile-search input,
.catalog-toolbar input,
.catalog-toolbar select {
  width: 100%;
  color: var(--text);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(100, 116, 139, 0.45);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.top-search input {
  padding: 10px 42px 10px 14px;
}

.top-search input:focus,
.mobile-search input:focus,
.catalog-toolbar input:focus,
.catalog-toolbar select:focus {
  border-color: rgba(34, 211, 238, 0.8);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.1);
}

.top-search button {
  position: absolute;
  right: 4px;
  width: 36px;
  height: 36px;
  border: 0;
  color: var(--muted);
  background: transparent;
}

.menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  color: var(--text);
  background: transparent;
  font-size: 28px;
}

.mobile-panel {
  display: none;
  padding: 16px;
  border-top: 1px solid rgba(51, 65, 85, 0.75);
  background: rgba(15, 23, 42, 0.98);
}

.mobile-panel.is-open {
  display: grid;
  gap: 14px;
}

.mobile-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.mobile-search input {
  padding: 11px 14px;
}

.mobile-search button {
  border: 0;
  border-radius: 12px;
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(90deg, var(--cyan-dark), var(--blue));
}

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

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

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

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(2, 6, 23, 0.68) 45%, rgba(2, 6, 23, 0.18) 100%),
    linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.18) 46%, rgba(2, 6, 23, 0.34) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding-bottom: 78px;
}

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

.hero-kicker,
.card-meta,
.detail-meta,
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.hero-kicker span,
.eyebrow,
.hero-kicker a {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.hero-kicker span,
.hero-kicker a {
  padding: 6px 12px;
  background: rgba(34, 211, 238, 0.13);
  border: 1px solid rgba(34, 211, 238, 0.42);
  color: var(--cyan);
}

.hero h1 {
  margin: 22px 0 16px;
  max-width: 780px;
  color: #fff;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.hero p {
  max-width: 620px;
  margin: 0 0 24px;
  color: #cbd5e1;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.7;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  color: #cbd5e1;
}

.hero-meta span,
.detail-meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.24);
}

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

.btn-primary,
.btn-secondary,
.section-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  padding: 13px 24px;
  color: #fff;
  background: linear-gradient(90deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 44px rgba(8, 145, 178, 0.28);
}

.btn-secondary,
.section-link {
  padding: 12px 18px;
  color: #bae6fd;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(34, 211, 238, 0.28);
}

.btn-primary:hover,
.btn-secondary:hover,
.section-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  font-size: 32px;
  line-height: 1;
  transform: translateY(-50%);
}

.hero-prev {
  left: 22px;
}

.hero-next {
  right: 22px;
}

.hero-dots {
  position: absolute;
  right: 34px;
  bottom: 34px;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.hero-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.is-active {
  width: 32px;
  background: var(--cyan);
}

.section-block {
  padding: 56px 0 0;
}

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

.section-head.compact {
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  text-transform: uppercase;
}

.section-head h2,
.page-hero h1,
.category-panel h2,
.detail-info h1,
.text-panel h2,
.detail-side h2 {
  margin: 0;
  color: #fff;
  letter-spacing: -0.04em;
}

.section-head h2,
.category-panel h2 {
  font-size: clamp(26px, 4vw, 38px);
}

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

.category-tile {
  position: relative;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid rgba(100, 116, 139, 0.32);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: 0 12px 38px rgba(0, 0, 0, 0.22);
}

.category-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.58;
  transition: transform 0.35s ease;
}

.category-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.2));
}

.category-tile span,
.category-tile em {
  position: absolute;
  z-index: 1;
  left: 18px;
  right: 18px;
}

.category-tile span {
  bottom: 52px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.category-tile em {
  bottom: 20px;
  color: #cbd5e1;
  font-style: normal;
  line-height: 1.5;
}

.category-tile:hover img {
  transform: scale(1.08);
}

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

.movie-card {
  overflow: hidden;
  border: 1px solid rgba(100, 116, 139, 0.34);
  border-radius: var(--radius);
  background: rgba(30, 41, 59, 0.58);
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.22);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(34, 211, 238, 0.62);
  box-shadow: var(--shadow);
}

.card-poster {
  position: relative;
  display: block;
  height: 0;
  padding-top: 132%;
  overflow: hidden;
  background: #0f172a;
}

.card-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.card-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(2, 6, 23, 0.02));
}

.card-duration {
  position: absolute;
  z-index: 1;
  right: 10px;
  bottom: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  color: #fff;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.card-play,
.compact-play {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 44px;
  opacity: 0;
  text-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
  transition: opacity 0.22s ease;
}

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

.card-body {
  padding: 16px;
}

.card-meta {
  margin-bottom: 10px;
  color: var(--faint);
  font-size: 12px;
}

.card-title {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.35;
}

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

.card-desc {
  display: -webkit-box;
  min-height: 44px;
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

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

.tag-row span,
.detail-tags span {
  padding: 5px 9px;
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 116, 144, 0.16);
  border: 1px solid rgba(34, 211, 238, 0.24);
  font-size: 12px;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 30px;
}

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

.rank-list.wide {
  gap: 14px;
}

.rank-row {
  display: grid;
  grid-template-columns: 52px 76px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(100, 116, 139, 0.3);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.7);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
  transform: translateX(3px);
  border-color: rgba(34, 211, 238, 0.56);
}

.rank-no {
  color: var(--cyan);
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.rank-row img {
  width: 76px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
}

.rank-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.rank-main strong {
  overflow: hidden;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-main em,
.rank-meta {
  color: var(--muted);
  font-style: normal;
  font-size: 13px;
}

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

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

.compact-card {
  position: relative;
  display: grid;
  min-height: 174px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(100, 116, 139, 0.3);
  background: #0f172a;
}

.compact-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.62;
  transition: transform 0.3s ease;
}

.compact-card:hover img {
  transform: scale(1.08);
}

.compact-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(2, 6, 23, 0.98), rgba(2, 6, 23, 0.12));
}

.compact-card strong,
.compact-card em {
  position: relative;
  z-index: 1;
  align-self: end;
  padding: 0 14px;
}

.compact-card strong {
  margin-top: auto;
  color: #fff;
  font-size: 16px;
}

.compact-card em {
  padding-bottom: 14px;
  color: #cbd5e1;
  font-style: normal;
  font-size: 12px;
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding: 70px 0 48px;
  border-bottom: 1px solid rgba(100, 116, 139, 0.22);
  background:
    radial-gradient(circle at 20% 20%, rgba(34, 211, 238, 0.16), transparent 26rem),
    linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.96));
}

.page-hero h1 {
  max-width: 820px;
  font-size: clamp(34px, 5vw, 58px);
}

.page-hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.category-panel {
  margin-bottom: 26px;
  padding: 24px;
  border: 1px solid rgba(100, 116, 139, 0.3);
  border-radius: 24px;
  background: rgba(15, 23, 42, 0.55);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.2);
}

.category-panel-head p {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
}

.catalog-toolbar {
  position: sticky;
  top: 78px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 14px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid rgba(100, 116, 139, 0.28);
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(16px);
}

.catalog-toolbar.large {
  grid-template-columns: minmax(0, 1fr) 200px;
}

.catalog-toolbar input,
.catalog-toolbar select {
  min-height: 46px;
  padding: 0 14px;
}

.catalog-item[hidden] {
  display: none;
}

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

.detail-backdrop {
  position: absolute;
  inset: 0;
}

.detail-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.36;
  filter: blur(5px);
  transform: scale(1.04);
}

.detail-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.98) 0%, rgba(2, 6, 23, 0.82) 52%, rgba(2, 6, 23, 0.58) 100%),
    linear-gradient(0deg, #020617, transparent 46%);
}

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

.detail-poster {
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

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

.breadcrumb {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

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

.detail-info h1 {
  max-width: 900px;
  margin-top: 10px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1;
}

.detail-line {
  max-width: 840px;
  margin: 22px 0;
  color: #cbd5e1;
  font-size: 19px;
  line-height: 1.8;
}

.detail-meta {
  margin-bottom: 18px;
  color: #cbd5e1;
}

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

.player-section {
  margin-top: -48px;
  position: relative;
  z-index: 3;
}

.player-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(34, 211, 238, 0.34);
  background: #000;
  box-shadow: 0 26px 92px rgba(0, 0, 0, 0.45);
}

.player-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: #fff;
  background: radial-gradient(circle, rgba(8, 145, 178, 0.2), rgba(0, 0, 0, 0.28));
  transition: opacity 0.2s ease;
}

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

.player-button {
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  box-shadow: 0 18px 60px rgba(8, 145, 178, 0.42);
  font-size: 42px;
  padding-left: 6px;
}

.detail-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  padding-top: 42px;
}

.detail-main {
  display: grid;
  gap: 20px;
}

.text-panel,
.detail-side {
  padding: 24px;
  border: 1px solid rgba(100, 116, 139, 0.28);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.68);
}

.text-panel p {
  margin: 14px 0 0;
  color: #cbd5e1;
  line-height: 1.9;
  white-space: pre-line;
}

.detail-side {
  height: fit-content;
}

.side-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.side-list .compact-card {
  min-height: 132px;
}

.site-footer {
  margin-top: 70px;
  border-top: 1px solid rgba(100, 116, 139, 0.22);
  background: rgba(2, 6, 23, 0.68);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 30px;
  padding: 48px 0;
}

.footer-logo {
  color: #fff;
  font-size: 20px;
}

.footer-text {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 17px;
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--cyan);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0 30px;
  color: var(--faint);
  border-top: 1px solid rgba(100, 116, 139, 0.18);
}

@media (max-width: 1100px) {
  .main-nav,
  .top-search {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

  .split-section,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

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

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

  .logo-text {
    font-size: 20px;
  }

  .hero {
    height: 82vh;
    min-height: 620px;
  }

  .hero-content {
    align-items: flex-end;
    padding-bottom: 96px;
  }

  .hero h1 {
    font-size: 42px;
  }

  .hero-arrow {
    display: none;
  }

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

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

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

  .catalog-toolbar,
  .catalog-toolbar.large {
    top: 74px;
    grid-template-columns: 1fr;
  }

  .rank-row {
    grid-template-columns: 42px 62px minmax(0, 1fr);
  }

  .rank-meta {
    display: none;
  }

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

  .detail-poster {
    max-width: 260px;
  }

  .detail-info h1 {
    font-size: 40px;
  }
}

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

  .hero h1,
  .detail-info h1 {
    font-size: 34px;
  }

  .page-hero h1 {
    font-size: 34px;
  }

  .card-poster {
    padding-top: 125%;
  }
}
