:root { --bg: #0b0b0e; --panel: #141418; --accent: #007bff; --text: #e0e0e0; --border: #2a2a35; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: sans-serif; overflow: hidden; height: 100vh; }
#app { display: flex; flex-direction: column; height: 100vh; }
#main-header { height: 60px; background: var(--panel); border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; flex-shrink: 0; z-index: 10; }
.brand { font-weight: bold; color: var(--accent); display: flex; align-items: center; gap: 10px; }
.toolbar { display: flex; align-items: center; gap: 15px; }
.tool-icon { background: none; border: none; color: #666; cursor: pointer; font-size: 18px; transition: 0.2s; padding: 5px; }
.tool-icon:hover { color: #fff; }
.sep { width: 1px; height: 20px; background: var(--border); }
.actions { display: flex; gap: 10px; }
.btn { background: #2a2a30; color: white; padding: 8px 16px; border: 1px solid var(--border); border-radius: 4px; cursor: pointer; font-size: 13px; text-decoration: none; display: inline-block; }
.btn.primary { background: var(--accent); border-color: var(--accent); }
#workspace { display: flex; flex: 1; overflow: hidden; position: relative; }
#sidebar { width: 320px; background: var(--panel); border-right: 1px solid var(--border); padding: 20px; overflow-y: auto; transition: margin 0.3s ease-in-out; flex-shrink: 0; }
#sidebar.hidden { margin-left: -320px; }
.panel { margin-bottom: 25px; border-bottom: 1px solid #222; padding-bottom: 15px; }
.panel h3 { font-size: 11px; text-transform: uppercase; color: #555; margin-bottom: 15px; letter-spacing: 1px; }
.control { margin-bottom: 15px; }
.control label { display: block; font-size: 11px; color: #888; margin-bottom: 5px; }
input[type="range"] { width: 100%; cursor: pointer; }
.channel-selector { display: flex; gap: 8px; margin-bottom: 15px; background: rgba(0,0,0,0.2); padding: 8px; border-radius: 4px; }
.chan-btn { width: 20px; height: 20px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; opacity: 0.5; transition: 0.2s; }
.chan-btn.active { border-color: #fff; transform: scale(1.2); opacity: 1; }
#viewport { flex: 1; position: relative; background: #000; overflow: hidden; }
#view-3d { width: 100%; height: 100%; cursor: grab; }
#view-3d:active { cursor: grabbing; }
#grid-overlay { 
    position: absolute; inset: 0; pointer-events: none; border: 1px solid rgba(255,255,255,0.2); 
    background-image: linear-gradient(to right, rgba(255,255,255,0.3) 1px, transparent 1px), linear-gradient(to bottom, rgba(255,255,255,0.3) 1px, transparent 1px); 
    background-size: 100px 100px; 
    z-index: 5; 
}
.hidden { display: none !important; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.4; } 100% { opacity: 1; } }
.btn.loading { animation: pulse 1.5s infinite; cursor: wait; pointer-events: none; background: #444 !important; }