/* ============================================
   EDUVERSE — ANIMATIONS & MICRO-INTERACTIONS
   ============================================ */

/* === KEYFRAMES === */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes pulseBorder {
  0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(124,58,237,0); }
}

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

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

@keyframes particleFloat {
  0% { transform: translate(0, 0) rotate(0deg); opacity: 0.8; }
  33% { transform: translate(20px, -30px) rotate(120deg); opacity: 0.5; }
  66% { transform: translate(-15px, -60px) rotate(240deg); opacity: 0.3; }
  100% { transform: translate(5px, -100px) rotate(360deg); opacity: 0; }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

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

@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px rgba(124,58,237,0.3); }
  50% { box-shadow: 0 0 40px rgba(124,58,237,0.7), 0 0 80px rgba(0,212,255,0.2); }
}

@keyframes progressStrike {
  from { width: 0; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-8px); }
  75% { transform: translateY(-4px); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

@keyframes starPop {
  0% { transform: scale(0) rotate(-30deg); opacity: 0; }
  60% { transform: scale(1.3) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* === ANIMATION UTILITIES === */
.animate-fadeIn { animation: fadeIn 0.5s ease forwards; }
.animate-fadeInUp { animation: fadeInUp 0.6s cubic-bezier(0.22,1,0.36,1) forwards; }
.animate-fadeInDown { animation: fadeInDown 0.5s ease forwards; }
.animate-slideInLeft { animation: slideInLeft 0.5s cubic-bezier(0.22,1,0.36,1) forwards; }
.animate-slideInRight { animation: slideInRight 0.5s cubic-bezier(0.22,1,0.36,1) forwards; }
.animate-scaleIn { animation: scaleIn 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards; }
.animate-float { animation: float 4s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s ease infinite; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-glow { animation: glow 2s ease-in-out infinite; }
.animate-bounce { animation: bounce 0.6s ease; }
.animate-shake { animation: shake 0.4s ease; }

/* === STAGGER DELAYS === */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }
.delay-700 { animation-delay: 700ms; }
.delay-800 { animation-delay: 800ms; }

/* === SKELETON LOADING === */
.skeleton {
  background: linear-gradient(90deg, 
    rgba(255,255,255,0.03) 25%, 
    rgba(255,255,255,0.08) 50%, 
    rgba(255,255,255,0.03) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

/* === HERO PARTICLES === */
.particles-container {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.particle {
  position: absolute;
  border-radius: 50%;
  animation: particleFloat linear infinite;
  opacity: 0;
}

/* === CARD HOVER EFFECTS === */
.card-tilt {
  transition: transform var(--transition-base);
  transform-style: preserve-3d;
}

.card-tilt:hover {
  transform: perspective(1000px) rotateY(-3deg) rotateX(2deg) translateZ(10px);
}

/* === GRADIENT ANIMATED BG === */
.grad-animated {
  background: linear-gradient(-45deg, #7C3AED, #00D4FF, #FF6B9D, #7C3AED);
  background-size: 400% 400%;
  animation: gradientShift 6s ease infinite;
}

/* === NEON GLOW TEXT === */
.neon-text {
  text-shadow: 0 0 10px rgba(124,58,237,0.8), 0 0 30px rgba(124,58,237,0.5);
}

.neon-text-cyan {
  text-shadow: 0 0 10px rgba(0,212,255,0.8), 0 0 30px rgba(0,212,255,0.5);
}

/* === RIPPLE EFFECT === */
.ripple-btn {
  position: relative;
  overflow: hidden;
}

.ripple-btn .ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

/* === PAGE TRANSITIONS === */
.page-enter {
  animation: fadeInUp 0.4s cubic-bezier(0.22,1,0.36,1) forwards;
}

.page-exit {
  animation: fadeIn 0.2s ease reverse forwards;
}

/* === SCORE COUNTER === */
.score-pop {
  animation: starPop 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

/* === PROGRESS LINE === */
.progress-animated .progress-fill {
  animation: progressStrike 1s cubic-bezier(0.22,1,0.36,1) forwards;
}
