/* --- Base Styles & Fonts --- */
body {
    background-color: #0a0a0a;
    color: #f0f0f0;
    font-family: 'Press Start 2P', cursive;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

h2, h3 {
    color: #00ffff; /* Cyan */
    text-shadow: 2px 2px #ff00ff; /* Magenta */
    margin-bottom: 10px;
    font-size: 1.2em;
}

p {
    font-size: 1em;
    color: #ffffff;
    margin: 4px 0;
}

/* --- Game Layout --- */
#game-container {
    display: flex;
    gap: 30px;
    padding: 20px;
    border: 4px solid #333;
    background: rgba(20, 20, 20, 0.8);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3), inset 0 0 15px rgba(255, 0, 255, 0.2);
    border-radius: 15px;
    position: relative;
    z-index: 1;
}

#game-canvas {
    border: 2px solid #00ffff;
    background-color: #000;
    box-shadow: inset 0 0 10px #000000;
}

#side-panel {
    display: flex;
    flex-direction: column;
    width: 200px;
}

.info-box, .controls-box {
    border: 2px solid #ff00ff;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
    background: #111;
}

.info-box h2 {
    margin-top: 0;
}

.info-box p {
    font-size: 1.5em;
    color: #ffff00; /* Yellow */
}

#next-canvas {
    background-color: #000;
    border: 1px solid #555;
}

.controls-box p {
    font-size: 0.7em;
    line-height: 1.5;
    color: #ccc;
    text-align: left;
    padding-left: 10px;
}

/* --- CRT Effect --- */
.crt-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    background:
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.2) 0px,
            rgba(0, 0, 0, 0.2) 1px,
            transparent 1px,
            transparent 3px
        );
}

.crt-effect::before {
    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: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

.crt-effect::after {
    content: ' ';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(18, 16, 16, 0.1);
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.2; }
    20% { opacity: 0.8; }
    40% { opacity: 0.3; }
    60% { opacity: 0.9; }
    80% { opacity: 0.2; }
    100% { opacity: 0.5; }
}
