/* Animation Classes */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

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

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.7), 0 0 20px rgba(0, 243, 255, 0.5);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.8), 0 0 30px rgba(0, 243, 255, 0.6);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.7), 0 0 20px rgba(0, 243, 255, 0.5);
  }
}

@keyframes glow {
  0% {
    box-shadow: 0 0 5px rgba(0, 243, 255, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.8);
  }
  100% {
    box-shadow: 0 0 5px rgba(0, 243, 255, 0.5);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Applying Animations */
.fade-in {
  animation: fadeIn 1s ease-in-out;
}

.slide-in-left {
  animation: slideInLeft 1s ease-in-out;
}

.slide-in-right {
  animation: slideInRight 1s ease-in-out;
}

.slide-in-up {
  animation: slideInUp 1s ease-in-out;
}

.pulse {
  animation: pulse 2s infinite;
}

.glow {
  animation: glow 3s infinite;
}

.spin {
  animation: spin 10s linear infinite;
}

/* Scroll Animations */
.reveal {
  position: relative;
  opacity: 0;
  transition: opacity 1s ease, transform 1s ease;
}

.reveal.active {
  opacity: 1;
}

.reveal--left {
  transform: translateX(-50px);
}

.reveal--left.active {
  transform: translateX(0);
}

.reveal--right {
  transform: translateX(50px);
}

.reveal--right.active {
  transform: translateX(0);
}

.reveal--up {
  transform: translateY(50px);
}

.reveal--up.active {
  transform: translateY(0);
}

/* Hover Animations */
.hover-lift {
  transition: transform 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-5px);
}

.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

/* Navigation Animation */
.nav-menu a::after {
  transition: width 0.3s ease;
}

/* Logo Animations */
.logo span.highlight {
  position: relative;
  display: inline-block;
  animation: glow 3s infinite;
}

/* Button Animations */
button, .cta-button {
  position: relative;
  overflow: hidden;
}

button::after, .cta-button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  100% {
    transform: scale(20, 20);
    opacity: 0;
  }
}

button:focus:not(:active)::after,
.cta-button:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

/* Game Card Hover Effects */
.game-card .game-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 100%
  );
  transform: skewX(-25deg);
  transition: all 0.75s;
  z-index: 1;
  opacity: 0;
}

.game-card:hover .game-image::before {
  animation: shine 1s;
}

@keyframes shine {
  100% {
    left: 125%;
    opacity: 1;
  }
}

/* Feature Card Animations */
.feature-card i {
  transition: transform 0.5s ease;
}

.feature-card:hover i {
  transform: scale(1.2);
  color: var(--neon-blue);
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background-color: var(--neon-blue);
  z-index: 1001;
  width: 0%;
  transition: width 0.2s ease;
}

/* Loading Animation */
.loading {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}

.loading:after {
  content: " ";
  display: block;
  border-radius: 50%;
  width: 0;
  height: 0;
  margin: 8px;
  box-sizing: border-box;
  border: 32px solid var(--neon-blue);
  border-color: var(--neon-blue) transparent var(--neon-blue) transparent;
  animation: loading 1.2s infinite;
}

@keyframes loading {
  0% {
    transform: rotate(0);
    animation-timing-function: cubic-bezier(0.55, 0.055, 0.675, 0.19);
  }
  50% {
    transform: rotate(180deg);
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
  }
  100% {
    transform: rotate(360deg);
  }
}