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

@keyframes glow {
  0% {
    box-shadow: 0 0 5px rgba(147, 51, 234, 0.5);
  }
  50% {
    box-shadow: 0 0 15px rgba(147, 51, 234, 0.8), 0 0 30px rgba(147, 51, 234, 0.4);
  }
  100% {
    box-shadow: 0 0 5px rgba(147, 51, 234, 0.5);
  }
}

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

@keyframes rotateIn {
  from {
    transform: rotate(-5deg) scale(0.9);
    opacity: 0;
  }
  to {
    transform: rotate(0) scale(1);
    opacity: 1;
  }
}

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

/* Applied Animations */
.section-title {
  animation: fadeIn 0.8s ease-out both;
}

.hero-content h1 {
  animation: fadeIn 1s ease-out 0.2s both;
}

.hero-content p {
  animation: fadeIn 1s ease-out 0.4s both;
}

.hero-content .btn {
  animation: fadeIn 1s ease-out 0.6s both;
}

.btn:hover {
  animation: pulse 1.5s infinite ease-in-out;
}

.game-card:hover {
  animation: glow 2s infinite ease-in-out;
}

.feature-icon {
  animation: pulse 3s infinite ease-in-out;
}

/* Scroll Animations (added via JS) */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-left.active {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-in-right.active {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.scale-in.active {
  opacity: 1;
  transform: scale(1);
}

/* Button Animations */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: all 0.5s;
}

.btn-primary:hover::before {
  left: 100%;
}

/* Game Card Hover Effect */
.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(147, 51, 234, 0.1) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  /* z-index: 1; */
}

.game-card:hover::before {
  opacity: 1;
}

/* Form Input Focus Effects */
.form-group input:focus,
.form-group textarea:focus {
  animation: glow 2s infinite ease-in-out;
}

/* Navigation Link Hover Animation */
.nav-links a::after {
  transition: width 0.3s ease, background-color 0.3s ease;
}

.nav-links a:hover::after {
  background-color: var(--accent-light);
  box-shadow: 0 0 10px var(--accent-light);
}

/* Mobile Menu Animation */
.hamburger span {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}