:root {
    --arcade-black: #000;
    --arcade-blue: #0000FF;
    --arcade-red: #F00;
    --scanline-color: rgba(0, 0, 0, 0.5);
}

body {
    background-color: #1a1a1a;
    color: white;
    font-family: 'Press Start 2P', cursive;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow: hidden;
}

.arcade-cabinet {
    position: relative;
    padding: 20px;
    background: #222;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.screen-container {
    position: relative;
    border: 4px solid #444;
    background-color: var(--arcade-black);
    width: 672px;
    /* 3x scale of original 224 */
    height: 768px;
    /* 3x scale of original 256 */
    overflow: hidden;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    /* Essential for retro feel */
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            var(--scanline-color) 50%,
            var(--scanline-color));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 10;
    opacity: 0.3;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 5;
}

#start-screen,
#game-over-screen {
    background: rgba(0, 0, 0, 0.85);
    padding: 20px;
    border: 2px solid cyan;
    color: white;
    text-shadow: 2px 2px #ff0000;
}

.hidden {
    display: none !important;
}

.controls-hint {
    margin-top: 10px;
    text-align: center;
}

.back-btn {
    color: #888;
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.3s;
}

.back-btn:hover {
    color: white;
}

.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* Specific text colors matching arcade */
h1 {
    color: #40e0d0;
    /* Cyan-ish title */
    font-size: 24px;
    margin-bottom: 30px;
}