/* grid.css */

.radar-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
    border-radius: 50%;
    border: 2px solid #00ffff33;
    background: radial-gradient(circle, #001a1a 0%, #000 100%);
    overflow: hidden;
    box-shadow: 0 0 30px #00ffff11, inset 0 0 20px #00ffff11;
}

/* Griglia fissa di sfondo stile bersaglio */
.radar-container::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 150px; height: 150px;
    border: 1px dashed #00ffff33;
    border-radius: 50%;
    pointer-events: none;
}
.radar-container::after {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 1px; height: 100%;
    background: #00ffff22;
    pointer-events: none;
}
.radar-center-point {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 6px; height: 6px;
    background: #00ffff;
    border-radius: 50%;
    box-shadow: 0 0 10px #00ffff;
    pointer-events: none;
}
.radar-center-point::after {
    content: '';
    position: absolute;
    top: 50%; left: 0;
    transform: translateY(-50%);
    width: 100vw; height: 1px;
    background: #00ffff22;
    pointer-events: none;
    z-index: 1;
}

/* Cerchio animato dello scan */
.radar-ping {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 2px;
    background: transparent;
    border: 2px solid #00ffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    pointer-events: none;
}

.radar-ping.active {
    animation: radarSweep 2.5s ease-out infinite;
}

@keyframes radarSweep {
    0% { width: 0; height: 0; opacity: 1; border-width: 4px; }
    100% { width: 350px; height: 350px; opacity: 0; border-width: 1px; }
}

/* Contenitore e Stile dei Nodi */
#grid-map-nodes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.grid-node {
    position: absolute;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 10;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    animation: pulseNode 2s infinite;
}

.grid-node::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid inherit;
    opacity: 0.5;
    animation: pingNode 2s infinite ease-out;
}

.grid-node:active { scale: 0.9; }

/* Colori specifici per tipo di nodo */
.node-data { background: #00ff00; border-color: #00ff00; box-shadow: 0 0 15px #00ff00; }
.node-cache { background: #ffaa00; border-color: #ffaa00; box-shadow: 0 0 15px #ffaa00; }
.node-syndicate { background: #aa00ff; border-color: #aa00ff; box-shadow: 0 0 15px #aa00ff; }
.node-honeypot { background: #ff003c; border-color: #ff003c; box-shadow: 0 0 15px #ff003c; }

@keyframes pulseNode {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

@keyframes pingNode {
    0% { width: 20px; height: 20px; opacity: 0.8; }
    100% { width: 50px; height: 50px; opacity: 0; }
}

/* Effetto Glitch FOMO per i nodi non scelti */
.node-fading {
    opacity: 0 !important;
    filter: blur(10px) grayscale(100%);
    pointer-events: none;
    transition: all 0.5s ease;
}