/* Custom styles */
@import url('https://fonts.googleapis.com/css2?family=Fredoka+One:wght@400&family=Inter:wght@300;400;600&display=swap');

.font-fredoka { font-family: 'Fredoka One', cursive; }
.font-inter { font-family: 'Inter', sans-serif; }

/* Rainbow text animation */
.rainbow-text {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4, #ffeaa7, #dda0dd, #ff6b6b);
  background-size: 400% 400%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: rainbow 3s ease infinite;
}

@keyframes rainbow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Dancing text animation */
.dancing-text {
  animation: dance 2s ease-in-out infinite;
}

@keyframes dance {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  25% { transform: translateY(-10px) rotate(1deg); }
  75% { transform: translateY(-5px) rotate(-1deg); }
}

/* Floating balloon animation */
.balloon-float {
  animation: float 3s ease-in-out infinite;
}

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

/* Birthday card flip effect */
.birthday-card {
  perspective: 1000px;
  height: 200px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.birthday-card:hover .card-inner {
  transform: rotateY(180deg);
}

.card-inner.flipped {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.card-back {
  transform: rotateY(180deg);
}

/* Pulsing animation for special elements */
.animate-pulse-slow {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 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);
}

/* Interactive button effects */
button:active {
  transform: scale(0.98);
}

/* Gradient text for special elements */
.gradient-text {
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Celebration sparkle effect */
.sparkle::before {
  content: '✨';
  position: absolute;
  top: -10px;
  right: -10px;
  animation: twinkle 1.5s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* Responsive design helpers */
@media (max-width: 768px) {
  .birthday-card {
    height: 180px;
  }
  
  .card-front, .card-back {
    padding: 1rem;
  }
}

/* Loading animation for dynamic content */
.loading-shimmer {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

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

/* Party decoration elements */
.party-decoration {
  position: fixed;
  pointer-events: none;
  z-index: 10;
}

.party-decoration.confetti {
  top: -10px;
  animation: fall 3s linear forwards;
}

@keyframes fall {
  to {
    transform: translateY(100vh) rotate(720deg);
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .rainbow-text,
  .dancing-text,
  .balloon-float,
  .animate-bounce {
    animation: none;
  }
  
  .card-inner {
    transition: none;
  }
}

/* Focus styles for keyboard navigation */
button:focus,
input:focus,
textarea:focus {
  outline: 3px solid #fbbf24;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .rainbow-text {
    -webkit-text-fill-color: white;
    color: white;
  }
}