* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0a0a0f;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    font-family: 'Press Start 2P', monospace;
}

#game-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
}

#canvas {
    display: block;
    width: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    border: 3px solid #333;
    border-radius: 4px;
}

#mobile-controls {
    display: none;
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    padding: 0 15px;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
}

.ctrl-btn {
    pointer-events: all;
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255,255,255,0.4);
    background: rgba(0,0,0,0.35);
    color: rgba(255,255,255,0.7);
    border-radius: 12px;
    font-size: 20px;
    font-family: 'Press Start 2P', monospace;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
    margin: 0 5px;
}

.ctrl-btn:active {
    background: rgba(255,255,255,0.2);
}

.ctrl-jump {
    width: 75px;
    height: 75px;
    font-size: 24px;
}

#mobile-left {
    display: flex;
}

footer {
    margin-top: 10px;
    padding: 8px;
}

footer a {
    color: #555;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    text-decoration: none;
}

footer a:hover {
    color: #aaa;
}

@media (hover: none) and (pointer: coarse) {
    #mobile-controls {
        display: flex;
    }
}

@media (max-width: 600px) {
    #mobile-controls {
        display: flex;
    }
}