* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

body {
    background: #0a0e14;
    overflow: hidden;
    font-family: 'Silkscreen', cursive;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100vw;
}

#canvas {
    display: block;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    cursor: default;
}

#footer {
    position: fixed;
    bottom: 4px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 100;
    pointer-events: auto;
}

#footer a {
    color: rgba(255,255,255,0.25);
    text-decoration: none;
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 11px;
    font-weight: 300;
    letter-spacing: 0.5px;
}

#footer a:hover {
    color: rgba(255,255,255,0.5);
}

.touch-zone {
    display: none;
    position: fixed;
    top: 0;
    bottom: 0;
    width: 50%;
    z-index: 10;
    pointer-events: none;
}

#touch-left { left: 0; }
#touch-right { right: 0; }

#joystick-container {
    display: none;
    position: fixed;
    bottom: 60px;
    left: 40px;
    z-index: 50;
    pointer-events: auto;
}

#joystick-base {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#joystick-knob {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    position: absolute;
    transition: none;
}

#dash-btn {
    display: none;
    position: fixed;
    bottom: 75px;
    right: 30px;
    z-index: 50;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(0,229,255,0.2);
    border: 2px solid rgba(0,229,255,0.4);
    color: #00e5ff;
    font-family: 'Silkscreen', cursive;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 0.5px;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.2s, border-color 0.2s, transform 0.1s;
    text-shadow: 0 0 8px rgba(0,229,255,0.5);
}

#dash-btn:active {
    background: rgba(0,229,255,0.4);
    transform: scale(0.92);
}

#dash-btn.on-cooldown {
    background: rgba(255,152,0,0.15);
    border-color: rgba(255,152,0,0.3);
    color: rgba(255,152,0,0.5);
    text-shadow: none;
}

#dash-btn.dashing {
    background: rgba(0,229,255,0.4);
    border-color: rgba(0,229,255,0.8);
    color: #fff;
    animation: dashPulse 0.5s infinite alternate;
}

@keyframes dashPulse {
    from { box-shadow: 0 0 8px rgba(0,229,255,0.3); }
    to { box-shadow: 0 0 20px rgba(0,229,255,0.7); }
}

@media (pointer: coarse) {
    #joystick-container {
        display: block;
    }
    #dash-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .touch-zone {
        display: block;
        pointer-events: auto;
    }
}