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

body {
    background-color: #1a1a2e;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: 'Press Start 2P', 'Courier New', monospace;
}

#game-container {
    position: relative;
    border: 4px solid #4a4a6a;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(100, 100, 150, 0.5);
}

#gameCanvas {
    display: block;
    background-color: #000;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    /* Kill the double-tap zoom and the 300ms tap delay so the on-screen
       controls feel immediate on a touch screen. */
    touch-action: manipulation;
}

/* Sits exactly over the name box drawn by drawNameEntry(). Positioned from
   JS so it tracks the canvas even if the canvas is ever CSS-scaled. The
   16px floor stops iOS Safari zooming the page when the field takes focus. */
#nameInput {
    position: absolute;
    margin: 0;
    background-color: #1a1a2e;
    border: 2px solid #9a9aca;
    border-radius: 0;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 22px;
    text-align: center;
    caret-color: #ffffff;
    outline: none;
}

#nameInput:focus {
    border-color: #ffffff;
}

#nameInput[hidden] {
    display: none;
}
