
        :root {
            --bg: #060b14;
            --surface: #0d1824;
            --neon-blue: #00d4ff;
            --neon-red: #ff2d55;
            --neon-green: #00ff9d;
            --neon-yellow: #ffd60a;
            --neon-purple: #bf5af2;
            --text: #e8f4fd;
            --text-dim: rgba(232, 244, 253, 0.5);
        }

        * {
            box-sizing: border-box;
        }

        body,
        html {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
            background-color: var(--bg);
            color: var(--text);
            font-family: 'Rajdhani', sans-serif;
            overflow: hidden;
            touch-action: none;
        }

        canvas {
            display: block;
            width: 100%;
            height: 100%;
        }

        /* Grid overlay on bg */
        body::before {
            content: '';
            position: fixed;
            inset: 0;
            background-image:
                linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
            background-size: 40px 40px;
            pointer-events: none;
            z-index: 0;
        }

        .ui-layer {
            position: absolute;
            inset: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background: rgba(6, 11, 20, 0.92);
            backdrop-filter: blur(6px);
            transition: opacity 0.4s ease;
            z-index: 10;
        }

        .hidden {
            opacity: 0;
            pointer-events: none;
        }

        /* ── TITLE ── */
        .game-title {
            font-family: 'Bangers', cursive;
            font-size: 5rem;
            margin-bottom: 0.5rem;
            color: #fff;
            text-shadow: 4px 4px 0px #ff6b6b, 8px 8px 0px #4ecdc4, 12px 12px 20px rgba(0, 0, 0, 0.5);
            letter-spacing: 5px;
            animation: titlePulse 2s ease-in-out infinite;
        }

        @keyframes gradientShift {
            0% {
                background-position: 0% 50%;
            }

            50% {
                background-position: 100% 50%;
            }

            100% {
                background-position: 0% 50%;
            }
        }

        .subtitle {
            font-size: 0.85rem;
            letter-spacing: 4px;
            color: var(--text-dim);
            margin: 0 0 28px;
            text-transform: uppercase;
        }

        /* ── HUD ── */
        .hud {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-family: 'Orbitron', monospace;
            font-size: 0.85rem;
            font-weight: 700;
            z-index: 5;
            padding: 16px 24px;
            background: linear-gradient(180deg, rgba(6, 11, 20, 0.9) 0%, transparent 100%);
        }

        .hud-score {
            background: rgba(0, 212, 255, 0.08);
            border: 1px solid rgba(0, 212, 255, 0.25);
            border-radius: 8px;
            padding: 6px 16px;
            color: var(--neon-blue);
            text-shadow: 0 0 12px var(--neon-blue);
            letter-spacing: 2px;
        }

        .lives-display {
            display: flex;
            gap: 10px;
            align-items: center;
            background: rgba(255, 45, 85, 0.08);
            border: 1px solid rgba(255, 45, 85, 0.2);
            border-radius: 8px;
            padding: 6px 16px;
        }

        .heart {
            font-size: 1.3rem;
            filter: drop-shadow(0 0 6px var(--neon-red));
            transition: transform 0.3s, filter 0.3s;
        }

        .heart.lost {
            filter: grayscale(1) brightness(0.3);
            opacity: 0.4;
        }

        @keyframes heartbeat {

            0%,
            100% {
                transform: scale(1);
            }

            50% {
                transform: scale(1.3);
            }
        }

        .heart.pulse {
            animation: heartbeat 0.35s ease;
        }

        /* ── HOW TO PLAY ── */
        .how-to-play {
            margin: 0 0 28px;
            background: rgba(0, 212, 255, 0.04);
            border: 1px solid rgba(0, 212, 255, 0.15);
            border-radius: 16px;
            padding: 18px 28px;
            max-width: 360px;
            width: 90%;
            position: relative;
            overflow: hidden;
        }

        .how-to-play::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 1px;
            background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
        }

        .how-to-play h3 {
            margin: 0 0 14px;
            font-family: 'Orbitron', monospace;
            font-size: 0.6rem;
            letter-spacing: 4px;
            text-transform: uppercase;
            color: var(--neon-blue);
            opacity: 0.6;
            text-align: center;
        }

        .instruction-row {
            display: flex;
            align-items: flex-start;
            gap: 14px;
            margin-bottom: 10px;
            text-align: left;
        }

        .instruction-row:last-child {
            margin-bottom: 0;
        }

        .instr-icon {
            font-size: 1.2rem;
            flex-shrink: 0;
            width: 28px;
            text-align: center;
            margin-top: 1px;
        }

        .instr-text {
            font-size: 0.9rem;
            line-height: 1.45;
            color: var(--text-dim);
        }

        .instr-text strong {
            color: var(--text);
        }

        /* ── BUTTONS ── */
        .btn-primary {
            padding: 14px 48px;
            font-family: 'Orbitron', monospace;
            font-size: 1rem;
            font-weight: 700;
            cursor: pointer;
            background: transparent;
            color: var(--neon-blue);
            border: 1.5px solid var(--neon-blue);
            border-radius: 30px;
            box-shadow:
                0 0 20px rgba(0, 212, 255, 0.25),
                inset 0 0 20px rgba(0, 212, 255, 0.05);
            transition: all 0.2s;
            text-transform: uppercase;
            letter-spacing: 3px;
            position: relative;
            overflow: hidden;
        }

        .btn-primary::before {
            content: '';
            position: absolute;
            inset: 0;
            background: var(--neon-blue);
            transform: translateX(-101%);
            transition: transform 0.25s ease;
            z-index: -1;
        }

        .btn-primary:hover {
            color: var(--bg);
            box-shadow: 0 0 40px rgba(0, 212, 255, 0.6);
            border-color: var(--neon-blue);
        }

        .btn-primary:hover::before {
            transform: translateX(0);
        }

        /* ── PRELOADER ── */
        #preloader {
            background: var(--bg);
            z-index: 20;
        }

        .loader-wrap {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 16px;
        }

        .loader-ring {
            width: 56px;
            height: 56px;
            position: relative;
        }

        .loader-ring::before,
        .loader-ring::after {
            content: '';
            position: absolute;
            inset: 0;
            border-radius: 50%;
            border: 2px solid transparent;
        }

        .loader-ring::before {
            border-top-color: var(--neon-blue);
            animation: spin 0.8s linear infinite;
        }

        .loader-ring::after {
            border-bottom-color: var(--neon-purple);
            animation: spin 1.4s linear infinite reverse;
        }

        @keyframes spin {
            to {
                transform: rotate(360deg);
            }
        }

        .load-label {
            font-family: 'Orbitron', monospace;
            font-size: 0.6rem;
            letter-spacing: 4px;
            color: var(--text-dim);
            text-transform: uppercase;
        }

        .progress-bar {
            width: 220px;
            height: 2px;
            background: rgba(255, 255, 255, 0.08);
            border-radius: 2px;
            overflow: hidden;
        }

        .progress-fill {
            width: 0%;
            height: 100%;
            background: linear-gradient(90deg, var(--neon-blue), var(--neon-purple));
            transition: width 0.1s;
            box-shadow: 0 0 8px var(--neon-blue);
        }

        /* ── GAME OVER ── */
        .game-over-badge {
            font-family: 'Orbitron', monospace;
            font-size: clamp(1.2rem, 4vw, 1.8rem);
            font-weight: 900;
            letter-spacing: 4px;
            text-transform: uppercase;
            color: var(--neon-red);
            text-shadow: 0 0 20px var(--neon-red), 0 0 40px rgba(255, 45, 85, 0.3);
            margin: 0 0 6px;
            animation: flicker 2s linear infinite;
        }

        @keyframes flicker {

            0%,
            95%,
            100% {
                opacity: 1;
            }

            96% {
                opacity: 0.6;
            }

            97% {
                opacity: 1;
            }

            98% {
                opacity: 0.4;
            }
        }

        .final-score {
            font-family: 'Orbitron', monospace;
            font-size: 0.75rem;
            letter-spacing: 3px;
            color: var(--text-dim);
            margin: 0 0 24px;
        }

        /* ── LEVEL UP FLASH ── */
        .level-flash {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            pointer-events: none;
            z-index: 6;
            opacity: 0;
            transition: opacity 0.1s;
        }

        .level-flash.show {
            opacity: 1;
            animation: lvlFlash 0.8s forwards;
        }

        .level-flash-text {
            font-family: 'Orbitron', monospace;
            font-size: clamp(1.5rem, 5vw, 3rem);
            font-weight: 900;
            color: var(--neon-green);
            text-shadow: 0 0 30px var(--neon-green);
            letter-spacing: 4px;
        }

        @keyframes lvlFlash {
            0% {
                opacity: 0;
                transform: scale(0.5);
            }

            30% {
                opacity: 1;
                transform: scale(1.1);
            }

            70% {
                opacity: 1;
                transform: scale(1);
            }

            100% {
                opacity: 0;
                transform: scale(1);
            }
        }

        /* ── SHAKE ── */
        .shake {
            animation: shake 0.3s cubic-bezier(.36, .07, .19, .97) both;
        }

        @keyframes shake {

            10%,
            90% {
                transform: translate3d(-2px, 0, 0);
            }

            20%,
            80% {
                transform: translate3d(4px, 0, 0);
            }

            30%,
            50%,
            70% {
                transform: translate3d(-8px, 0, 0);
            }

            40%,
            60% {
                transform: translate3d(8px, 0, 0);
            }
        }

        /* ============================= */
        /* 📱 MOBILE RESPONSIVE FIXES   */
        /* ============================= */

        @media (max-width: 768px) {

            /* Prevent accidental horizontal movement */
            html,
            body {
                overflow: hidden;
                position: fixed;
                width: 100%;
                height: 100%;
            }

            /* Reduce title size */
            .game-title {
                font-size: 2.5rem;
                letter-spacing: 3px;
                text-align: center;
            }

            .subtitle {
                font-size: 0.7rem;
                letter-spacing: 2px;
                text-align: center;
            }

            /* HUD spacing */
            .hud {
                padding: 12px 14px;
                font-size: 0.75rem;
            }

            .hud-score {
                padding: 5px 10px;
                font-size: 0.7rem;
            }

            .lives-display {
                padding: 5px 10px;
                gap: 6px;
            }

            .heart {
                font-size: 1rem;
            }

            /* How To Play box */
            .how-to-play {
                max-width: 95%;
                padding: 14px 16px;
                border-radius: 12px;
            }

            .how-to-play h3 {
                font-size: 0.55rem;
                letter-spacing: 3px;
            }

            .instr-text {
                font-size: 0.8rem;
            }

            /* Buttons */
            .btn-primary {
                padding: 12px 30px;
                font-size: 0.8rem;
                letter-spacing: 2px;
            }

            /* Game Over badge */
            .game-over-badge {
                font-size: 1.2rem;
                text-align: center;
            }

            .final-score {
                font-size: 0.7rem;
                text-align: center;
            }

            /* Level flash */
            .level-flash-text {
                font-size: 1.6rem;
                text-align: center;
            }
        }

        /* Extra small devices */
        @media (max-width: 480px) {

            .game-title {
                font-size: 2rem;
            }

            .how-to-play {
                padding: 12px;
            }

            .instr-text {
                font-size: 0.75rem;
            }

            .btn-primary {
                padding: 10px 24px;
                font-size: 0.75rem;
            }
        }

        @media (max-width: 768px) {

            html,
            body {
                overflow: hidden;
                height: 100%;
                width: 100%;
            }

            canvas {
                position: fixed;
                top: 0;
                left: 0;
            }

            .ui-layer {
                position: fixed;
            }
        }