/* Animation Effects for CSUN Maps Quiz */

/* Pulse Animation for Prompt */
.pulse-animation {
  animation: pulse 0.6s ease-in-out;
}

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

/* Feedback Animations */
.correct-feedback {
  animation: slideInBounce 0.5s ease-out;
  background: rgba(40, 167, 69, 0.1);
  border: 2px solid var(--success-color);
}

.incorrect-feedback {
  animation: shake 0.5s ease-out;
  background: rgba(220, 53, 69, 0.1);
  border: 2px solid var(--error-color);
}

@keyframes slideInBounce {
  0% {
    transform: translateY(-20px);
    opacity: 0;
  }
  60% {
    transform: translateY(5px);
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

/* Slide In Animation for Results */
.slide-in-animation {
  animation: slideIn 0.5s ease-out;
}

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

/* Fade In Animation */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Score Counter Animation */
@keyframes scoreIncrement {
  0% {
    transform: scale(1);
    color: inherit;
  }
  50% {
    transform: scale(1.2);
    color: var(--success-color);
  }
  100% {
    transform: scale(1);
    color: inherit;
  }
}

.score-increment {
  animation: scoreIncrement 0.4s ease-out;
}

/* Map Overlay Fade In */
@keyframes overlayFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.4;
  }
}

/* Button Hover Effects */
@keyframes buttonPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(210, 38, 48, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(210, 38, 48, 0);
  }
}

.btn-primary:active {
  animation: buttonPulse 0.6s;
}

/* Loading Dots Animation */
.loading-dots::after {
  content: '';
  animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
  0%,
  20% {
    content: '.';
  }
  40% {
    content: '..';
  }
  60%,
  100% {
    content: '...';
  }
}

/* Celebration Effect for Perfect Score */
@keyframes celebrate {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(-5deg) scale(1.1);
  }
  75% {
    transform: rotate(5deg) scale(1.1);
  }
}

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

/* Glow Effect for High Score */
@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 5px rgba(210, 38, 48, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(210, 38, 48, 0.8);
  }
}

.glow-effect {
  animation: glow 2s infinite;
}
