* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    color: #fff;
    font-family: 'Courier New', monospace;
    overflow: hidden;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#screen {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    max-width: 100vw;
    max-height: 100vh;
    padding: 10px;
}

#crt {
    position: relative;
    border: 3px solid #333;
    border-radius: 18px;
    overflow: hidden;
    box-shadow:
        0 0 20px rgba(255, 255, 255, 0.05),
        inset 0 0 60px rgba(0, 0, 0, 0.4),
        0 0 80px rgba(0, 150, 255, 0.08);
    background: #000;
}

#gameCanvas {
    display: block;
    background: #000;
}

#shaderCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 2s ease;
    mix-blend-mode: screen;
}

#shaderCanvas.active {
    opacity: 0.12;
}

#scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.15) 2px,
        rgba(0, 0, 0, 0.15) 4px
    );
    z-index: 10;
}

#hud {
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 2px;
    pointer-events: none;
    z-index: 5;
}

#score {
    font-size: 28px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

#lives {
    font-size: 18px;
    letter-spacing: 6px;
}

#level {
    font-size: 16px;
    opacity: 0.7;
}

/* Shader side panel */
#shaderPanel {
    width: 320px;
    min-height: 400px;
    border: 2px solid #1a3a1a;
    border-radius: 12px;
    background: #050a05;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow:
        0 0 20px rgba(0, 255, 0, 0.05),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
}

#shaderLabel {
    padding: 8px 12px;
    font-size: 11px;
    letter-spacing: 3px;
    color: #0f0;
    opacity: 0.6;
    border-bottom: 1px solid #1a3a1a;
    text-align: center;
}

#shaderDisplayCanvas {
    width: 100%;
    height: 320px;
    display: block;
    background: #000;
}

#shaderInfo {
    padding: 10px 12px;
    font-size: 10px;
    line-height: 1.6;
    color: #0a0;
    opacity: 0.8;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    max-height: 200px;
    overflow-y: auto;
    border-top: 1px solid #1a3a1a;
}

#shaderOverlay {
    display: none;
}

/* Responsive */
@media (max-width: 1100px) {
    #screen {
        flex-direction: column;
        align-items: center;
    }
    #shaderPanel {
        width: 100%;
        max-width: 640px;
    }
}
