/* ============================================================
   FLEXING DATA — Animated Background System (Quiz 1 - Data)
   Beautiful floating gradients + animated backdrop elements
   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 - middle (amber glow) */
.quiz-page {
  --blob-amber-opacity: 0.15;
}

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

/* Floating blob animations */
@keyframes floatBlobTL {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(40px, -60px) scale(1.05);
  }
  50% {
    transform: translate(80px, 20px) scale(0.95);
  }
  75% {
    transform: translate(30px, 60px) scale(1.02);
  }
}

@keyframes floatBlobBR {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  25% {
    transform: translate(-50px, 40px) scale(0.98);
  }
  50% {
    transform: translate(-90px, -30px) scale(1.05);
  }
  75% {
    transform: translate(-40px, -70px) scale(1.01);
  }
}

/* Subtle shine effect - passes over the background */
.quiz-page {
  position: relative;
}

.quiz-page::backdrop {
  opacity: 1;
}

/* Extra layer: tertiary blob in the middle-top area */
.card {
  position: relative;
}

/* Middle blob disabled - plain background preferred */

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

/* Enhanced grid animation - more visible and dynamic */
.quiz-page::backdrop-filter {
  backdrop-filter: blur(0px);
}

/* Ambient pulse for the background gradient */
@keyframes ambientPulse {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.02);
  }
}

.quiz-page {
  animation: ambientPulse 8s ease-in-out infinite;
}

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

/* Create particle elements using data attributes */
.card::after {
  content: "";
  position: fixed;
  top: 0;
  left: 10%;
  width: 3px;
  height: 3px;
  background: rgba(10, 150, 199, 0.6);
  border-radius: 50%;
  filter: blur(0.5px);
  animation: shimmerFloat 6s ease-in infinite;
  will-change: transform;
  z-index: 1;
  pointer-events: none;
}

/* 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 */
@media (max-width: 768px) {
  .quiz-page::before {
    width: 400px;
    height: 400px;
    top: -40%;
    left: -30%;
  }

  .quiz-page::after {
    width: 450px;
    height: 450px;
    bottom: -40%;
    right: -25%;
  }

  .card::before {
    width: 350px;
    height: 350px;
    right: 15%;
    top: 35%;
  }
}

/* Ultra-wide screens - scale blobs larger */
@media (min-width: 1600px) {
  .quiz-page::before {
    width: 750px;
    height: 750px;
  }

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

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

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

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