.data-flow-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding: 8px 16px;
  background: rgba(0, 255, 140, 0.05);
  border: 1px solid rgba(0, 255, 140, 0.2);
  border-radius: 20px;
  overflow: hidden;
}

.flow-line {
  width: 40px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent) 20%,
    var(--accent) 80%,
    transparent 100%
  );
  position: relative;
  animation: flow-circuit 2s ease-in-out infinite;
}

.flow-line::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 255, 140, 0.3) 50%,
    transparent 100%
  );
  animation: flow-glow 2s ease-in-out infinite;
}

.flow-arrow {
  position: relative;
  width: 16px;
  height: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.arrow-head {
  width: 0;
  height: 0;
  border-left: 8px solid var(--accent);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  position: relative;
  filter: drop-shadow(0 0 4px var(--accent));
  animation: arrow-pulse 2s ease-in-out infinite;
}

.arrow-head::before {
  content: "";
  position: absolute;
  top: -3px;
  left: -6px;
  width: 0;
  height: 0;
  border-left: 6px solid rgba(0, 255, 140, 0.4);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  animation: arrow-trail 2s ease-in-out infinite 0.2s;
}

.flow-pulse {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  position: relative;
  animation: pulse-circuit 1.5s ease-in-out infinite;
}

.flow-pulse::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  width: 10px;
  height: 10px;
  background: rgba(0, 255, 140, 0.3);
  border-radius: 50%;
  animation: pulse-expand 1.5s ease-in-out infinite;
}

.circuit-nodes {
  display: flex;
  gap: 4px;
  align-items: center;
}

.node {
  width: 4px;
  height: 4px;
  background: rgba(0, 255, 140, 0.3);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.node.active {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(0, 255, 140, 0.6);
  animation: node-blink 1s ease-in-out infinite alternate;
}

@keyframes flow-circuit {
  0%,
  100% {
    opacity: 0.7;
    transform: scaleX(1);
  }
  50% {
    opacity: 1;
    transform: scaleX(1.1);
  }
}

@keyframes flow-glow {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@keyframes arrow-pulse {
  0%,
  100% {
    transform: scale(1) translateX(0);
    filter: drop-shadow(0 0 4px var(--accent));
  }
  50% {
    transform: scale(1.1) translateX(2px);
    filter: drop-shadow(0 0 8px var(--accent));
  }
}

@keyframes arrow-trail {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 0.8;
  }
}

@keyframes pulse-circuit {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

@keyframes pulse-expand {
  0% {
    transform: scale(0);
    opacity: 0.8;
  }
  70% {
    transform: scale(1);
    opacity: 0.4;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

@keyframes node-blink {
  0% {
    box-shadow: 0 0 4px rgba(0, 255, 140, 0.4);
  }
  100% {
    box-shadow: 0 0 12px rgba(0, 255, 140, 0.8);
  }
}

/* Hover effect for the entire indicator */
.data-flow-indicator:hover .flow-line {
  animation-duration: 0.5s;
}

.data-flow-indicator:hover .arrow-head {
  transform: scale(1.2) translateX(4px);
  filter: drop-shadow(0 0 12px var(--accent));
}

.data-flow-indicator:hover .flow-pulse {
  animation-duration: 0.8s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .data-flow-indicator {
    padding: 6px 12px;
    gap: 6px;
  }

  .flow-line {
    width: 30px;
  }

  .arrow-head {
    border-left-width: 6px;
    border-top-width: 4px;
    border-bottom-width: 4px;
  }
}
