/* Animation Keyframes */

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

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

/* glow removed */

@keyframes correctFlash {
  0% {
    background-color: rgba(76, 175, 80, 0.6);
    transform: scale(1.05);
  }
  100% {
    background-color: transparent;
    transform: scale(1);
  }
}

@keyframes wrongShake {
  0% {
    transform: translateX(-10px);
    background-color: rgba(244, 67, 54, 0.6);
  }
  25% {
    transform: translateX(10px);
  }
  50% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
  100% {
    transform: translateX(0);
    background-color: transparent;
  }
}

@keyframes confettiFall {
  to {
    transform: translateY(100vh) rotate(360deg);
  }
}

@keyframes vibrate {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-3px);
  }
  50% {
    transform: translateX(3px);
  }
  75% {
    transform: translateX(-3px);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes popupEntrance {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

/* Animation Classes */

.correct {
  animation: correctFlash 0.5s;
  background-color: rgba(76, 175, 80, 0.3) !important;
}

.wrong {
  animation: wrongShake 0.5s;
  background-color: rgba(244, 67, 54, 0.3) !important;
}

.vibrate {
  animation: vibrate 0.3s linear;
}

.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  pointer-events: none;
  animation: confettiFall linear;
}

.table-responsive {
  animation: tableEntrance 0.6s ease-out;
}

/* Transition Effects */

.popup .close-popup {
  transition: transform 0.2s ease, color 0.2s ease;
}

.loading-screen {
  transition: opacity 0.3s ease;
}

/* Hover Effects */

.popup .close-popup:hover {
  transform: scale(1.3);
  color: var(--accent-color);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  transform: translateY(-2px);
  transition: all 0.2s ease;
}

/* pulse removed */

/* Fade Animations */

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

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

.fade-in {
  animation: fadeIn 0.3s ease-in;
}

.fade-out {
  animation: fadeOut 0.3s ease-out;
}

/* Slide Animations */

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

@keyframes slideDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.slide-up {
  animation: slideUp 0.4s ease-out;
}

.slide-down {
  animation: slideDown 0.4s ease-out;
}

/* neon pulse removed */

/* Tile flip */
@keyframes flipIn {
  from {
    transform: rotateX(90deg);
    opacity: 0;
  }
  to {
    transform: rotateX(0);
    opacity: 1;
  }
}
.flip-in {
  transform-origin: bottom;
  animation: flipIn 0.35s ease both;
}
