 body { 
            margin: 0; 
            overflow: hidden; 
            background: #000; 
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
            user-select: none; 
        }
        canvas { 
            display: block; 
            width: 100%; 
            height: 100%; 
        }
        
        /* UI Overlay */
        #ui-layer { 
            position: absolute; 
            top: 0; 
            left: 0; 
            width: 100%; 
            height: 100%; 
            pointer-events: none; 
            display: flex; 
            flex-direction: column; 
            justify-content: space-between; 
            z-index: 10; 
        }
        
        /* Danger Overlay (Red Vignette & Glitch) */
        #danger-overlay {
            position: absolute; 
            top: 0; 
            left: 0; 
            width: 100%; 
            height: 100%;
            background: radial-gradient(circle, transparent 40%, rgba(100,0,0,0.9) 100%);
            opacity: 0; 
            transition: opacity 0.2s; 
            pointer-events: none; 
            z-index: 5;
            mix-blend-mode: multiply;
        }

        /* HUD */
        #hud { 
            padding: 20px; 
            display: none; 
            justify-content: space-between; 
            align-items: flex-start; 
        }
        .hud-box { 
            background: rgba(0, 0, 0, 0.6); 
            padding: 10px 20px; 
            border-radius: 8px; 
            border: 1px solid #444; 
            color: #fff; 
            font-size: 1.2rem; 
            display: flex; 
            align-items: center; 
            gap: 10px; 
            min-width: 100px; 
            justify-content: center; 
        }
        .icon { font-size: 1.5rem; }
        
        /* Power Buttons */
        #powers-container { 
            position: absolute; 
            bottom: 80px; 
            right: 20px; 
            display: flex; 
            flex-direction: column; 
            gap: 10px; 
            pointer-events: auto; 
        }
        .power-btn { 
            background: linear-gradient(45deg, #444, #222); 
            border: 2px solid #666; 
            color: #aaa; 
            padding: 10px 15px; 
            border-radius: 8px; 
            cursor: pointer; 
            font-weight: bold; 
            display: flex; 
            align-items: center; 
            gap: 10px; 
            transition: 0.3s; 
            text-transform: uppercase; 
            font-size: 0.9rem; 
            opacity: 0.8; 
        }
        .power-btn:hover { opacity: 1; border-color: #888; transform: scale(1.05); }
        .power-btn.used { 
            background: #111; 
            color: #444; 
            border-color: #222; 
            cursor: default; 
            transform: none; 
            text-decoration: line-through; 
        }
        
        /* Battery Bar */
        #battery-bar-container { 
            width: 150px; 
            height: 10px; 
            background: #333; 
            border-radius: 5px; 
            overflow: hidden; 
            margin-top: 5px; 
        }
        #battery-fill { 
            width: 100%; 
            height: 100%; 
            background: #0f0; 
            transition: width 0.2s, background 0.5s; 
        }
        #light-timer-box { 
            display: none; 
            color: #ffff00; 
            border-color: #ffff00; 
            animation: pulse 1s infinite; 
        }
        @keyframes pulse { 
            0% { box-shadow: 0 0 5px #ff0; } 
            50% { box-shadow: 0 0 20px #ff0; } 
            100% { box-shadow: 0 0 5px #ff0; } 
        }

        /* Enemy Warning */
        #enemy-warning { 
            position: absolute; 
            top: 15%; 
            left: 50%; 
            transform: translateX(-50%); 
            color: #ff0000; 
            font-weight: 900; 
            font-size: 2rem; 
            letter-spacing: 5px;
            display: none; 
            animation: shake 0.5s infinite; 
            text-shadow: 0 0 20px red;
        }
        @keyframes shake { 
            0% { transform: translateX(-52%); } 
            50% { transform: translateX(-48%); } 
            100% { transform: translateX(-50%); } 
        }

        /* Menus */
        .menu-screen { 
            position: absolute; 
            top: 0; 
            left: 0; 
            width: 100%; 
            height: 100%; 
            /* Default dark background for other menus */
            background: rgba(0,0,0,0.9); 
            display: flex; 
            flex-direction: column; 
            justify-content: center; 
            align-items: center; 
            pointer-events: auto; 
            text-align: center; 
            z-index: 20; 
        }

        /* --- START SCREEN SPECIFIC STYLE (NEW) --- */
        #main-menu {
            /* Black overlay (70% opacity) + Image */
            background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8)), url('assets/main.avif');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }
        
        #ad-modal { display: none; background: rgba(0,0,0,0.95); z-index: 100; }
        .ad-content { background: #fff; color: #000; padding: 20px; border-radius: 10px; width: 90%; max-width: 400px; position: relative; text-align: center; }
        
        /* Instruction Modal Specifics */
        .instruction-content {
            background: #222;
            color: #eee;
            border: 2px solid #555;
            padding: 30px;
            text-align: left;
            width: 90%;
            max-width: 500px;
        }
        .instruction-content h2 { margin-top: 0; color: #4caf50; text-align: center; border-bottom: 1px solid #444; padding-bottom: 10px; }
        .instruction-content ul { padding-left: 20px; font-size: 1.1rem; line-height: 1.6; }
        .instruction-content li { margin-bottom: 10px; }
        .instruction-content strong { color: #fff; }

        #ad-placeholder { width: 100%; height: 250px; background: #eee; border: 2px dashed #999; display: flex; align-items: center; justify-content: center; margin: 15px 0; font-weight: bold; color: #555; font-size: 1.2rem; }
        #ad-close-btn { position: absolute; top: -15px; right: -15px; background: red; color: white; border: 2px solid white; border-radius: 50%; width: 40px; height: 40px; font-weight: bold; font-size: 1.2rem; cursor: pointer; display: none; }
        
        .btn { 
            background: #333; 
            color: #fff; 
            border: 2px solid #555; 
            padding: 15px 30px; 
            margin: 10px; 
            font-size: 1.5rem; 
            cursor: pointer; 
            border-radius: 5px; 
            transition: 0.3s; 
            text-transform: uppercase; 
            font-weight: bold; 
            min-width: 250px; 
        }
        .btn:hover { transform: scale(1.05); filter: brightness(1.2); }
        .btn-restart { background: #d32f2f; border-color: #b71c1c; }
        .btn-next { background: #4caf50; border-color: #388e3c; }
        .btn-info { background: #0288d1; border-color: #0277bd; font-size: 1.2rem; padding: 10px 20px; min-width: 200px; }
        
        .btn-mode-normal { background: #2e7d32; border-color: #4caf50; box-shadow: 0 0 15px rgba(76, 175, 80, 0.3); }
        .btn-mode-ghost { background: #b71c1c; border-color: #f44336; box-shadow: 0 0 15px rgba(244, 67, 54, 0.3); animation: pulseBtn 2s infinite; }
        @keyframes pulseBtn { 0% { box-shadow: 0 0 15px rgba(244, 67, 54, 0.3); } 50% { box-shadow: 0 0 30px rgba(244, 67, 54, 0.6); } 100% { box-shadow: 0 0 15px rgba(244, 67, 54, 0.3); } }

        #main-menu, #mode-select, #level-select { display: none; }
        #level-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; margin-top: 30px; max-width: 800px; }
        .level-btn { background: #222; border: 1px solid #444; color: #888; padding: 15px; font-size: 1.2rem; cursor: not-allowed; border-radius: 5px; }
        .level-btn.unlocked { background: #1565c0; color: #fff; border-color: #42a5f5; cursor: pointer; }
        .level-btn.unlocked:hover { background: #1e88e5; transform: scale(1.1); }

        #game-over-screen, #win-screen { display: none; }
        h1.title-3d { 
            font-size: 5rem; 
            color: #ff3333; 
            margin: 0; 
            letter-spacing: 5px; 
            text-transform: uppercase; 
            font-weight: 900; 
            transform: perspective(400px) rotateX(15deg);
            text-shadow: 0 1px 0 #8b0000, 0 5px 0 #8b0000, 0 0 20px rgba(255, 0, 0, 0.4);
            animation: floatText 3s ease-in-out infinite alternate;
        }
        @keyframes floatText { from { transform: perspective(400px) rotateX(15deg) translateY(0); } to { transform: perspective(400px) rotateX(15deg) translateY(-15px); } }
        p.sub { font-size: 1.5rem; color: #ccc; margin-bottom: 20px; }
        
        #notify { position: absolute; top: 20%; left: 50%; transform: translateX(-50%); color: #0f0; font-size: 2rem; font-weight: bold; opacity: 0; transition: opacity 0.5s; text-shadow: 0 0 10px #000; pointer-events: none; text-align: center; }
        #level-indicator { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); font-size: 1.5rem; color: #fff; font-weight: bold; background: rgba(0,0,0,0.5); padding: 5px 20px; border-radius: 20px; display: none; }
        #crosshair { position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; background: rgba(255, 255, 255, 0.8); border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 0 4px #fff; display: none; }
        #instructions { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; text-align: center; display: none; }
        .key-hint { background: #333; padding: 2px 6px; border-radius: 4px; color: #fff; font-weight: bold; border: 1px solid #555; }
        
        .mode-desc { font-size: 1rem; color: #aaa; margin-top: -10px; margin-bottom: 20px; font-style: italic; }