:root {
  color-scheme: dark;
  --bg: #020617;
  --bg-soft: #0f172a;
  --panel: rgba(15, 23, 42, 0.76);
  --panel-strong: rgba(15, 23, 42, 0.94);
  --line: rgba(34, 211, 238, 0.20);
  --line-strong: rgba(34, 211, 238, 0.42);
  --text: #f8fafc;
  --muted: #94a3b8;
  --accent: #22d3ee;
  --accent-2: #3b82f6;
  --accent-3: #14b8a6;
  --danger: #f97316;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-cyan: 0 20px 70px rgba(34, 211, 238, 0.12);
  --shadow-card: 0 18px 50px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.site-body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.16), transparent 32rem),
    radial-gradient(circle at 80% 10%, rgba(59, 130, 246, 0.18), transparent 34rem),
    linear-gradient(180deg, #020617 0%, #07111f 45%, #020617 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.header-inner,
.section-inner,
.footer-inner,
.breadcrumb,
.detail-layout,
.page-hero,
.catalog-tools,
.search-panel {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

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

.brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 16px;
  color: #03101a;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 34px rgba(34, 211, 238, 0.35);
  font-weight: 900;
}

.brand-text strong,
.footer-brand {
  display: block;
  font-size: 1.35rem;
  font-weight: 850;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #67e8f9, #60a5fa, #22d3ee);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.brand-text em {
  display: block;
  margin-top: 2px;
  color: rgba(103, 232, 249, 0.68);
  font-size: 0.74rem;
  font-style: normal;
}

.header-search,
.mobile-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 320px;
  max-width: 430px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.72);
  overflow: hidden;
}

.header-search input,
.mobile-search input,
.filter-input,
.search-input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.header-search input,
.mobile-search input {
  min-width: 0;
  padding: 11px 14px 11px 20px;
}

.header-search button,
.mobile-search button,
.btn,
.search-button {
  border: 0;
  cursor: pointer;
  color: #06111d;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 800;
  transition: transform 0.22s ease, box-shadow 0.22s ease, opacity 0.22s ease;
}

.header-search button,
.mobile-search button {
  margin-right: 5px;
  padding: 8px 15px;
  border-radius: 999px;
  white-space: nowrap;
}

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

.nav-link,
.mobile-nav-link,
.footer-links a,
.breadcrumb a,
.inline-link {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav-link {
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active,
.footer-links a:hover,
.breadcrumb a:hover,
.inline-link:hover {
  color: #67e8f9;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link.is-active {
  background: rgba(34, 211, 238, 0.10);
}

.mobile-toggle {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--accent);
  background: rgba(15, 23, 42, 0.72);
}

.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 3px auto;
  border-radius: 999px;
  background: var(--accent);
}

.mobile-nav {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 16px;
  border-top: 1px solid rgba(34, 211, 238, 0.16);
}

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

.mobile-search {
  max-width: none;
  margin-top: 14px;
}

.mobile-nav-link {
  display: block;
  padding: 12px 14px;
  border: 1px solid rgba(34, 211, 238, 0.12);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.54);
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 46px 0 30px;
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.50), rgba(2, 6, 23, 0.95)),
    radial-gradient(circle at 18% 22%, rgba(34, 211, 238, 0.24), transparent 28rem),
    radial-gradient(circle at 88% 32%, rgba(59, 130, 246, 0.24), transparent 30rem);
  pointer-events: none;
}

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

.hero-slider {
  position: relative;
  min-height: 520px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.90), rgba(2, 6, 23, 0.76));
  box-shadow: var(--shadow-cyan);
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 430px;
  gap: 34px;
  align-items: center;
  padding: clamp(26px, 5vw, 58px);
  opacity: 0;
  transform: translateX(26px) scale(0.985);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-kicker,
.section-kicker,
.detail-kicker {
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-title {
  max-width: 760px;
  margin: 14px 0 16px;
  font-size: clamp(2.5rem, 6vw, 5.6rem);
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: -0.07em;
}

.hero-text {
  max-width: 680px;
  color: #cbd5e1;
  font-size: clamp(1rem, 1.8vw, 1.22rem);
  line-height: 1.86;
}

.hero-actions,
.detail-actions,
.category-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  color: #06111d;
  text-decoration: none;
}

.btn:hover,
.search-button:hover,
.header-search button:hover,
.mobile-search button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(34, 211, 238, 0.22);
}

.btn-secondary {
  color: var(--text);
  border: 1px solid rgba(34, 211, 238, 0.28);
  background: rgba(15, 23, 42, 0.78);
}

.hero-art {
  position: relative;
  min-height: 420px;
}

.hero-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 34px;
  border: 1px solid rgba(103, 232, 249, 0.24);
  box-shadow: 0 34px 86px rgba(0, 0, 0, 0.52);
}

.hero-glass-card {
  position: absolute;
  left: -34px;
  bottom: 30px;
  width: min(320px, 90%);
  padding: 18px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 22px;
  background: rgba(2, 6, 23, 0.78);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}

.hero-glass-card strong {
  display: block;
  margin-bottom: 6px;
  color: #f8fafc;
  font-size: 1.05rem;
}

.hero-glass-card span {
  color: #93c5fd;
  font-size: 0.9rem;
}

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

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

.hero-dot.is-active {
  background: var(--accent);
}

.category-strip {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  padding: 12px 0 4px;
  overflow-x: auto;
}

.category-pill {
  flex: 0 0 auto;
  color: #cffafe;
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(15, 23, 42, 0.68);
  text-decoration: none;
}

.section {
  padding: 38px 0;
}

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

.section-title,
.page-title,
.detail-title {
  margin: 8px 0 0;
  font-size: clamp(1.65rem, 4vw, 3rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.section-desc,
.page-desc,
.detail-desc {
  max-width: 800px;
  color: var(--muted);
  line-height: 1.85;
}

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

.movie-card {
  min-width: 0;
  border: 1px solid rgba(34, 211, 238, 0.14);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.82), rgba(15, 23, 42, 0.46));
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-strong);
  box-shadow: 0 24px 70px rgba(34, 211, 238, 0.13);
}

.movie-poster {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.16), rgba(59, 130, 246, 0.10));
}

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

.movie-card:hover .movie-poster img {
  transform: scale(1.06);
  filter: saturate(1.08) contrast(1.05);
}

.movie-poster::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(180deg, transparent 48%, rgba(2, 6, 23, 0.88));
}

.movie-year {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(2, 6, 23, 0.66);
  font-size: 0.8rem;
  font-weight: 800;
  backdrop-filter: blur(10px);
}

.movie-card-body {
  padding: 15px;
}

.movie-meta {
  margin: 0 0 7px;
  color: #67e8f9;
  font-size: 0.8rem;
}

.movie-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
}

.movie-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.movie-line {
  min-height: 3.3em;
  margin: 9px 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

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

.tag-list span,
.detail-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 999px;
  color: #bae6fd;
  background: rgba(14, 165, 233, 0.09);
  font-size: 0.78rem;
}

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

.category-card {
  display: grid;
  min-height: 180px;
  padding: 22px;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: var(--radius-md);
  color: inherit;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.12), transparent 48%),
    rgba(15, 23, 42, 0.72);
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
}

.category-card strong {
  font-size: 1.35rem;
}

.category-card span {
  color: var(--muted);
  line-height: 1.75;
}

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

.rank-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(34, 211, 238, 0.14);
  border-radius: 18px;
  color: inherit;
  background: rgba(15, 23, 42, 0.68);
  text-decoration: none;
}

.rank-card:hover {
  border-color: var(--line-strong);
}

.rank-card img {
  width: 72px;
  height: 96px;
  flex: 0 0 72px;
  border-radius: 12px;
  object-fit: cover;
  background: rgba(34, 211, 238, 0.08);
}

.rank-card strong,
.rank-card em {
  display: block;
}

.rank-card strong {
  margin-bottom: 6px;
}

.rank-card em {
  color: var(--muted);
  font-size: 0.88rem;
  font-style: normal;
}

.rank-badge {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  flex: 0 0 32px;
  border-radius: 12px;
  color: #07111f;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 900;
}

.page-hero {
  display: block;
  padding: 42px 0 18px;
}

.catalog-tools,
.search-panel {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.66);
}

.filter-input,
.search-input {
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.42);
}

.search-button {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
}

.breadcrumb {
  padding: 26px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.breadcrumb span {
  color: #e2e8f0;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  padding: 26px 0 46px;
}

.detail-main,
.detail-side,
.player-shell,
.content-panel {
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow-card);
}

.detail-main {
  overflow: hidden;
}

.detail-hero {
  padding: clamp(22px, 4vw, 34px);
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.12), transparent 44%),
    linear-gradient(180deg, rgba(15, 23, 42, 0.86), rgba(2, 6, 23, 0.70));
}

.detail-title {
  margin-bottom: 12px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.player-shell {
  margin: 0 clamp(18px, 4vw, 34px) clamp(18px, 4vw, 34px);
  overflow: hidden;
  background: #020617;
}

.player-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  min-height: 220px;
  background: #000;
  cursor: pointer;
}

.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border: 0;
  cursor: pointer;
  background:
    radial-gradient(circle at center, rgba(34, 211, 238, 0.22), transparent 19rem),
    rgba(2, 6, 23, 0.32);
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.play-circle {
  display: grid;
  width: clamp(74px, 10vw, 96px);
  height: clamp(74px, 10vw, 96px);
  place-items: center;
  border-radius: 50%;
  color: #06111d;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 50px rgba(34, 211, 238, 0.45);
  font-size: 2.1rem;
  font-weight: 900;
  transform: translateZ(0);
}

.content-panel {
  margin: 0 clamp(18px, 4vw, 34px) clamp(18px, 4vw, 34px);
  padding: clamp(20px, 4vw, 30px);
}

.content-panel h2,
.detail-side h2 {
  margin: 0 0 12px;
  font-size: 1.45rem;
  font-weight: 850;
}

.content-panel p {
  color: #cbd5e1;
  line-height: 1.95;
}

.detail-side {
  align-self: start;
  padding: 16px;
  position: sticky;
  top: 98px;
}

.side-cover {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(34, 211, 238, 0.16);
  background: rgba(34, 211, 238, 0.08);
}

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

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

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

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

.empty-state {
  display: none;
  padding: 28px;
  border: 1px solid rgba(34, 211, 238, 0.14);
  border-radius: 18px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.56);
}

.empty-state.is-visible {
  display: block;
}

.site-footer {
  margin-top: 28px;
  border-top: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 110px;
  color: var(--muted);
}

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

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

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

  .hero-slide {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-slider {
    min-height: 790px;
  }

  .hero-art {
    min-height: 360px;
  }

  .hero-glass-card {
    left: 18px;
  }

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

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

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

  .detail-side {
    position: static;
  }
}

@media (max-width: 760px) {
  .header-inner,
  .section-inner,
  .footer-inner,
  .breadcrumb,
  .detail-layout,
  .page-hero,
  .catalog-tools,
  .search-panel,
  .hero-inner {
    width: min(100% - 22px, 1180px);
  }

  .brand-text strong {
    font-size: 1.05rem;
  }

  .brand-text em {
    display: none;
  }

  .hero {
    padding-top: 24px;
  }

  .hero-slider {
    min-height: 710px;
    border-radius: 22px;
  }

  .hero-slide {
    padding: 22px;
  }

  .hero-title {
    font-size: clamp(2.25rem, 13vw, 3.6rem);
  }

  .hero-art {
    min-height: 310px;
  }

  .hero-dots {
    right: 22px;
    bottom: 18px;
  }

  .section-head,
  .page-hero,
  .catalog-tools,
  .search-panel {
    display: block;
  }

  .catalog-tools .filter-input,
  .search-panel .search-input,
  .search-button {
    width: 100%;
    margin-top: 10px;
  }

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

  .movie-card-body {
    padding: 12px;
  }

  .movie-line {
    min-height: 0;
    font-size: 0.86rem;
  }

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

  .footer-inner {
    display: grid;
    padding: 26px 0;
  }
}

@media (max-width: 460px) {
  .movie-grid {
    grid-template-columns: 1fr;
  }

  .hero-slider {
    min-height: 680px;
  }

  .player-wrap {
    min-height: 190px;
  }
}
