:root {
  color-scheme: dark;
  --bg: #020617;
  --panel: rgba(15, 23, 42, 0.82);
  --panel-strong: #0f172a;
  --line: rgba(148, 163, 184, 0.18);
  --text: #f8fafc;
  --muted: #94a3b8;
  --soft: #cbd5e1;
  --brand: #38bdf8;
  --brand-strong: #0284c7;
  --gold: #facc15;
  --danger: #ef4444;
  --radius: 22px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(14, 165, 233, 0.18), transparent 34rem),
    radial-gradient(circle at 85% 10%, rgba(37, 99, 235, 0.16), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.6;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 23, 42, 0.94);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.24);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 24px;
}

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

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  box-shadow: 0 16px 36px rgba(14, 165, 233, 0.28);
  color: #ffffff;
  font-size: 18px;
}

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

.brand-text strong {
  font-size: 20px;
  letter-spacing: 0.02em;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

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

.nav-link {
  transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 22px;
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 16px;
  padding: 14px;
  border-top: 1px solid var(--line);
}

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

.mobile-link {
  padding: 12px 14px;
  border-radius: 14px;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.04);
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-items: center;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.7s ease, transform 0.9s ease;
  pointer-events: none;
}

.hero-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  filter: blur(8px) saturate(1.08);
  transform: scale(1.06);
  opacity: 0.55;
}

.hero-slide.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.60), rgba(2, 6, 23, 0.86)),
    linear-gradient(0deg, #020617 0%, transparent 36%, rgba(2, 6, 23, 0.28) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  gap: 64px;
  min-height: 680px;
  padding: 84px 0;
}

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

.eyebrow,
.page-hero > p,
.section-title p {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.hero h1,
.page-hero h1,
.detail-info h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.hero p {
  margin: 24px 0 0;
  max-width: 660px;
  color: #dbeafe;
  font-size: 19px;
}

.hero-tags,
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-tags span,
.detail-meta span,
.tag-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.search-line button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.primary-btn,
.search-line button {
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9, #2563eb);
  box-shadow: 0 16px 35px rgba(14, 165, 233, 0.28);
}

.ghost-btn {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(10px);
}

.primary-btn:hover,
.ghost-btn:hover,
.search-line button:hover {
  transform: translateY(-2px) scale(1.01);
}

.hero-poster {
  position: relative;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.20);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transform: rotate(1deg);
}

.hero-poster img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  font-size: 38px;
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.hero-prev {
  left: 24px;
}

.hero-next {
  right: 24px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 28px;
  z-index: 4;
  display: flex;
  gap: 10px;
  transform: translateX(-50%);
}

.hero-dot {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
  cursor: pointer;
}

.hero-dot.active {
  width: 30px;
  background: #38bdf8;
}

.quick-search-block,
.section-block,
.page-main {
  padding: 46px 0;
}

.search-panel {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}

.search-panel label {
  font-size: 18px;
  font-weight: 800;
}

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

input[type="search"] {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  outline: none;
  background: rgba(2, 6, 23, 0.72);
  color: var(--text);
  font-size: 15px;
}

input[type="search"]:focus {
  border-color: rgba(56, 189, 248, 0.72);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.quick-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.quick-cats.wide {
  margin-top: 28px;
}

.pill-link,
.filter-chip {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #dbeafe;
  font-weight: 800;
  cursor: pointer;
}

.filter-chip.active,
.pill-link:hover {
  border-color: rgba(56, 189, 248, 0.58);
  background: rgba(14, 165, 233, 0.20);
  color: #ffffff;
}

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

.section-title h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 40px);
  letter-spacing: -0.03em;
}

.section-title a,
.text-link {
  color: #7dd3fc;
  font-weight: 800;
}

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

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

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

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

.movie-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: 0 24px 52px rgba(14, 165, 233, 0.10);
}

.poster-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  background: rgba(30, 41, 59, 0.70);
}

.poster-wrap img {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.poster-wrap::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.poster-play {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.94);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(14, 165, 233, 0.26);
}

.rank-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #facc15, #f97316);
  color: #111827;
  font-weight: 900;
}

.card-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

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

.card-body h3 a:hover {
  color: #7dd3fc;
}

.card-meta,
.card-desc {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.card-desc {
  min-height: 42px;
  color: #cbd5e1;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

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

.category-tile,
.category-overview-card,
.text-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), rgba(30, 41, 59, 0.54));
  box-shadow: var(--shadow);
}

.category-tile {
  padding: 22px;
}

.category-tile span {
  display: block;
  color: #7dd3fc;
  font-weight: 900;
  font-size: 22px;
}

.category-tile strong {
  display: block;
  margin-top: 8px;
  color: #e2e8f0;
  font-size: 15px;
}

.mini-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.mini-links a {
  color: var(--muted);
  font-size: 13px;
}

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

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

.page-hero h1 {
  max-width: 900px;
}

.page-copy {
  max-width: 780px;
  margin-top: 18px;
  color: #cbd5e1;
  font-size: 18px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 26px;
}

.filter-bar input {
  flex: 1 1 320px;
}

.overview-stack {
  display: grid;
  gap: 26px;
}

.category-overview-card {
  padding: 22px;
}

.category-overview-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.category-overview-head h2 {
  margin: 0 0 6px;
  font-size: 28px;
}

.category-overview-head p {
  margin: 0;
  color: var(--muted);
}

.movie-detail-hero {
  position: relative;
  overflow: hidden;
  min-height: 600px;
  background: #020617;
}

.movie-detail-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--detail-image);
  background-size: cover;
  background-position: center;
  filter: blur(8px) saturate(1.05);
  transform: scale(1.06);
  opacity: 0.45;
}

.detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.62)), linear-gradient(0deg, #020617, transparent 40%);
}

.detail-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  min-height: 600px;
  padding: 70px 0;
}

.detail-poster {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

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

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb a {
  color: #7dd3fc;
}

.breadcrumb em {
  font-style: normal;
  color: #e2e8f0;
}

.detail-one {
  max-width: 800px;
  margin: 22px 0 0;
  color: #dbeafe;
  font-size: 19px;
}

.detail-tags {
  margin-top: 18px;
  margin-bottom: 26px;
}

.player-section {
  margin-top: -44px;
  position: relative;
  z-index: 5;
}

.player-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 24px;
  background: #000000;
  box-shadow: var(--shadow);
}

.player-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  border: 0;
  background: rgba(2, 6, 23, 0.42);
  color: #ffffff;
  cursor: pointer;
}

.player-cover.hidden {
  display: none;
}

.big-play {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: linear-gradient(135deg, #38bdf8, #2563eb);
  box-shadow: 0 18px 42px rgba(14, 165, 233, 0.34);
  font-size: 30px;
}

.player-cover strong {
  padding: 0 18px;
  font-size: 20px;
}

.detail-content {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  padding: 42px 0 12px;
}

.text-panel {
  padding: 26px;
}

.text-panel h2 {
  margin: 0 0 14px;
  font-size: 26px;
}

.text-panel p {
  margin: 0;
  color: #dbeafe;
  font-size: 16px;
}

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

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr);
  gap: 28px;
}

.footer-grid p {
  margin: 10px 0 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 18px;
  color: #cbd5e1;
  font-size: 14px;
}

.footer-links a:hover {
  color: #7dd3fc;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1120px) {
  .desktop-nav {
    gap: 14px;
    font-size: 13px;
  }

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

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

  .menu-button {
    display: grid;
    place-items: center;
  }

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

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

  .hero-poster {
    width: min(250px, 72vw);
    transform: none;
  }

  .hero-arrow {
    display: none;
  }

  .movie-grid,
  .compact-grid,
  .catalog-grid,
  .micro-grid,
  .category-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .detail-poster {
    width: min(280px, 76vw);
  }

  .footer-links {
    justify-content: flex-start;
  }
}

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

  .brand-text strong {
    font-size: 17px;
  }

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

  .hero p,
  .detail-one,
  .page-copy {
    font-size: 16px;
  }

  .hero-actions,
  .search-line,
  .section-title,
  .category-overview-head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-btn,
  .ghost-btn,
  .search-line button {
    width: 100%;
  }

  .movie-grid,
  .compact-grid,
  .catalog-grid,
  .micro-grid,
  .category-grid,
  .detail-content,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .card-desc {
    min-height: unset;
  }

  .player-section {
    margin-top: 0;
  }
}
