:root {
    --accent: #44ffaa;
    --bg: #000000;
    --panel: rgba(20, 25, 30, 0.8);
    --border: 1px solid rgba(255, 255, 255, 0.15);
    --text: #ffffff;
    --text-mute: #8899aa;
}

* { margin: 0; padding: 0; box-sizing: border-box; user-select: none; -webkit-tap-highlight-color: transparent; font-family: 'Segoe UI', sans-serif; }

body { background: var(--bg); overflow: hidden; width: 100vw; height: 100vh; color: var(--text); }
canvas { display: block; width: 100%; height: 100%; outline: none; }

.header {
    position: absolute; top: 0; left: 0; width: 100%;
    padding: 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent);
    pointer-events: none; z-index: 10;
    display: flex; align-items: center; gap: 15px;
}
.logo-text { letter-spacing: 2px; font-size: 14px; text-transform: uppercase; color: var(--text-mute); }
.logo-text strong { color: white; font-weight: 700; }

.sidebar {
    position: absolute; right: 15px; top: 50%; 
    transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 8px;
    z-index: 20;
}

.btn-tool {
    width: 45px; height: 45px;
    background: rgba(10,15,20,0.6);
    border: var(--border);
    border-radius: 6px;
    color: #ccc;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; cursor: pointer;
    backdrop-filter: blur(8px);
    transition: 0.2s;
}
.btn-tool:active { background: var(--accent); color: black; }
.btn-tool.active { border-color: var(--accent); color: var(--accent); }

#layers-menu {
    position: absolute; right: 70px; top: 50%;
    transform: translateY(-50%) scale(0.9);
    width: 200px;
    background: rgba(5,10,15,0.95);
    border: var(--border);
    border-radius: 8px;
    padding: 10px;
    opacity: 0; pointer-events: none;
    transition: 0.2s; transform-origin: right center;
}
#layers-menu.show { opacity: 1; pointer-events: auto; transform: translateY(-50%) scale(1); }

.layer-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px; cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.layer-row:last-child { border: none; }
.cb { width: 14px; height: 14px; border: 1px solid #666; display:grid; place-items:center; border-radius:3px; }
.layer-row.on .cb { background: var(--accent); border-color: var(--accent); }
.layer-row.on .cb::after { content:''; width:6px; height:6px; background:black; }
.layer-label { font-size: 12px; }

.bottom-ui {
    position: absolute; bottom: 30px; left: 0; width: 100%;
    display: flex; flex-direction: column; align-items: center;
    pointer-events: none;
}
.live-badge {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: bold; color: var(--accent);
    margin-bottom: 10px;
    background: rgba(0,0,0,0.5); padding: 5px 12px; border-radius: 20px;
    border: 1px solid rgba(68, 255, 170, 0.3);
}
.dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 8px var(--accent); }

.scrubber {
    width: 80%; max-width: 400px;
    height: 40px;
    border-top: 1px solid rgba(255,255,255,0.2);
    position: relative;
    display: flex; justify-content: center;
}
.scrubber::before {
    content: ''; position: absolute; top: -5px; left: 50%;
    width: 10px; height: 10px; background: var(--text);
    border-radius: 50%; transform: translateX(-50%);
}
.date-readout {
    margin-top: 15px; font-family: monospace; font-size: 12px; color: var(--text-mute);
    letter-spacing: 1px;
}

.p-label {
    position: absolute; color: white; font-size: 11px;
    text-shadow: 0 0 4px black; font-weight: 600;
    transform: translate(-50%, -150%);
    white-space: nowrap; pointer-events: none;
    opacity: 0.8;
}

#info-panel {
    position: absolute; top: 80px; left: 20px;
    width: 250px; background: rgba(0,0,0,0.8);
    border-left: 3px solid var(--accent);
    padding: 15px; display: none;
    backdrop-filter: blur(10px);
}
#info-panel h2 { font-size: 18px; margin-bottom: 5px; text-transform: uppercase; }
#info-panel p { font-size: 12px; color: #aaa; margin-bottom: 3px; }
