.lottie-hero {
  position: absolute; right: -20px; top: 50%; transform: translateY(-50%);
  width: 320px; height: 320px; opacity: 0.9;
  pointer-events: none; z-index: 1;
}
.lottie-hero-inline {
  width: 280px; height: 280px; margin: 0 auto;
  filter: drop-shadow(0 10px 30px rgba(91,94,244,0.15));
}
.lottie-float {
  animation: lottieFloat 3s ease-in-out infinite;
}
@keyframes lottieFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.lottie-levelup {
  width: 180px; height: 180px; margin: 0 auto 0.5rem;
}
.lottie-gameover {
  width: 160px; height: 160px; margin: 0 auto;
}
.lottie-grading {
  width: 120px; height: 120px; margin: 0 auto;
  display: block;
}
.lottie-score-celebrate {
  position: absolute; top: -40px; left: 50%;
  transform: translateX(-50%);
  width: 250px; height: 250px;
  pointer-events: none; z-index: 10;
}
.lottie-empty-state {
  width: 200px; height: 200px; margin: 1rem auto;
  opacity: 0.85;
}
.lottie-streak-fire {
  width: 60px; height: 60px; display: inline-block;
  vertical-align: middle; margin: -10px 0;
}
.lottie-card-icon {
  width: 80px; height: 80px; margin: 0 auto 0.5rem;
}
.lottie-section-header {
  width: 50px; height: 50px; display: inline-block;
  vertical-align: middle; margin-right: 0.5rem;
  margin-top: -5px;
}
.lottie-bg-decoration {
  position: absolute; opacity: 0.12;
  pointer-events: none; z-index: 0;
}
.lottie-inline-small {
  width: 40px; height: 40px; display: inline-block;
  vertical-align: middle;
}
.lottie-inline-medium {
  width: 64px; height: 64px; display: inline-block;
  vertical-align: middle;
}

.lottie-pulse {
  animation: lottiePulse 2s ease-in-out infinite;
}
@keyframes lottiePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.lottie-entrance {
  animation: lottieEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes lottieEntrance {
  from { opacity: 0; transform: scale(0.5) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.lottie-spin-in {
  animation: lottieSpinIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes lottieSpinIn {
  from { opacity: 0; transform: scale(0) rotate(-180deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

/* ===== PAGE LOAD ANIMATIONS ===== */
.fade-in-up {
  animation: fadeInUp 0.5s ease both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

.scale-in {
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

.slide-in-left {
  animation: slideInLeft 0.5s ease both;
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
  animation: slideInRight 0.5s ease both;
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Glass shimmer effect for cards */
.glass-shimmer {
  position: relative;
  overflow: hidden;
}
.glass-shimmer::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(
    115deg,
    transparent 40%,
    rgba(255,255,255,0.2) 50%,
    transparent 60%
  );
  animation: shimmer 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shimmer {
  0% { transform: translateX(-100%) rotate(15deg); }
  100% { transform: translateX(100%) rotate(15deg); }
}

/* Smooth hover lift for cards */
.hover-lift {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(91,94,244,0.15);
}

/* Gradient text animation */
.gradient-text-anim {
  background: linear-gradient(135deg, #5b5ef4, #7209b7, #f72585, #5b5ef4);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s ease infinite;
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Smooth counting number animation */
.count-up {
  display: inline-block;
  transition: transform 0.3s ease;
}
.count-up.bumped {
  transform: scale(1.15);
}

/* Glow pulse for CTAs */
.glow-pulse {
  animation: glowPulse 2s ease-in-out infinite;
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 5px rgba(91,94,244,0.3); }
  50% { box-shadow: 0 0 20px rgba(91,94,244,0.5), 0 0 40px rgba(91,94,244,0.2); }
}

/* Particle burst on click */
.particle-burst {
  position: relative;
}
.particle-burst::before {
  content: '';
  position: absolute;
  width: 100%; height: 100%;
  top: 0; left: 0;
  border-radius: inherit;
  opacity: 0;
  background: radial-gradient(circle, rgba(91,94,244,0.3) 0%, transparent 70%);
  animation: burstOut 0.6s ease;
  pointer-events: none;
}
@keyframes burstOut {
  0% { transform: scale(0.5); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

@media (max-width: 768px) {
  .lottie-hero { display: none; }
  .lottie-hero-inline { width: 200px; height: 200px; }
  .lottie-levelup { width: 120px; height: 120px; }
  .lottie-gameover { width: 120px; height: 120px; }
  .lottie-empty-state { width: 150px; height: 150px; }
}
