/* ========================================================
   Gra „Nadmuchaj balon” — Logonauts
   Animations & Physics Transitions
   ======================================================== */

/* Sun Warm Glow Pulse */
@keyframes sunPulse {
  0% {
    transform: scale(0.96);
    box-shadow: 0 0 40px rgba(255, 213, 79, 0.6);
  }
  100% {
    transform: scale(1.06);
    box-shadow: 0 0 70px rgba(255, 224, 130, 0.9);
  }
}

/* Floating Clouds */
@keyframes floatCloud {
  0% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(110vw);
  }
}

/* Flowers Swaying in Gentle Breeze */
@keyframes flowerSway {
  0% {
    transform: rotate(-6deg);
  }
  100% {
    transform: rotate(8deg);
  }
}

/* Speech Prompt Gentle Float */
@keyframes promptFloat {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-6px);
  }
}

/* Pulsing Progress Dot */
@keyframes pulseDot {
  0% {
    transform: scale(1.15);
    box-shadow: 0 0 4px var(--brand-teal);
  }
  50% {
    transform: scale(1.35);
    box-shadow: 0 0 12px var(--brand-teal-light);
  }
  100% {
    transform: scale(1.15);
    box-shadow: 0 0 4px var(--brand-teal);
  }
}

/* Mic Active Pulse */
@keyframes pulseMic {
  0% {
    transform: scale(1);
    box-shadow: 0 0 6px var(--success-green);
  }
  50% {
    transform: scale(1.3);
    box-shadow: 0 0 14px var(--success-green);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 6px var(--success-green);
  }
}

/* Boy Blinking */
@keyframes blinkEyes {
  0%, 94%, 100% {
    transform: scaleY(1);
  }
  96%, 98% {
    transform: scaleY(0.1);
  }
}

/* Boy Cheeks Puffed (Blowing Animation) */
.boy-blowing .boy-cheek-left,
.boy-blowing .boy-cheek-right {
  transform: scale(1.45) !important;
  fill: #ff8a80 !important;
  opacity: 0.9 !important;
}

.boy-blowing .boy-mouth-round {
  opacity: 1 !important;
  transform: scale(1.15) !important;
}
.boy-blowing .boy-mouth-smile {
  opacity: 0 !important;
}

.boy-cheering .boy-arms {
  transform: translateY(-30px) rotate(-15deg);
}

/* Balloon Jiggle / Wobble during Inflation */
@keyframes balloonWobble {
  0% {
    transform: scale(var(--b-scale, 1)) rotate(0deg);
  }
  25% {
    transform: scale(calc(var(--b-scale, 1) * 1.02), calc(var(--b-scale, 1) * 0.98)) rotate(1.5deg);
  }
  50% {
    transform: scale(calc(var(--b-scale, 1) * 0.99), calc(var(--b-scale, 1) * 1.02)) rotate(-1.5deg);
  }
  75% {
    transform: scale(calc(var(--b-scale, 1) * 1.015), calc(var(--b-scale, 1) * 0.985)) rotate(1deg);
  }
  100% {
    transform: scale(var(--b-scale, 1)) rotate(0deg);
  }
}

.balloon-inflating {
  animation: balloonWobble 0.25s infinite linear;
}

/* Balloon Flying Away (Celebration Finale 1) */
@keyframes flyToSky {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
    opacity: 1;
  }
  30% {
    transform: translate(30px, -150px) scale(0.9) rotate(8deg);
  }
  60% {
    transform: translate(-40px, -450px) scale(0.7) rotate(-10deg);
  }
  100% {
    transform: translate(80px, -1000px) scale(0.3) rotate(15deg);
    opacity: 0;
  }
}

.balloon-flying-away {
  animation: flyToSky 2.8s forwards cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}

/* Balloon Deflating Zoom (Whizzing Air Finale 2) */
@keyframes deflatingFly {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
  20% {
    transform: translate(80px, -90px) scale(0.85) rotate(45deg);
  }
  40% {
    transform: translate(-120px, -200px) scale(0.65) rotate(-65deg);
  }
  60% {
    transform: translate(140px, -320px) scale(0.45) rotate(90deg);
  }
  80% {
    transform: translate(-60px, -100px) scale(0.25) rotate(-30deg);
    opacity: 0.8;
  }
  100% {
    transform: translate(0, 50px) scale(0.1) rotate(180deg);
    opacity: 0;
  }
}

.balloon-deflating-fly {
  animation: deflatingFly 1.8s forwards ease-in-out;
  pointer-events: none;
}

/* Pop burst animation (Finale 3) */
@keyframes popBurst {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  40% {
    transform: scale(1.35);
    opacity: 0.8;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.balloon-popping {
  animation: popBurst 0.25s forwards cubic-bezier(0.1, 0.9, 0.2, 1);
  pointer-events: none;
}

/* Trophy bounce on victory modal */
@keyframes bounceTrophy {
  0% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(-12px) scale(1.08);
  }
}
