/* Bouncy Castle Loading Animation */
.bouncy-spinner {
  position: relative;
  width: 40px;
  height: 40px;
  margin: 0 auto;
}

.bouncy-castle {
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230d6efd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18M3 21V8l9-6 9 6v13M12 3v18M7 21v-6h4v6m2 0v-6h4v6'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  animation: bounce 1s ease-in-out infinite;
}

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

/* Shadow effect for the bouncing castle */
.bouncy-castle::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 25%;
  width: 50%;
  height: 10px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  animation: shadow 1s ease-in-out infinite;
}

@keyframes shadow {
  0%, 100% {
    transform: scale(1);
    opacity: 0.3;
  }
  50% {
    transform: scale(0.7);
    opacity: 0.1;
  }
}

/* Loading text animation */
.loading-text {
  margin-top: 10px;
  color: #0d6efd;
  animation: pulse 1.5s ease-in-out infinite;
}

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

/* Party Animation Elements */
.party-element {
  position: absolute;
  pointer-events: none;
  z-index: 1;
}

.balloon {
  width: 30px;
  height: 40px;
  opacity: 0.8;
  animation: float 15s linear infinite;
  position: absolute;
}

.confetti {
  width: 10px;
  height: 10px;
  opacity: 0.7;
  animation: confettiFall 8s linear infinite;
  position: absolute;
}

.party-hat {
  width: 25px;
  height: 30px;
  opacity: 0.9;
  animation: spin 10s linear infinite;
  position: absolute;
}

.star {
  width: 15px;
  height: 15px;
  opacity: 0.8;
  animation: twinkle 4s ease-in-out infinite;
  position: absolute;
}

/* Animation for floating balloons */
@keyframes float {
  0% {
    transform: translateY(110vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-20vh) translateX(20px) rotate(20deg);
    opacity: 0;
  }
}

/* Animation for falling confetti */
@keyframes confettiFall {
  0% {
    transform: translateY(-20px) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.7;
  }
  100% {
    transform: translateY(100vh) translateX(100px) rotate(360deg);
    opacity: 0;
  }
}

/* Animation for spinning party hats */
@keyframes spin {
  0% {
    transform: translateY(110vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(-10vh) translateX(100px) rotate(360deg);
    opacity: 0;
  }
}

/* Animation for twinkling stars */
@keyframes twinkle {
  0%, 100% {
    transform: scale(1);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.8;
  }
}
