/* ============================================
   🎮 GEAR MATRIX - BIBLIOTECA DE ANIMAÇÕES
   Arquivo: matrix-animations.css
   ============================================ */

/* ===========================
   🎨 VARIÁVEIS DE CORES MATRIX
   =========================== */
:root {
  /* Matrix Colors */
  --matrix-1: #0A1C0A;
  --matrix-2: #0F331A;
  --matrix-3: #144A25;
  --matrix-4: #196130;
  --matrix-5: #1E783B;
  --matrix-6: #238F46;
  --matrix-7: #28A651;
  --matrix-8: #2DBD5C;
  --matrix-9: #32D467;
  --matrix-10: #37EB72;
  --matrix-11: #5AF28F;
  --matrix-12: #8CF5B1;
  
  /* Base Colors */
  --dark: #0A0A0A;
  --darker: #050505;
  --light: #F8F9FA;
  
  /* Gradients */
  --gradient-matrix: linear-gradient(135deg, var(--matrix-6), var(--matrix-10));
  --gradient-dark: linear-gradient(135deg, var(--matrix-1), var(--matrix-3));
  
  /* Effects */
  --glow-matrix: 0 0 10px var(--matrix-8), 0 0 20px var(--matrix-6);
  --shadow-matrix: 0 4px 20px rgba(35, 143, 70, 0.3);
}

/* ===========================
   💫 ANIMAÇÕES DE ENTRADA
   =========================== */

/* Fade In */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Fade In Down */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In Up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Fade In Left */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Fade In Right */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Scale In */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Zoom In */
@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===========================
   🌊 ANIMAÇÕES DE TRANSIÇÃO
   =========================== */

/* Slide In Left */
@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Slide In Right */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Slide Out Left */
@keyframes slideOutLeft {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

/* Slide Out Right */
@keyframes slideOutRight {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(100%);
  }
}

/* ===========================
   ✨ EFEITOS MATRIX
   =========================== */

/* Matrix Glitch */
@keyframes matrixGlitch {
  0%, 100% {
    text-shadow: 0.05em 0 0 rgba(0, 255, 65, 0.75),
                 -0.05em -0.025em 0 rgba(0, 255, 255, 0.75);
  }
  14% {
    text-shadow: 0.05em 0 0 rgba(0, 255, 65, 0.75),
                 -0.05em -0.025em 0 rgba(0, 255, 255, 0.75);
  }
  15% {
    text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75),
                 0.025em 0.025em 0 rgba(0, 255, 65, 0.75);
  }
  49% {
    text-shadow: -0.05em -0.025em 0 rgba(255, 0, 0, 0.75),
                 0.025em 0.025em 0 rgba(0, 255, 65, 0.75);
  }
  50% {
    text-shadow: 0.025em 0.05em 0 rgba(0, 255, 255, 0.75),
                 0.05em 0 0 rgba(255, 0, 255, 0.75);
  }
  99% {
    text-shadow: 0.025em 0.05em 0 rgba(0, 255, 255, 0.75),
                 0.05em 0 0 rgba(255, 0, 255, 0.75);
  }
}

/* Pulse Glow */
@keyframes pulseGlow {
  0%, 100% {
    box-shadow: var(--glow-matrix);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 20px var(--matrix-10), 0 0 40px var(--matrix-8);
    transform: scale(1.02);
  }
}

/* Neon Pulse */
@keyframes neonPulse {
  0%, 100% {
    border-color: var(--matrix-6);
    box-shadow: 0 0 5px var(--matrix-6);
  }
  50% {
    border-color: var(--matrix-10);
    box-shadow: 0 0 20px var(--matrix-10), 0 0 40px var(--matrix-8);
  }
}

/* Matrix Rain Shimmer */
@keyframes matrixShimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Typing Cursor */
@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Progress Shine */
@keyframes progressShine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* ===========================
   🎯 ANIMAÇÕES DE LOADING
   =========================== */

/* Spinner Rotate */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Bounce */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Float */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ===========================
   🎪 ANIMAÇÕES ESPECIAIS
   =========================== */

/* Matrix Digital Rain */
@keyframes digitalRain {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

/* Glitch Horizontal */
@keyframes glitchHorizontal {
  0% {
    clip-path: inset(40% 0 61% 0);
  }
  20% {
    clip-path: inset(92% 0 1% 0);
  }
  40% {
    clip-path: inset(43% 0 1% 0);
  }
  60% {
    clip-path: inset(25% 0 58% 0);
  }
  80% {
    clip-path: inset(54% 0 7% 0);
  }
  100% {
    clip-path: inset(58% 0 43% 0);
  }
}

/* Wave */
@keyframes wave {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(20deg);
  }
  75% {
    transform: rotate(-20deg);
  }
}

/* ===========================
   🛠️ CLASSES UTILITÁRIAS
   =========================== */

/* Animações de Entrada */
.animate-fadeIn {
  animation: fadeIn 0.6s ease;
}

.animate-fadeInDown {
  animation: fadeInDown 0.6s ease;
}

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease;
}

.animate-fadeInLeft {
  animation: fadeInLeft 0.6s ease;
}

.animate-fadeInRight {
  animation: fadeInRight 0.6s ease;
}

.animate-scaleIn {
  animation: scaleIn 0.5s ease;
}

.animate-zoomIn {
  animation: zoomIn 0.5s ease;
}

/* Efeitos Matrix */
.animate-glitch {
  animation: matrixGlitch 3s infinite;
}

.animate-pulseGlow {
  animation: pulseGlow 2s infinite;
}

.animate-neonPulse {
  animation: neonPulse 2s infinite;
}

.animate-shimmer {
  animation: matrixShimmer 2s infinite;
}

/* Loading */
.animate-spin {
  animation: spin 1s linear infinite;
}

.animate-bounce {
  animation: bounce 1s infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Delays */
.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-300 { animation-delay: 0.3s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }
.animate-delay-600 { animation-delay: 0.6s; }
.animate-delay-700 { animation-delay: 0.7s; }
.animate-delay-800 { animation-delay: 0.8s; }
.animate-delay-900 { animation-delay: 0.9s; }
.animate-delay-1000 { animation-delay: 1s; }

/* Durações */
.animate-duration-fast { animation-duration: 0.3s; }
.animate-duration-normal { animation-duration: 0.6s; }
.animate-duration-slow { animation-duration: 1s; }
.animate-duration-slower { animation-duration: 2s; }

/* ===========================
   🎬 TRANSIÇÕES SUAVES
   =========================== */

.transition-all {
  transition: all 0.3s ease;
}

.transition-transform {
  transition: transform 0.3s ease;
}

.transition-opacity {
  transition: opacity 0.3s ease;
}

.transition-colors {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ===========================
   🌟 HOVER EFFECTS
   =========================== */

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-matrix);
}

.hover-glow:hover {
  box-shadow: var(--glow-matrix);
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-brightness:hover {
  filter: brightness(1.2);
}

/* ===========================
   🎨 SCANLINES EFFECT
   =========================== */

.scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 65, 0.03) 2px,
    rgba(0, 255, 65, 0.03) 4px
  );
  pointer-events: none;
  z-index: 1000;
}

/* ===========================
   🔥 GLOWING TEXT
   =========================== */

.text-glow {
  text-shadow: var(--glow-matrix);
}

.text-glow-intense {
  text-shadow: 0 0 20px var(--matrix-10),
               0 0 40px var(--matrix-8),
               0 0 60px var(--matrix-6);
}

/* ===========================
   🎯 RESPONSIVE ANIMATIONS
   =========================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}