:root {
    --bg-dark: #07090b;
    --panel-bg: #10151a;
    --border-grey: #222d37;
    --text-primary: #e1e7ed;
    --text-muted: #62778c;
    --airbus-blue: #00a2ff;
    --airbus-green: #34c759;
    --airbus-amber: #ff9500;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

body, html {
    width: 100%;
    height: 100%;
    background-color: var(--bg-dark);
    font-family: var(--font-stack);
    color: var(--text-primary);
    overflow: hidden;
    position: fixed;
    touch-action: none;
}

#app-container {
    display: flex;
    flex-direction: column;
    width: 100vw;
    height: 100vh;
}

#hardware-debug-panel {
    background-color: #020406;
    border-bottom: 2px solid var(--border-grey);
    padding: 8px 16px;
    font-family: monospace;
    font-size: 11px;
}

.dbg-split-container {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 16px;
}

.dbg-data-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.dbg-action-column {
    flex-shrink: 0;
}

.dbg-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
}

.env-row {
    color: #8a9ba8;
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.font-highlight {
    color: var(--airbus-blue) !important;
    font-weight: bold;
    border-top: 1px dashed #1f2933;
    padding-top: 2px;
}

#hardware-debug-panel span { color: #fff; }
.font-highlight span { color: var(--airbus-green) !important; }

.copy-action-btn {
    background-color: #1c232b;
    border: 1px solid #384856;
    color: var(--text-primary);
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.copy-action-btn:active {
    background-color: var(--airbus-blue);
    color: #000;
}

#system-bar {
    height: 34px;
    background-color: var(--panel-bg);
    border-bottom: 1px solid var(--border-grey);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    font-size: 11px;
    font-weight: 700;
}

.meta-block { display: flex; align-items: center; width: 30%; }
.text-right { justify-content: flex-end; }
.system-title { width: 40%; text-align: center; color: var(--airbus-blue); }

.indicator-dot { width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }
.disconnected { background-color: var(--airbus-amber); }
.connected { background-color: var(--airbus-green); }

#flight-deck { flex: 1; display: flex; flex-direction: row; }
#control-panel { width: 30%; border-right: 1px solid var(--border-grey); background-color: var(--panel-bg); padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.panel-card { background-color: rgba(255,255,255,0.01); border: 1px solid var(--border-grey); border-radius: 6px; padding: 12px; }
.panel-card h3 { font-size: 10px; color: var(--text-muted); margin-bottom: 8px; }
.btn-group { display: flex; gap: 6px; margin-bottom: 10px; }

.btn {
    flex: 1;
    padding: 10px;
    background-color: #161c22;
    border: 1px solid var(--border-grey);
    color: var(--text-primary);
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
}

.btn.active { background-color: var(--airbus-blue); border-color: var(--airbus-blue); color: #000; }
.system-init-btn { background-color: rgba(0, 162, 255, 0.12); border-color: var(--airbus-blue); color: var(--airbus-blue); width: 100%; }
label { display: block; font-size: 9px; color: var(--text-muted); margin-bottom: 4px; }
input[type="text"] { width: 100%; padding: 8px 10px; background-color: var(--bg-dark); border: 1px solid var(--border-grey); color: var(--text-primary); font-family: monospace; border-radius: 4px; }
.hidden { display: none !important; }

#pfd-space { width: 50%; height: 100%; background-color: #000; }
#pfd-canvas { width: 100%; height: 100%; display: block; }
#throttle-quadrant { width: 20%; height: 100%; background-color: var(--panel-bg); border-left: 1px solid var(--border-grey); display: flex; justify-content: center; align-items: center; }
#throttle-track { width: 44px; height: 85%; background-color: #090d10; border: 2px solid var(--border-grey); border-radius: 22px; position: relative; }
#throttle-detents { position: absolute; width: 100%; height: 100%; pointer-events: none; }
.detent-line { position: absolute; width: 150%; height: 2px; background-color: rgba(255, 255, 255, 0.12); left: -25%; }
.detent-line::after { content: attr(data-label); position: absolute; right: 140%; font-size: 8px; color: var(--text-muted); font-weight: 700; top: -5px; }
.detent-line[data-label="TOGA"] { top: 5%; background-color: rgba(255, 60, 48, 0.4); }
.detent-line[data-label="FLX/MCT"] { top: 22%; background-color: rgba(255, 149, 0, 0.4); }
.detent-line[data-label="CLB"] { top: 42%; background-color: rgba(0, 162, 255, 0.4); }
.detent-line[data-label="IDLE"] { top: 92%; background-color: rgba(52, 199, 89, 0.4); }

#throttle-lever {
    position: absolute;
    width: 72px;
    height: 44px;
    background-color: #1a222a;
    border: 2px solid #354757;
    border-radius: 6px;
    left: -14px;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 6px 16px rgba(0,0,0,0.6);
}

.lever-grip { width: 100%; height: 6px; background-color: var(--airbus-blue); position: absolute; top: 0; border-radius: 4px 4px 0 0; }
#throttle-pct { font-size: 11px; font-weight: 700; font-family: monospace; margin-top: 2px; }
#telemetry-log { height: 30px; background-color: var(--bg-dark); border-top: 1px solid var(--border-grey); display: flex; justify-content: space-around; align-items: center; }
.log-item { font-family: monospace; font-size: 10px; color: var(--text-muted); }
