:root {
    --bg-deep: #050505;
    --bg-side: #0a0a0a;
    --accent: #00ff66; /* Biohazard Green */
    --accent-dim: rgba(0, 255, 102, 0.1);
    --text: #e0e0e0;
    --text-muted: #666;
    --border: rgba(255, 255, 255, 0.05);
    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'Inter', sans-serif;
}

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

body {
    background-color: var(--bg-deep);
    color: var(--text);
    font-family: var(--font-sans);
    height: 100vh;
    overflow: hidden;
}

.scanner-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
    opacity: 0.1;
    z-index: 1000;
    box-shadow: 0 0 20px var(--accent);
    animation: scan 4s linear infinite;
}

@keyframes scan {
    from { transform: translateY(-100px); }
    to { transform: translateY(110vh); }
}

.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(0, 255, 102, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.app-layout {
    display: flex;
    height: 100vh;
    z-index: 10;
    position: relative;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-side);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 2rem 0;
}

.brand {
    padding: 0 2rem 3rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--accent);
}

.brand-text { display: flex; flex-direction: column; }
.brand-text .main { font-weight: 800; font-size: 1.25rem; letter-spacing: 2px; }
.brand-text .sub { font-size: 0.6rem; opacity: 0.7; font-family: var(--font-mono); }

.side-nav { flex: 1; padding: 0 1rem; }
.nav-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    text-align: left;
}

.nav-btn:hover { color: var(--text); background: rgba(255,255,255,0.02); }
.nav-btn.active { color: var(--accent); background: var(--accent-dim); border-left: 2px solid var(--accent); }

.sidebar-bottom { padding: 1.5rem; border-top: 1px solid var(--border); }
.hub-link { color: var(--text-muted); text-decoration: none; font-size: 0.8rem; display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.system-status { display: flex; align-items: center; gap: 0.75rem; font-size: 0.7rem; font-family: var(--font-mono); color: var(--accent); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }

/* Main Stage */
.main-stage { flex: 1; padding: 4rem; overflow-y: auto; }
.pane { display: none; max-width: 1100px; margin: 0 auto; animation: slideUp 0.5s ease-out; }
.pane.active { display: block; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.pane-header { margin-bottom: 3rem; }
.pane-header h1 { font-size: 3rem; font-weight: 800; letter-spacing: -1px; margin-bottom: 0.5rem; color: #fff; }
.pane-header p { color: var(--text-muted); font-size: 1.1rem; }

/* Analyzer Grid */
.analyzer-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 3rem; }
.area-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent); text-transform: uppercase; margin-bottom: 1rem; letter-spacing: 1px; }

textarea {
    width: 100%;
    height: 350px;
    background: #0d0d0d;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    resize: none;
    outline: none;
    margin-bottom: 1.5rem;
}

textarea:focus { border-color: var(--accent); }

.scan-btn {
    width: 100%;
    padding: 1.25rem;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 4px;
    font-weight: 800;
    font-family: var(--font-mono);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s;
}

.scan-btn:hover { transform: scale(1.02); box-shadow: 0 0 30px var(--accent-dim); }

.chart-container {
    background: #0f0f0f;
    border: 1px solid var(--border);
    height: 250px;
    border-radius: 50%;
    width: 250px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gauge-center { text-align: center; }
.gauge-center span { display: block; font-size: 3rem; font-weight: 800; font-family: var(--font-mono); color: var(--accent); }
.gauge-center label { font-size: 0.6rem; color: var(--text-muted); letter-spacing: 1px; }

.ws-status-mini {
    margin-top: 1rem;
    padding: 0.5rem;
    background: rgba(0, 255, 102, 0.05);
    border: 1px solid rgba(0, 255, 102, 0.1);
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: #00ff66;
}

.ws-status-mini.hidden { display: none; }

.stats-list { display: flex; flex-direction: column; gap: 0.75rem; }
.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255,255,255,0.02);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}
.stat-item .val { color: var(--accent); }

/* Artifact Scanner */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: 12px;
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}
.drop-zone:hover { border-color: var(--accent); background: var(--accent-dim); }
.drop-zone i { width: 48px; height: 48px; color: var(--text-muted); }

.report-header { font-family: var(--font-mono); font-size: 0.8rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; margin-bottom: 1rem; color: var(--accent); }
.artifact-report { margin-top: 2rem; background: #0d0d0d; border: 1px solid var(--border); padding: 2rem; border-radius: 8px; }
.anomaly-item { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; font-size: 0.9rem; }
.anomaly-item.warning { color: #ffab00; }
.anomaly-item.safe { color: var(--accent); }

/* Sandbox */
.sandbox-container { background: #0d0d0d; border: 1px solid var(--border); padding: 2rem; border-radius: 8px; }
.input-group { margin-bottom: 1.5rem; }
.input-group label { display: block; font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.input-group textarea { height: 120px; margin-bottom: 0; }
select { width: 100%; background: #1a1a1a; border: 1px solid var(--border); padding: 1rem; color: #fff; border-radius: 4px; outline: none; }

.attack-log {
    margin-top: 2rem;
    height: 200px;
    background: #000;
    border: 1px solid var(--border);
    padding: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: #444;
    overflow-y: auto;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #fff;
    color: #000;
    padding: 1rem 2rem;
    border-radius: 4px;
    font-weight: 700;
    transform: translateY(100px);
    transition: transform 0.3s cubic-bezier(0.42, 0, 0.58, 1);
}
.toast.show { transform: translateY(0); }

/* Audio Forensic Styles */
.audio-analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.spectrogram-mock { 
    background: #000; 
    height: 300px; 
    border-radius: 12px; 
    position: relative; 
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    gap: 4px;
}
.spectrogram-mock .scan-bar {
    position: absolute; top: 0; left: 0; width: 2px; height: 100%;
    background: var(--accent); opacity: 0.5;
    animation: scan-horizontal 3s linear infinite;
}
@keyframes scan-horizontal { from { left: 0; } to { left: 100%; } }
.freq-data { display: flex; align-items: flex-end; height: 100%; width: 100%; gap: 6px; }
.bar { flex: 1; background: var(--accent); opacity: 0.3; transition: height 0.2s; }

.hidden { display: none; }
