 @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;600&display=swap');

  /* Reset e base */
  *, *::before, *::after {
    box-sizing: border-box;
  }
  body, html {
    margin: 0; padding: 0; height: 100%;
    font-family: 'Poppins', sans-serif;
    background: radial-gradient(circle at center, #00111f 0%, #001a36 70%);
    color: #a2dfff;
    overflow: hidden;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  svg {
    width: 100vw;
    height: 100vh;
    background-color: #121212;
    cursor: grab;
    user-select: none;
  }

  /* Link styles */
  .links line {
    stroke-linecap: round;
    transition: stroke-width 0.3s ease, stroke-opacity 0.3s ease;
    filter: drop-shadow(0 0 6px rgba(0, 210, 255, 0.7));
    animation: pulseGlow 3s infinite ease-in-out alternate;
  }
   .links line.forte {
    stroke-width: 2.5;
  }
  .links line.media {
    stroke-width: 1.8;
  }
  .links line.debole {
    stroke-width: 0.8;
  }
  @keyframes pulseGlow {
    0% { filter: drop-shadow(0 0 5px rgba(0, 240, 255, 0.5)); }
    100% { filter: drop-shadow(0 0 12px rgba(0, 240, 255, 1)); }
  }

  /* Nodes */
  .nodes circle {
    stroke: #00334d;
    stroke-width: 2.2px;
    cursor: pointer;
    filter: drop-shadow(0 0 5px rgba(0, 240, 255, 0.7));
    transition: r 0.3s ease, filter 0.3s ease;
    mix-blend-mode: screen;
  }
  .nodes circle:hover,
  .nodes circle:focus-visible {
    r: 20px !important;
    filter: drop-shadow(0 0 18px #00f0ff);
    outline: none;
  }

  /* Labels */
  text {
    pointer-events: none;
    font-size: 13px;
    fill: #80dfff;
    text-shadow:
      0 0 4px #00dfff,
      0 0 6px #00c2ff,
      0 0 10px #00e0ff;
    font-weight: 700;
    user-select: none;
    font-variant: small-caps;
  }

  /* Tooltip */
   #tooltip {
    position: fixed;
    pointer-events: none;
    background: rgba(0,0,0,0.75);
    color: #0ff;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.2;
    opacity: 0;
    transition: opacity 0.15s ease;
    max-width: 250px;
    z-index: 1000;
  }
  #tooltip.visible {
    opacity: 1;
  }

  /* Legend */
  #legend {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(0, 30, 50, 0.65);
    border-radius: 18px;
    padding: 18px 28px;
    color: #00f0ff;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 0 24px #00f0ff;
    user-select: none;
    display: flex;
    gap: 28px;
    align-items: center;
    z-index: 15;
  }
  #legend span {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: default;
  }
  #legend .colorbox {
    width: 22px; height: 22px;
    border-radius: 8px;
    box-shadow: 0 0 16px currentColor;
  }
  #legend .forte { color: #00f0ff; }
  #legend .media { color: #0099ff; }
  #legend .debole { color: #003344; }

  /* Filter Buttons */
  #filterButtons {
    position: fixed;
    top: 24px;
    left: 24px;
    background: rgba(0, 20, 40, 0.6);
    border-radius: 18px;
    padding: 14px 30px;
    box-shadow: 0 0 24px #00f0ff;
    user-select: none;
    z-index: 15;
    display: flex;
    gap: 20px;
  }
  #filterButtons button {
    background: transparent;
    border: 3px solid #00f0ff;
    color: #00f0ff;
    font-weight: 700;
    padding: 12px 24px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.4s ease;
    user-select: none;
  }
  button.active {
    background-color: #00f0ff;
    color: #000;
  }
  #filterButtons button:hover,
  #filterButtons button:focus-visible {
    background-color: #00f0ff;
    color: #002233;
    box-shadow: 0 0 16px #00f0ff;
    outline: none;
  }
   button {
    margin-right: 8px;
    padding: 6px 14px;
    background: #222;
    border: none;
    color: #0ff;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
  }
 #loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000a;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.loader-text {
  margin-top: 20px;
  color: #00f0ff;
  font-size: 1.2rem;
  font-weight: 500;
  text-align: center;
  font-family: 'Orbitron', sans-serif;
  text-shadow: 0 0 6px #00f0ff, 0 0 12px #0088ff;
  animation: fadeIn 1s ease-in-out infinite alternate;
}



.plasma-loader {
  position: relative;
  width: 120px;
  height: 120px;
  transform: rotate(45deg);
}

.ring {
  position: absolute;
  border: 3px solid transparent;
  border-radius: 50%;
  animation: rotate 1.5s linear infinite;
}

.ring1 {
  width: 100%;
  height: 100%;
  border-top: 3px solid #00f0ff;
  animation-delay: 0s;
}

.ring2 {
  width: 80%;
  height: 80%;
  top: 10%;
  left: 10%;
  border-right: 3px solid #00bbff;
  animation-delay: 0.15s;
}

.ring3 {
  width: 60%;
  height: 60%;
  top: 20%;
  left: 20%;
  border-bottom: 3px solid #0099ff;
  animation-delay: 0.3s;
}

.ring4 {
  width: 40%;
  height: 40%;
  top: 30%;
  left: 30%;
  border-left: 3px solid #0077aa;
  animation-delay: 0.45s;
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0.6;
  }
  to {
    opacity: 1;
  }
}