canvas {
    image-rendering: crisp-edges;
    image-rendering: pixelated;
}

main {
    max-width: 768px;
    width: 100%;
    height: auto;
    padding: 0;
    margin: 0 auto;
    margin-top: 50px;
}

canvas.game {
    display: block;
    width: 100%;
    height: auto;
    background-color: #222;
}

.game-overlay {
    position: absolute;
    font-family: sans-serif;
    text-align: center;
    z-index: 10;
}

 h2 {
    color: white;
    font-size: 32px;
    text-shadow: 4px 4px black;
}

.game-overlay p {
    font-size: 24px;
    color: #eee;
    text-shadow: 2px 2px black;
}

.game-overlay em {
    color: yellow;
}

.game-overlay button {
    color: #eee;
    background-color: #444;
    text-shadow: 1px 1px black;
    border: none;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    box-shadow: 2px 2px black;
    min-width: 44px;
    min-height: 44px;
    touch-action: manipulation;
}

.game-overlay button:hover {
    color: #eee;
    background-color: #666;
}

body {
    padding: 0;
    background-color: #222;
}

/* Joystick styles */
#joystick.joystick {
    position: fixed;
    bottom: 16px;
    left: 16px;
    width: 120px;
    height: 120px;
    z-index: 5;
    touch-action: none;
}

#joystick .joystick-base {
    position: absolute;
    left: 0; top: 0;
    width: 100%; height: 100%;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    border: 2px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 0 10px rgba(0,0,0,0.6);
}

#joystick .joystick-knob {
    position: absolute;
    left: 50%; top: 50%;
    width: 56px; height: 56px;
    margin-left: -28px; margin-top: -28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.14);
    box-shadow: 0 3px 6px rgba(0,0,0,0.6);
    transition: transform 0s;
}

@media (max-width: 480px) {
    #joystick.joystick { width: 96px; height: 96px; }
    #joystick .joystick-knob { width: 48px; height: 48px; margin-left: -24px; margin-top: -24px; }
}