/* Animated background (shared) */
.animated-bg {
  position: relative;
  overflow-x: hidden;
}

.animated-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 40%, #0f172a 100%);
  background-size: 200% 200%;
  animation: mspos-bgShift 14s ease-in-out infinite;
}

@keyframes mspos-bgShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.bg-orbs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-orbs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: mspos-orbFloat 12s ease-in-out infinite;
}

.bg-orbs span:nth-child(1) {
  width: 420px; height: 420px;
  top: -80px; left: -60px;
  background: radial-gradient(circle, rgba(34,211,238,0.55), transparent 70%);
  animation-duration: 14s;
}
.bg-orbs span:nth-child(2) {
  width: 380px; height: 380px;
  top: 20%; right: -100px;
  background: radial-gradient(circle, rgba(99,102,241,0.5), transparent 70%);
  animation-duration: 16s;
  animation-delay: -3s;
}
.bg-orbs span:nth-child(3) {
  width: 320px; height: 320px;
  bottom: -60px; left: 25%;
  background: radial-gradient(circle, rgba(244,63,94,0.35), transparent 70%);
  animation-duration: 13s;
  animation-delay: -6s;
}
.bg-orbs span:nth-child(4) {
  width: 260px; height: 260px;
  bottom: 18%; right: 18%;
  background: radial-gradient(circle, rgba(168,85,247,0.4), transparent 70%);
  animation-duration: 15s;
  animation-delay: -2s;
}
.bg-orbs span:nth-child(5) {
  width: 200px; height: 200px;
  top: 45%; left: 40%;
  background: radial-gradient(circle, rgba(56,189,248,0.3), transparent 70%);
  animation-duration: 11s;
  animation-delay: -5s;
}

@keyframes mspos-orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(40px, -50px) scale(1.08); }
  50% { transform: translate(-30px, 30px) scale(0.95); }
  75% { transform: translate(50px, 20px) scale(1.05); }
}

/* Ensure app shells sit above background */
.app-shell,
.auth-shell,
.mobile-app {
  position: relative;
  z-index: 1;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .animated-bg::before { animation: none; }
  .bg-orbs span { animation: none; }
}

