/* Fog Background Animation */
.fog-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.fog {
  position: absolute;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(139, 0, 0, 0.1) 25%,
    rgba(157, 0, 255, 0.1) 50%,
    rgba(139, 0, 0, 0.1) 75%,
    transparent 100%
  );
  opacity: 0.3;
}

.fog-1 {
  animation: fogMove 60s linear infinite;
  top: 0;
}

.fog-2 {
  animation: fogMove 45s linear infinite reverse;
  top: 20%;
  opacity: 0.2;
}

.fog-3 {
  animation: fogMove 75s linear infinite;
  top: 40%;
  opacity: 0.15;
}

@keyframes fogMove {
  0% {
    transform: translateX(-50%);
  }
  100% {
    transform: translateX(0%);
  }
}

/* Flickering Neon Border Animation */
@keyframes neonFlicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    opacity: 1;
    filter: brightness(100%);
  }
  20%, 24%, 55% {
    opacity: 0.8;
    filter: brightness(80%);
  }
  22% {
    opacity: 0.6;
    filter: brightness(60%);
  }
}

.flicker-neon {
  animation: neonFlicker 3s infinite;
}

/* Selection Effect Animation */
@keyframes selectionPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.8);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(139, 0, 0, 1);
  }
}

.selected-character {
  animation: selectionPulse 0.6s ease-in-out;
  border: 2px solid var(--color-accent-blood);
  box-shadow: var(--glow-blood);
}

/* Spinner/Loading Animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top: 4px solid var(--color-accent-neon);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

/* Fade In Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Slide In Animation */
@keyframes slideIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.slide-in {
  animation: slideIn 0.4s ease-out;
}

/* Pulse Animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Glow Pulse Animation */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.4);
  }
  50% {
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.8);
  }
}

.glow-pulse {
  animation: glowPulse 2s ease-in-out infinite;
}

/* Success Check Animation */
@keyframes successCheck {
  0% {
    transform: scale(0) rotate(0deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(180deg);
  }
  100% {
    transform: scale(1) rotate(360deg);
    opacity: 1;
  }
}

.success-icon {
  display: inline-block;
  font-size: 4rem;
  animation: successCheck 0.6s ease-out;
}

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

.shake {
  animation: shake 0.5s ease-in-out;
}

/* Hover Glow Effect */
.hover-glow {
  transition: all var(--transition-normal);
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(139, 0, 0, 0.8);
  transform: translateY(-2px);
}

/* Button Press Animation */
@keyframes buttonPress {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

.btn-press {
  animation: buttonPress 0.2s ease-out;
}

/* Notification Slide In */
@keyframes notificationSlide {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.notification {
  animation: notificationSlide 0.3s ease-out;
}

/* Modal Fade In */
@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal.active .modal-content {
  animation: modalFadeIn 0.3s ease-out;
}
