/* ============================================================
   FANTASY LIGHTNING — Cinematic + Works With Rain/Fog/Vignette
============================================================ */

#fx-layer.fx-lightning {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 6; /* above rain, below UI */
}

/* Main flash */
#fx-layer .lightning-flash {
    position: absolute;
    inset: 0;
    z-index: 999;
    background: radial-gradient(
        circle at 50% 25%,
        rgba(230,245,255,0.55),
        rgba(170,200,255,0.15),
        transparent
    );
    animation: lightningFlash 0.35s ease-out;
    filter: blur(4px);
}

@keyframes lightningFlash {
    0%   { opacity: 0; }
    15%  { opacity: 1; }
    40%  { opacity: 0.5; }
    100% { opacity: 0; }
}

/* Arc streak */
#fx-layer .lightning-arc {
    position: absolute;
    width: 2px;
    height: 180px;

    left: calc(50vw + (var(--offset) * 1px));
    top: 8vh;

    background: rgba(230,245,255,0.95);

    filter: blur(1px)
            drop-shadow(0 0 8px rgba(210,235,255,0.9));

    transform: rotate(-15deg);

    animation: arcFlash 0.22s ease-out;
}

@keyframes arcFlash {
    0%   { opacity: 0; transform: scaleY(0.5) rotate(-15deg); }
    30%  { opacity: 1;   }
    100% { opacity: 0; transform: scaleY(1.2) rotate(-15deg); }
}
