:root {
    --primary: #ff2d55;
    --neon-blue: #00f2ff;
    --bg-dark: #050507;
    --glass: rgba(10, 10, 15, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-glow: 0 0 10px rgba(255, 45, 85, 0.6);
}

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

body, html {
    width: 100%; height: 100%;
    background: var(--bg-dark);
    font-family: 'Outfit', sans-serif;
    color: white;
    overflow: hidden;
}

#globeViz { width: 100%; height: 100%; }

/* Loading Screen */
#loadingScreen {
    position: fixed; inset: 0;
    background: var(--bg-dark);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease;
}
#loadingScreen.hidden { opacity: 0; pointer-events: none; }
.loader-content { text-align: center; }
.loader-content p { margin-top: 20px; font-size: 0.8rem; letter-spacing: 2px; opacity: 0.6; }
.spinner {
    width: 40px; height: 40px; margin: 0 auto;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Overlay */
.overlay-container {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    display: flex; flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    z-index: 10;
}

header { pointer-events: auto; }

.live-badge {
    background: rgba(255, 45, 85, 0.15);
    border: 1px solid var(--primary);
    color: var(--primary);
    display: inline-flex; align-items: center;
    padding: 3px 8px; border-radius: 4px;
    font-size: 0.55rem; font-weight: 700;
    letter-spacing: 1.5px; margin-bottom: 10px;
}
.live-badge span {
    width: 6px; height: 6px;
    background: var(--primary); border-radius: 50%;
    margin-right: 6px;
    animation: pulse-red 1.5s infinite;
}
@keyframes pulse-red {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 8px var(--primary); }
    100% { transform: scale(0.9); opacity: 0.7; }
}

header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.6rem; letter-spacing: 3px; margin-bottom: 3px;
}
header h1 span { color: var(--primary); text-shadow: var(--text-glow); }
header p { font-size: 0.65rem; letter-spacing: 2px; opacity: 0.4; }

/* Controls */
.controls-panel {
    pointer-events: auto;
    width: 260px;
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 18px;
    display: flex; flex-direction: column; gap: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.6);
}

.control-group {
    display: flex; justify-content: space-between; align-items: center;
}
.control-group label { font-size: 0.8rem; opacity: 0.6; }

.btn-toggle {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--glass-border);
    color: rgba(255,255,255,0.7);
    padding: 5px 12px; border-radius: 6px;
    cursor: pointer; font-weight: 600;
    font-size: 0.65rem; letter-spacing: 0.5px;
    transition: all 0.25s ease;
    font-family: 'Outfit', sans-serif;
}
.btn-toggle:hover { background: rgba(255,255,255,0.08); }
.btn-toggle.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 0 12px rgba(255, 45, 85, 0.4);
}

.btn-secondary {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    color: rgba(255,255,255,0.5);
    padding: 8px; border-radius: 8px;
    cursor: pointer; font-size: 0.75rem;
    font-family: 'Outfit', sans-serif;
    transition: all 0.2s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.08); color: white; }

.info-panel {
    background: rgba(255, 45, 85, 0.04);
    border-radius: 10px; padding: 10px;
    font-size: 0.75rem; line-height: 1.4;
    border: 1px solid rgba(255, 45, 85, 0.15);
}
.highlight { color: var(--primary); font-weight: 600; }

.stats-footer {
    display: flex; justify-content: flex-end; gap: 8px;
    pointer-events: none;
}
.stat {
    background: var(--glass);
    padding: 5px 12px; border-radius: 16px;
    font-size: 0.65rem;
    color: var(--neon-blue);
    border: 1px solid rgba(0, 242, 255, 0.15);
    font-family: 'Courier New', monospace;
}

/* Mobile */
@media (max-width: 600px) {
    .controls-panel { width: 220px; padding: 14px; gap: 10px; }
    header h1 { font-size: 1.2rem; }
    .overlay-container { padding: 12px; }
    .stats-footer { flex-direction: column; align-items: flex-end; }
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }
