@keyframes confetti-fall {
  0% {
    transform: translateY(-100vh) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.confetti-particle {
  animation: confetti-fall 3s ease-out forwards;
}

.animate-pulse-fast {
  animation: pulse 0.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-spin-slow {
  animation: spin 2s linear infinite;
}

/* Glassmorphism effects */
.backdrop-blur-lg {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* Touch improvements */
@media (hover: none) {
  button:active {
    transform: scale(0.95);
  }
}

/* Dark mode transitions */
.dark {
  color-scheme: dark;
}

/* Smooth transitions */
* {
  -webkit-tap-highlight-color: transparent;
}

/* Mobile optimizations */
@media (max-width: 640px) {
  .text-4xl {
    font-size: 1.75rem;
  }
}

/* Animation for achievement popup */
@keyframes achievement-pop {
  0% {
    transform: translate(-50%, -20px) scale(0.8);
    opacity: 0;
  }
  20% {
    transform: translate(-50%, 0) scale(1.1);
    opacity: 1;
  }
  40% {
    transform: translate(-50%, 0) scale(1);
  }
  100% {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
  }
}

/* Fun hover effects */
button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

/* Input focus states */
input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Gradient text effect for headers */
.gradient-text {
  background: linear-gradient(135deg, #fff 0%, #ffd6e7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}