/* style.css */
:root {
    --space-bg: #0d0f18;
    --cpu-color: #00d9ff;
    --ram-color: #ff3b30; /* Red */
    --net-color: #ffb400; /* Yellow */
    --text-primary: #e6f7ff;
    --text-secondary: #8cb2c7;
    --hud-bg: rgba(13, 15, 24, 0.9);
    --hud-border: rgba(0, 217, 255, 0.4);
    --hud-border-active: #ff3b30; /* Active highlight is Red */
}
body, html {
    margin: 0; padding: 0; height: 100%; width: 100%;
    overflow: hidden; font-family: 'Orbitron', sans-serif;
    background-color: var(--space-bg);
}
.title-overlay {
    position: absolute; top: 20px; left: 50%;
    transform: translateX(-50%); z-index: 1002;
}
.title-overlay h1 {
    margin: 0; font-size: 1.5rem; color: var(--text-primary);
    letter-spacing: 5px; text-shadow: 0 0 10px var(--cpu-color);
}
#map {
    width: 100vw; height: 100vh;
    background-image: url('https://www.transparenttextures.com/patterns/stardust.png');
    cursor: default !important;
}
#connector-container, #widget-container {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%; z-index: 1000;
    pointer-events: none;
}
#widget-container { z-index: 1001; }
.connector-line {
    stroke-width: 1.5; stroke: var(--hud-border);
    filter: drop-shadow(0 0 3px var(--cpu-color));
    transition: all 0.3s ease;
}
.connector-line.active {
    stroke: var(--hud-border-active);
    filter: drop-shadow(0 0 5px var(--hud-border-active));
}
@keyframes pulse {
    0% { box-shadow: 0 0 10px 2px var(--cpu-color); }
    70% { box-shadow: 0 0 15px 4px transparent; }
    100% { box-shadow: 0 0 10px 2px var(--cpu-color); }
}
.server-marker {
    background-color: var(--cpu-color);
    border: 1px solid white; border-radius: 50%;
    transition: all 0.3s ease; animation: pulse 2.5s infinite;
    cursor: pointer; pointer-events: all;
}
.server-marker-active {
    transform: scale(1.6); background-color: var(--ram-color);
    animation: pulse 1.2s infinite;
}
.graph-widget {
    position: absolute;
    width: 340px; 
    height: 280px; 
    background: var(--hud-bg); backdrop-filter: blur(8px);
    border: 1px solid var(--hud-border); border-radius: 4px;
    box-shadow: inset 0 0 15px rgba(0, 217, 255, 0.1);
    color: var(--text-primary);
    display: flex; flex-direction: column;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    pointer-events: all;
}
.widget-header {
    padding: 10px 15px 8px 15px;
    cursor: grab;
    text-align: center;
}
.widget-header:active { cursor: grabbing; }
.widget-header h2 { margin: 0; font-size: 1.2rem; }
.graph-widget.active {
    border-color: var(--hud-border-active);
    box-shadow: inset 0 0 15px rgba(255, 59, 48, 0.2), 0 0 20px rgba(255, 59, 48, 0.3);
    z-index: 1002; 
}
.widget-body {
    display: flex;
    flex-direction: column; 
    flex-grow: 1;
    padding: 0 15px 15px 15px;
}
.main-stats {
    flex-grow: 1;
    display: flex; 
    flex-direction: column;
}
.widget-stats {
    font-size: 0.75rem; color: var(--text-secondary);
    border-bottom: 1px solid var(--hud-border);
    margin-bottom: 8px; padding-bottom: 8px;
}
.widget-stats p { margin: 2px 0; }
.widget-stats span { color: var(--text-primary); font-weight: bold; }
.charts-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 15px 10px; 
    flex-grow: 1; 
}
.chart-wrapper { position: relative; }
.chart-wrapper h4 {
    position: absolute; top: -2px; left: 4px;
    margin: 0; font-size: 0.6rem; color: var(--text-secondary);
}
.chart-wrapper canvas { width: 100% !important; height: 100% !important; }
.widget-link {
    display: block;
    text-decoration: none;
    color: var(--text-secondary);
    border: 1px solid var(--hud-border);
    border-radius: 4px;
    padding: 6px 0;
    text-align: center;
    font-size: 0.7rem;
    transition: all 0.2s ease;
    margin-top: 10px; 
}
.widget-link:hover {
    background-color: var(--hud-border-active);
    border-color: var(--hud-border-active);
    color: white;
}

/* ADDED: Styles for the new info panel */
#info-panel {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1002;
    background: var(--hud-bg);
    backdrop-filter: blur(8px);
    border: 1px solid var(--hud-border);
    border-radius: 4px;
    padding: 15px 20px;
    max-width: 280px;
    box-shadow: inset 0 0 15px rgba(0, 217, 255, 0.1);
    pointer-events: all;
}

#info-panel p {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 0 0 15px 0;
    line-height: 1.5;
}

#info-panel a {
    display: block;
    text-decoration: none;
    color: var(--text-secondary);
    border: 1px solid var(--hud-border);
    border-radius: 4px;
    padding: 8px 0;
    text-align: center;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

#info-panel a:hover {
    background-color: var(--hud-border-active);
    border-color: var(--hud-border-active);
    color: white;
}