/* ============================================
   ModForge Hub — Animations
   Hover · Glow · Shimmer · Fade · Particles
   ============================================ */

/* ── Keyframes ── */

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-left {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-in-right {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.7);
  }
}

@keyframes pulse-glow-green {
  0%, 100% {
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
  }
  50% {
    box-shadow: 0 0 24px rgba(34, 197, 94, 0.6);
  }
}

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

@keyframes float-slow {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-16px) rotate(1deg);
  }
}

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

@keyframes border-glow-pulse {
  0%, 100% {
    border-color: rgba(139, 92, 246, 0.3);
  }
  50% {
    border-color: rgba(139, 92, 246, 0.6);
  }
}

@keyframes typing-dot {
  0%, 60%, 100% { opacity: 0.3; }
  30% { opacity: 1; }
}

@keyframes slide-in-bottom {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes neon-flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.6),
                 0 0 20px rgba(139, 92, 246, 0.4),
                 0 0 40px rgba(139, 92, 246, 0.2);
  }
  20%, 24%, 55% {
    text-shadow: none;
  }
}

/* ── Animation Classes ── */

.animate-fade-in {
  animation: fade-in 0.6s ease forwards;
}

.animate-fade-in-up {
  animation: fade-in-up 0.7s ease forwards;
}

.animate-fade-in-left {
  animation: fade-in-left 0.6s ease forwards;
}

.animate-fade-in-right {
  animation: fade-in-right 0.6s ease forwards;
}

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

.animate-float {
  animation: float 4s ease-in-out infinite;
}

.animate-float-slow {
  animation: float-slow 6s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.animate-pulse-glow-green {
  animation: pulse-glow-green 2s ease-in-out infinite;
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
}

/* ── Scroll Animation (Moved to GSAP) ── */

/* ── Shimmer Loading ── */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card-solid) 25%,
    rgba(148, 163, 184, 0.08) 50%,
    var(--bg-card-solid) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}

.skeleton-text {
  height: 14px;
  width: 80%;
  margin-bottom: var(--space-2);
}

.skeleton-title {
  height: 20px;
  width: 60%;
  margin-bottom: var(--space-3);
}

.skeleton-image {
  width: 100%;
  height: 200px;
}

/* ── Hover Effects ── */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hover-glow {
  transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
  box-shadow: var(--glow-purple);
}

.hover-glow-green:hover {
  box-shadow: var(--glow-green);
}

.hover-border-glow {
  transition: border-color var(--transition-base);
}

.hover-border-glow:hover {
  border-color: rgba(139, 92, 246, 0.55);
}

/* ── Background Particles Container ── */
.particles-container {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--purple);
  border-radius: 50%;
  opacity: 0.15;
  animation: float-slow 8s ease-in-out infinite;
}

.particle:nth-child(odd) {
  background: var(--cyan);
  opacity: 0.1;
  animation-duration: 12s;
}

.particle:nth-child(3n) {
  background: var(--green);
  opacity: 0.08;
  width: 3px;
  height: 3px;
  animation-duration: 10s;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

/* Removed reveal reduced motion overrides as GSAP handles it */
}
