@keyframes corePulse {
  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
    box-shadow: 0 0 10px rgba(255, 194, 0, 0.4);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.4);
    opacity: 1;
    box-shadow: 0 0 25px rgba(255, 194, 0, 0.8);
  }
}

/* Orbiting nodes */
@keyframes nodeOrbit {
  0%,
  100% {
    transform: translate(var(--orbit-x), var(--orbit-y)) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translate(var(--orbit-x), var(--orbit-y)) scale(1.6);
    opacity: 1;
  }
}

/* Connecting lines pulse */
@keyframes linePulse {
  0%,
  100% {
    opacity: 0.4;
    transform: scaleX(0.8);
  }
  50% {
    opacity: 0.8;
    transform: scaleX(1);
  }
}

/* Organic pulse waves */
@keyframes organicWave {
  0% {
    width: 0;
    height: 0;
    opacity: 0.5;
  }
  50% {
    opacity: 0.2;
  }
  100% {
    width: 180px;
    height: 180px;
    opacity: 0;
  }
}

/* Mirror divider pulse */
@keyframes mirrorPulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scaleY(0.9);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* Mirror glow */
@keyframes mirrorGlow {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

/* Ripple effect */
@keyframes rippleExpand {
  0% {
    width: 0;
    height: 0;
    opacity: 0.7;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    width: 500px;
    height: 500px;
    opacity: 0;
  }
}

/* Circuit rotation */
@keyframes circuitRotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Circuit border pulse */
@keyframes circuitBorderPulse {
  0%,
  100% {
    border-color: rgba(255, 194, 0, 0.4);
  }
  50% {
    border-color: rgba(255, 194, 0, 1);
  }
}

/* Circuit nodes pulse */
@keyframes circuitNodePulse {
  0%,
  100% {
    border-color: rgba(255, 194, 0, 0.3);
    transform: scale(1);
    box-shadow: 0 0 0px rgba(255, 194, 0, 0);
  }
  50% {
    border-color: rgba(255, 194, 0, 1);
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(255, 194, 0, 0.6);
  }
}

/* Circuit lines pulse */
@keyframes circuitLinePulseH {
  0%,
  100% {
    opacity: 0.5;
    transform: scaleX(0.8);
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes circuitLinePulseV {
  0%,
  100% {
    opacity: 0.5;
    transform: scaleY(0.8);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* Digital scan line */
@keyframes digitalScan {
  0%,
  100% {
    transform: translateY(-40px);
  }
  50% {
    transform: translateY(40px);
  }
}

/* Data stream - Left to Right */
@keyframes streamLTR {
  0% {
    left: 0;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

/* Data stream - Right to Left */
@keyframes streamRTL {
  0% {
    right: 0;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    right: 100%;
    opacity: 0;
  }
}

/* Fade in */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Logo fade in */
@keyframes logoFadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Glitch effect - Red channel */
@keyframes glitchRed {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  20% {
    transform: translateX(-3px);
    opacity: 0.7;
  }
  40% {
    transform: translateX(2px);
    opacity: 0;
  }
  60% {
    transform: translateX(-1px);
    opacity: 0.5;
  }
  100% {
    transform: translateX(0);
    opacity: 0;
  }
}

/* Glitch effect - Cyan channel */
@keyframes glitchCyan {
  0% {
    transform: translateX(0);
    opacity: 0;
  }
  20% {
    transform: translateX(3px);
    opacity: 0.6;
  }
  40% {
    transform: translateX(-2px);
    opacity: 0;
  }
  60% {
    transform: translateX(1px);
    opacity: 0.4;
  }
  100% {
    transform: translateX(0);
    opacity: 0;
  }
}

/* Scan line across logo */
@keyframes logoScan {
  from {
    top: -100%;
  }
  to {
    top: 200%;
  }
}

/* Logo glow pulse */
@keyframes logoGlow {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.6;
  }
}

/* ===== CONTAINER ===== */
.visual-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  height: max-content;
  aspect-ratio: 800 / 600;
  background: linear-gradient(
    135deg,
    rgba(15, 26, 37, 0.6),
    rgba(17, 29, 42, 1),
    rgba(26, 37, 48, 0.6)
  );
  border-radius: 0.5rem;
  overflow: hidden;
  animation: fadeIn 1s ease-out;
}

@keyframes rotate {
  100% {
    transform: translate(-50%, -50%) rotate(1turn);
  }
}

/* ===== NEURAL NETWORK - LEFT SIDE (HUMAN MIND) ===== */
.neural-network {
  position: absolute;
  left: 48px;
  top: 50%;
  transform: translateY(-50%);
  width: 160px;
  height: 160px;
}

/* Central pulsing core */
.neural-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #ffc200;
  animation: corePulse 2.5s ease-in-out infinite;
  z-index: 5;
}

/* Orbiting nodes */
.neural-node {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 194, 0, 0.7);
  animation: nodeOrbit 3.5s ease-in-out infinite;
}

/* Connecting lines */
.neural-line {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 1px;
  width: 50px;
  background: linear-gradient(
    to right,
    rgba(255, 194, 0, 0.6),
    rgba(255, 194, 0, 0.3),
    transparent
  );
  transform-origin: left center;
  animation: linePulse 2.5s ease-in-out infinite;
}

/* Organic pulse waves */
.neural-wave {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 194, 0, 0.2);
  border-radius: 50%;
  animation: organicWave 5s ease-out infinite;
}

/* ===== MIRROR SURFACE - CENTER ===== */
.mirror-surface {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  transform: translateX(-50%);
}

.mirror-line {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, #ffc200, transparent);
  animation: mirrorPulse 3.5s ease-in-out infinite;
}

.mirror-glow {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 16px;
  background: linear-gradient(
    to right,
    rgba(255, 194, 0, 0.1),
    rgba(255, 194, 0, 0.05),
    transparent
  );
  filter: blur(4px);
  animation: mirrorGlow 3.5s ease-in-out infinite;
}

/* Ripple effects */
.mirror-ripple {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 194, 0, 0.25);
  border-radius: 50%;
  animation: rippleExpand 5s ease-out infinite;
}

/* ===== AI CIRCUIT - RIGHT SIDE (MACHINE MIND) ===== */
.ai-circuit {
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%);
  width: 160px;
  height: 160px;
}

/* Central processing unit */
.circuit-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 2px solid #ffc200;
  animation: circuitRotate 20s linear infinite,
    circuitBorderPulse 2s ease-in-out infinite;
  z-index: 5;
}

/* Circuit nodes */
.circuit-node {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 2px solid #ffc200;
  background-color: #111d2a;
  animation: circuitNodePulse 2.5s ease-in-out infinite;
}

/* Circuit connection lines */
.circuit-line-h {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 80px;
  height: 1px;
  background: linear-gradient(
    to right,
    rgba(255, 194, 0, 0.6),
    rgba(255, 194, 0, 0.2)
  );
  transform: translateY(-50%);
  animation: circuitLinePulseH 2s ease-in-out infinite;
}

.circuit-line-v {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1px;
  height: 80px;
  background: linear-gradient(
    to bottom,
    rgba(255, 194, 0, 0.6),
    rgba(255, 194, 0, 0.2)
  );
  transform: translateX(-50%);
  animation: circuitLinePulseV 2s ease-in-out infinite 1s;
}

/* Digital scan effect */
.circuit-scan {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 194, 0, 0.5),
    transparent
  );
  animation: digitalScan 4s linear infinite;
}

/* ===== DATA STREAMS ===== */
.data-stream {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.stream-ltr {
  background: radial-gradient(
    circle,
    rgba(255, 194, 0, 0.8),
    rgba(255, 194, 0, 0)
  );
  animation: streamLTR 5s ease-in-out infinite;
}

.stream-rtl {
  background: radial-gradient(
    circle,
    rgba(255, 194, 0, 0.6),
    rgba(255, 194, 0, 0)
  );
  animation: streamRTL 5s ease-in-out infinite;
}

/* ===== LOGO WITH GLITCH EFFECT ===== */
.logo-container {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 20;
}

.logo-wrapper {
  position: relative;
  width: 320px;
  max-width: 80%;
}

.logo-main {
  position: relative;
  width: 100%;
  height: auto;
  z-index: 10;
  animation: logoFadeIn 1.5s ease-out 0.5s backwards;
}

/* Glitch layers */
.logo-glitch-red {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  opacity: 0;
  mix-blend-mode: screen;
  filter: hue-rotate(180deg);
  animation: glitchRed 0.3s linear infinite;
  animation-delay: 3.3s;
}

.logo-glitch-cyan {
  position: absolute;
  inset: 0;
  width: 100%;
  height: auto;
  opacity: 0;
  mix-blend-mode: screen;
  filter: hue-rotate(90deg);
  animation: glitchCyan 0.3s linear infinite;
  animation-delay: 3.4s;
}

/* Scan line effect */
.logo-scan {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 194, 0, 0.3),
    transparent
  );
  animation: logoScan 2s linear infinite;
  animation-delay: 6s;
}

/* Glow effect */
.logo-glow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: blur(20px);
  background: radial-gradient(circle, rgba(255, 194, 0, 0.2), transparent);
  animation: logoGlow 4s ease-in-out infinite;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .visual-container {
    aspect-ratio: 1 /1;
  }

  .neural-network,
  .ai-circuit {
    width: 100px;
    height: 100px;
  }

  .neural-network {
    left: 24px;
  }

  .ai-circuit {
    right: 24px;
  }

  .neural-line,
  .circuit-line-h {
    width: 30px;
  }

  .circuit-line-v {
    height: 50px;
  }
}
