/* --- Screen --- */
.screen-bezel {
    background: var(--screen-bezel);
    width: 360px;
    height: 440px;
    border-radius: 20px;
    box-shadow: inset 2px 2px 5px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 30px;
}

.lcd-container {
    width: 330px;
    height: 390px;
    background: var(--screen-bg);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ui-bar {
    display: flex;
    justify-content: space-between;
    padding: 6px 12px;
    color: #fdfdca;
    font-size: 1.4rem;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(253, 253, 202, 0.5);
    background: rgba(0, 0, 0, 0.3);
}

canvas#gameCanvas {
    width: 100%;
    height: auto;
    image-rendering: pixelated;
    /* Crisp pixels */
}

/* Glitch/Scanlines overlay (Optional) */
.lcd-container::after {
    content: "";
    position: absolute;
    top: 40px;
    left: 20px;
    right: 20px;
    bottom: 40px;
    /* Match lcd container + offset */
    background: linear-gradient(rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.1) 50%);
    background-size: 100% 4px;
    pointer-events: none;
    opacity: 0.3;
}

/* --- Raycaster (Right Panel) Styles --- */
#raycaster-canvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: crisp-edges;
}

.crt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 5;
}

#raycaster-ui {
    position: absolute;
    top: 20px;
    left: 20px;
    font-family: 'Courier New', monospace;
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
    pointer-events: none;
    z-index: 6;
}

.status-line {
    font-size: 14px;
    margin-bottom: 5px;
}