/* ============================================================
   FLEXING DATA — Animated Background System (Quiz 2 - AI)
   Beautiful floating gradients + ambient animations (Violet Theme)
   Performance: will-change + GPU acceleration
   ============================================================ */

/* Container positioning for animated elements */
.quiz-page {
  position: relative;
  overflow: hidden;
}

/* Animated gradient blobs disabled - plain background preferred */

/* Additional floating blob - center (violet-blue mix) */
.quiz-page {
  --blob-violet-opacity: 0.18;
}

.quiz-page .card {
  position: relative;
  z-index: 2;
}

/* Floating blob animations */
@keyframes floatBlobTR {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(-50px, 50px) scale(1.06);
  }
  50% {
    transform: translate(-100px, -30px) scale(0.96);
  }
  75% {
    transform: translate(-30px, -70px) scale(1.03);
  }
}

@keyframes floatBlobBL {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(60px, -40px) scale(0.99);
  }
  50% {
    transform: translate(90px, 50px) scale(1.04);
  }
  75% {
    transform: translate(40px, 80px) scale(1.02);
  }
}

/* Tertiary blob - creates additional depth */
.card {
  position: relative;
}

/* Center blob disabled - plain background preferred */

@keyframes floatBlobCenter {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(70px, -60px) scale(1.04);
  }
  50% {
    transform: translate(-70px, 40px) scale(0.98);
  }
  75% {
    transform: translate(50px, 70px) scale(1.03);
  }
}

/* Ambient glow pulse animation */
@keyframes ambientGlow {
  0%, 100% {
    filter: brightness(1) saturate(1);
  }
  50% {
    filter: brightness(1.03) saturate(1.02);
  }
}

.quiz-page {
  animation: ambientGlow 9s ease-in-out infinite;
}

/* Particle shimmer effect - subtle floating sparkles */
@keyframes shimmerFloat {
  0% {
    opacity: 0;
    transform: translateY(100vh) translateX(0);
  }
  10% {
    opacity: 0.5;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: translateY(-100vh) translateX(80px);
  }
}

/* Create shimmer particles */
.card::after {
  content: "";
  position: fixed;
  top: 0;
  right: 15%;
  width: 4px;
  height: 4px;
  background: rgba(124, 92, 255, 0.7);
  border-radius: 50%;
  filter: blur(0.8px);
  animation: shimmerFloat 7s ease-in infinite;
  will-change: transform;
  z-index: 1;
  pointer-events: none;
}

/* Additional shimmer from different position */
@keyframes shimmerFloatAlt {
  0% {
    opacity: 0;
    transform: translateY(100vh) translateX(0);
  }
  15% {
    opacity: 0.4;
  }
  85% {
    opacity: 0.4;
  }
  100% {
    opacity: 0;
    transform: translateY(-100vh) translateX(-80px);
  }
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  .quiz-page::before,
  .quiz-page::after,
  .card::before,
  .card::after {
    animation: none !important;
  }

  .quiz-page {
    animation: none !important;
  }
}

/* Responsive adjustments for tablets and phones */
@media (max-width: 768px) {
  .quiz-page::before {
    width: 450px;
    height: 450px;
    top: -35%;
    right: -25%;
  }

  .quiz-page::after {
    width: 500px;
    height: 500px;
    bottom: -35%;
    left: -30%;
  }

  .card::before {
    width: 400px;
    height: 400px;
    left: 15%;
    top: 40%;
  }

  /* Slower animations on mobile for battery efficiency */
  @keyframes floatBlobTR {
    0%, 100% {
      transform: translate(0, 0) scale(1);
    }
    25% {
      transform: translate(-30px, 25px) scale(1.03);
    }
    50% {
      transform: translate(-50px, -20px) scale(0.98);
    }
    75% {
      transform: translate(-20px, -40px) scale(1.01);
    }
  }
}

/* Ultra-wide screens - bigger, more immersive blobs */
@media (min-width: 1600px) {
  .quiz-page::before {
    width: 800px;
    height: 800px;
  }

  .quiz-page::after {
    width: 900px;
    height: 900px;
  }

  .card::before {
    width: 700px;
    height: 700px;
  }
}

/* Ensures the card stays above all animated backgrounds */
.quiz-page > .card {
  position: relative;
  z-index: 10;
}

/* Optional: Add subtle backdrop-filter support */
@supports (backdrop-filter: blur(1px)) {
  .quiz-page::before,
  .quiz-page::after {
    backdrop-filter: blur(1px);
  }
}

/* Prevent interaction with background animation */
.quiz-page::before,
.quiz-page::after,
.card::before,
.card::after {
  pointer-events: none;
}
