body {
    margin: 0;
    padding: 0;
    background-color: #000;
    color: #0f0;
    font-family: 'Courier New', Courier, monospace;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    touch-action: none;
}

#game-container {
    position: relative;
    width: 95vw;
    max-width: 600px;
    max-height: 95vh;
    aspect-ratio: 3 / 4;
    border: 2px solid #333;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
    display: flex;
    flex-direction: column;
}

@media (min-aspect-ratio: 3/4) {
    #game-container {
        width: auto;
        height: 95vh;
    }
}

canvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: pixelated;
}

.crt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        rgba(18, 16, 16, 0) 50%,
        rgba(0, 0, 0, 0.25) 50%
    ), linear-gradient(
        90deg,
        rgba(255, 0, 0, 0.06),
        rgba(0, 255, 0, 0.02),
        rgba(0, 0, 255, 0.06)
    );
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    z-index: 10;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    box-sizing: border-box;
    z-index: 5;
}

#status-bar {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

#score-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#score, #highscore, #level {
    font-size: 24px;
    text-shadow: 0 0 5px #0f0;
}

#highscore {
    font-size: 16px;
    opacity: 0.8;
}

#message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    text-align: center;
    text-shadow: 0 0 10px #0f0;
}
