/* Animation Keyframes */
@keyframes glow {
  0% {
    box-shadow: 0 0 5px var(--color-primary);
  }
  50% {
    box-shadow: 0 0 20px var(--color-primary),
                0 0 30px var(--color-secondary);
  }
  100% {
    box-shadow: 0 0 5px var(--color-primary);
  }
}

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

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

@keyframes sparkle {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0);
  }
}

/* Apply Animations */
.logo-text {
  animation: float 4s ease-in-out infinite;
}

.cta-button {
  animation: glow 3s infinite;
}

.game-card::before {
  content: '';
  position: absolute;
  top: -50px;
  left: -50px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, var(--color-secondary) 0%, transparent 70%);
  opacity: 0;
  transition: all 0.5s;
  pointer-events: none;
}

.game-card:hover::before {
  opacity: 0.7;
  animation: sparkle 1.5s infinite;
}

.game-card::after {
  content: '';
  position: absolute;
  bottom: -50px;
  right: -50px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
  opacity: 0;
  transition: all 0.5s;
  pointer-events: none;
}

.game-card:hover::after {
  opacity: 0.7;
  animation: sparkle 1.5s infinite 0.3s;
}

.social-icon {
  animation: float 3s ease-in-out infinite;
}

.discord {
  animation-delay: 0s;
}

.twitter {
  animation-delay: 0.5s;
}

.youtube {
  animation-delay: 1s;
}

/* Form submission animation */
@keyframes formSuccess {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.form-success-message {
  display: none;
  text-align: center;
  padding: 20px;
  background-color: rgba(0, 255, 115, 0.1);
  border: 2px solid var(--color-accent);
  border-radius: var(--border-radius);
  margin-top: 20px;
  color: var(--color-accent);
}

.form-success-message.show {
  display: block;
  animation: formSuccess 0.5s ease-in-out;
}

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

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

/* Scroll animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Game hover sparkle effect */
.sparkle {
  position: absolute;
  pointer-events: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--color-primary);
  box-shadow: 0 0 10px var(--color-primary),
              0 0 20px var(--color-secondary);
  opacity: 0;
}

.sparkle.animate {
  animation: sparkle 1s ease-in-out;
}