/* Dynamic Lighting Overlays applied to the game shell */

.lighting-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1; /* Below the UI container but above base background */
    transition: background 1s ease, opacity 1s ease;
    background: transparent;
}

/* Pitch Black: Heavy vignette, nearly pure black edges */
.lighting-overlay.lighting-fx-pitch_black {
    background: radial-gradient(circle at center, transparent 10%, rgba(0,0,0,0.95) 80%);
}

/* Candlelight: Warm flickering radial gradient */
.lighting-overlay.lighting-fx-candlelight {
    background: radial-gradient(circle at center, rgba(255, 150, 50, 0.1) 0%, rgba(0, 0, 0, 0.8) 70%);
    animation: candleFlicker 3s infinite ease-in-out alternate;
}

@keyframes candleFlicker {
    0% { opacity: 0.9; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
    100% { opacity: 0.85; transform: scale(0.98); }
}

/* Low Interior Light: Gloomy grey/black vignette */
.lighting-overlay.lighting-fx-inside_lowlight {
    background: radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.6) 100%);
}

/* Interior Moonlight: Cold silver tint around edges */
.lighting-overlay.lighting-fx-inside_moonlight {
    background: radial-gradient(circle at center, transparent 40%, rgba(140, 160, 190, 0.15) 100%);
}

/* Moonlight: Cold silver tint */
.lighting-overlay.lighting-fx-outside_moonlight {
    background: radial-gradient(circle at center, transparent 20%, rgba(140, 160, 190, 0.2) 100%);
}

/* Interior Daylight: Soft white/grey edges */
.lighting-overlay.lighting-fx-inside_daylight {
    background: radial-gradient(circle at center, transparent 50%, rgba(200, 200, 200, 0.05) 100%);
}

/* Bright Illumination / Daylight / Stable: No heavy vignette */
.lighting-overlay.lighting-fx-inside_brightlight,
.lighting-overlay.lighting-fx-outside_daylight,
.lighting-overlay.lighting-fx-stable {
    background: transparent;
}

/* Basement Electrical Fault: Intermittent flickering dark */
.lighting-overlay.lighting-fx-basement_fault {
    background: radial-gradient(circle at center, transparent 20%, rgba(0,0,0,0.85) 100%);
    animation: electricalFault 4s infinite;
}

@keyframes electricalFault {
    0%, 94%, 98% { opacity: 1; }
    95%, 99% { opacity: 0.1; }
    96%, 100% { opacity: 0.5; }
}

/* Purge Emergency: Throbbing dark red vignette */
.lighting-overlay.lighting-fx-purge_emergency {
    background: radial-gradient(circle at center, rgba(200, 0, 0, 0.05) 0%, rgba(100, 0, 0, 0.4) 100%);
    animation: purgeStrobe 2s infinite;
}

@keyframes purgeStrobe {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Ancient Cairn: Eerie green/blue bio-luminescence */
.lighting-overlay.lighting-fx-ancient_cairn {
    background: radial-gradient(circle at center, rgba(50, 200, 150, 0.05) 0%, rgba(10, 50, 40, 0.5) 100%);
}
