:root {
    --accent: #0066ff;
    --bg-dark: #0a0a0a;
    --panel-bg: #161616;
    --border: #2a2a2a;
    --text: #e0e0e0;
    --text-muted: #888;
    --input-bg: #050505;
    
    /* G2 v5 Colors */
    --color-mission-text: #28a745;
    --color-mission-bg: rgba(40, 167, 69, 0.1);
    --color-mission-border: #28a745;
    --color-guidance-text: #0066ff;
    --color-guidance-bg: rgba(0, 102, 255, 0.1);
    --color-guidance-border: #0066ff;
    --color-intervention-text: #dc3545;
    --color-intervention-bg: rgba(220, 53, 69, 0.1);
    --color-intervention-border: #dc3545;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row; /* Standard: Stage links, Sidebar rechts */
    height: 100vh;
    background: #000;
    color: var(--text);
    font-family: 'Inter', -apple-system, sans-serif;
    overflow: hidden;
}

#stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    position: relative;
    overflow: hidden;
}

#container {
    background: #fff;
    box-shadow: 0 0 60px rgba(0,0,0,0.8);
    position: relative;
    width: 100%;
    height: 100%;
}

#sidebar {
    width: 360px;
    background: var(--bg-dark);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    box-shadow: -5px 0 20px rgba(0,0,0,0.5);
    z-index: 100;
}

#scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 0; /* Accordion handles padding */
}

/* --- Accordion Styles --- */
.accordion-item {
    border-bottom: 1px solid var(--border);
}

.accordion-header {
    padding: 15px 20px;
    background: var(--panel-bg);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.accordion-header:hover {
    background: #1c1c1c;
}

.accordion-header.active {
    border-bottom: 1px solid var(--accent);
    background: #1a1a1a;
}

.accordion-header .title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.accordion-header.active .title {
    color: var(--accent);
}

.accordion-content {
    padding: 20px;
    display: none;
    background: var(--bg-dark);
}

.accordion-header.active + .accordion-content {
    display: block;
}

/* --- Controls --- */
label {
    font-size: 11px;
    display: block;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
}

.val {
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
}

input[type="range"] {
    width: 100%;
    margin-bottom: 15px;
    accent-color: var(--accent);
}

input[type="number"], 
input[type="text"], 
select {
    width: 100%;
    background: var(--input-bg);
    color: #fff;
    border: 1px solid var(--border);
    padding: 8px 10px;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 15px;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--accent);
}

.row {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

.col {
    flex: 1;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    transition: opacity 0.2s;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-ghost {
    width: 100%;
    padding: 8px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    margin-bottom: 10px;
}

.btn-ghost:hover {
    background: var(--panel-bg);
}

/* --- Graph Entries --- */
.graph-entry {
    background: var(--panel-bg);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    border-left: 3px solid var(--accent);
    position: relative;
}

.btn-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #331111;
    color: #ff4444;
    border: 1px solid #442222;
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 10px;
}

/* --- Console --- */
#console-log {
    height: 100px;
    background: #000;
    border-top: 1px solid var(--border);
    padding: 12px;
    color: #0f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    overflow-y: auto;
    flex-shrink: 0;
}

/* --- Utilities --- */
.no-mirror {
    /* Prevents mirroring if stage is flipped (though we handle this in JS mapping mostly) */
}
