:root {
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.78);
  --panel-soft: rgba(30, 41, 59, 0.58);
  --text: #ffffff;
  --muted: #cbd5e1;
  --muted-2: #94a3b8;
  --line: rgba(148, 163, 184, 0.18);
  --cyan: #22d3ee;
  --cyan-dark: #0891b2;
  --green: #4ade80;
  --pink: #f472b6;
  --radius: 18px;
  --shadow: 0 25px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100%;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(8, 145, 178, 0.22), transparent 34rem),
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 32rem),
    linear-gradient(135deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
  color: var(--text);
}

body::selection {
  background: rgba(34, 211, 238, 0.35);
}

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

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

main {
  min-height: 62vh;
  padding-top: 76px;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.site-header.is-scrolled,
body:not(.home-page) .site-header {
  background: rgba(15, 23, 42, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(14px);
}

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

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.logo:hover,
.desktop-nav a:hover,
.mobile-nav a:hover,
.footer-grid a:hover,
.section-more:hover,
.strip-title a:hover {
  color: var(--cyan);
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--cyan), #3b82f6);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 0 24px rgba(34, 211, 238, 0.38);
}

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

.nav-toggle {
  display: none;
  border: 0;
  background: rgba(30, 41, 59, 0.74);
  color: #ffffff;
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
  box-shadow: var(--shadow);
}

.mobile-nav.open {
  display: grid;
  gap: 8px;
}

.mobile-nav a {
  padding: 10px 12px;
  color: #d1d5db;
  border-radius: 10px;
}

.mobile-nav a:hover {
  background: rgba(30, 41, 59, 0.7);
}

.hero-carousel {
  position: relative;
  height: 600px;
  margin-top: -76px;
  overflow: hidden;
  background: #020617;
}

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

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

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

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, #0f172a 0%, rgba(15, 23, 42, 0.72) 44%, rgba(15, 23, 42, 0.12) 100%),
    linear-gradient(to right, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.42), rgba(2, 6, 23, 0.1));
}

.hero-content {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding-bottom: 72px;
}

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--cyan);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.hero-copy p,
.page-hero p {
  margin: 0;
  max-width: 760px;
  color: #d1d5db;
  font-size: 20px;
  line-height: 1.7;
}

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

.hero-meta {
  margin-top: 22px;
}

.hero-meta span,
.detail-meta span,
.movie-meta span,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  color: #d1d5db;
  font-size: 13px;
}

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

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

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

.btn.primary {
  background: #06b6d4;
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(6, 182, 212, 0.26);
}

.btn.primary:hover {
  background: var(--cyan-dark);
}

.btn.ghost {
  color: #ffffff;
  border-color: rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.68);
}

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

.hero-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #64748b;
  transition: width 0.25s ease, background 0.25s ease;
}

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

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

.section-band {
  background: linear-gradient(90deg, rgba(30, 41, 59, 0.5), rgba(15, 23, 42, 0.55));
}

.section-heading,
.strip-title,
.detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.section-heading h2,
.strip-title h3,
.detail-side h2,
.info-panel h2 {
  margin: 0;
  color: #ffffff;
}

.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(26px, 3vw, 36px);
}

.section-heading h2 span {
  color: var(--cyan);
}

.section-more,
.strip-title a {
  color: #94a3b8;
  font-weight: 700;
}

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

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

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

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

.catalog-grid {
  align-items: stretch;
}

.movie-card {
  min-width: 0;
}

.movie-card.is-hidden {
  display: none;
}

.movie-link {
  display: block;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: var(--radius);
  background: var(--panel-soft);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-link:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(34, 211, 238, 0.32);
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.3);
}

.movie-thumb {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(8, 145, 178, 0.24), rgba(15, 23, 42, 0.88));
}

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

.movie-thumb.wide {
  aspect-ratio: 16 / 9;
}

.movie-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.movie-link:hover .movie-thumb img {
  transform: scale(1.1);
}

.movie-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.18), transparent);
  opacity: 0.86;
}

.movie-year,
.rank-badge,
.movie-play {
  position: absolute;
  z-index: 2;
}

.movie-year {
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.rank-badge {
  top: 10px;
  left: 10px;
  display: grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #22d3ee, #3b82f6);
  color: #ffffff;
  font-weight: 900;
}

.movie-play {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.92);
  color: #ffffff;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.88);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-link:hover .movie-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.movie-info {
  padding: 16px;
}

.movie-info h3 {
  margin: 0 0 10px;
  min-height: 46px;
  color: #ffffff;
  font-size: 16px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.25s ease;
}

.movie-link:hover .movie-info h3 {
  color: var(--cyan);
}

.movie-info p {
  margin: 0 0 12px;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.movie-meta {
  gap: 8px;
}

.movie-meta span {
  min-height: 24px;
  font-size: 12px;
}

.category-list {
  display: grid;
  gap: 36px;
}

.category-strip {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.42);
}

.page-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(22, 78, 99, 0.32), rgba(15, 23, 42, 0.95), rgba(30, 58, 138, 0.24)),
    radial-gradient(circle at 75% 20%, rgba(34, 211, 238, 0.16), transparent 26rem);
}

.page-hero.compact {
  padding: 74px 0 62px;
}

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

.category-card a {
  display: grid;
  gap: 18px;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.54);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.category-covers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.category-covers img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.8);
}

.category-card h2 {
  margin: 0 0 8px;
  color: #ffffff;
}

.category-card p {
  margin: 0;
  color: #94a3b8;
  line-height: 1.65;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 14px;
  margin-bottom: 28px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.56);
}

.filter-panel.wide {
  grid-template-columns: 1fr 190px 160px;
}

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

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

.empty-result {
  display: none;
  padding: 48px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 18px;
}

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

.player-wrap {
  padding: 28px 0 0;
  background: #000000;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  align-items: center;
  padding: 0 0 18px;
  color: #94a3b8;
  font-size: 14px;
}

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

.player-shell {
  position: relative;
  width: min(980px, 100%);
  aspect-ratio: 16 / 9;
  margin: 0 auto 34px;
  overflow: hidden;
  border-radius: 18px;
  background: #020617;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

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

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: #020617;
  overflow: hidden;
  z-index: 3;
}

.player-cover.is-hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.player-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.68;
}

.player-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.18));
}

.big-play {
  position: relative;
  z-index: 1;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(6, 182, 212, 0.92);
  color: #ffffff;
  font-size: 36px;
  box-shadow: 0 0 0 12px rgba(6, 182, 212, 0.12);
  transition: transform 0.2s ease, background 0.2s ease;
}

.player-cover:hover .big-play {
  transform: scale(1.08);
  background: var(--cyan-dark);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  padding: 46px 0 8px;
}

.detail-main,
.detail-side,
.info-panel {
  min-width: 0;
}

.detail-title-row h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.detail-meta {
  color: #d1d5db;
}

.lead-text {
  margin: 0 0 26px;
  color: #d1d5db;
  font-size: 20px;
  line-height: 1.7;
}

.info-panel {
  margin-bottom: 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(30, 41, 59, 0.5);
}

.info-panel h2 {
  margin-bottom: 14px;
  font-size: 24px;
}

.info-panel h2:not(:first-child) {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.info-panel p {
  margin: 0;
  color: #d1d5db;
  line-height: 1.85;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-side {
  align-self: start;
  position: sticky;
  top: 96px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.54);
}

.detail-side h2 {
  margin-bottom: 18px;
}

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

.side-list .movie-info p,
.side-list .movie-meta {
  display: none;
}

.side-list .movie-info h3 {
  min-height: 0;
}

.side-list .movie-link {
  display: grid;
  grid-template-columns: 86px 1fr;
  align-items: center;
}

.side-list .movie-thumb {
  height: 114px;
}

.side-list .movie-thumb.poster {
  aspect-ratio: auto;
}

.narrow-text {
  max-width: 860px;
}

.site-footer {
  margin-top: 62px;
  background: #020617;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: #94a3b8;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  padding: 44px 0;
}

.footer-grid h3,
.footer-grid h4 {
  margin: 0 0 14px;
  color: #ffffff;
}

.footer-grid p,
.footer-grid ul {
  margin: 0;
  padding: 0;
  list-style: none;
  line-height: 1.8;
}

.footer-bottom {
  padding: 18px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  text-align: center;
  color: #64748b;
  font-size: 14px;
}

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

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

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

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

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

  main {
    padding-top: 72px;
  }

  .hero-carousel {
    height: 560px;
    margin-top: -72px;
  }

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

  .hero-copy p,
  .page-hero p,
  .lead-text {
    font-size: 17px;
  }

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

  .featured-grid,
  .category-overview,
  .filter-panel,
  .filter-panel.wide,
  .detail-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }

  .detail-title-row,
  .section-heading,
  .strip-title {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  .logo {
    font-size: 22px;
  }

  .hero-carousel {
    height: 520px;
  }

  .hero-copy h1,
  .page-hero h1 {
    font-size: 38px;
  }

  .hero-meta span:nth-child(3) {
    display: none;
  }

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

  .poster-grid,
  .small-grid {
    gap: 14px;
  }

  .movie-info {
    padding: 12px;
  }

  .movie-info h3 {
    font-size: 15px;
  }

  .player-shell {
    border-radius: 12px;
  }

  .big-play {
    width: 72px;
    height: 72px;
  }
}
