/*! © 2026 LogosVox. All rights reserved. Copying, modifying or redistributing this code is not permitted. https://games.logosvox.com/terms */

        /* The shared top bar (lv-shell) floats over the canvas: what sat at the top moves below it. */
        /* (its HUD is at the bottom) */
    

        body { margin: 0; overflow: hidden; background-color: #050505; font-family: 'Segoe UI', Roboto, sans-serif; user-select: none; }
        
        /* Glassmorphism UI */
        #ui-container {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 360px;
            padding: 30px;
            border-radius: 16px;
            background: rgba(15, 15, 15, 0.65);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 0.08);
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
            color: #e0e0e0;
            z-index: 100;
            text-align: center;
            display: none; /* Hidden by default, shown on ESC */
        }

        h2 { margin: 0 0 20px 0; font-weight: 300; letter-spacing: 4px; font-size: 1.4rem; text-transform: uppercase; color: #ffaa00; }
        h3 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; margin: 15px 0 10px; opacity: 0.7; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 5px; }

        .control-group { margin-bottom: 15px; text-align: left; }
        label { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 6px; font-weight: 500; color: #ccc; }
        
        input[type=range] { 
            width: 100%; appearance: none; background: rgba(255,255,255,0.1); height: 4px; border-radius: 2px; outline: none;
        }
        input[type=range]::-webkit-slider-thumb {
            -webkit-appearance: none; width: 14px; height: 14px; background: #ffaa00; border-radius: 50%; cursor: pointer; transition: transform 0.1s;
        }
        input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }

        .btn-group { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
        .btn-full { width: 100%; margin-top: 5px; }
        
        button {
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            color: #ddd;
            padding: 12px;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-weight: 600;
        }
        button:hover { background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.3); }
        button:active { transform: scale(0.98); }
        button.primary { background: #ffaa00; color: #000; border: none; }
        button.primary:hover { background: #ffbb33; }
        button.danger { background: rgba(255, 50, 50, 0.2); border-color: rgba(255, 50, 50, 0.4); }
        button.danger:hover { background: rgba(255, 50, 50, 0.4); }

        /* HUD */
        #hud {
            position: absolute;
            bottom: 20px;
            left: 20px;
            color: rgba(255,255,255,0.5);
            font-size: 13px;
            pointer-events: none;
        }
        .key { display: inline-block; padding: 2px 6px; background: rgba(255,255,255,0.15); border-radius: 4px; font-family: monospace; color: #fff; margin: 0 2px; }

        #start-screen {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background: radial-gradient(circle at center, #1a1a1a 0%, #000000 100%);
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            z-index: 200; color: white;
        }
        #start-btn { 
            padding: 15px 50px; font-size: 1.2rem; background: #ffaa00; color: black; border: none; 
            border-radius: 50px; font-weight: bold; cursor: pointer; box-shadow: 0 0 30px rgba(255, 170, 0, 0.3);
            margin-top: 20px; transition: transform 0.2s;
        }
        #start-btn:hover { transform: scale(1.05); box-shadow: 0 0 50px rgba(255, 170, 0, 0.5); }

        #crosshair {
            position: absolute; top: 50%; left: 50%; width: 4px; height: 4px; background: rgba(255, 255, 255, 0.5);
            border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; z-index: 5;
        }
    