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

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

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

@keyframes scaleIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(243, 167, 18, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(243, 167, 18, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(243, 167, 18, 0);
  }
}

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

.fade-in-delay {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  animation-delay: 0.3s;
}

.fade-in-delay-more {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
  animation-delay: 0.6s;
}

.fade-in-left {
  animation: fadeInLeft 0.8s ease forwards;
}

.fade-in-right {
  animation: fadeInRight 0.8s ease forwards;
}

.scale-in {
  animation: scaleIn 0.5s ease forwards;
}

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

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

.scroll-fade-in-left {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.scroll-fade-in-right {
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Element-specific animations */
.feature-card:hover i {
  animation: pulseGlow 1.5s infinite;
}

.game-card {
  transform: perspective(1000px) rotateY(0deg);
  transition: transform 0.5s ease;
}

.game-card:hover {
  transform: perspective(1000px) rotateY(5deg);
}

/* Staggered animations for multiple elements */
.feature:nth-child(1) {
  animation-delay: 0.1s;
}

.feature:nth-child(2) {
  animation-delay: 0.2s;
}

.feature:nth-child(3) {
  animation-delay: 0.3s;
}

.feature:nth-child(4) {
  animation-delay: 0.4s;
}

.games-grid .game-card:nth-child(odd) {
  animation-delay: 0.2s;
}

.games-grid .game-card:nth-child(even) {
  animation-delay: 0.4s;
}

.gallery-item:nth-child(1) {
  animation-delay: 0.1s;
}

.gallery-item:nth-child(2) {
  animation-delay: 0.2s;
}

.gallery-item:nth-child(3) {
  animation-delay: 0.3s;
}

.gallery-item:nth-child(4) {
  animation-delay: 0.4s;
}

.gallery-item:nth-child(5) {
  animation-delay: 0.5s;
}

.gallery-item:nth-child(6) {
  animation-delay: 0.6s;
}

/* Button hover animation */
.btn-primary, .btn-secondary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before, .btn-secondary::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: left 0.5s ease;
}

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