/* AI Robotics Logo Animation Effects */

/* Circuit-like glow animation */
@keyframes circuitGlow {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(45, 212, 191, 0.4)) 
            drop-shadow(0 0 16px rgba(45, 212, 191, 0.2));
  }
  25% {
    filter: drop-shadow(0 0 12px rgba(59, 130, 246, 0.5)) 
            drop-shadow(0 0 24px rgba(59, 130, 246, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.4)) 
            drop-shadow(0 0 20px rgba(139, 92, 246, 0.2));
  }
  75% {
    filter: drop-shadow(0 0 14px rgba(16, 185, 129, 0.5)) 
            drop-shadow(0 0 28px rgba(16, 185, 129, 0.3));
  }
}

/* Digital scan effect */
@keyframes digitalScan {
  0% {
    transform: translateY(-100%);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateY(100%);
    opacity: 0;
  }
}

/* Holographic flicker */
@keyframes holoFlicker {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  5% {
    opacity: 0.9;
    transform: scale(1.01);
  }
  10% {
    opacity: 1;
    transform: scale(1);
  }
  15% {
    opacity: 0.95;
    transform: scale(0.99);
  }
  20% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Data pulse effect */
@keyframes dataPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.4;
  }
}

/* Circuit board pattern rotation */
@keyframes circuitRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Enhanced logo container */
.logo-container {
  position: relative;
  display: inline-block;
  padding: 8px;
}

/* Circuit board background effect */
.logo-container::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  background: 
    radial-gradient(circle at 20% 20%, rgba(45, 212, 191, 0.1) 2px, transparent 2px),
    radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.1) 2px, transparent 2px),
    radial-gradient(circle at 40% 60%, rgba(139, 92, 246, 0.1) 1px, transparent 1px),
    linear-gradient(45deg, transparent 40%, rgba(45, 212, 191, 0.05) 50%, transparent 60%);
  background-size: 20px 20px, 25px 25px, 15px 15px, 100% 100%;
  border-radius: 50%;
  opacity: 0;
  z-index: -2;
  transition: opacity 0.4s ease;
  animation: circuitRotate 20s linear infinite;
}

/* Holographic rim effect */
.logo-container::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: conic-gradient(
    from 0deg,
    rgba(45, 212, 191, 0.4),
    rgba(59, 130, 246, 0.4),
    rgba(139, 92, 246, 0.4),
    rgba(16, 185, 129, 0.4),
    rgba(45, 212, 191, 0.4)
  );
  border-radius: 50%;
  opacity: 0;
  z-index: -1;
  transition: opacity 0.4s ease;
  animation: circuitRotate 8s linear infinite reverse;
}

/* Hover effects */
.logo-container:hover::before {
  opacity: 1;
}

.logo-container:hover::after {
  opacity: 0.6;
}

/* Enhanced logo image */
.logo-enhanced {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: circuitGlow 4s ease-in-out infinite;
  border-radius: 50%;
  position: relative;
  z-index: 1;
}

.logo-enhanced:hover {
  transform: scale(1.1) rotate(5deg);
  animation: holoFlicker 0.8s ease-in-out;
}

/* Scanning line effect */
.logo-container .scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(45, 212, 191, 0.8), 
    transparent
  );
  opacity: 0;
  z-index: 2;
  animation: digitalScan 3s ease-in-out infinite;
}

.logo-container:hover .scan-line {
  opacity: 1;
}

/* Data nodes (replacing sparkles) */
.logo-data-node {
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(45, 212, 191, 0.8);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(45, 212, 191, 0.6);
  animation: dataPulse 2s ease-in-out infinite;
}

.logo-data-node:nth-child(1) {
  top: 15%;
  left: 25%;
  animation-delay: 0s;
  background: rgba(59, 130, 246, 0.8);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

.logo-data-node:nth-child(2) {
  top: 25%;
  right: 20%;
  animation-delay: 0.5s;
  background: rgba(139, 92, 246, 0.8);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
}

.logo-data-node:nth-child(3) {
  bottom: 30%;
  left: 20%;
  animation-delay: 1s;
  background: rgba(16, 185, 129, 0.8);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.logo-data-node:nth-child(4) {
  bottom: 20%;
  right: 25%;
  animation-delay: 1.5s;
  background: rgba(245, 158, 11, 0.8);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

/* Connection lines between data nodes */
.logo-container .data-connection {
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(45, 212, 191, 0.4), 
    transparent
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.logo-container:hover .data-connection {
  opacity: 1;
}

.data-connection:nth-child(5) {
  top: 20%;
  left: 30%;
  width: 40%;
  transform: rotate(15deg);
}

.data-connection:nth-child(6) {
  bottom: 25%;
  left: 25%;
  width: 50%;
  transform: rotate(-20deg);
}

/* Dark mode adjustments */
.dark .logo-container::before {
  background: 
    radial-gradient(circle at 20% 20%, rgba(45, 212, 191, 0.15) 2px, transparent 2px),
    radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.15) 2px, transparent 2px),
    radial-gradient(circle at 40% 60%, rgba(139, 92, 246, 0.15) 1px, transparent 1px),
    linear-gradient(45deg, transparent 40%, rgba(45, 212, 191, 0.08) 50%, transparent 60%);
}

.dark .logo-container::after {
  background: conic-gradient(
    from 0deg,
    rgba(45, 212, 191, 0.6),
    rgba(59, 130, 246, 0.6),
    rgba(139, 92, 246, 0.6),
    rgba(16, 185, 129, 0.6),
    rgba(45, 212, 191, 0.6)
  );
}

/* Remove the problematic background gradient from header */
.logo-container .bg-gradient-to-r {
  display: none;
}

/* Performance optimization */
@media (prefers-reduced-motion: reduce) {
  .logo-enhanced,
  .logo-container::before,
  .logo-container::after,
  .logo-data-node,
  .scan-line {
    animation: none;
  }
  
  .logo-enhanced:hover {
    transform: scale(1.05);
  }
} 