/* css/animation-styles.css */

/* Animaciones principales */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes glow {
  0% { box-shadow: 0 0 5px rgba(76, 175, 80, 0.5); }
  50% { box-shadow: 0 0 20px rgba(76, 175, 80, 0.8), 0 0 30px rgba(76, 175, 80, 0.4); }
  100% { box-shadow: 0 0 5px rgba(76, 175, 80, 0.5); }
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% { transform: translate3d(0, 0, 0); }
  40%, 43% { transform: translate3d(0, -15px, 0); }
  70% { transform: translate3d(0, -7px, 0); }
  90% { transform: translate3d(0, -2px, 0); }
}

/* Aplicación de animaciones */
.node {
  animation: fadeIn 0.6s ease-out;
}

.node.highlighted {
  animation: pulse 2s infinite;
}

.info-panel {
  animation: slideIn 0.3s ease-out;
}

.control-panel button:hover {
  animation: glow 1s ease-in-out infinite alternate;
}

.node-circle:hover {
  animation: bounce 0.6s ease-in-out;
}

/* Transiciones suaves */
.node-circle,
.node-text,
.link {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tooltip {
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

/* Estados de carga */
.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Efectos de hover mejorados */
.node:hover .node-circle {
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.3));
  transform: scale(1.05);
}

.node:hover .node-text {
  transform: translateY(-2px);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}