:root {
    --bg-color: #050505;
    --panel-bg: rgba(15, 15, 15, 0.9);
    --text-main: #ffffff;
    --text-muted: #888;
    --border: rgba(255, 255, 255, 0.1);
    
    /* STATUS KLEUREN */
    --status-active: #00CC55;  /* Groen */
    --status-backup: #0099FF;  /* Blauw */
    --status-offline: #FF0033; /* Rood */
    --status-pending: #FFAA00; /* Oranje */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: var(--bg-color);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

#map { width: 100%; height: 100%; background: #0a0a0a; z-index: 1; }
.leaflet-container { background: #000 !important; }
.leaflet-control-attribution { display: none; }

/* UI Layer */
.ui-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 1000; padding: 20px;
    display: flex; flex-direction: column;
}

.header { pointer-events: auto; margin-bottom: 20px; }
.header h1 {
    font-size: 1.8rem; font-weight: 800; letter-spacing: -1px; text-transform: uppercase;
    text-shadow: 0 0 20px rgba(0, 204, 85, 0.3);
}
.subtitle { font-family: 'JetBrains Mono'; font-size: 0.8rem; color: var(--status-active); display: flex; align-items: center; gap: 8px; }
.pulse-dot { width: 8px; height: 8px; background: var(--status-active); border-radius: 50%; animation: pulse 2s infinite; }


/* Sidebar */
.sidebar {
    pointer-events: auto; background: var(--panel-bg); backdrop-filter: blur(10px);
    border: 1px solid var(--border); border-radius: 12px; width: 340px;
    max-height: 80vh; overflow-y: auto; padding: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}

.region-group { margin-bottom: 20px; }
.region-title { font-size: 0.75rem; text-transform: uppercase; color: #666; letter-spacing: 1px; margin-bottom: 8px; border-bottom: 1px solid #222; padding-bottom: 4px; }

.server-row { 
    display: flex; justify-content: space-between; align-items: center; 
    margin-bottom: 8px; font-size: 0.9rem;
    cursor: pointer; 
    transition: background 0.2s;
}
.server-row:hover { background: rgba(255, 255, 255, 0.05); }

.row-left { display: flex; flex-direction: column; }
.city-name { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.host-label { font-size: 0.7rem; color: #555; font-family: 'JetBrains Mono'; }

.node-count { background: #222; color: #ccc; padding: 2px 6px; border-radius: 4px; font-size: 0.75rem; font-family: 'JetBrains Mono'; margin-right: 5px;}

/* Ping Status Classes */
.ping { font-family: 'JetBrains Mono'; font-weight: bold; color: var(--status-active); min-width: 60px; text-align: right; }
.ping.backup { color: var(--status-backup); }
.ping.offline { color: var(--status-offline); text-shadow: 0 0 10px rgba(255, 0, 51, 0.5); }

/* Map Markers */
.custom-marker { display: flex; justify-content: center; align-items: center; transition: opacity 0.5s ease-in-out; }
.core-dot { width: 8px; height: 8px; background: #fff; border-radius: 50%; box-shadow: 0 0 10px var(--color); z-index: 2; transition: 0.3s; }
.hex-ring {
    position: absolute; width: 40px; height: 40px; border: 1px solid var(--color); opacity: 0.3;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: spin 10s linear infinite;
    transition: 0.3s;
}

/* Offline marker styles */
.custom-marker.offline .hex-ring {
    animation: pulse-red 1s infinite !important;
    border-width: 2px;
    opacity: 0.8;
}

/* Uplink Animatie */
@keyframes flow-dash {
    to { stroke-dashoffset: -50px; }
}

.animated-uplink-path {
    animation: flow-dash 2s linear infinite;
    stroke-linecap: butt;
}

/* Algemene Animaties */
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }
@keyframes pulse-red { 0% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.2); opacity: 0.2; } 100% { transform: scale(1); opacity: 0.8; } }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #111; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

@media (max-width: 600px) { .sidebar { width: 100%; position: absolute; bottom: 0; left: 0; max-height: 40vh; border-radius: 12px 12px 0 0; } }