/* Optimized brain glow effect - reduced shadow layers */
.brain-glow {
  position: relative;
  animation: brain-glow 6s ease-in-out infinite alternate;
  will-change: box-shadow;
}

@keyframes brain-glow {
  0% {
    box-shadow:
      0 0 25px rgba(34, 197, 94, 0.2),
      0 0 50px rgba(34, 197, 94, 0.1);
  }
  100% {
    box-shadow:
      0 0 35px rgba(34, 197, 94, 0.3),
      0 0 60px rgba(34, 197, 94, 0.15);
  }
}

/* Amira gradient background */
.amira-gradient {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}

/* Optimized Google sign-in button glow */
.google-glow {
  position: relative;
  animation: google-glow 4s ease-in-out infinite alternate;
  will-change: box-shadow;
}

@keyframes google-glow {
  0% {
    box-shadow:
      0 0 25px rgba(147, 51, 234, 0.4),
      0 0 50px rgba(147, 51, 234, 0.2),
      0 0 75px rgba(147, 51, 234, 0.1);
  }
  100% {
    box-shadow:
      0 0 35px rgba(147, 51, 234, 0.6),
      0 0 70px rgba(147, 51, 234, 0.3),
      0 0 100px rgba(147, 51, 234, 0.15);
  }
}

/* Loading shimmer animation */
.loading-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0.1) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite linear;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Lightweight pond ripple animations */
.pond-ripple-ring {
  position: absolute;
  width: 200px;
  height: 200px;
  border: 0.8px solid rgba(52, 211, 153, 0.4);
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: pond-ripple 18s linear forwards;
  will-change: transform, opacity;
  contain: layout;
}

@keyframes pond-ripple {
  0% {
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 0;
  }
  5% {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0.7;
  }
  100% {
    transform: translate(-50%, -50%) scale(4);
    opacity: 0;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Reduced motion support - keep subtle glow but remove ripples */
@media (prefers-reduced-motion: reduce) {
  .pond-ripple-ring {
    animation: none !important;
    display: none;
  }

  .loading-shimmer {
    animation: none !important;
    background: rgba(255, 255, 255, 0.2);
  }

  /* Keep glow but make it static for reduced motion */
  .brain-glow {
    box-shadow:
      0 0 30px rgba(34, 197, 94, 0.25),
      0 0 55px rgba(34, 197, 94, 0.125) !important;
    animation: none !important;
  }

  .google-glow {
    box-shadow:
      0 0 25px rgba(147, 51, 234, 0.25),
      0 0 40px rgba(147, 51, 234, 0.125) !important;
    animation: none !important;
  }

  .webauthn-glow {
    box-shadow:
      0 0 30px rgba(99, 102, 241, 0.25),
      0 0 50px rgba(99, 102, 241, 0.125) !important;
    animation: none !important;
  }
}

/* Optimized WebAuthn button glow */
.webauthn-glow {
  position: relative;
  animation: webauthn-glow 3s ease-in-out infinite alternate;
  will-change: box-shadow;
}

@keyframes webauthn-glow {
  0% {
    box-shadow:
      0 0 25px rgba(99, 102, 241, 0.4),
      0 0 45px rgba(99, 102, 241, 0.25),
      0 0 70px rgba(99, 102, 241, 0.1);
  }
  100% {
    box-shadow:
      0 0 35px rgba(139, 92, 246, 0.6),
      0 0 60px rgba(139, 92, 246, 0.35),
      0 0 90px rgba(139, 92, 246, 0.2);
  }
}
