/* --- BOOT SCREEN STRINGS --- */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    transition: opacity 0.5s ease-out;
}

.boot-line {
    margin: 2px 0;
    line-height: 1.2;
    text-shadow: 0 0 2px rgba(255, 255, 255, 0.8);
}

.boot-cursor {
    display: inline-block;
    width: 8px;
    height: 14px;
    background-color: #fff;
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* --- GLITCH WINDOW ANIMATION --- */
@keyframes windowGlitchIn {
    0% {
        opacity: 0;
        transform: scale(0.95) skewX(2deg);
        filter: blur(4px);
    }

    10% {
        opacity: 0.5;
        transform: scale(1.02) skewX(-2deg);
        filter: blur(2px) invert(1);
    }

    20% {
        opacity: 0.2;
        transform: scale(0.98) skewX(1deg);
        filter: blur(0px) invert(0);
    }

    30% {
        opacity: 0.8;
        transform: scale(1.01) skewX(0deg);
    }

    40% {
        opacity: 0.5;
        transform: scale(1) translateY(2px);
        filter: hue-rotate(90deg);
    }

    50% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: hue-rotate(0deg);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.window.glitch-in {
    animation: windowGlitchIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* --- CANVAS FADE IN (ILLUMINATION) --- */
#gl {
    transition: filter 2s ease-in-out, opacity 2s ease-in-out;
}

body.booting #gl {
    filter: brightness(0) contrast(0);
    opacity: 0;
}

body.booting #top-bar,
body.booting #ui-layer {
    opacity: 0;
    pointer-events: none;
}

#top-bar,
#ui-layer {
    transition: opacity 0.5s ease-in;
}