#spinnerContainer {
    position: absolute;
    left: 50%;
    top: 78%;
    width: 100%;
    max-width: 10%;
    height: 100%;
    max-height: 10%;
    background: rgba(0, 0, 0, 0);
    background-image: none;
}

.lds-ellipsis {
    display: block;
    position: absolute;
    z-index: 19;
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%) translateY(-50%);
    transform: translateX(-50%) translateY(-50%);
    width: 120px;
    height: 80px;
    background: rgba(0, 0, 0, 0);
}

#fantasma-preloader-container {
    background: radial-gradient(ellipse at top, rgb(13, 22, 65), #13151d),
    radial-gradient(ellipse at center, #0053c056, #1409b6a8);
    width: 100%;
    height: 100%;
    position: fixed;
}

#fade-in {
    -webkit-animation: fade-in 2s ease-out forwards;
    animation: fade-in 2s ease-out forwards;
}

#preloader-bg {
    width: 100%;
    height: 100%;
    top: -12px;
    position: absolute;
    z-index: 1;

    /*background-image: url("background.png");*/
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    /*-webkit-animation: fade-in 2s ease-out forwards;*/
    /*animation: fade-in 2s ease-out forwards;*/
}
#preloader-backdrop {
    width: 100%;
    height: 100%;
    position: absolute;

    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;

    z-index: 0;
}
#preloader {
    width: 100%;
    height: 100%;
    position: absolute;
    /*background-image: url("background.png");*/
    /*background-repeat: no-repeat;*/
    /*background-position: center;*/
    /*background-size: contain;*/
    /*-webkit-animation: fade-in 2s ease-out forwards;*/
    /*animation: fade-in 2s ease-out forwards;*/
}

#loadingText {
    max-width: 50%;
    z-index: 4; /* sits on top of the whole bar */
}

#corpLogo {
    position: absolute;
    transform: translateX(-50%);
    left: 50%;
    bottom: 2%;
    max-height: 20%;
    max-width: 30%;
}

#loadingText, #barBg, #progress {
    position: absolute;
    left: 50%;
    top: 65%;
    max-height: 8%;
    -webkit-transform: translateX(-50%) translateY(-50%);
    -ms-transform: translateX(-50%) translateY(-50%);
    transform: translateX(-50%) translateY(-50%);
}

#barBg, #progress {
    display: grid;
    -webkit-animation: fade-in 1s ease-out;
    animation: fade-in 1s ease-out;

}
/* ===================== LOADING BAR LENGTH ===================== */
/* Change this ONE number to make the whole loading bar longer or shorter.
   It is a % of the screen width (the original length was 79%).
   The frame and the fill both follow it automatically. */
:root {
    --bar-length: 66%;

    /* Frame thickness: shrinks on small screens (phones) so the frame
       doesn't look chunky, and stays at 9px on normal/big screens.
       clamp(SMALLEST, GROWS WITH SCREEN WIDTH, BIGGEST) */
    --frame-thickness: clamp(5px, 0.55vw, 9px);

    /* How tall (thick) the bar is. The fill follows it automatically. */
    --bar-height: 2.5em;
}

/* PHONES (screens narrower than 768px): longer and a bit thinner bar */
@media (max-width: 768px) {
    :root {
        --bar-length: 79%;
        --bar-height: 2em;
    }
}

/* ===================== LOADING BAR FRAME ===================== */
/* Gold frame with a dark wine-red inside, built in 3 layers
   (like the 3 Strokes in Photoshop):
   - #barBg itself    = Stroke 3 (9px, thin outer rim), at the very back
   - #barBg::before   = Stroke 2 (8px, busy gold), in the middle
   - #barBg::after    = Stroke 1 (3px) + the wine-red inside, on top */
#barBg {
    z-index: 2; /* frame sits above the background picture (which is 1) */
    height: var(--bar-height); /* thickness: set at the top of this section */
    width: var(--bar-length) !important; /* length: set at the top of this section */
    border-radius: 2.8em;

    border: var(--frame-thickness) solid transparent; /* total frame thickness (set at the top of this section) */

    /* STROKE 3: yellow at the top to dark orange at the bottom */
    background: linear-gradient(to top,
        #a0400e 27%,
        #fff56b 73%
    ) border-box;

    /* DROP SHADOW under the whole bar:
       0 = left/right shift, 4px = down shift, 8px = softness,
       last number (0.55) = opacity */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.55);
}

/* STROKE 2: the main gold band - dark gold at the start (left),
   getting brighter, with diagonal light shines like polished gold */
#barBg::before {
    content: "";
    position: absolute;
    /* 8/9 of the frame thickness (8px on big screens) */
    top: calc(var(--frame-thickness) * -8 / 9);
    right: calc(var(--frame-thickness) * -8 / 9);
    bottom: calc(var(--frame-thickness) * -8 / 9);
    left: calc(var(--frame-thickness) * -8 / 9);
    border-radius: 999px;
    background:
        /* SHINE 1: wide diagonal light streak, left of the middle */
        linear-gradient(156deg,
            transparent 29%,
            rgba(255, 236, 140, 0.55) 33.5%,
            #fff9d2 36%,
            #fff9d2 38%,
            rgba(255, 236, 140, 0.55) 40.5%,
            transparent 45%
        ),
        /* SHINE 2: diagonal light streak, near the right end */
        linear-gradient(156deg,
            transparent 67%,
            rgba(255, 236, 140, 0.55) 70%,
            #fffbe0 72%,
            rgba(255, 236, 140, 0.55) 74%,
            transparent 77%
        ),
        /* BASE GOLD: darker gold at both ends, brighter in the middle */
        linear-gradient(to right,
            #b96500 0%,
            #e08e00 22%,
            #f5a800 50%,
            #e08e00 78%,
            #b96500 100%
        );
}

/* STROKE 1 + INSIDE */
#barBg::after {
    content: "";
    position: absolute;
    /* 1/3 of the frame thickness (3px on big screens) */
    top: calc(var(--frame-thickness) / -3);
    right: calc(var(--frame-thickness) / -3);
    bottom: calc(var(--frame-thickness) / -3);
    left: calc(var(--frame-thickness) / -3);
    border-radius: 999px;
    border: calc(var(--frame-thickness) / 3) solid transparent; /* Stroke 1 thickness */

    background:
        /* INSIDE: wine red, darker at both ends, brighter in the middle */
        linear-gradient(to right,
            #5a0a22 0%,
            #950f4c 50%,
            #5a0a22 100%
        ) padding-box,

        /* STROKE 1: dark orange at the top to yellow at the bottom */
        linear-gradient(to bottom,
            #a0400e 27%,
            #fff56b 73%
        ) border-box;

    /* the two dark purple Inner Shadows (Multiply) from Photoshop */
    box-shadow:
        inset 0 0 24px rgba(25, 1, 20, 0.69),       /* big soft one: size 24 */
        inset 0 0 7px 3px rgba(25, 1, 20, 0.76);    /* tighter one: size 10, choke 25% */
}

/* ===================== LOADING BAR FILL ===================== */
#progress {
    z-index: 3; /* fill sits above the frame */
    left: calc(50% - var(--bar-length) / 2 - 1px); /* position: starts at the frame's inside left edge (follows the bar length) */
    border-radius: 2.7em; /* shape: rounds the corners into a pill */
    -webkit-transform: translate(0px, calc(-50% - 0.5px));
    -ms-transform: translate(0px, calc(-50% - 0.5px));
    transform: translate(0px, calc(-50% - 0.5px)); /* position: centers the bar, and moves it slightly up so it stretches 2px up and 1px down */
    height: calc(var(--bar-height) - 3px); /* size: stretched 2px upward and 1px downward */
    padding: 0 1px; /* size: stretches the fill 1px wider on the left and on the right */
    max-height: calc(8% - 3px); /* short screens (phones sideways): keeps the fill the same height as the frame's inside, so it never spills over the frame */
    width: 110%; /* size (the game changes this while loading) */
    max-width: calc(var(--bar-length) - 4px); /* never grows past the frame's inside right edge */

    border: 2px solid transparent; /* inside Stroke thickness */

    background:
        /* GLOW 1: yellow band down the middle (Screen) */
        linear-gradient(87deg, #000000 35.5%, #ffe600 50%, #000000 64.5%) padding-box,
        /* GLOW 2: orange band down the middle (Screen) */
        linear-gradient(87deg, #000000 35.5%, #ff8a00 50%, #000000 64.5%) padding-box,
        /* BASE: orange at the bottom to yellow at the top */
        linear-gradient(to top, #ff8f0e -25%, #ffd733 125%) padding-box,
        /* STROKE: dark orange at the bottom, orange, light yellow at the top */
        linear-gradient(to top, #a13e0b 0%, #f29a00 46%, #fde776 100%) border-box;

    /* blend modes, in the same order as the layers above */
    background-blend-mode: screen, screen, normal, normal;
}

.lds-ellipsis div {
    position: absolute;
    width: 88px;
    height: 50px;
    background-image: url("tick.png");
    background-repeat: no-repeat;
    background-position: center;
    -webkit-animation-timing-function: cubic-bezier(0, 1, 1, 0);
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.lds-ellipsis div:nth-child(1) {
    left: -60px;
    -webkit-animation: lds-ellipsis1 0.6s infinite;
    animation: lds-ellipsis1 0.6s infinite;
}

.lds-ellipsis div:nth-child(2) {
    left: -60px;
    -webkit-animation: lds-ellipsis2 0.6s infinite;
    animation: lds-ellipsis2 0.6s infinite;
}

.lds-ellipsis div:nth-child(3) {
    left: 10px;
    -webkit-animation: lds-ellipsis2 0.6s infinite;
    animation: lds-ellipsis2 0.6s infinite;
}

.lds-ellipsis div:nth-child(4) {
    left: 80px;
    -webkit-animation: lds-ellipsis3 0.6s infinite;
    animation: lds-ellipsis3 0.6s infinite;
}

@-webkit-keyframes fade-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@-webkit-keyframes enter-in-small {
    0% {
        -webkit-transform: translate(-50%, -20%);
        transform: translate(-50%, -20%);
        opacity: 0;
    }
    100% {
        -webkit-transform: translate(-50%, 0);
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@keyframes enter-in-small {
    0% {
        -webkit-transform: translate(-50%, -20%);
        transform: translate(-50%, -20%);
        opacity: 0;
    }
    100% {
        -webkit-transform: translate(-50%, 0);
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@-webkit-keyframes enter-in {
    0% {
        -webkit-transform: translate(-50%, 0);
        transform: translate(-50%, 0);
        opacity: 0;
    }
    100% {
        -webkit-transform: translate(-50%, -50%);
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

@keyframes enter-in {
    0% {
        -webkit-transform: translate(-50%, 0);
        transform: translate(-50%, 0);
        opacity: 0;
    }
    100% {
        -webkit-transform: translate(-50%, -50%);
        transform: translate(-50%, -50%);
        opacity: 1;
    }
}

@-webkit-keyframes lds-ellipsis1 {
    0% {
        /*transform: translate(-55px, 0);*/
        -webkit-transform: translate(-120px, 0);
        transform: translate(-120px, 0);
        opacity: 0;
    }
    100% {
        -webkit-transform: translate(0, 0);
        transform: translate(0, 0);
        opacity: 1;
    }
}

@keyframes lds-ellipsis1 {
    0% {
        /*transform: translate(-55px, 0);*/
        -webkit-transform: translate(-120px, 0);
        transform: translate(-120px, 0);
        opacity: 0;
    }
    100% {
        -webkit-transform: translate(0, 0);
        transform: translate(0, 0);
        opacity: 1;
    }
}

@-webkit-keyframes lds-ellipsis2 {
    0% {
        -webkit-transform: translate(0, 0);
        transform: translate(0, 0);
    }
    100% {
        -webkit-transform: translate(70px, 0);
        transform: translate(70px, 0);
    }
}

@keyframes lds-ellipsis2 {
    0% {
        -webkit-transform: translate(0, 0);
        transform: translate(0, 0);
    }
    100% {
        -webkit-transform: translate(70px, 0);
        transform: translate(70px, 0);
    }
}

@-webkit-keyframes lds-ellipsis3 {
    0% {
        -webkit-transform: translate(0, 0);
        transform: translate(0, 0);
        opacity: 1;
    }
    100% {
        -webkit-transform: translate(120px, 0);
        transform: translate(120px, 0);
        opacity: 0;
    }
}

@keyframes lds-ellipsis3 {
    0% {
        -webkit-transform: translate(0, 0);
        transform: translate(0, 0);
        opacity: 1;
    }
    100% {
        -webkit-transform: translate(120px, 0);
        transform: translate(120px, 0);
        opacity: 0;
    }
}
