@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

body {
    background-color: #000;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    color: white;
    font-family: 'Press Start 2P', cursive;
    overflow: hidden;
}

#game-container {
    position: relative;
    width: 800px;
    height: 450px;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    background: #111;
     /* CRT Effect Scale */
    transform: scale(1.5); 
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

#ui-layer {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 780px;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    text-shadow: 2px 2px #000;
    z-index: 10;
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    text-align: center;
}

h1 {
    font-size: 32px;
    color: #b00;
    margin-bottom: 20px;
    text-shadow: 4px 4px 0px #300;
}

p {
    font-size: 16px;
    color: #eee;
}

.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* CRT Scanline Effect Overlay */
#game-container::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    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));
    z-index: 5;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}
