
        /* =====================================================================
           CSS STYLING & RESPONSIVENESS ARCHITECTURE
           ===================================================================== */
        :root {
            --primary: #EF476F;      /* Wrong Answer/Danger Red */
            --secondary: #118AB2;    /* Arcade Blue */
            --success: #06D6A0;      /* Laser Green / Correct */
            --warning: #FFD166;      /* Code Yellow */
            --dark: #0F111A;         /* Deep IDE Space */
            --terminal: #1A1C23;     
            --light: #A6ACCD;        
            --font-code: 'Courier New', Courier, monospace;
        }

        * {
            box-sizing: border-box;
            user-select: none;
            -webkit-user-select: none;
            touch-action: manipulation;
        }

        body {
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100vw;
            height: 100vh;
            background-color: #050508; 
            font-family: 'Segoe UI', sans-serif;
            overflow: hidden;
        }
        
        #game-container {
            position: relative;
            width: 100vw;
            height: 100vh;
            max-width: 1280px;
            max-height: 720px;
            background: #020205; 
            box-shadow: 0 0 50px rgba(17, 138, 178, 0.4);
            overflow: hidden;
            border: 2px solid var(--secondary);
            border-radius: 8px;
        }

        canvas {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: contain; 
            z-index: 1;
        }
        
        /* --- UI Layers --- */
        .ui-layer {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            background: rgba(15, 17, 26, 0.9);
            color: var(--light);
            text-align: center;
            z-index: 100;
        }

        .hidden { display: none !important; }

        h1.game-title {
            font-size: clamp(2.5rem, 5vw, 4.5rem);
            margin: 0 0 10px;
            text-shadow: 4px 4px 0 #000;
            color: var(--warning);
            font-family: var(--font-code);
            font-weight: 900;
        }

        p.subtitle {
            font-size: clamp(1.1rem, 2.5vw, 1.6rem);
            margin-bottom: 30px;
            color: #89DDFF;
            font-family: var(--font-code);
        }

        button.primary-btn {
            padding: 16px 50px;
            font-size: 1.8rem;
            border: none;
            border-radius: 8px;
            background: var(--success);
            color: #000;
            cursor: pointer;
            font-weight: 900;
            text-transform: uppercase;
            box-shadow: 0 6px 0 #049A73;
            transition: transform 0.1s;
            font-family: var(--font-code);
        }
        button.primary-btn:active { transform: translateY(6px); box-shadow: 0 0 0 #049A73; }

        /* --- HUD --- */
        #hud {
            position: absolute;
            top: 20px;
            left: 30px;
            font-family: var(--font-code);
            z-index: 50;
            pointer-events: none;
            text-align: left;
        }
        #hud-score { font-size: 2.6rem; font-weight: 900; color: var(--success); text-shadow: 2px 2px 0 #000; }
        
        #hud-lives { 
            font-size: 1.4rem; 
            color: var(--primary); 
            font-weight: bold; 
            margin-top: 5px; 
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .mistake-boxes { display: flex; gap: 5px; }
        .mistake-box {
            width: 18px; height: 18px;
            border: 2px solid var(--primary);
            background: rgba(0,0,0,0.5);
            border-radius: 3px;
            transition: background 0.3s;
        }
        .mistake-box.filled {
            background: var(--primary);
            box-shadow: 0 0 8px var(--primary);
        }

        /* --- Question Interface Terminal --- */
        #terminal-overlay {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            width: 90%;
            max-width: 900px;
            background: var(--dark);
            border: 2px solid #3A3F58;
            border-radius: 12px;
            padding: 20px;
            z-index: 60;
            font-family: var(--font-code);
            box-shadow: 0 10px 30px rgba(0,0,0,0.8);
        }

        .terminal-header {
            display: flex;
            gap: 8px;
            margin-bottom: 15px;
            border-bottom: 1px solid #222;
            padding-bottom: 8px;
            text-align: left;
        }
        .term-dot { width: 12px; height: 12px; border-radius: 50%; }
        .dot-r { background: var(--primary); }
        .dot-y { background: var(--warning); }
        .dot-g { background: var(--success); }

        #question {
            font-size: clamp(1rem, 2.1vw, 1.5rem);
            color: #A6ACCD;
            background: var(--terminal);
            padding: 15px;
            border-radius: 6px;
            border-left: 5px solid var(--warning);
            margin-bottom: 15px;
            text-align: left;
            line-height: 1.4;
        }

        .answers-container {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 15px;
        }

        .ans-btn {
            padding: 15px 10px;
            font-size: 1.15rem;
            font-weight: bold;
            background: #292D3E;
            color: #FFF;
            border: 2px solid #3A3F58;
            border-radius: 8px;
            cursor: pointer;
            transition: background 0.2s;
            font-family: var(--font-code);
        }
        .ans-btn:hover { background: #3A3F58; border-color: var(--secondary); }
        .ans-btn.correct { background: var(--success) !important; color: #000 !important; border-color: #FFF !important; }
        .ans-btn.wrong { background: var(--primary) !important; color: #FFF !important; }

        /* --- On-screen Mobile Controls --- */
        #mobile-controls {
            position: absolute;
            bottom: 180px; 
            left: 0; width: 100%;
            display: none;
            justify-content: space-between;
            padding: 0 40px;
            z-index: 40;
        }
        .control-group { display: flex; gap: 15px; }
        .action-btn {
            width: 65px; height: 65px; border-radius: 50%;
            background: rgba(255,255,255,0.1); border: 2px solid rgba(255,255,255,0.3);
            color: white; font-size: 1.5rem; font-weight: bold;
            display: flex; justify-content: center; align-items: center;
        }
        .action-btn:active { background: rgba(255,255,255,0.4); }

        /* Flash Layer */
        #flash-overlay { position: absolute; inset: 0; z-index: 90; pointer-events: none; opacity: 0; transition: opacity 0.2s; }
        .flash-red { background: rgba(239, 71, 111, 0.4); opacity: 1 !important; }
        .flash-green { background: rgba(6, 214, 160, 0.3); opacity: 1 !important; }

        @media (max-width: 768px) {
            .answers-container { grid-template-columns: 1fr; gap: 10px; }
            .ans-btn { padding: 12px; font-size: 1.1rem; }
            #mobile-controls { display: flex; }
            #terminal-overlay { width: 95%; padding: 10px; bottom: 10px; }
            #mobile-controls { bottom: 250px; }
        }
    