/* Animations for Velassira */

/* Particle Animation */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px var(--color-primary-light);
  }
  50% {
    box-shadow: 0 0 20px var(--color-primary);
  }
}

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

/* Button Hover Animation */
.btn-primary:hover, 
.btn-secondary:hover, 
.btn-play:hover {
  animation: glow 2s infinite;
}

/* Nav Link Hover Animation */
.nav-link:before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover:before,
.nav-link.active:before {
  width: 100%;
}

/* Logo Animation */
.logo-symbol {
  position: relative;
  overflow: hidden;
}

.logo-symbol:after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  animation: shimmer 4s infinite linear;
  pointer-events: none;
}

/* Game Card Hover Animation */
.game-card {
  position: relative;
  overflow: hidden;
}

.game-card:before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-25deg);
  transition: all 0.75s ease;
  z-index: 1;
}

.game-card:hover:before {
  left: 100%;
}

/* Section Title Animation */
.section-title {
  position: relative;
}

.section-title:before,
.section-title:after {
  content: '';
  position: absolute;
  height: 5px;
  bottom: -10px;
  background: linear-gradient(to right, transparent, var(--color-accent), transparent);
  transition: var(--transition-medium);
}

.section-title:before {
  left: 25%;
  width: 50%;
  opacity: 0.5;
}

.section-title:after {
  left: 35%;
  width: 30%;
  opacity: 0.8;
}

/* Particle Animation for Backgrounds */
.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.3;
  pointer-events: none;
  animation: pulse 3s infinite, float 6s infinite;
}

/* Form Input Focus Animation */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  animation: glow 2s infinite;
}

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

body {
  animation: fadeIn 1s ease-out;
}

section {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Loading Animation for Game Frame */
@keyframes loading {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.game-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  border: 5px solid var(--color-background-lighter);
  border-top: 5px solid var(--color-primary);
  border-radius: 50%;
  animation: loading 1.5s linear infinite;
}