/* Брендовый splash-экран: пульсирующий логотип, орбиты и мягкий индикатор ожидания. */
#splashScreen {
  box-sizing: border-box;
  min-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: contain;
  justify-content: space-between;
  padding: max(24px, env(safe-area-inset-top)) 24px max(8px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 40%, rgba(202, 255, 53, .08), transparent 30%),
    radial-gradient(circle at 50% 52%, rgba(85, 224, 172, .08), transparent 46%);
}

#splashScreen .splash-content {
  box-sizing: border-box;
  width: min(100%, 420px);
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vh, 26px);
  text-align: center;
}

#splashScreen .splash-logo-shell {
  position: relative;
  flex: 0 0 auto;
  width: 194px;
  height: 194px;
  margin: 0;
  display: grid;
  place-items: center;
  isolation: isolate;
}

#splashScreen .splash-logo-shell::before,
#splashScreen .splash-logo-shell::after {
  content: '';
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

/* Два расширяющихся кольца повторяют ритм сердцебиения. */
#splashScreen .splash-logo-shell::before {
  inset: 31px;
  border: 1px solid rgba(202, 255, 53, .45);
  box-shadow: 0 0 24px rgba(202, 255, 53, .2), inset 0 0 24px rgba(85, 224, 172, .16);
  animation: splash-heartbeat-ring 1.55s ease-out infinite;
}

#splashScreen .splash-logo-shell::after {
  inset: 14px;
  border: 1px solid rgba(85, 224, 172, .2);
  box-shadow: 0 0 0 12px rgba(85, 224, 172, .035), 0 0 52px rgba(85, 224, 172, .18);
  animation: splash-heartbeat-ring 1.55s .18s ease-out infinite;
}

#splashScreen .splash-logo {
  position: relative;
  z-index: 3;
  flex: 0 0 auto;
  margin: 0;
  animation: splash-heartbeat 1.55s ease-in-out infinite;
  filter: drop-shadow(0 0 18px rgba(202, 255, 53, .18));
}

.splash-logo-orbit {
  position: absolute;
  inset: 3px;
  z-index: 1;
  border: 1px solid rgba(190, 242, 224, .18);
  border-radius: 50%;
  transform: rotate(-14deg);
  animation: splash-orbit-breathe 1.55s ease-in-out infinite;
}

.splash-logo-orbit::before,
.splash-logo-orbit::after {
  content: '';
  position: absolute;
  border: 3px solid transparent;
  border-radius: 50%;
  pointer-events: none;
}

.splash-logo-orbit::before {
  inset: -1px;
  border-top-color: #caff35;
  border-right-color: rgba(85, 224, 172, .8);
  transform: rotate(24deg);
  animation: splash-orbit-spin 2.2s linear infinite;
}

.splash-logo-orbit::after {
  inset: 17px;
  border-left-color: #ffb347;
  border-bottom-color: rgba(202, 255, 53, .8);
  transform: rotate(-28deg);
  animation: splash-orbit-spin-reverse 1.35s linear infinite;
}

.splash-orbit-particle {
  position: absolute;
  z-index: 2;
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #caff35;
  box-shadow: 0 0 8px currentColor, 0 0 18px currentColor;
  animation: splash-particle-float 1.55s ease-in-out infinite;
}

.splash-orbit-particle::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: rgba(255, 255, 255, .9);
}

.particle-a { top: 8px; left: 50%; color: #caff35; transform: translateX(-50%); }
.particle-b { top: 31px; right: 19px; color: #55e0ac; animation-delay: -.25s; }
.particle-c { right: 2px; top: 50%; color: #ffb347; animation-delay: -.5s; }
.particle-d { right: 32px; bottom: 20px; color: #caff35; animation-delay: -.75s; }
.particle-e { bottom: 5px; left: 50%; color: #55e0ac; transform: translateX(-50%); animation-delay: -1s; }
.particle-f { left: 18px; top: 39%; color: #ffb347; animation-delay: -1.25s; }

#splashScreen h1 {
  flex: 0 0 auto;
  margin: 0;
  line-height: 1;
}

#splashScreen .splash-content > p {
  flex: 0 0 auto;
  max-width: 320px;
  margin: 0;
  line-height: 1.5;
}

.splash-loading-dots {
  flex: 0 0 auto;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 8px 0;
}

.splash-loading-dots span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #caff35;
  box-shadow: 0 0 10px rgba(202, 255, 53, .7), 0 0 22px rgba(85, 224, 172, .32);
  animation: splash-dot-jump .9s ease-in-out infinite;
}

.splash-loading-dots span:nth-child(2) {
  background: #55e0ac;
  animation-delay: .14s;
}

.splash-loading-dots span:nth-child(3) {
  background: #ffb347;
  animation-delay: .28s;
}

@keyframes splash-heartbeat {
  0%, 100% { transform: scale(1); }
  8% { transform: scale(1.045); }
  16% { transform: scale(1); }
  25% { transform: scale(1.065); }
  38%, 100% { transform: scale(1); }
}

@keyframes splash-heartbeat-ring {
  0%, 100% { opacity: .5; transform: scale(.88); }
  10% { opacity: .95; transform: scale(1.02); }
  22% { opacity: .45; transform: scale(.91); }
  36% { opacity: .78; transform: scale(1.08); }
  58%, 100% { opacity: .2; transform: scale(1.18); }
}

@keyframes splash-orbit-spin { to { transform: rotate(384deg); } }
@keyframes splash-orbit-spin-reverse { to { transform: rotate(-388deg); } }

@keyframes splash-orbit-breathe {
  0%, 100% { transform: rotate(-14deg) scale(.97); }
  16% { transform: rotate(-7deg) scale(1.03); }
  31% { transform: rotate(-18deg) scale(.98); }
  48% { transform: rotate(2deg) scale(1.045); }
}

@keyframes splash-particle-float {
  0%, 100% { opacity: .62; filter: blur(.1px); }
  35% { opacity: 1; transform: translateY(-5px) scale(1.22); }
  68% { opacity: .74; transform: translateY(3px) scale(.84); }
}

@keyframes splash-dot-jump {
  0%, 55%, 100% { opacity: .55; transform: translateY(0) scale(.82); }
  25% { opacity: 1; transform: translateY(-9px) scale(1.08); }
}

@media (max-height: 700px) {
  #splashScreen {
    padding-top: max(16px, env(safe-area-inset-top));
  }

  #splashScreen .splash-content {
    gap: 12px;
  }

  #splashScreen .splash-logo-shell {
    width: 150px;
    height: 150px;
    transform: scale(.88);
  }
}

@media (max-width: 380px) {
  #splashScreen .splash-logo-shell {
    width: 174px;
    height: 174px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #splashScreen .splash-logo,
  #splashScreen .splash-logo-shell::before,
  #splashScreen .splash-logo-shell::after,
  .splash-logo-orbit,
  .splash-logo-orbit::before,
  .splash-logo-orbit::after,
  .splash-orbit-particle,
  .splash-loading-dots span {
    animation: none !important;
  }
}
