html,
            body {
                background: #151c22;
                margin: 0;
                height: 100vh;
            }

            @font-face {
                font-family: "VT323";
                src: url("https://fonts.gstatic.com/s/vt323/v17/pxiKyp0ihIEF2hsY.woff2");
            }

            #wrap {
                max-width: 430px;
                margin: 0 auto;
                min-height: 10vh;
                display: flex;
                flex-direction: column;
            }

            #header {
                text-align: center;
                margin-top: 14px;
                letter-spacing: 2px;
                text-shadow: 0 0 6px #11ffde88;
            }

            #header h1 {
                font-family: "VT323", monospace;
                font-size: 2.2rem;
                color: #45ffe6;
                margin: 0;
            }

            #header p {
                color: #ff5c70;
                font-size: 1.1em;
                margin-top: 7px;
                margin-bottom: 2px;
            }

            #topStatBar {
                font-family: "VT323", monospace;
                font-size: 1.13em;
                color: #57e3ff;
                letter-spacing: 1px;
                margin: 7px 0 4px 0;
                text-align: left;
                width: 95vw;
                max-width: 430px;
                display: flex;
                justify-content: center;
                gap: 16px;
            }

            #topStatBar span {
                color: #ffe175;
                min-width: 22px;
                display: inline-block;
                text-align: right;
                margin-right: 8px;
            }

            #gameCanvas {
                display: block;
                margin: 0 auto;
                background: linear-gradient(180deg, #161a1f 55%, #3d4d57 100%);
                border-radius: 18px;
                box-shadow:
                    0 7px 30px #01e7e6a0,
                    0 1px 0px #000c;
                border: 3px solid #232e38;
                image-rendering: pixelated;
                max-width: 98vw;
                height: 400px !important;
            }

            #upgrades {
                display: flex;
                justify-content: center;
                flex-wrap: wrap;
                gap: 4px;
                margin: 8px auto 7px auto;
                max-width: 420px;
                width: 99vw;
            }

            .upBtn {
                background: #282f38;
                color: #4cf7ff;
                border: 2px solid #3eead3;
                border-radius: 0.6em;
                font-family: "VT323", monospace;
                font-size: 0.95em;
                padding: 5px 7px;
                cursor: pointer;
                letter-spacing: 1px;
                min-width: 60px;
                max-width: 84px;
                text-align: center;
                box-shadow: 0 1px 6px #01e6fa38 inset;
                transition: background 0.2s;
                margin-bottom: 0px;
            }

            .upBtn:hover {
                background: #31adc6;
                color: #fff;
            }

            #buttonBar {
                display: flex;
                justify-content: center;
                align-items: center;
                gap: 7px;
                flex-wrap: wrap;
                margin-bottom: 15px;
                margin-top: 15px;
                width: 100%;
                max-width: 99vw;
            }

            .btn {
                background: #23ffdb;
                color: #111;
                border: none;
                border-radius: 1em;
                font-family: "VT323", monospace;
                font-weight: bold;
                font-size: 1.05em;
                padding: 10px 14px;
                cursor: pointer;
                margin: 4px 1px;
                letter-spacing: 1px;
                min-width: 88px;
                max-width: 160px;
                text-align: center;
                box-sizing: border-box;
                white-space: nowrap;
            }

            .btn:hover {
                background: #08ad9f;
            }

            .btn.other {
                background: #212d3a;
                color: #fff;
                text-decoration: none;
            }

            .upBtn:focus,
            .upBtn:active,
            .btn:focus,
            .btn:active {
                outline: none !important;
                box-shadow: none !important;
                background: #282f38 !important;
                color: #4cf7ff !important;
            }

            .btn.other:focus,
            .btn.other:active {
                background: #212d3a !important;
                color: #fff !important;
            }

            @media (max-width: 430px) {
                #wrap {
                    max-width: 100vw;
                }
                #gameCanvas {
                    width: 99vw !important;
                    height: 400px !important;
                }
                #upgrades,
                #buttonBar,
                #topStatBar {
                    max-width: 99vw;
                }
                .btn,
                .upBtn {
                    min-width: 68px;
                    font-size: 0.95em;
                    padding: 6px 7px;
                }
            }

            @media (max-width: 370px) {
                .btn,
                .upBtn {
                    font-size: 0.89em;
                }
                #gameCanvas {
                    height: 400px !important;
                }
            }