:root {
    --p-green: #00ff66;
    --dark-void: #010803;
    --glow: 0 0 15px rgba(0, 255, 102, 0.4);
    --warning: #ff3300;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
    background: var(--dark-void);
    color: var(--p-green);
    font-family: 'Courier New', monospace;
    overflow: hidden;
    height: 100vh;
}

/* --- EFECTOS VISUALES --- */
.noise-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAIklEQVQIW2NkQAKrVq36z8gAFWNgYGBkgAsgFQMjg9Wf7/8Be0AL5YwE08gAAAAASUVORK5CYII=') repeat;
    opacity: 0.04; z-index: 100; pointer-events: none;
}

.vignette {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, transparent 40%, #000 100%);
    z-index: 10; pointer-events: none;
}

#neural-background {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 5; opacity: 0.25;
}

.neural-container {
    position: relative; display: flex; flex-direction: column; 
    justify-content: space-between; height: 100vh; padding: 25px; z-index: 20;
}

/* --- HEADER --- */
.hud-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(0, 255, 102, 0.2); padding-bottom: 10px;
}

.identity-glitch { font-size: 1.3rem; letter-spacing: 2px; }
.status-text, .coord-group { font-size: 0.65rem; opacity: 0.7; }

.pulse-dot {
    display: inline-block; width: 6px; height: 6px; background: var(--p-green);
    border-radius: 50%; margin-right: 8px; animation: pulse 1.5s infinite;
}

/* --- NODOS --- */
.node-field { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 10; }

.neural-node {
    position: absolute; display: flex; flex-direction: column;
    align-items: center; cursor: pointer; transition: 0.3s ease;
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: translateY(0) translateX(0); }
    33% { transform: translateY(-5px) translateX(2px); }
    66% { transform: translateY(3px) translateX(-2px); }
}

#node-1 { top: 25%; left: 20%; }
#node-2 { top: 55%; left: 15%; }
#node-3 { top: 40%; left: 55%; }
#node-4 { top: 75%; left: 45%; }

.neural-node::before {
    content: ''; width: 18px; height: 18px; border-radius: 50%;
    border: 1px solid var(--p-green); background: var(--dark-void);
    margin-bottom: 10px; box-shadow: var(--glow); transition: 0.3s;
}

.neural-node:hover::before, .neural-node.active-node::before {
    background: var(--p-green); transform: scale(1.3);
}

.node-label { font-size: 0.75rem; letter-spacing: 1px; text-shadow: var(--glow); text-align: center; }
.node-id { font-size: 0.5rem; opacity: 0.5; }

/* --- HUD INFO --- */
.info-hud {
    position: absolute; top: 50%; right: 40px; transform: translateY(-50%) scale(0.95);
    width: 450px; max-height: 75vh; padding: 30px;
    background: rgba(1, 12, 5, 0.96); border: 1px solid rgba(0, 255, 102, 0.4);
    box-shadow: var(--glow); z-index: 30; opacity: 0;
    display: flex; flex-direction: column; transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    pointer-events: none;
}

.info-hud.active { opacity: 1; transform: translateY(-50%) scale(1); pointer-events: all; }

.hud-corner { position: absolute; width: 12px; height: 12px; border: 2px solid var(--p-green); }
.top-left { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.top-right { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.bottom-left { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.bottom-right { bottom: -2px; right: -2px; border-left: none; border-top: none; }

#data-title { font-size: 1.1rem; border-bottom: 1px solid var(--p-green); 
    margin-bottom: 20px; padding-bottom: 10px; flex-shrink: 0; letter-spacing: 2px; }

.data-stream {
    font-size: 0.95rem; line-height: 1.6; text-align: left;
    overflow-y: auto; padding-right: 15px; white-space: normal; word-wrap: break-word;
}

.data-stream::-webkit-scrollbar { width: 4px; }
.data-stream::-webkit-scrollbar-thumb { background: var(--p-green); }

.close-hud {
    margin-top: 20px; background: none; border: none; color: var(--p-green);
    cursor: pointer; font-family: inherit; font-size: 0.75rem; opacity: 0.5; align-self: flex-end;
}

/* --- FOOTER --- */
.hud-footer {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.7rem; border-top: 1px solid rgba(0, 255, 102, 0.2); padding-top: 15px;
}

.nav-link { color: var(--p-green); text-decoration: none; margin-left: 20px; opacity: 0.7; transition: 0.3s; }
.nav-link:hover { opacity: 1; text-shadow: var(--glow); }

/* --- RESPONSIVE / AJUSTE MÓVIL SOLICITADO --- */
@media (max-width: 768px) {
    /* Ocultar elementos laterales del header */
    .status-group, .coord-group { 
        display: none !important; 
    }

    /* Centrar nombre en el header */
    .hud-header { 
        justify-content: center !important; 
        padding-bottom: 15px;
    }

    .identity-glitch { 
        font-size: 1.1rem; 
        text-align: center;
        width: 100%;
    }

    /* Ajustes generales móvil */
    .desktop-only { display: none; }
    .info-hud { right: 5%; left: 5%; width: 90%; top: 50%; max-height: 65vh; }
    
    #node-1 { top: 20%; left: 10%; }
    #node-2 { top: 40%; left: 65%; }
    #node-3 { top: 65%; left: 15%; }
    #node-4 { top: 82%; left: 55%; }
}

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }