body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #050010;
    font-family: 'Press Start 2P', cursive;
    overflow: hidden;
    touch-action: none;
    transition: background-color 0.5s;
}

#game-container {
    position: relative;
    border: 4px solid #333;
    border-radius: 8px;
    transition: box-shadow 0.5s;
}

canvas {
    display: block;
    background-color: #1a0b2e;
    image-rendering: pixelated;
}

/* Scanlines - Only visible in Neon Mode */
.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%,
            rgba(0, 0, 0, 0.2) 50%,
            rgba(0, 0, 0, 0.2));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 20;
    border-radius: 4px;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.7);
    opacity: 1;
    transition: opacity 0.5s;
}

.ui-layer {
    position: absolute;
    top: 20px;
    width: 100%;
    text-align: center;
    color: #0ff;
    text-shadow: 2px 2px 0 #b026ff;
    font-size: 12px;
    z-index: 30;
    pointer-events: none;
    animation: pulse 2s infinite;
    transition: opacity 0.3s, color 0.5s, text-shadow 0.5s;
}

/* Theme Toggle Button */
#theme-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 40;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid #fff;
    color: #fff;
    padding: 8px 10px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    font-size: 10px;
    border-radius: 4px;
    outline: none;
    user-select: none;
    /* Added transition for smooth appearance */
    transition: opacity 0.3s;
}

#theme-btn:hover {
    background: #fff;
    color: #000;
}

@keyframes pulse {
    0% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.8;
    }
}