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

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

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

canvas {
    display: block;
    image-rendering: pixelated; /* To keep pixel art sharp */
}

#ui {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    text-shadow: 2px 2px 0px #000;
}

.hud {
    font-size: 16px;
    line-height: 1.5;
}

.hud.left { text-align: left; }
.hud.center { text-align: center; color: #ff3333; font-size: 20px;}
.hud.right { text-align: right; }

.hidden {
    display: none !important;
}

#game-over, #start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

#game-over h1, #start-screen h1 {
    font-size: 40px;
    color: #ffcc00;
    margin-bottom: 20px;
    text-shadow: 4px 4px 0 #000;
}

#game-over p, #start-screen p {
    font-size: 14px;
    margin-bottom: 10px;
}
