:root {
  --bg-dark: #03050a; --bg-panel: rgba(10, 16, 30, 0.75); --border-glow: rgba(34, 211, 238, 0.3);
  --cyan: #06b6d4; --cyan-bright: #22d3ee; --green: #22c55e; --red: #ef4444;
  --text-main: #e2e8f0; --text-muted: #64748b;
  --font-ui: 'Inter', sans-serif; --font-data: 'JetBrains Mono', monospace; --font-display: 'Orbitron', sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background-color: var(--bg-dark);
  background-image: radial-gradient(circle at 15% 50%, rgba(6, 182, 212, 0.05), transparent 40%), radial-gradient(circle at 85% 30%, rgba(34, 197, 94, 0.05), transparent 40%), linear-gradient(rgba(34, 211, 238, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(34, 211, 238, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  color: var(--text-main); font-family: var(--font-ui); height: 100vh; overflow: hidden; display: flex; flex-direction: column;
}
.header { height: 64px; display: flex; justify-content: space-between; align-items: center; padding: 0 24px; background: linear-gradient(180deg, rgba(10, 16, 30, 0.9) 0%, rgba(10, 16, 30, 0.4) 100%); border-bottom: 1px solid var(--border-glow); backdrop-filter: blur(12px); z-index: 100; }
.header-title { font-family: var(--font-display); font-size: 18px; font-weight: 700; letter-spacing: 0.15em; color: var(--cyan-bright); text-shadow: 0 0 20px rgba(34, 211, 238, 0.5); }
.header-right { display: flex; align-items: center; gap: 16px; }
.trust-gate { display: flex; align-items: center; gap: 12px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--border-glow); padding: 6px 14px; border-radius: 4px; box-shadow: inset 0 0 10px rgba(0,0,0,0.5); }
.trust-label { font-family: var(--font-data); font-size: 10px; color: var(--cyan-bright); letter-spacing: 0.1em; }
.trust-value { font-family: var(--font-data); font-size: 12px; color: var(--green); font-weight: bold; }
input[type=range] { -webkit-appearance: none; width: 100px; background: transparent; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 14px; width: 14px; border-radius: 50%; background: var(--green); cursor: pointer; box-shadow: 0 0 10px var(--green); margin-top: -5px; }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 4px; cursor: pointer; background: rgba(255,255,255,0.1); border-radius: 2px; }
.btn { font-family: var(--font-data); font-size: 11px; font-weight: 600; letter-spacing: 0.05em; padding: 8px 16px; border-radius: 4px; cursor: pointer; transition: all 0.2s; text-transform: uppercase; }
.btn-cyan { color: var(--cyan-bright); border: 1px solid var(--cyan); background: rgba(34, 211, 238, 0.1); }
.btn-cyan:hover { background: rgba(34, 211, 238, 0.3); box-shadow: 0 0 15px rgba(34, 211, 238, 0.4); }
.btn-green { color: var(--green); border: 1px solid var(--green); background: rgba(34, 197, 94, 0.1); }
.btn-green:hover { background: rgba(34, 197, 94, 0.3); box-shadow: 0 0 15px rgba(34, 197, 94, 0.4); }
.btn-red { color: var(--red); border: 1px solid var(--red); background: rgba(239, 68, 68, 0.1); }
.btn-red:hover { background: rgba(239, 68, 68, 0.3); box-shadow: 0 0 15px rgba(239, 68, 68, 0.4); }
.header-clock { display: flex; flex-direction: column; align-items: flex-end; margin-left: 10px; }
.clock-label { font-family: var(--font-data); font-size: 9px; color: var(--text-muted); }
.clock-value { font-family: var(--font-data); font-size: 16px; color: var(--text-main); text-shadow: 0 0 10px rgba(255,255,255,0.3); }
.dashboard { display: grid; grid-template-columns: 300px 1fr 360px; gap: 16px; padding: 16px; flex: 1; min-height: 0; }
.panel { background: var(--bg-panel); border: 1px solid rgba(255, 255, 255, 0.05); border-top: 1px solid var(--border-glow); border-radius: 6px; padding: 16px; display: flex; flex-direction: column; backdrop-filter: blur(16px); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(34, 211, 238, 0.02); position: relative; overflow: hidden; }
.panel::before { content: ''; position: absolute; top: 0; left: 0; width: 8px; height: 8px; border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan); }
.panel::after { content: ''; position: absolute; bottom: 0; right: 0; width: 8px; height: 8px; border-bottom: 2px solid var(--cyan); border-right: 2px solid var(--cyan); }
.panel-title { font-family: var(--font-display); font-size: 11px; font-weight: 700; color: var(--cyan-bright); letter-spacing: 0.15em; margin-bottom: 16px; border-bottom: 1px solid rgba(34, 211, 238, 0.2); padding-bottom: 8px; }
.sector-stats { display: flex; justify-content: space-between; text-align: center; }
.stat { font-family: var(--font-data); font-size: 10px; color: var(--text-muted); }
.stat span { font-size: 24px; font-weight: 700; color: var(--text-main); display: block; margin-bottom: 4px; text-shadow: 0 0 10px rgba(255,255,255,0.2); }
.stat.text-red span { color: var(--red); text-shadow: 0 0 10px rgba(239, 68, 68, 0.4); }
.stat.text-cyan span { color: var(--cyan-bright); text-shadow: 0 0 10px rgba(34, 211, 238, 0.4); }
.kv-table { display: flex; flex-direction: column; gap: 10px; }
.kv-row { display: flex; justify-content: space-between; font-family: var(--font-data); font-size: 11px; border-bottom: 1px dashed rgba(255,255,255,0.05); padding-bottom: 4px; }
.kv-key { color: var(--text-muted); }
.kv-val { color: var(--text-main); text-align: right; font-weight: 600; }
.panel-canvas { padding: 0; overflow: hidden; border: none; background: transparent; box-shadow: none; }
.panel-canvas::before, .panel-canvas::after { display: none; }
#earth-canvas-container { width: 100%; height: 100%; border-radius: 6px; overflow: hidden; }
.right-col { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.panel-tracker { flex: 1; }
.obj-hint { font-family: var(--font-data); font-size: 10px; color: var(--text-muted); text-align: center; margin-top: 10px; text-transform: uppercase; letter-spacing: 0.1em; }
.explain-card { margin-top: 15px; display: flex; flex-direction: column; flex: 1; animation: fadeIn 0.3s ease; }
.explain-card.hidden { display: none; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.lock-head { font-family: var(--font-display); font-size: 12px; color: var(--cyan-bright); margin-bottom: 12px; font-weight: bold; text-shadow: 0 0 10px rgba(34, 211, 238, 0.5); }
.radar-container { flex: 1; position: relative; min-height: 180px; margin-top: 15px; }
.panel-log { height: 260px; }
.audit-chip { font-family: var(--font-data); font-size: 10px; text-align: center; letter-spacing: 0.05em; padding: 8px; border-radius: 4px; margin-bottom: 12px; background: rgba(34, 197, 94, 0.1); color: var(--green); border: 1px solid rgba(34, 197, 94, 0.3); box-shadow: inset 0 0 10px rgba(34, 197, 94, 0.1); }
.audit-chip.audit-fail { background: rgba(239, 68, 68, 0.1); color: var(--red); border-color: rgba(239, 68, 68, 0.3); box-shadow: inset 0 0 10px rgba(239, 68, 68, 0.1); }
.event-log { flex: 1; overflow-y: auto; list-style: none; display: flex; flex-direction: column; gap: 6px; padding-right: 4px; }
.log-item { font-family: var(--font-data); font-size: 10px; padding: 6px 10px; border-left: 2px solid var(--border-glow); background: rgba(255,255,255,0.02); animation: slideIn 0.2s ease; }
@keyframes slideIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }
.log-time { color: var(--text-muted); margin-right: 8px; }
.log-info { border-left-color: var(--cyan); }
.log-safe { border-left-color: var(--green); color: var(--green); }
.log-warning { border-left-color: #f59e0b; color: #f59e0b; }
.log-breach { border-left-color: var(--red); color: var(--red); background: rgba(239, 68, 68, 0.1); }
.gev-overlay { position: fixed; inset: 0; pointer-events: none; z-index: 999; display: flex; flex-direction: column; justify-content: space-between; transition: opacity 0.5s ease; opacity: 1; }
.gev-overlay.hidden { opacity: 0; visibility: hidden; }
.gev-top-bar, .gev-bottom-bar { background: linear-gradient(90deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 50%, rgba(0,0,0,0) 100%); padding: 16px 24px; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-data); font-size: 12px; color: var(--cyan-bright); border-bottom: 1px solid var(--border-glow); border-top: 1px solid var(--border-glow); }
.gev-rec { display: flex; align-items: center; gap: 8px; color: var(--red); font-weight: bold; }
.rec-dot { width: 10px; height: 10px; background: var(--red); border-radius: 50%; animation: blink 1s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.gev-title { letter-spacing: 0.3em; font-weight: 700; text-shadow: 0 0 10px rgba(34, 211, 238, 0.8); }
.gev-reticle { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 300px; height: 300px; border: 1px solid rgba(34, 211, 238, 0.3); border-radius: 50%; animation: pulse-reticle 2s infinite; }
@keyframes pulse-reticle { 0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; } 50% { transform: translate(-50%, -50%) scale(1.05); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; } }
.gev-reticle::before, .gev-reticle::after { content: ''; position: absolute; background: rgba(34, 211, 238, 0.5); }
.gev-reticle::before { top: 50%; left: -30px; right: -30px; height: 1px; }
.gev-reticle::after { left: 50%; top: -30px; bottom: -30px; width: 1px; }
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 2px; }
@keyframes flash-breach { 0%, 49.9% { box-shadow: inset 0 0 100px rgba(239, 68, 68, 0.5); } 50%, 100% { box-shadow: inset 0 0 0px rgba(239, 68, 68, 0); } }

/* Data Selector */
.data-selector {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 15px;
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 4px;
    border: 1px solid var(--border-glow);
}
.data-selector label {
    font-family: var(--font-data);
    font-size: 10px;
    color: var(--cyan-bright);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.data-selector select {
    background: #0a1226;
    color: var(--text-main);
    border: 1px solid var(--border-glow);
    padding: 6px;
    font-family: var(--font-data);
    font-size: 11px;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}
.mb-10 { margin-bottom: 10px; }

/* Global Sector Grid */
.sector-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 15px;
}
.sector-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(34, 211, 238, 0.3);
    color: var(--text-muted);
    font-family: var(--font-data);
    font-size: 10px;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
}
.sector-btn:hover {
    border-color: var(--cyan-bright);
    color: var(--cyan-bright);
}
.sector-btn.active {
    background: rgba(34, 211, 238, 0.2);
    border-color: var(--cyan-bright);
    color: var(--cyan-bright);
    box-shadow: 0 0 10px rgba(34, 211, 238, 0.3);
    font-weight: bold;
}

/* Scanning Overlay Animation */
.scan-overlay {
    position: absolute;
    inset: 0;
    z-index: 50;
    background: rgba(3, 5, 10, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}
.scan-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}
.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--cyan-bright);
    box-shadow: 0 0 20px 4px var(--cyan-bright);
    animation: scan 1s linear infinite;
}
@keyframes scan {
    0% { top: 0%; }
    100% { top: 100%; }
}
.scan-text {
    font-family: var(--font-display);
    color: var(--cyan-bright);
    font-size: 14px;
    letter-spacing: 0.2em;
    text-shadow: 0 0 10px var(--cyan-bright);
    animation: pulse-text 1s infinite alternate;
}
@keyframes pulse-text {
    from { opacity: 0.5; }
    to { opacity: 1; }
}
.mt-10 { margin-top: 10px; }
