/* =========================================================
   CloudCraft AWS Academy - Micro-Interactions & Animations
   ========================================================= */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-danger {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(225, 29, 72, 0.4);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 0 0 6px rgba(225, 29, 72, 0);
  }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.scale-up {
  animation: scaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.spin-icon {
  animation: spin 1s linear infinite;
}

/* Question Option Selection Transition */
.option-item {
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.test-card {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}

.btn {
  transition: transform 0.12s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: scale(0.97);
}

/* Palette button click effect */
.palette-btn:active {
  transform: scale(0.92);
}

/* =========================================================
   Gemini AI Neural Studio Modal Animations
   ========================================================= */
@keyframes ai-pulse-glow {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.4), inset 0 0 15px rgba(56, 189, 248, 0.3);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 0 45px rgba(129, 140, 248, 0.65), inset 0 0 25px rgba(129, 140, 248, 0.5);
  }
}

@keyframes ai-orbit {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes ai-orbit-reverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}

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

.ai-glow-orb {
  animation: ai-pulse-glow 2.4s ease-in-out infinite;
}

.ai-orbit-ring {
  animation: ai-orbit 8s linear infinite;
}

.ai-orbit-ring-rev {
  animation: ai-orbit-reverse 12s linear infinite;
}

.ai-shimmer-progress {
  background: linear-gradient(90deg, #38bdf8 0%, #818cf8 25%, #c084fc 50%, #38bdf8 75%, #818cf8 100%);
  background-size: 200% 100%;
  animation: shimmer-bar 2s linear infinite;
}

