:root {
  --brand: #6d5dfb;
  --brand-2: #00d4ff;
  --surface-glass: rgba(255,255,255,.76);
  --surface-card: rgba(255,255,255,.86);
  --text-soft: #64748b;
  --hero-bg: radial-gradient(circle at 15% 20%, rgba(109,93,251,.22), transparent 32%), radial-gradient(circle at 85% 15%, rgba(0,212,255,.20), transparent 28%), linear-gradient(135deg, #f8fbff 0%, #eef3ff 54%, #fff 100%);
  --card-shadow: 0 24px 70px rgba(15, 23, 42, .13);
  --card-shadow-hover: 0 26px 90px rgba(109, 93, 251, .26);
}

[data-bs-theme="dark"] {
  --surface-glass: rgba(15,23,42,.74);
  --surface-card: rgba(15,23,42,.82);
  --text-soft: #94a3b8;
  --hero-bg: radial-gradient(circle at 18% 18%, rgba(109,93,251,.28), transparent 34%), radial-gradient(circle at 86% 18%, rgba(0,212,255,.18), transparent 28%), linear-gradient(135deg, #020617 0%, #0f172a 58%, #111827 100%);
  --card-shadow: 0 24px 70px rgba(0,0,0,.32);
  --card-shadow-hover: 0 26px 90px rgba(0,212,255,.18);
}

* { box-sizing: border-box; }
html { max-width: 100%; overflow-x: hidden; }
body {
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--hero-bg);
  color: var(--bs-body-color);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { text-decoration: none; }
img { max-width: 100%; height: auto; }

.site-navbar {
  backdrop-filter: blur(18px);
  background: var(--surface-glass);
  border-bottom: 1px solid rgba(148,163,184,.24);
}
.navbar-brand {
  letter-spacing: -.03em;
  font-weight: 850;
}
.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: white;
  box-shadow: 0 12px 30px rgba(109,93,251,.34);
}
.nav-link { font-weight: 650; }
.nav-link.active { color: var(--brand) !important; }
.theme-toggle { min-width: 122px; }

.btn-brand {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #5c4ff0;
  --bs-btn-hover-border-color: #5c4ff0;
  box-shadow: 0 14px 32px rgba(109,93,251,.26);
}
.btn-glass {
  background: var(--surface-card);
  border: 1px solid rgba(148,163,184,.24);
  color: var(--bs-body-color);
  box-shadow: 0 12px 30px rgba(15,23,42,.08);
}
.btn-glass:hover { border-color: rgba(109,93,251,.45); color: var(--brand); }
.text-soft { color: var(--text-soft); }

.page-shell { padding-top: 96px; padding-bottom: 64px; position: relative; }
.section-heading {
  max-width: 860px;
  margin: 0 auto 32px;
  text-align: center;
}
.section-heading h1,
.hero-title {
  font-weight: 900;
  letter-spacing: -.055em;
}
.gradient-text {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.glass-card {
  background: var(--surface-card);
  border: 1px solid rgba(148,163,184,.22);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(18px);
  border-radius: 28px;
}

/* Home */
body.page-home {
  height: 100svh;
  overflow: hidden;
}
body.page-home .page-shell {
  margin-top: 72px;
  height: calc(100svh - 72px);
  min-height: 0;
  padding: 14px clamp(12px, 3vw, 36px) 18px;
  display: grid;
  place-items: center;
}
.home-stage {
  width: min(1120px, 100%);
  max-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  gap: clamp(10px, 2vh, 20px);
}
.home-intro { text-align: center; padding-bottom: 15px; }
.home-intro h1 { font-size: clamp(1.65rem, 4.2vw, 4.6rem); line-height: .96; margin: 0; }
.home-intro p { max-width: 760px; margin: .55rem auto 0; font-size: clamp(.86rem, 1.3vw, 1.05rem); color: var(--text-soft); }
.home-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(66px, 184px));
  justify-content: center;
  align-items: center;
  gap: clamp(8px, 1.8vw, 22px);
}
.home-card {
  aspect-ratio: 9 / 16;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(10px, 1.6vw, 22px);
  border-radius: clamp(20px, 3vw, 32px);
  color: white;
  background: linear-gradient(135deg, rgba(109,93,251,.96), rgba(0,212,255,.86));
  box-shadow: var(--card-shadow);
  transform: translateZ(0);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.home-card:nth-child(2) { background: linear-gradient(135deg, #14b8a6, #22c55e); }
.home-card:nth-child(3) { background: linear-gradient(135deg, #f97316, #ec4899); }
.home-card:nth-child(4) { background: linear-gradient(135deg, #111827, #6366f1); }
.home-card::before,
.home-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: rgba(255,255,255,.24);
  z-index: -1;
}
.home-card::before { width: 72%; aspect-ratio: 1; top: -18%; right: -28%; }
.home-card::after { width: 60%; aspect-ratio: 1; bottom: -20%; left: -25%; background: rgba(0,0,0,.14); }
.home-card:hover { transform: translateY(-8px) scale(1.018); box-shadow: var(--card-shadow-hover); color: white; filter: saturate(1.08); }
.home-card__icon {
  position: absolute;
  top: clamp(10px, 1.7vw, 22px);
  left: clamp(10px, 1.7vw, 22px);
  width: clamp(32px, 5vw, 54px);
  height: clamp(32px, 5vw, 54px);
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(8px);
  font-size: clamp(1rem, 2.5vw, 1.55rem);
}
.home-card h2 { font-weight: 850; line-height: .98; font-size: clamp(.72rem, 1.7vw, 1.45rem); letter-spacing: -.035em; margin: 0; }
.home-card p { display: none; }
.social-row { padding-top: 18px; display: flex; justify-content: center; align-items: center; gap: clamp(8px, 1.4vw, 14px); flex-wrap: wrap; }
.social-link {
  width: clamp(40px, 5vw, 52px);
  height: clamp(40px, 5vw, 52px);
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--surface-card);
  border: 1px solid rgba(148,163,184,.24);
  color: var(--bs-body-color);
  box-shadow: 0 14px 34px rgba(15,23,42,.10);
  font-size: clamp(1rem, 1.6vw, 1.24rem);
  transition: .2s ease;
}
.social-link:hover { transform: translateY(-4px); color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }

/* Catalog */
.catalog-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 26px;
}
.search-box { position: relative; flex: 1 1 320px; }
.search-box i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-soft); }
.search-box .form-control { padding-left: 48px; height: 56px; border-radius: 18px; background: var(--surface-card); border-color: rgba(148,163,184,.24); }
.search-box .form-control:focus { box-shadow: 0 0 0 .25rem rgba(109,93,251,.16); border-color: rgba(109,93,251,.65); }
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 22px;
}
.catalog-grid.catalog-grid--horizontal { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.content-card {
  display: block;
  color: inherit;
  background: var(--surface-card);
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  height: 100%;
}
.content-card:hover { transform: translateY(-8px); color: inherit; border-color: rgba(109,93,251,.45); box-shadow: var(--card-shadow-hover); }
.poster-frame { position: relative; overflow: hidden; background: #111827; }
.content-card--vertical .poster-frame { aspect-ratio: 9 / 16; }
.content-card--horizontal .poster-frame { aspect-ratio: 16 / 9; }
.poster-frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.content-card:hover .poster-frame img { transform: scale(1.045); }
.card-chip {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(15,23,42,.56);
  color: #fff;
  font-size: .78rem;
  font-weight: 750;
  backdrop-filter: blur(10px);
}
.content-card__body { padding: 18px; }
.content-card__body h2 { font-size: 1.1rem; font-weight: 850; letter-spacing: -.025em; margin: 0 0 6px; }
.content-card__body p { margin: 0; color: var(--text-soft); font-size: .94rem; }
.empty-state { padding: 34px; text-align: center; }

/* Detail */
.detail-hero { padding: 24px; }
.detail-cover { border-radius: 26px; overflow: hidden; box-shadow: var(--card-shadow); }
.detail-cover.vertical { aspect-ratio: 9 / 16; max-height: 560px; }
.detail-cover.horizontal { aspect-ratio: 16 / 9; }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.meta-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.meta-pill { padding: 8px 12px; border-radius: 999px; background: rgba(109,93,251,.10); color: var(--brand); font-weight: 750; font-size: .88rem; }
.action-links { display: flex; gap: 12px; flex-wrap: wrap; }
.screens-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 4px 18px;
  scroll-snap-type: x mandatory;
}
.screens-strip::-webkit-scrollbar { height: 10px; }
.screens-strip::-webkit-scrollbar-thumb { background: rgba(148,163,184,.45); border-radius: 999px; }
.screen-shot {
  flex: 0 0 auto;
  width: min(265px, 74vw);
  aspect-ratio: 9 / 16;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  scroll-snap-align: start;
  background: #0f172a;
}
.screen-shot.wide { width: min(520px, 82vw); aspect-ratio: 16 / 9; }
.screen-shot img { width: 100%; height: 100%; object-fit: cover; }
.video-shell {
  border-radius: 30px;
  overflow: hidden;
  background: #020617;
  box-shadow: var(--card-shadow);
  position: relative;
}
.video-shell video { width: 100%; height: 100%; object-fit: cover; display: block; background: #020617; }
.video-note {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  padding: 10px 14px;
  border-radius: 16px;
  color: #fff;
  background: rgba(15,23,42,.58);
  backdrop-filter: blur(12px);
  font-size: .9rem;
  pointer-events: none;
}
.feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; padding: 0; margin: 0; list-style: none; }
.feature-list li { padding: 14px 16px; border-radius: 18px; background: rgba(109,93,251,.08); font-weight: 650; }
.feature-list i { color: var(--brand); margin-right: 8px; }

/* Contact & text pages */
.form-card { padding: clamp(20px, 3vw, 34px); }
.form-control, .form-select { border-radius: 16px; min-height: 50px; }
textarea.form-control { min-height: 154px; }
.captcha-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(109,93,251,.10);
  border: 1px dashed rgba(109,93,251,.35);
  font-weight: 850;
  letter-spacing: .16em;
}
.contact-info-card { padding: 24px; }
.contact-info-card i { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 16px; background: rgba(109,93,251,.12); color: var(--brand); margin-right: 12px; }
.legal-content { padding: clamp(22px, 4vw, 42px); line-height: 1.75; }
.legal-content h2 { margin-top: 1.7rem; font-weight: 850; letter-spacing: -.03em; }
.site-footer { padding: 26px 0 40px; color: var(--text-soft); }

@media (max-width: 991.98px) {
  .theme-toggle { min-width: auto; }
  .page-shell { padding-top: 86px; }
  body.page-home .page-shell { margin-top: 64px; height: calc(100svh - 64px); }
}
@media (max-width: 767.98px) {
  .home-grid { grid-template-columns: repeat(4, minmax(54px, 1fr)); gap: 8px; }
   
    /* Добавляем aspect-ratio сюда */
  .home-card { 
    border-radius: 18px; 
    padding: 10px; 
    aspect-ratio: 1 / 1; /* Гарантирует идеальный квадрат */
  }
  
  .home-card { border-radius: 18px; padding: 10px; }
  .home-card__icon { border-radius: 13px; }
 

@media (max-width: 767.98px) {
  .catalog-grid,
  .catalog-grid.catalog-grid--horizontal {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .content-card {
    max-width: 420px;
    width: 100%;
    margin-inline: auto;
  }

  .content-card__body {
    padding: 18px !important;
  }

  .content-card__body h2 {
    font-size: 1.1rem !important;
  }

  .content-card__body p {
    font-size: .94rem !important;
  }
}

 .content-card__body { padding: 14px; }
  .content-card__body h2 { font-size: .98rem; }
  .content-card__body p { font-size: .84rem; }
  .detail-hero { padding: 16px; }
}
@media (max-width: 420px) {
  .home-intro p { display: none; }
  .home-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-card h2 { font-size: clamp(.58rem, 3.2vw, .75rem); }
  .home-card__icon { width: 30px; height: 30px; font-size: .95rem; }
  .social-link { width: 38px; height: 38px; border-radius: 14px; }
}
.fw-black { font-weight: 900; letter-spacing: -.035em; }
.social-logo {
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1;
}


/* === Обновления макета: cookie-тема, fixed background, галерея, пагинация, back-to-top === */
body {
 background-attachment: scroll !important;
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
}

.site-navbar,
.glass-card,
.content-card,
.social-link,
.btn-glass {
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.btn-clear-search {
  height: 56px;
  padding-inline: 18px;
  border-radius: 18px;
  opacity: .7;
  transform: translateY(0);
  transition: opacity .2s ease, transform .2s ease, border-color .2s ease;
}
.btn-clear-search.is-visible,
.btn-clear-search:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.catalog-pagination .page-link,
.pagination-modern .page-link {
  min-width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px !important;
  border: 1px solid rgba(148,163,184,.24);
  background: var(--surface-card);
  color: var(--bs-body-color);
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(15,23,42,.08);
}
.pagination-modern .page-item.active .page-link {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 34px rgba(109,93,251,.28);
}
.pagination-modern .page-item.disabled .page-link {
  opacity: .45;
  pointer-events: none;
}

.gallery-shell {
  position: relative;
  padding-inline: clamp(0px, 3vw, 56px);
}
.screens-strip {
  display: flex;
  gap: clamp(12px, 2vw, 18px);
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 4px 22px;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  overscroll-behavior-x: contain;
  cursor: grab;
  touch-action: pan-y;
}
.screens-strip.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  scroll-behavior: auto;
  user-select: none;
}
.screens-strip:focus-visible {
  outline: 3px solid rgba(109,93,251,.45);
  outline-offset: 4px;
  border-radius: 24px;
}
.screens-strip::-webkit-scrollbar { height: 11px; }
.screens-strip::-webkit-scrollbar-track { background: rgba(148,163,184,.14); border-radius: 999px; }
.screens-strip::-webkit-scrollbar-thumb { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-radius: 999px; }
.screen-shot {
  border: 0;
  padding: 0;
  flex: 0 0 auto;
  width: clamp(210px, 20vw, 282px);
  aspect-ratio: 9 / 16;
  border-radius: clamp(20px, 2.4vw, 30px);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  scroll-snap-align: center;
  background: #0f172a;
  cursor: zoom-in;
  transition: transform .22s ease, box-shadow .22s ease;
}
.screen-shot:hover {
  transform: translateY(-4px) scale(1.015);
  box-shadow: var(--card-shadow-hover);
}
.screen-shot.wide {
  width: clamp(300px, 42vw, 620px);
  aspect-ratio: 16 / 9;
}
.screen-shot img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.gallery-nav,
.gallery-modal-nav {
  position: absolute;
  z-index: 2;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148,163,184,.26);
  border-radius: 18px;
  color: var(--bs-body-color);
  background: var(--surface-card);
  box-shadow: 0 16px 36px rgba(15,23,42,.15);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: transform .18s ease, color .18s ease, background .18s ease;
}
.gallery-nav:hover,
.gallery-modal-nav:hover {
  transform: translateY(-2px);
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.gallery-nav { top: 50%; transform: translateY(-50%); }
.gallery-nav:hover { transform: translateY(calc(-50% - 2px)); }
.gallery-nav--prev { left: 0; }
.gallery-nav--next { right: 0; }
.screenshot-modal .modal-content {
  border: 1px solid rgba(148,163,184,.22);
  border-radius: 28px;
  background: var(--surface-card);
  box-shadow: var(--card-shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}
.screenshot-modal__img {
  display: block;
  max-width: 100%;
  max-height: min(76vh, 820px);
  width: auto;
  margin: 0 auto;
  border-radius: 24px;
  box-shadow: var(--card-shadow);
  background: #0f172a;
}
.gallery-modal-nav { top: 50%; transform: translateY(-50%); }
.gallery-modal-nav:hover { transform: translateY(calc(-50% - 2px)); }
.gallery-modal-nav--prev { left: 18px; }
.gallery-modal-nav--next { right: 18px; }

.video-shell {
  border-radius: 30px;
  overflow: hidden;
  background: #020617;
  box-shadow: var(--card-shadow);
  position: relative;
}
.video-shell .plyr {
  width: 100%;
  height: 100%;
  --plyr-color-main: var(--brand);
  --plyr-video-control-color: #fff;
  --plyr-video-control-background-hover: var(--brand);
  --plyr-control-radius: 14px;
  --plyr-menu-radius: 14px;
}
.video-shell .plyr--video,
.video-shell .plyr__video-wrapper,
.video-shell video { height: 100%; }
.video-note {
  z-index: 2;
  max-width: min(92%, 520px);
}

.back-to-top {
  position: fixed;
  right: clamp(16px, 3vw, 32px);
  bottom: clamp(16px, 3vw, 32px);
  z-index: 1055;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 48px;
  padding: 8px 16px 8px 12px;
  border: 1px solid rgba(148,163,184,.24);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 42px rgba(109,93,251,.34);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(.96);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.back-to-top i { font-size: 1.35rem; line-height: 1; }
.back-to-top span { font-weight: 850; }
.back-to-top:hover { transform: translateY(-3px) scale(1.015); }

@media (min-width: 768px) {
  body.page-home {
    height: 100svh;
    overflow: hidden;
  }
}

@media (max-width: 767.98px) {
  body.page-home {
    height: auto;
    min-height: 100svh;
    overflow-x: hidden;
    overflow-y: auto;
  }
  body.page-home .page-shell {
    margin-top: 64px;
    min-height: calc(100svh - 64px);
    height: auto;
    padding-block: 18px 32px;
    display: block;
  }
  .home-stage {
    max-height: none;
    gap: 18px;
  }
  .home-grid {
    width: min(330px, 100%);
    margin-inline: auto;
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .home-card {
    min-height: 320px;
    border-radius: 28px;
    padding: 22px;
  }
  .home-card h2 { font-size: 1.35rem; }
  .home-card__icon { width: 54px; height: 54px; font-size: 1.45rem; border-radius: 18px; }
  .social-row { padding-top: 18px; padding-bottom: 18px; }
  .catalog-toolbar { align-items: stretch; }
  .search-box { flex-basis: 100%; }
  .btn-clear-search { flex: 1 1 100%; }
  .gallery-shell { padding-inline: 0; }
  .gallery-nav { display: none; }
  .screens-strip { scroll-padding-inline: 18px; margin-inline: -4px; padding-bottom: 18px; }
  .screen-shot { width: min(72vw, 270px); scroll-snap-align: center; }
  .screen-shot.wide { width: min(86vw, 520px); }
  .screenshot-modal .modal-content { border-radius: 0; min-height: 100%; }
  .gallery-modal-nav { width: 44px; height: 44px; }
  .gallery-modal-nav--prev { left: 10px; }
  .gallery-modal-nav--next { right: 10px; }
  .back-to-top { right: 14px; bottom: 14px; min-height: 44px; padding-inline: 10px 12px; }
}

@media (max-width: 420px) {
  .home-intro p { display: block; font-size: .92rem; }
  .home-grid { grid-template-columns: 1fr; }
  .home-card h2 { font-size: 1.2rem; }
  .home-card__icon { width: 50px; height: 50px; font-size: 1.35rem; }
}


/* === 404 page === */
.page-404 .notfound-shell {
  min-height: calc(100svh - 72px);
  display: grid;
  align-items: center;
}
.notfound-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.25rem, 4vw, 3rem);
}
.notfound-kicker {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .85rem;
  border-radius: 999px;
  color: var(--brand);
  background: rgba(109,93,251,.12);
  font-weight: 900;
  margin-bottom: 1rem;
}
.notfound-title {
  max-width: 760px;
  font-size: clamp(2.35rem, 7vw, 6.1rem);
  line-height: .92;
  letter-spacing: -.075em;
  font-weight: 950;
  margin-bottom: 1rem;
}
.notfound-lead {
  max-width: 680px;
  color: var(--text-soft);
  font-size: clamp(1rem, 2vw, 1.2rem);
}
.notfound-visual {
  position: relative;
  min-height: 320px;
  display: grid;
  place-items: center;
  border-radius: 30px;
  background: radial-gradient(circle at 30% 20%, rgba(0,212,255,.32), transparent 28%), radial-gradient(circle at 72% 82%, rgba(109,93,251,.35), transparent 34%), rgba(109,93,251,.08);
  border: 1px solid rgba(148,163,184,.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 22px 60px rgba(109,93,251,.16);
}
.notfound-code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(.25rem, 1vw, .75rem);
  color: transparent;
  font-size: clamp(4.5rem, 13vw, 9.5rem);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.08em;
  background: linear-gradient(135deg, var(--brand), var(--brand-2), #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 18px 32px rgba(109,93,251,.28));
}
.notfound-code i {
  color: var(--brand-2);
  font-size: .42em;
  filter: drop-shadow(0 0 22px rgba(0,212,255,.7));
}
.notfound-planet {
  position: absolute;
  right: 9%;
  bottom: 10%;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 26px;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 18px 42px rgba(0,212,255,.25);
}
.notfound-planet i { font-size: 2rem; }
.notfound-orb {
  position: absolute;
  width: 240px;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(22px);
  opacity: .22;
  pointer-events: none;
}
.notfound-orb--one { left: -80px; top: -90px; background: var(--brand-2); }
.notfound-orb--two { right: -70px; bottom: -110px; background: #ec4899; }
.notfound-links {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .8rem;
  margin-top: clamp(1rem, 3vw, 2rem);
}
.notfound-links a {
  min-height: 88px;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1rem;
  border-radius: 22px;
  color: var(--bs-body-color);
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(148,163,184,.24);
  font-weight: 850;
  transition: transform .18s ease, border-color .18s ease, color .18s ease;
}
[data-bs-theme="dark"] .notfound-links a { background: rgba(15,23,42,.32); }
.notfound-links a:hover {
  transform: translateY(-4px);
  color: var(--brand);
  border-color: rgba(109,93,251,.42);
}
.notfound-links i {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: white;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 14px 28px rgba(109,93,251,.22);
}
@media (max-width: 991.98px) {
  .notfound-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notfound-visual { min-height: 250px; }
}
@media (max-width: 575.98px) {
  .page-404 .notfound-shell { align-items: start; }
  .notfound-card { border-radius: 24px; }
  .notfound-links { grid-template-columns: 1fr; }
  .notfound-links a { min-height: 72px; }
}

/* === V-Blog style navbar + top button for Ushakov.com === */
:root {
  --vb-bg:#f7f8ff;
  --vb-surface:rgba(255,255,255,.78);
  --vb-surface-2:rgba(255,255,255,.94);
  --vb-line:rgba(99,102,241,.18);
  --vb-text:#172033;
  --vb-muted:#64748b;
  --vb-primary:#6d5dfc;
  --vb-cyan:#02b7ff;
  --vb-pink:#e84cff;
  --vb-shadow:0 24px 70px rgba(67,56,202,.16);
  --vb-radius:28px;
  --vb-nav:78px;
}
[data-bs-theme="dark"] {
  --vb-bg:#090d1a;
  --vb-surface:rgba(15,23,42,.72);
  --vb-surface-2:rgba(15,23,42,.94);
  --vb-line:rgba(148,163,184,.18);
  --vb-text:#edf3ff;
  --vb-muted:#a6b1c5;
  --vb-shadow:0 26px 80px rgba(0,0,0,.42);
}
.vb-navbar.site-navbar {
  min-height:var(--vb-nav);
  border-bottom:1px solid var(--vb-line);
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
}
[data-bs-theme="dark"] .vb-navbar.site-navbar { background:rgba(9,13,26,.72); }
.vb-brand {
  display:flex;
  align-items:center;
  gap:.7rem;
  font-size:1.2rem;
  letter-spacing:-.03em;
  font-weight:850;
  color:var(--vb-text);
}
.vb-brand:hover { color:var(--vb-primary); }
.vb-brand img {
  width:42px;
  height:42px;
  object-fit:cover;
  border-radius:16px;
  box-shadow:0 10px 28px rgba(109,93,252,.3);
}
.vb-brand small { color:var(--vb-muted); font-weight:800; }
.vb-navbar .nav-link {
  border-radius:999px;
  padding:.55rem .82rem !important;
  font-weight:700;
  color:var(--vb-text);
  display:flex;
  align-items:center;
  gap:.35rem;
}
.vb-navbar .nav-link:hover,
.vb-navbar .nav-link.active,
.vb-navbar .show > .nav-link {
  background:rgba(109,93,252,.12);
  color:var(--vb-primary) !important;
}
.vb-dropdown {
  border:1px solid var(--vb-line);
  border-radius:18px;
  padding:.55rem;
  background:var(--vb-surface-2);
  box-shadow:var(--vb-shadow);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.vb-dropdown .dropdown-item {
  border-radius:12px;
  padding:.6rem .75rem;
  font-weight:700;
}
.vb-dropdown .dropdown-item:hover,
.vb-dropdown .dropdown-item.active {
  background:rgba(109,93,252,.12);
  color:var(--vb-primary);
}
.vb-theme-btn {
  border:1px solid var(--vb-line);
  background:var(--vb-surface);
  color:var(--vb-text);
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  font-weight:800;
  white-space:nowrap;
  box-shadow:none;
}
.vb-theme-btn:hover {
  border-color:rgba(109,93,252,.35);
  color:var(--vb-primary);
  background:var(--vb-surface-2);
}
.vb-to-top {
  position:fixed;
  right:1.1rem;
  bottom:1.1rem;
  z-index:1050;
  width:54px;
  height:54px;
  border:0;
  border-radius:18px;
  color:#fff;
  background:linear-gradient(135deg,var(--vb-primary),var(--vb-pink));
  box-shadow:0 18px 40px rgba(109,93,252,.34);
  opacity:0;
  pointer-events:none;
  transform:translateY(16px);
  transition:.2s ease;
  display:inline-grid;
  place-items:center;
  font-size:1.28rem;
}
.vb-to-top.is-visible { opacity:1; pointer-events:auto; transform:translateY(0); }
.vb-to-top:hover { transform:translateY(-3px); box-shadow:0 24px 52px rgba(109,93,252,.45); }
@media(max-width:991.98px){
  .vb-navbar .navbar-collapse{padding:1rem 0;}
  .vb-theme-btn{width:100%;margin-top:.6rem;}
}
@media(max-width:575.98px){
  .vb-to-top{right:.85rem;bottom:.85rem;width:50px;height:50px;border-radius:16px;}
}


/* Navbar height alignment after V-Blog menu import */
body.page-home .page-shell {
  margin-top: var(--vb-nav);
  height: calc(100svh - var(--vb-nav));
}
@media (max-width: 991.98px) {
  .page-shell { padding-top: calc(var(--vb-nav) + 18px); }
  body.page-home .page-shell {
    margin-top: var(--vb-nav);
    height: calc(100svh - var(--vb-nav));
  }
}
@media (max-width: 767.98px) {
  body.page-home .page-shell {
    margin-top: var(--vb-nav);
    min-height: calc(100svh - var(--vb-nav));
    height: auto;
  }
}


/* === FixPack 2026-05 v2: mobile menu + page scroll === */
/* Desktop home: intentionally no vertical browser scroll. */
@media (min-width: 992px) {
  body.page-home {
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  body.page-home .page-shell {
    height: calc(100svh - var(--vb-nav));
    min-height: 0;
    overflow: hidden;
  }

  @supports (height: 100dvh) {
    body.page-home {
      height: 100dvh;
      min-height: 100dvh;
    }

    body.page-home .page-shell {
      height: calc(100dvh - var(--vb-nav));
    }
  }
}

/* Mobile/tablet home: content may scroll normally. */
@media (max-width: 991.98px) {
  html {
    overflow-x: hidden;
  }

  body.page-home {
    height: auto;
    min-height: 100svh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.page-home .page-shell {
    height: auto;
    min-height: calc(100svh - var(--vb-nav));
    overflow: visible;
  }

  @supports (min-height: 100dvh) {
    body.page-home {
      min-height: 100dvh;
    }

    body.page-home .page-shell {
      min-height: calc(100dvh - var(--vb-nav));
    }
  }
}

/* Other pages: keep the native browser scrollbar usable by mouse. */
body:not(.page-home) {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: visible;
}

/* Active menu items, including clean URLs like /terms. */
.vb-navbar .nav-link.active,
.vb-navbar .dropdown-toggle.active,
.vb-dropdown .dropdown-item.active {
  background: rgba(109, 93, 252, .12);
  color: var(--vb-primary) !important;
}

.vb-dropdown .dropdown-item.active {
  font-weight: 850;
}

[data-bs-theme="dark"] .vb-navbar .nav-link.active,
[data-bs-theme="dark"] .vb-navbar .dropdown-toggle.active,
[data-bs-theme="dark"] .vb-dropdown .dropdown-item.active {
  background: rgba(109, 93, 252, .2);
}

/* Mobile navbar: menu opens as an overlay under the fixed header,
   so brand/toggler never move and Bootstrap height animation does not stutter. */
@media (max-width: 991.98px) {
  .vb-navbar.site-navbar {
    min-height: var(--vb-nav);
    padding-top: 0;
    padding-bottom: 0;
  }

  .vb-navbar.site-navbar > .container-xl {
    position: relative;
    min-height: var(--vb-nav);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: .75rem;
  }

  .vb-brand {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
  }

  .vb-brand span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .vb-navbar .navbar-toggler {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid var(--vb-line);
    background: var(--vb-surface);
    box-shadow: none;
  }

  .vb-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 .22rem rgba(109, 93, 252, .18);
  }

  .vb-navbar .navbar-collapse {
    position: absolute;
    top: calc(100% + 10px);
    left: var(--bs-gutter-x, .75rem);
    right: var(--bs-gutter-x, .75rem);
    z-index: 1055;
    width: auto;
    max-height: calc(100dvh - var(--vb-nav) - 24px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: .85rem;
    border: 1px solid var(--vb-line);
    border-radius: 24px;
    background: var(--vb-surface-2);
    box-shadow: var(--vb-shadow);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
  }

  .vb-navbar .navbar-collapse:not(.show):not(.collapsing) {
    display: none;
  }

  .vb-navbar .navbar-collapse.show {
    display: block;
    height: auto !important;
    opacity: 1;
    transform: translateY(0) scale(1);
    animation: none;
  }

  .vb-navbar .navbar-collapse.collapsing {
    display: block;
    height: auto !important;
    transition: none !important;
    will-change: opacity, transform;
    backface-visibility: hidden;
    animation: vbMenuIn .14s ease-out both;
  }

  .vb-navbar.is-menu-closing .navbar-collapse.collapsing {
    animation: vbMenuOut .10s ease-in both;
  }

  .vb-navbar .navbar-nav {
    gap: .32rem;
    align-items: stretch !important;
  }

  .vb-navbar .nav-link {
    width: 100%;
    min-height: 44px;
    justify-content: flex-start;
    border-radius: 16px;
    padding: .68rem .82rem !important;
  }

  .vb-navbar .dropdown-menu {
    position: static !important;
    transform: none !important;
    width: 100%;
    margin: .3rem 0 .45rem;
  }

  .vb-dropdown {
    width: 100%;
    border-radius: 18px;
  }

  .vb-dropdown .dropdown-item {
    min-height: 42px;
    display: flex;
    align-items: center;
  }

  .vb-theme-btn {
    width: 100%;
    min-height: 46px;
    margin-top: .65rem !important;
    border-radius: 16px;
  }
}

@keyframes vbMenuIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes vbMenuOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-8px) scale(.985);
  }
}


/* === FixPack 2026-05 v4: opaque mobile menu + stable scrollbar on theme switch === */
html.has-page-scroll {
  overflow-x: hidden;
  overflow-y: scroll;
}

html.has-page-scroll body {
  overflow-x: hidden;
  overflow-y: visible;
}

@media (min-width: 992px) {
  html.is-page-home {
    overflow-x: hidden;
    overflow-y: hidden;
  }

  html.is-page-home body.page-home {
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }

  @supports (height: 100dvh) {
    html.is-page-home body.page-home {
      height: 100dvh;
      min-height: 100dvh;
    }
  }
}

@media (max-width: 991.98px) {
  html.is-page-home {
    overflow-x: hidden;
    overflow-y: auto;
  }

  html.is-page-home body.page-home {
    height: auto;
    min-height: 100svh;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .vb-navbar .navbar-collapse {
    background: #ffffff !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  [data-bs-theme="dark"] .vb-navbar .navbar-collapse {
    background: #0f172a !important;
  }

  .vb-navbar .dropdown-menu.vb-dropdown,
  .vb-navbar .vb-dropdown {
    background: #ffffff !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  [data-bs-theme="dark"] .vb-navbar .dropdown-menu.vb-dropdown,
  [data-bs-theme="dark"] .vb-navbar .vb-dropdown {
    background: #111827 !important;
  }
}

/* === FixPack 2026-05 v5: keep Chrome scrollbar stable on theme toggle === */
html.has-page-scroll {
  overflow-x: hidden !important;
  overflow-y: scroll !important;
}

html.has-page-scroll body {
  overflow-x: hidden !important;
}

html.has-page-scroll body:not(.page-home) {
  min-height: calc(100vh + 1px);
  overflow-y: visible !important;
}

@media (min-width: 992px) {
  html.is-page-home:not(.has-page-scroll) {
    overflow-x: hidden !important;
    overflow-y: hidden !important;
  }

  html.is-page-home:not(.has-page-scroll) body.page-home {
    overflow: hidden !important;
  }
}

@media (max-width: 991.98px) {
  html.is-page-home.has-page-scroll {
    overflow-x: hidden !important;
    overflow-y: scroll !important;
  }

  html.is-page-home.has-page-scroll body.page-home {
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }
}


/* === FixPack 2026-05 v6: stable Chrome scrollbar + no desktop navbar shift + mobile brand hitbox === */
html {
  overflow-x: hidden;
}

html.has-page-scroll {
  overflow-x: hidden !important;
  overflow-y: scroll !important;
  scrollbar-gutter: stable;
}

html.has-page-scroll body {
  overflow-x: hidden !important;
}

html.has-page-scroll body:not(.page-home) {
  overflow-y: visible !important;
}

@media (min-width: 992px) {
  html.is-page-home:not(.has-page-scroll) {
    overflow-x: hidden !important;
    overflow-y: hidden !important;
  }

  html.is-page-home:not(.has-page-scroll) body.page-home {
    height: 100svh !important;
    min-height: 100svh !important;
    overflow: hidden !important;
  }
}

@media (max-width: 991.98px) {
  html.is-page-home.has-page-scroll,
  html.has-page-scroll.is-page-home {
    overflow-x: hidden !important;
    overflow-y: scroll !important;
    scrollbar-gutter: stable;
  }

  html.is-page-home.has-page-scroll body.page-home,
  html.has-page-scroll.is-page-home body.page-home {
    height: auto !important;
    min-height: 100svh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .vb-navbar.site-navbar > .container-xl {
    align-items: center !important;
  }

  .vb-brand {
    flex: 0 1 auto !important;
    width: auto !important;
    max-width: calc(100% - 60px);
  }

  .vb-brand span {
    flex: 0 1 auto;
  }
}


/* === FixPack 2026-05 v7: Chrome native scrollbar stability + no first-paint navbar shift ===
   Keep desktop home locked. Every other page gets a real, draggable Chrome scrollbar
   before JS starts, because html has the initial class in markup. */
html {
  overflow-x: hidden !important;
  scrollbar-gutter: auto !important;
}

html.has-page-scroll {
  overflow-y: scroll !important;
}

html.has-page-scroll body {
  overflow-x: hidden !important;
  overflow-y: visible !important;
}

html.has-page-scroll body:not(.page-home) {
  min-height: 100vh;
}

@media (min-width: 992px) {
  html.is-page-home:not(.has-page-scroll) {
    overflow-x: hidden !important;
    overflow-y: hidden !important;
  }

  html.is-page-home:not(.has-page-scroll) body.page-home {
    height: 100svh !important;
    min-height: 100svh !important;
    overflow: hidden !important;
  }

  html.is-page-home:not(.has-page-scroll) body.page-home .page-shell {
    height: calc(100svh - var(--vb-nav)) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
}

@media (max-width: 991.98px) {
  html.is-page-home {
    overflow-x: hidden !important;
    overflow-y: scroll !important;
  }

  html.is-page-home body.page-home {
    height: auto !important;
    min-height: 100svh !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }

  html.is-page-home body.page-home .page-shell {
    height: auto !important;
    min-height: calc(100svh - var(--vb-nav)) !important;
    overflow: visible !important;
  }
}

/* Fixed header must keep the same horizontal geometry from the first paint. */
.vb-navbar.site-navbar {
  left: 0;
  right: 0;
  width: 100%;
}

.vb-navbar.site-navbar > .container-xl {
  width: 100%;
}

/* === FixPack 2026-05 v8: prevent desktop navbar shift from theme button label update === */
@media (min-width: 992px) {
  .vb-theme-btn {
    width: 132px;
    min-width: 132px;
    max-width: 132px;
    flex: 0 0 132px;
    padding-left: .95rem;
    padding-right: .95rem;
  }

  .vb-theme-btn [data-vb-theme-label] {
    display: inline-block;
    min-width: 64px;
    text-align: left;
  }
}

/* === Mobile scroll performance fix === */
@media (max-width: 991.98px) {
  body {
    background-attachment: scroll !important;
  }

  .site-navbar,
  .vb-navbar.site-navbar,
  .glass-card,
  .content-card,
  .social-link,
  .btn-glass,
  .vb-dropdown {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .vb-navbar.site-navbar {
    background: rgba(255, 255, 255, .96) !important;
  }

  [data-bs-theme="dark"] .vb-navbar.site-navbar {
    background: rgba(9, 13, 26, .96) !important;
  }

  .content-card,
  .glass-card,
  .btn-glass,
  .social-link {
    box-shadow: 0 10px 28px rgba(15, 23, 42, .10) !important;
  }

  [data-bs-theme="dark"] .content-card,
  [data-bs-theme="dark"] .glass-card,
  [data-bs-theme="dark"] .btn-glass,
  [data-bs-theme="dark"] .social-link {
    box-shadow: 0 12px 30px rgba(0, 0, 0, .24) !important;
  }
}

@media (hover: none), (pointer: coarse) {
  .content-card,
  .poster-frame img,
  .home-card,
  .social-link,
  .btn-clear-search,
  .vb-to-top {
    transition: none !important;
  }

  .content-card:hover,
  .home-card:hover,
  .social-link:hover {
    transform: none !important;
    filter: none !important;
  }

  .content-card:hover .poster-frame img {
    transform: none !important;
  }
}

/* Mobile gallery: vertical page scroll must not open screenshots */
.screens-strip {
  touch-action: pan-y !important;
}

.screen-shot {
  pointer-events: auto !important;
}

.screen-shot img {
  pointer-events: none !important;
}

.hash-card {
  overflow: hidden;
}

.hash-line {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 6px;
}

.hash-line::-webkit-scrollbar {
  height: 6px;
}

.hash-line::-webkit-scrollbar-thumb {
  background: rgba(109, 93, 252, .45);
  border-radius: 999px;
}

.hash-line::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, .18);
  border-radius: 999px;
}

/* === Chrome scrollbar hard fix for site pages ===
   Не стилизуем системный scrollbar html/body.
   Это убирает зависание Chrome при перетаскивании правого скроллбара мышкой.
   Desktop-главная страница сайта остаётся заблокированной, как было задумано.
*/
html.has-page-scroll {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  scrollbar-gutter: stable;
}

html.has-page-scroll body {
  overflow-x: hidden !important;
  overflow-y: visible !important;
}

html.has-page-scroll body:not(.page-home) {
  min-height: 100vh;
}

/* Сохраняем старое поведение главной страницы сайта на desktop: без вертикального скролла. */
@media (min-width: 768px) {
  body.page-home {
    height: 100svh !important;
    overflow: hidden !important;
  }

  body.page-home .page-shell {
    height: calc(100svh - var(--vb-nav, 72px)) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }
}

@supports (height: 100dvh) {
  @media (min-width: 768px) {
    body.page-home {
      height: 100dvh !important;
    }

    body.page-home .page-shell {
      height: calc(100dvh - var(--vb-nav, 72px)) !important;
    }
  }
}
