/* Nodes Sync Authenticator - Advanced Animations CSS */

/* Cyberpunk Beam Animations */
@keyframes rise {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    transform: translateY(-5%);
    opacity: 0;
  }
}

@keyframes fade {
  0%, 100% {
    opacity: 0;
  }
  5%, 85% {
    opacity: 0.8;
  }
}

@keyframes moveGrid {
  from {
    background-position: 0 0;
  }
  to {
    background-position: -100px -50px;
  }
}

@keyframes rainFall {
  0% {
    transform: translateY(100vh);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh);
    opacity: 0;
  }
}

/* Particle System Animations */
@keyframes particleFloat {
  0%, 100% {
    transform: translateY(0) translateX(0);
    opacity: 0.3;
  }
  25% {
    transform: translateY(-20px) translateX(10px);
    opacity: 0.8;
  }
  50% {
    transform: translateY(-40px) translateX(-5px);
    opacity: 0.6;
  }
  75% {
    transform: translateY(-20px) translateX(-10px);
    opacity: 0.4;
  }
}

@keyframes particleGlow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(0, 240, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.8);
  }
}

/* Glass Morphism Hover Effects */
@keyframes glassHover {
  0% {
    backdrop-filter: blur(20px);
    border-color: rgba(0, 240, 255, 0.3);
  }
  100% {
    backdrop-filter: blur(25px);
    border-color: rgba(0, 240, 255, 0.6);
  }
}

@keyframes glassGlow {
  0% {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.8);
  }
  100% {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
  }
}

/* Text Gradient Animations */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes textGlow {
  0%, 100% {
    text-shadow: 0 0 5px rgba(0, 240, 255, 0.5);
  }
  50% {
    text-shadow: 0 0 20px rgba(0, 240, 255, 1);
  }
}

/* Card Entrance Animations */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

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

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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1);
    transform: translate3d(0, 0, 0);
  }
  40%, 43% {
    animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
    transform: translate3d(0, -15px, 0);
  }
  70% {
    animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
    transform: translate3d(0, -8px, 0);
  }
  90% {
    transform: translate3d(0, -3px, 0);
  }
}

/* Enhanced Solana Logo Bounce */
@keyframes solanaBounce {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  25% {
    transform: translateY(-12px) scale(1.05);
  }
  50% {
    transform: translateY(-20px) scale(1.1);
  }
  75% {
    transform: translateY(-8px) scale(1.03);
  }
}

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

/* Modal Animations */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Button Hover Effects */
@keyframes buttonGlow {
  0% {
    box-shadow: 0 0 5px rgba(0, 240, 255, 0.3);
  }
  100% {
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.8);
  }
}

@keyframes buttonShake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-2px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(2px);
  }
}

/* Cyberpunk Matrix Effect */
@keyframes matrixRain {
  0% {
    transform: translateY(-100vh);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(100vh);
    opacity: 0;
  }
}

/* Glitch Effect */
@keyframes glitch {
  0%, 100% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
}

/* Neon Flicker */
@keyframes neonFlicker {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
  75% {
    opacity: 0.9;
  }
}

/* Holographic Effect */
@keyframes holographic {
  0% {
    background-position: 0% 50%;
    filter: hue-rotate(0deg);
  }
  50% {
    background-position: 100% 50%;
    filter: hue-rotate(180deg);
  }
  100% {
    background-position: 0% 50%;
    filter: hue-rotate(360deg);
  }
}

/* Utility Animation Classes */
.animate-fade-in {
  animation: fadeIn 1s ease-in-out;
}

.animate-slide-up {
  animation: slideInUp 0.6s ease-out;
}

.animate-slide-left {
  animation: slideInLeft 0.6s ease-out;
}

.animate-slide-right {
  animation: slideInRight 0.6s ease-out;
}

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

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-bounce {
  animation: bounce 1s infinite;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

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

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

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

.animate-neon-flicker {
  animation: neonFlicker 0.15s infinite linear alternate;
}

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

/* Stagger Animation 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;
}

/* Intersection Observer Animations */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

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

.slide-in-left-on-scroll {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease-out;
}

.slide-in-left-on-scroll.visible {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right-on-scroll {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease-out;
}

.slide-in-right-on-scroll.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in-on-scroll {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.8s ease-out;
}

.scale-in-on-scroll.visible {
  opacity: 1;
  transform: scale(1);
}

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

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 240, 255, 0.2);
}

.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.6);
}

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

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

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

.hover-rotate:hover {
  transform: rotate(5deg);
}

/* Loading States */
.loading-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

/* Performance Optimizations */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

.will-change-auto {
  will-change: auto;
}

/* Mobile Navigation Animations */
@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutToRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

@keyframes hamburgerRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(90deg);
  }
}

@keyframes hamburgerLine1 {
  from {
    transform: translateY(0) rotate(0deg);
  }
  to {
    transform: translateY(8px) rotate(45deg);
  }
}

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

@keyframes hamburgerLine3 {
  from {
    transform: translateY(0) rotate(0deg);
  }
  to {
    transform: translateY(-8px) rotate(-45deg);
  }
}

/* Mobile Menu Link Animations */
@keyframes mobileNavLinkSlide {
  from {
    transform: translateX(20px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes mobileNavLinkGlow {
  0% {
    background: transparent;
  }
  100% {
    background: rgba(0, 240, 255, 0.1);
  }
}

/* Touch-friendly Animations */
@keyframes touchFeedback {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1);
  }
}

/* Mobile-specific Animation Classes */
.mobile-nav-slide-in {
  animation: slideInFromRight 0.3s ease-out;
}

.mobile-nav-slide-out {
  animation: slideOutToRight 0.3s ease-out;
}

.hamburger-animate {
  animation: hamburgerRotate 0.3s ease-out;
}

.mobile-nav-link-animate {
  animation: mobileNavLinkSlide 0.4s ease-out;
}

.touch-feedback {
  animation: touchFeedback 0.2s ease-out;
}

/* Mobile Optimized Hover Effects */
@media (hover: none) and (pointer: coarse) {
  .hover-lift:hover,
  .hover-glow:hover,
  .hover-scale:hover,
  .hover-rotate:hover {
    transform: none;
    box-shadow: none;
  }
  
  .mobile-touch-active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
}

/* Floating Solana Images Animation */
@keyframes floatUp {
  0% {
    transform: translateY(100vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-100vh) translateX(var(--drift, 20px)) rotate(360deg);
    opacity: 0;
  }
}

@keyframes floatUpSlow {
  0% {
    transform: translateY(100vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 0.6;
  }
  85% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-100vh) translateX(var(--drift, -15px)) rotate(-180deg);
    opacity: 0;
  }
}

@keyframes floatUpFast {
  0% {
    transform: translateY(100vh) translateX(0) rotate(0deg);
    opacity: 0;
  }
  8% {
    opacity: 0.9;
  }
  92% {
    opacity: 0.9;
  }
  100% {
    transform: translateY(-100vh) translateX(var(--drift, 30px)) rotate(180deg);
    opacity: 0;
  }
}

/* Floating Solana Image Styles */
.floating-sol-image {
  position: absolute;
  width: 36px;
  height: 36px;
  pointer-events: none;
  z-index: 1;
  filter: drop-shadow(0 0 8px rgba(0, 240, 255, 0.4));
  opacity: 0.7;
  animation: floatUp 8s linear infinite;
}

.floating-sol-image.slow {
  animation: floatUpSlow 12s linear infinite;
  width: 32px;
  height: 32px;
  opacity: 0.5;
}

.floating-sol-image.fast {
  animation: floatUpFast 6s linear infinite;
  width: 40px;
  height: 40px;
  opacity: 0.8;
}

.floating-sol-image.purple {
  filter: drop-shadow(0 0 8px rgba(176, 0, 255, 0.4));
}

.floating-sol-image.pink {
  filter: drop-shadow(0 0 8px rgba(255, 0, 128, 0.4));
}

/* Mobile Performance Optimizations */
@media (max-width: 768px) {
  .animate-slide-up,
  .animate-slide-left,
  .animate-slide-right,
  .animate-scale-in {
    animation-duration: 0.4s;
  }
  
  .fade-in-on-scroll {
    transition-duration: 0.5s;
  }
  
  /* Reduce complex animations on mobile */
  .particle,
  .rain-beam {
    animation-duration: 2s;
  }
  
  /* Reduce floating images on mobile for performance */
  .floating-sol-image {
    width: 28px;
    height: 28px;
    animation-duration: 10s;
  }
  
  .floating-sol-image.slow {
    width: 24px;
    height: 24px;
    animation-duration: 14s;
  }
  
  .floating-sol-image.fast {
    width: 32px;
    height: 32px;
    animation-duration: 8s;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .mobile-nav,
  .hamburger,
  .mobile-nav-link {
    transition: none !important;
    animation: none !important;
  }
}
