/* animations.css */
@keyframes shimmer { 0% { background-position: -1000px 0; } 100% { background-position: 1000px 0; } }
@keyframes gradientShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes scaleIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes slideInLeft { from { transform: translateX(-40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideInUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes bounceIn { 0% { transform: scale(0.3); opacity: 0; } 50% { transform: scale(1.05); } 70% { transform: scale(0.9); } 100% { transform: scale(1); opacity: 1; } }
@keyframes rotateIn { from { transform: rotate(-10deg) scale(0.9); opacity: 0; } to { transform: rotate(0deg) scale(1); opacity: 1; } }
@keyframes typewriter { from { width: 0; } to { width: 100%; } }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes ripple { 0% { transform: scale(0); opacity: 1; } 100% { transform: scale(4); opacity: 0; } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes ping { 75%,100% { transform: scale(2); opacity: 0; } }
@keyframes heartbeat { 0%,100% { transform: scale(1); } 14% { transform: scale(1.1); } 28% { transform: scale(1); } 42% { transform: scale(1.1); } 70% { transform: scale(1); } }
@keyframes glitch { 0%,100% { text-shadow: 0 0 0 transparent; } 33% { text-shadow: -2px 0 #9b7bff, 2px 0 #6c47ff; } 66% { text-shadow: 2px 0 #9b7bff, -2px 0 #6c47ff; } }
@keyframes neonPulse { 0%,100% { box-shadow: 0 0 10px rgba(108,71,255,0.3), 0 0 20px rgba(108,71,255,0.2), 0 0 40px rgba(108,71,255,0.1); } 50% { box-shadow: 0 0 20px rgba(108,71,255,0.6), 0 0 40px rgba(108,71,255,0.4), 0 0 80px rgba(108,71,255,0.2); } }
@keyframes textGlow { 0%,100% { text-shadow: 0 0 10px rgba(255, 107, 53,0.5); } 50% { text-shadow: 0 0 20px rgba(255, 107, 53,0.9), 0 0 40px rgba(255, 107, 53,0.5); } }
@keyframes morphBorder { 0%,100% { border-radius: 32px; } 25% { border-radius: 24px 40px 24px 40px; } 50% { border-radius: 40px; } 75% { border-radius: 40px 24px 40px 24px; } }

/* Utility classes */
.anim-shimmer { background: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.05) 50%, transparent 75%); background-size: 1000px 100%; animation: shimmer 2s infinite; }
.anim-gradient { background-size: 200% 200%; animation: gradientShift 4s ease infinite; }
.anim-scale-in { animation: scaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.anim-slide-left { animation: slideInLeft 0.6s ease forwards; }
.anim-slide-right { animation: slideInRight 0.6s ease forwards; }
.anim-slide-up { animation: slideInUp 0.6s ease forwards; }
.anim-bounce { animation: bounceIn 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97) forwards; }
.anim-neon { animation: neonPulse 2s ease-in-out infinite; }
.anim-heartbeat { animation: heartbeat 1.5s ease-in-out infinite; }
.anim-spin { animation: spin 1s linear infinite; }
.anim-morph { animation: morphBorder 6s ease-in-out infinite; }
.anim-glow-text { animation: textGlow 2s ease-in-out infinite; }
.anim-glitch { animation: glitch 3s infinite; }

/* Hover animations */
.hover-lift { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.hover-lift:hover { transform: translateY(-8px); box-shadow: 0 20px 48px rgba(108,71,255,0.25); }
.hover-scale { transition: transform 0.3s ease; }
.hover-scale:hover { transform: scale(1.05); }
.hover-glow { transition: box-shadow 0.3s ease; }
.hover-glow:hover { box-shadow: 0 0 32px rgba(108,71,255,0.4); }
.hover-border { transition: border-color 0.3s ease; }
.hover-border:hover { border-color: var(--primary-light) !important; }

/* Number ticker */
.ticker { display: inline-block; overflow: hidden; vertical-align: middle; }

/* Loading skeleton */
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%); background-size: 400% 100%; animation: shimmer 1.5s ease infinite; border-radius: 8px; }

/* Stagger animation for children */
.stagger-children > * { opacity: 0; animation: slideInUp 0.5s ease forwards; }
.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.6s; }

/* Progress bar animation */
@keyframes progressFill { from { width: 0%; } to { width: var(--width, 80%); } }
.progress-bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,0.08); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; background: var(--gradient-main); animation: progressFill 1.5s ease forwards; }

/* Floating particles */
@keyframes particleFloat { 0%,100% { transform: translateY(0) translateX(0); opacity: 0.6; } 50% { transform: translateY(-30px) translateX(10px); opacity: 1; } }
.particle { position: absolute; border-radius: 50%; background: rgba(108,71,255,0.4); animation: particleFloat var(--duration, 4s) ease-in-out infinite; animation-delay: var(--delay, 0s); }

/* Gradient border */
.gradient-border { position: relative; }
.gradient-border::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; background: var(--gradient-main); z-index: -1; opacity: 0; transition: opacity 0.3s ease; }
.gradient-border:hover::before { opacity: 1; }

/* Underline animation */
.animated-underline { position: relative; display: inline-block; }
.animated-underline::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 0%; height: 2px; background: var(--gradient-main); transition: width 0.4s ease; border-radius: 1px; }
.animated-underline:hover::after { width: 100%; }

/* Badge pulse */
.badge-pulse { position: relative; }
.badge-pulse::before { content: ''; position: absolute; inset: -4px; border-radius: 50px; background: rgba(108,71,255,0.3); animation: ping 2s ease-in-out infinite; }

/* Icon spin on hover */
.icon-hover-spin { transition: transform 0.4s ease; }
.icon-hover-spin:hover { transform: rotate(360deg); }

/* Perspective card tilt */
.tilt-card { transition: transform 0.3s ease; transform-style: preserve-3d; }
.tilt-card:hover { transform: perspective(800px) rotateY(-5deg) rotateX(5deg) translateY(-4px); }

/* Tiny Twinkling Stars */
@keyframes starDrift {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(var(--y-drift, -20px)) translateX(var(--x-drift, 10px));
  }
}

@keyframes starTwinkle {
  0%, 100% {
    opacity: var(--min-opacity, 0.2);
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}

.twinkle-star {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  will-change: transform, opacity;
}
