/* Reset and base styles */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Common lightning background - applied to body and loader */
.lightning-background {
    position: relative;
    background-color: #1E1E1E;
    overflow: hidden;
}

/* Lightning images as pseudo-elements - matches BoundedScreen desktop layout */
.lightning-background::before,
.lightning-background::after {
    content: '';
    position: absolute;
    background-image: url('assets/assets/images/lightning.png');
    background-repeat: no-repeat;
    background-size: contain;
    pointer-events: none;
    z-index: -1;
}

/* Right lightning image - normal */
.lightning-background::after {
    top: 5%;
    right: 0%;
    width: 96%;
    height: 96%;
    background-position: top right;
}

/* Left lightning image - flipped and scaled down (scale -0.5, 0.5) */
.lightning-background::before {
    top: 6.5%;
    left: -15%;
    width: 47%;
    height: 47%;
    background-position: top left;
    transform: scaleX(-1);
    opacity: 1;
}

/* Custom loader container - matches BoundedScreen background */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: opacity 0.3s ease-out;
}

#loading.loaded {
    opacity: 0;
    pointer-events: none;
}

/* Loader content - matches SplashScreen centered layout */
.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

/* Initialization text - matches SplashScreen text style */
.loader-text {
    color: #FFFFFF;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0.15px;
}

/* Spinner - matches Flutter CircularProgressIndicator */
.loader-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(161, 255, 255, 0.2);
    border-top-color: rgba(161, 255, 255, 0.63);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile adjustments - matches BoundedScreen mobile layout */
@media (max-width: 600px) {
    /* Hide left lightning on mobile */
    .lightning-background::before {
        display: none;
    }

    /* Adjust right lightning for mobile - scaled up like in BoundedScreen (scale: 10) */
    .lightning-background::after {
        width: 100%;
        height: 100%;
        background-position: center right;
        background-size: 1000%;
    }
}
