/* ============================================
   ANIMATIONS & KEYFRAMES
   ============================================ */

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

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

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

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

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

/* ========== SCALE ANIMATIONS ========== */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 217, 225, 0.4);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 217, 225, 0.8);
  }
}

/* ========== ROTATE ANIMATIONS ========== */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

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

/* ========== LOGO ANIMATIONS ========== */
@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg) scale(1);
  }
  50% {
    transform: translateY(-20px) rotate(5deg) scale(1.05);
  }
}

@keyframes logoSpin {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.1);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

/* ========== TEXT ANIMATIONS ========== */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blinkCaret {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: var(--accent-lime);
  }
}

@keyframes textGlow {
  0%, 100% {
    text-shadow: 0 0 10px rgba(0, 217, 225, 0.5);
  }
  50% {
    text-shadow: 0 0 30px rgba(0, 217, 225, 0.9), 0 0 40px rgba(204, 255, 0, 0.6);
  }
}

/* ========== NUMBER COUNTER ANIMATION ========== */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========== STATS CIRCLE ANIMATIONS ========== */
@keyframes fillCircle {
  from {
    stroke-dashoffset: 565;
  }
  to {
    stroke-dashoffset: calc(565 - (565 * var(--percentage) / 100));
  }
}

@keyframes circleGlow {
  0%, 100% {
    filter: drop-shadow(0 0 10px rgba(0, 217, 225, 0.6));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(0, 217, 225, 1));
  }
}

/* ========== MAP ANIMATIONS ========== */
@keyframes pulseOutline {
  0%, 100% {
    stroke-width: 2;
    opacity: 1;
  }
  50% {
    stroke-width: 3;
    opacity: 0.7;
  }
}

@keyframes blinkPoint {
  0%, 100% {
    r: 5;
    opacity: 1;
  }
  50% {
    r: 8;
    opacity: 0.6;
  }
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

/* ========== BUTTON ANIMATIONS ========== */
@keyframes buttonShine {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes buttonPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(0, 217, 225, 0.4);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 217, 225, 0.8), 0 0 60px rgba(204, 255, 0, 0.5);
  }
}

/* ========== FORM SUCCESS ANIMATION ========== */
@keyframes successPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes checkmark {
  0% {
    stroke-dashoffset: 100;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

/* ========== LOADING ANIMATIONS ========== */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

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

/* ========== PARTICLE ANIMATIONS ========== */
@keyframes particleFloat {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(50px);
    opacity: 0;
  }
}

/* ========== SCROLL REVEAL ANIMATIONS ========== */
@keyframes slideInLeft {
  from {
    transform: translateX(-100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

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

/* ========== HOVER EFFECTS ========== */
@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes wiggle {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-5deg);
  }
  75% {
    transform: rotate(5deg);
  }
}

@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
  }
  10%, 30% {
    transform: scale(0.9);
  }
  20%, 40%, 60%, 80% {
    transform: scale(1.1);
  }
  50%, 70% {
    transform: scale(1.05);
  }
}

/* ========== UTILITY ANIMATION CLASSES ========== */
.fade-in {
  animation: fadeIn 1s ease-out;
}

.fade-in-up {
  animation: fadeInUp 1s ease-out;
}

.fade-in-down {
  animation: fadeInDown 1s ease-out;
}

.fade-in-left {
  animation: fadeInLeft 1s ease-out;
}

.fade-in-right {
  animation: fadeInRight 1s ease-out;
}

.scale-in {
  animation: scaleIn 0.8s ease-out;
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

.rotate {
  animation: rotate 2s linear infinite;
}

.float {
  animation: float 3s ease-in-out infinite;
}

/* ========== DELAY CLASSES ========== */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }
.delay-700 { animation-delay: 0.7s; }
.delay-800 { animation-delay: 0.8s; }
.delay-900 { animation-delay: 0.9s; }
.delay-1000 { animation-delay: 1s; }

/* ========== DURATION CLASSES ========== */
.duration-fast { animation-duration: 0.3s; }
.duration-normal { animation-duration: 0.6s; }
.duration-slow { animation-duration: 1s; }
.duration-slower { animation-duration: 2s; }

/* ========== AOS (Animate On Scroll) Custom ========== */
[data-aos] {
  opacity: 0;
  transition-property: opacity, transform;
  transition-duration: 0.8s;
  transition-timing-function: ease-out;
}

[data-aos].aos-animate {
  opacity: 1;
}

[data-aos="fade-up"].aos-animate {
  transform: translateY(0);
}

[data-aos="fade-down"].aos-animate {
  transform: translateY(0);
}

[data-aos="fade-left"].aos-animate {
  transform: translateX(0);
}

[data-aos="fade-right"].aos-animate {
  transform: translateX(0);
}

[data-aos="zoom-in"].aos-animate {
  transform: scale(1);
}

/* ========== PAGE LOAD ANIMATION ========== */
@keyframes pageLoad {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body {
  animation: pageLoad 1s ease-out;
}

/* ========== PERFORMANCE OPTIMIZATIONS ========== */
.will-animate {
  will-change: transform, opacity;
}

.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}
