/* =================================================================
   ЛК — cinema-фон как на главной (distro-home)
   Частицы .nb-particles (18) и #nbDashParallax не трогаем
   ================================================================= */

body:has(#nb-dashboard-wrapper),
html:has(#nb-dashboard-wrapper) {
  background-color: #050505 !important;
  background-image: none !important;
}

/* старые градиенты выключаем — рисует .nb-dash-cinema-bg */
#nb-dashboard-wrapper::before,
#nb-dashboard-wrapper::after {
  display: none !important;
  content: none !important;
  opacity: 0 !important;
}

#nb-dashboard-wrapper .nb-starfield,
#nb-dashboard-wrapper .nb-star,
#nb-dashboard-wrapper .nb-aurora,
#nb-dashboard-wrapper .nb-floating-bg,
#nb-dashboard-wrapper .mesh-blob,
#nb-dashboard-wrapper .nb-noise-overlay {
  display: none !important;
}

#nb-dashboard-wrapper .nb-dash-cinema-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #050505;
}

#nb-dashboard-wrapper .nb-par {
  position: absolute;
  inset: 0;
  will-change: transform;
  backface-visibility: hidden;
  pointer-events: none;
}

#nb-dashboard-wrapper .nb-distro__void {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% -5%, rgba(255, 190, 60, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 35% at 90% 20%, rgba(232, 163, 23, 0.08), transparent 55%),
    #050505;
}

#nb-dashboard-wrapper .nb-distro__streak {
  position: absolute;
  left: -20%;
  top: 8%;
  width: 140%;
  height: 42%;
  background: linear-gradient(118deg, transparent 20%, rgba(255, 200, 70, 0.22) 45%, rgba(232, 163, 23, 0.08) 58%, transparent 75%);
  filter: blur(42px);
  opacity: .85;
  transform: rotate(-12deg);
  animation: nbDashStreak 14s ease-in-out infinite;
}
#nb-dashboard-wrapper .nb-distro__streak.is-b {
  top: 38%;
  height: 28%;
  opacity: .45;
  filter: blur(56px);
  transform: rotate(8deg);
  animation-duration: 18s;
  animation-delay: -4s;
}
#nb-dashboard-wrapper .nb-distro__streak.is-c {
  top: 62%;
  height: 34%;
  opacity: .35;
  filter: blur(64px);
  transform: rotate(-6deg);
  animation-duration: 22s;
  animation-delay: -8s;
}

#nb-dashboard-wrapper .nb-distro__aurora {
  position: absolute;
  inset: -10% -4%;
  filter: blur(48px);
  opacity: .7;
}
#nb-dashboard-wrapper .nb-distro__aurora span {
  position: absolute;
  border-radius: 50%;
}
#nb-dashboard-wrapper .nb-distro__aurora span:nth-child(1) {
  width: 46%; height: 34%;
  left: -6%; top: 4%;
  background: radial-gradient(circle, rgba(255,215,0,.28), transparent 70%);
  animation: nbDashAurora 18s ease-in-out infinite;
}
#nb-dashboard-wrapper .nb-distro__aurora span:nth-child(2) {
  width: 40%; height: 32%;
  right: -8%; top: 28%;
  background: radial-gradient(circle, rgba(232,163,23,.18), transparent 70%);
  animation: nbDashAurora 22s ease-in-out infinite reverse;
}
#nb-dashboard-wrapper .nb-distro__aurora span:nth-child(3) {
  width: 55%; height: 36%;
  left: 20%; bottom: -6%;
  background: radial-gradient(circle, rgba(255,180,40,.14), transparent 70%);
  animation: nbDashAurora 26s ease-in-out infinite;
}

#nb-dashboard-wrapper .nb-distro__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}
#nb-dashboard-wrapper .nb-distro__orb--a {
  width: min(42vw, 380px); height: min(42vw, 380px);
  left: -8%; top: 4%;
  background: radial-gradient(circle, rgba(255,215,0,.22), transparent 70%);
  animation: nbDashOrb 16s ease-in-out infinite;
}
#nb-dashboard-wrapper .nb-distro__orb--b {
  width: min(36vw, 320px); height: min(36vw, 320px);
  right: -6%; top: 22%;
  background: radial-gradient(circle, rgba(232,163,23,.16), transparent 70%);
  animation: nbDashOrb 20s ease-in-out infinite reverse;
}
#nb-dashboard-wrapper .nb-distro__orb--c {
  width: min(40vw, 360px); height: min(40vw, 360px);
  left: 40%; bottom: -10%;
  background: radial-gradient(circle, rgba(255,190,60,.12), transparent 70%);
  animation: nbDashOrb 24s ease-in-out infinite;
}

#nb-dashboard-wrapper .nb-distro__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,215,0,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,215,0,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .45;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 75%);
}

#nb-dashboard-wrapper .nb-distro__dust { position: absolute; inset: 0; }
#nb-dashboard-wrapper .nb-distro__dust i {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: rgba(255,230,160,.7);
  box-shadow: 0 0 8px rgba(255,215,0,.45);
  animation: nbDashDust 18s linear infinite;
  opacity: 0;
}
#nb-dashboard-wrapper .nb-distro__dust i:nth-child(1)  { left: 8%;  top: 20%; }
#nb-dashboard-wrapper .nb-distro__dust i:nth-child(2)  { left: 18%; top: 55%; animation-delay: 2s; }
#nb-dashboard-wrapper .nb-distro__dust i:nth-child(3)  { left: 28%; top: 12%; animation-delay: 4s; }
#nb-dashboard-wrapper .nb-distro__dust i:nth-child(4)  { left: 38%; top: 70%; animation-delay: 1s; }
#nb-dashboard-wrapper .nb-distro__dust i:nth-child(5)  { left: 48%; top: 30%; animation-delay: 3.5s; }
#nb-dashboard-wrapper .nb-distro__dust i:nth-child(6)  { left: 58%; top: 62%; animation-delay: 5s; }
#nb-dashboard-wrapper .nb-distro__dust i:nth-child(7)  { left: 68%; top: 18%; animation-delay: 1.8s; }
#nb-dashboard-wrapper .nb-distro__dust i:nth-child(8)  { left: 78%; top: 48%; animation-delay: 6s; }
#nb-dashboard-wrapper .nb-distro__dust i:nth-child(9)  { left: 88%; top: 26%; animation-delay: 2.6s; }
#nb-dashboard-wrapper .nb-distro__dust i:nth-child(10) { left: 12%; top: 78%; animation-delay: 7s; }
#nb-dashboard-wrapper .nb-distro__dust i:nth-child(11) { left: 42%; top: 42%; animation-delay: 3s; }
#nb-dashboard-wrapper .nb-distro__dust i:nth-child(12) { left: 72%; top: 80%; animation-delay: 4.5s; }
#nb-dashboard-wrapper .nb-distro__dust i:nth-child(13) { left: 22%; top: 36%; animation-delay: 8s; }
#nb-dashboard-wrapper .nb-distro__dust i:nth-child(14) { left: 92%; top: 66%; animation-delay: 5.5s; }
#nb-dashboard-wrapper .nb-distro__dust i:nth-child(15) { left: 54%; top: 10%; animation-delay: 9s; }
#nb-dashboard-wrapper .nb-distro__dust i:nth-child(16) { left: 34%; top: 88%; animation-delay: 2.2s; }

#nb-dashboard-wrapper .nb-distro__spark {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
#nb-dashboard-wrapper .nb-distro__spark i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 0 7px rgba(255, 255, 255, 0.5);
  opacity: 0;
  animation-name: nbDashSpark;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  will-change: transform, opacity;
}
#nb-dashboard-wrapper .nb-distro__spark i.is-gold {
  background: rgba(255, 215, 0, 0.92);
  box-shadow: 0 0 9px rgba(255, 200, 80, 0.7);
}
#nb-dashboard-wrapper .nb-distro__spark i.is-soft {
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

@keyframes nbDashStreak {
  0%,100% { opacity: .55; transform: rotate(-12deg) translate3d(0,0,0); }
  50% { opacity: .95; transform: rotate(-10deg) translate3d(2%, -2%, 0); }
}
@keyframes nbDashAurora {
  0%,100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(30px,-24px,0) scale(1.08); }
}
@keyframes nbDashOrb {
  0%,100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(16px,-20px,0) scale(1.05); }
}
@keyframes nbDashDust {
  0% { transform: translate3d(0, 20px, 0); opacity: 0; }
  15% { opacity: .8; }
  85% { opacity: .5; }
  100% { transform: translate3d(12px, -70vh, 0); opacity: 0; }
}
@keyframes nbDashSpark {
  0%   { transform: translate3d(0, 10vh, 0) scale(.5); opacity: 0; }
  8%   { opacity: .9; }
  45%  { opacity: .55; }
  100% { transform: translate3d(var(--dx, 0px), -110vh, 0) scale(.35); opacity: 0; }
}

/* UI поверх cinema-фона */
#nb-dashboard-wrapper .nb-particles {
  z-index: 2;
}
#nb-dashboard-wrapper #nbDashParallax,
#nb-dashboard-wrapper .nb-dash-parallax {
  z-index: 3;
}
#nb-dashboard-wrapper .nb-app-layout,
#nb-dashboard-wrapper .nb-mobile-toggle {
  position: relative;
  z-index: 5;
}

/* лёгкий tint вкладок поверх cinema — не перекрывает слои */
#nb-dashboard-wrapper .nb-dash-cinema-tint {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 70% at 20% 20%, var(--dash-bg-glow-a, rgba(255,200,80,.05)) 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 85% 80%, var(--dash-bg-glow-b, rgba(180,130,40,.04)) 0%, transparent 50%);
  opacity: .55;
  transition: opacity .45s ease, background .55s ease;
}

@media (max-width: 1024px) {
  #nb-dashboard-wrapper .nb-distro__spark,
  #nb-dashboard-wrapper .nb-distro__dust {
    opacity: .55;
  }
}

@media (prefers-reduced-motion: reduce) {
  #nb-dashboard-wrapper .nb-distro__streak,
  #nb-dashboard-wrapper .nb-distro__aurora span,
  #nb-dashboard-wrapper .nb-distro__orb,
  #nb-dashboard-wrapper .nb-distro__dust i,
  #nb-dashboard-wrapper .nb-distro__spark i {
    animation: none !important;
  }
}
