/* Base — the whole scene is three.js; DOM is menu + debug only. */

* { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0; height: 100%;
    background: #000;
    color: #eee;
    font-family: 'Alte Haas Grotesk', -apple-system, "Helvetica Neue",
                 Helvetica, Arial, sans-serif;
    overflow: hidden;
}

#three-container {
    position: fixed;
    inset: 0;
}
#three-container canvas { display: block; }

/* ── Collapsible parameters menu ───────────────────────────────── */

#menu {
    position: fixed;
    bottom: 0;
    left: 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 50;
}

#menu-tab {
    width: 44px;
    height: 20px;
    border: none;
    border-radius: 6px 6px 0 0;
    background: rgba(18, 18, 22, 0.85);
    color: #777;
    font-size: 13px;
    cursor: pointer;
    opacity: 0.35;
    transition: opacity 0.2s;
}
#menu-tab:hover { opacity: 1; }
#menu.open #menu-tab { opacity: 1; color: #bbb; }

#menu-body {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 14px 18px;
    margin-bottom: 0;
    background: rgba(14, 14, 18, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    backdrop-filter: blur(6px);
    min-width: 280px;
}
#menu.open #menu-body { display: flex; }

.menu-action {
    padding: 6px 10px;
    background: transparent;
    color: #777e86;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    font-family: inherit;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
}
.menu-action:hover { color: #c8ced4; border-color: rgba(255, 255, 255, 0.3); }

.menu-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.menu-links a { color: #777e86; text-decoration: none; }
.menu-links a:hover { color: #c8ced4; }

#btn-power-menu {
    padding: 8px;
    background: linear-gradient(180deg, #34363a 0%, #17181b 100%);
    color: #c2c8ce;
    border: 1px solid #050506;
    border-radius: 4px;
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 3px;
    font-weight: 700;
    cursor: pointer;
}
#btn-power-menu.connected { color: #8be08f; }

.param-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #9aa0a8;
}
.param-row input[type="range"] {
    flex: 1;
    accent-color: #b8c0c8;
}
.param-val {
    min-width: 20px;
    text-align: right;
    color: #c8ced4;
}

.toggle-group {
    display: flex;
    gap: 16px;
    justify-content: center;
}
.toggle-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #9aa0a8;
    cursor: pointer;
}
.toggle-group input[type="checkbox"] {
    accent-color: #b8c0c8;
    width: 13px; height: 13px;
}

/* ── Reflection debug panel ────────────────────────────────────── */

#debug-panel {
    position: fixed;
    right: 14px;
    bottom: 14px;
    width: 240px;
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    background: rgba(10, 10, 14, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    z-index: 60;
}
#debug-panel.open { display: flex; }
#debug-video {
    width: 100%;
    border-radius: 4px;
    background: #000;
    aspect-ratio: 4 / 3;
}
#debug-env {
    width: 100%;
    height: 56px;
    background: #000;
    border-radius: 4px;
}
#debug-log {
    margin: 0;
    font-family: "Menlo", monospace;
    font-size: 10px;
    line-height: 1.5;
    color: #8f8;
    white-space: pre-wrap;
}
