
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
            background: linear-gradient(135deg, #0a4d2e 0%, #064d2a 50%, #043d22 100%);
            display: flex; justify-content: center; align-items: center; height: 100vh; overflow: hidden; touch-action: manipulation;
        }
        body::before {
            content: ''; position: fixed; top: -50%; left: -50%; width: 200%; height: 200%;
            background: radial-gradient(circle, rgba(255,255,255,0.03) 1px, transparent 1px);
            background-size: 50px 50px; animation: backgroundScroll 20s linear infinite; pointer-events: none;
        }
        @keyframes backgroundScroll { 0% { transform: translate(0, 0); } 100% { transform: translate(50px, 50px); } }
        #game-container {
            position: relative; width: 360px; height: 640px; overflow: hidden; border-radius: 32px;
            box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 30px 60px rgba(0, 0, 0, 0.4), 0 10px 30px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
            background: linear-gradient(to bottom, #086f3c, #064d2a); transform: scale(1); transition: transform 0.3s ease;
        }
        #game-container:hover { transform: scale(1.01); }
        canvas { display: block; }
        #preloader {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background: linear-gradient(135deg, #0a4d2e 0%, #064d2a 50%, #043d22 100%);
            display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 10; color: white;
        }
        #preloader p { font-size: 16px; font-weight: 400; opacity: 0.9; }
        #loading-bar { width: 240px; height: 4px; background-color: rgba(255, 255, 255, 0.2); border-radius: 2px; margin-top: 32px; overflow: hidden; }
        #loading-progress { height: 100%; width: 0%; background: white; border-radius: 2px; transition: width 0.3s ease; }
        #game-ui { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
        #score-container { position: absolute; top: 15px; width: 100%; display: flex; margin-left: 5%; gap: 14%; }
        .score-item {
            display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px);
            padding: 10px 18px; border-radius: 16px; border: 2px solid rgba(255, 255, 255, 0.8);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }
        .score-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8);
        }
        .score-icon { font-size: 24px; }
        .score-value {
            font-size: 24px; font-weight: 700; color: #1a1a1a; text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
            letter-spacing: -0.5px; transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        #game-over {
            position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0.8);
            background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(30px); color: #1a1a1a;
            padding: 48px 36px; border-radius: 32px; text-align: center; display: none; pointer-events: auto;
            width: 85%; max-width: 320px; border: 3px solid rgba(255, 255, 255, 1);
            box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3), 0 15px 30px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.8);
            opacity: 0; animation: gameOverAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
        }
        @keyframes gameOverAppear {
            0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
            50% { transform: translate(-50%, -50%) scale(1.05); }
            100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
        }
        #game-over h2 {
            font-size: 36px; font-weight: 800; margin-bottom: 12px; letter-spacing: -1.5px;
            background: linear-gradient(135deg, #dc2626 0%, #f97316 100%);
            -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
        }
        #game-over p { font-size: 15px; opacity: 0.6; margin-bottom: 28px; font-weight: 500; }
        .final-stats { display: flex; gap: 16px; justify-content: center; margin-bottom: 16px; }
        .stat-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
        .stat-value {
            font-size: 36px; font-weight: 800;
            background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
            -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; letter-spacing: -1px;
        }
        .stat-label { font-size: 11px; opacity: 0.5; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; }
        #restart-btn {
            background: linear-gradient(135deg, #dc2626 0%, #f97316 100%); color: white; border: none;
            padding: 18px 40px; font-size: 17px; font-weight: 700; border-radius: 16px; cursor: pointer;
            margin-top: 12px; pointer-events: auto; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 8px 20px rgba(220, 38, 38, 0.3), 0 4px 10px rgba(220, 38, 38, 0.2); letter-spacing: 0.3px;
        }
        #restart-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 12px 28px rgba(220, 38, 38, 0.4), 0 6px 14px rgba(220, 38, 38, 0.3);
        }
        #restart-btn:active {
            transform: translateY(-1px);
            box-shadow: 0 6px 16px rgba(220, 38, 38, 0.3), 0 3px 8px rgba(220, 38, 38, 0.2);
        }
        #start-screen {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background: linear-gradient(135deg, #0a4d2e 0%, #064d2a 50%, #043d22 100%);
            display: flex; flex-direction: column; justify-content: center; align-items: center;
            color: white; text-align: center; z-index: 5; padding: 32px;
        }
        #start-screen::before {
            content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
            background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
                        radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
            pointer-events: none;
        }
        #start-screen h1 {
            font-size: 48px; font-weight: 800; margin-bottom: 16px; letter-spacing: -2px;
            text-shadow: 0 4px 16px rgba(0, 0, 0, 0.3); position: relative; z-index: 1;
        }
        #start-screen>p { font-size: 18px; opacity: 0.95; margin-bottom: 48px; font-weight: 500; position: relative; z-index: 1; }
        #instructions {
            max-width: 280px; font-size: 15px; line-height: 1.7; opacity: 0.85;
            margin-bottom: 20px; position: relative; z-index: 1; font-weight: 400;
        }
        .controls-info { font-size: 13px; opacity: 0.65; margin-bottom: 36px; position: relative; z-index: 1; font-weight: 500; }
        #start-btn {
            background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); color: #1a1a1a; border: none;
            padding: 20px 56px; font-size: 19px; font-weight: 700; border-radius: 16px; cursor: pointer;
            pointer-events: auto; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); position: relative; z-index: 1;
            box-shadow: 0 10px 30px rgba(251, 191, 36, 0.4), 0 5px 15px rgba(251, 191, 36, 0.3); letter-spacing: 0.5px;
        }
        #start-btn:hover {
            transform: translateY(-4px);
            box-shadow: 0 15px 40px rgba(251, 191, 36, 0.5), 0 8px 20px rgba(251, 191, 36, 0.4);
        }
        #start-btn:active {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(251, 191, 36, 0.4), 0 4px 12px rgba(251, 191, 36, 0.3);
        }
        #sound-toggle {
            position: absolute; top: 20px; right: 20px; width: 48px; height: 48px;
            background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(20px); border: 2px solid rgba(255, 255, 255, 0.8);
            border-radius: 14px; cursor: pointer; pointer-events: auto; display: flex; align-items: center; justify-content: center;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); font-size: 22px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
        }
        #sound-toggle:hover {
            background: rgba(255, 255, 255, 1); transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 0 3px 6px rgba(0, 0, 0, 0.15);
        }
        #sound-toggle:active { transform: translateY(0); }
        @media (max-width: 400px) { #game-container { width: 100%; height: 100vh; border-radius: 0; } }
