:root {
    --svg-ball-scale: 120%;
    --svg-star-scale: 90%;
    --svg-ball-animation-scale: 13;
    --svg-star-animation-scale: 90%;
}

#loadingScreen {
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    z-index: 100;
    width: 100%;
    height: 100%;
    color: white;
    font-family: cursive;
    font-size: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url(../geometry/start.jpg);
    background-blend-mode: multiply;
    background-color: hsl(0, 0%, 50%);
}

#title {
    text-shadow: 0 0 30px black;
}

.svgContainer {
    margin: auto;
    width: 100%;
    height: 250px;
}

.svgContainer > svg {
    position: absolute;
    top: 50%;
    left: 50%;
}

/* Ball */
svg:first-child {
    --_hue: 0;
    translate: -50% -50%;
    transform: scale(var(--svg-ball-scale)) rotate(0deg);
    filter: drop-shadow(-5px 5px 10px rgba(0, 0, 0, 0.5));
    animation: ballAnimation 2.2s;
    animation-iteration-count: 1;
    animation-timing-function: ease-out;
    z-index: 1000;
}

/* Star */
svg:last-child {
    --_hue: 45;
    translate: 0% -30%;
    rotate: 90deg;
    transform: scale(var(--svg-star-scale));
    filter: drop-shadow(-5px 10px 10px rgba(0, 0, 0, 0.5));
    animation: starAnimation 2.8s;
    animation-timing-function: ease-out;
    animation-iteration-count: 1;
    z-index: 1001;
}

#loadingText {
    padding: 20px 50px;
    border-radius: 5px;
    font-size: 25px;
    width: 200px;
    grid-column: 1fr;
    margin: auto;
    text-align: center;
    font-size: 0.7em;
    translate: 0 -50%;
}

#loadingText::after {
    content: "...";
    color: white;
    /* animation: loading 2s linear infinite alternate; */
}

#play {
    font-size: 40px;
    color: white;
    font-family: cursive;
    background-color: transparent;
    padding: 15px 75px;
    margin: auto;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    display: none;
    text-shadow: 0 0 5px black;
    translate: 0 -50%;
    border: 5px solid hsla(0, 0%, 25%, 0);
    border-radius: 50px;
    transition: border 250ms;
    animation: scale 500ms ease-in-out;
}

#play:hover {
    border: 5px solid hsla(0, 0%, 40%, 0.75);
}

@keyframes ballAnimation {
    from {
        transform: scale(var(--svg-ball-animation-scale)) rotate(0deg);
        translate: -50% -50%;
        z-index: 1000;
    }
}

@keyframes starAnimation {
    0%, 60% {
        transform: scale(var(--svg-star-animation-scale)) rotate(360deg);
        translate: 50vw;
    }
}

@keyframes scale {
    from {
        scale: 0.5;
    }
    to {
        scale: 1;
    }
}

@keyframes rotate {
    from {
        transform: rotate(5deg);
    }
    to {
        transform: rotate(-5deg);
    }
}

@keyframes loading {
    0% {
        content: "";
    }
    20% {
        content: ".";
    }
    40% {
        content: "..";
    }
    60% {
        content: "...";
    }
    80% {
        content: "....";
    }
    100% {
        content: ".....";
    }
}

@media (width < 500px) {
    :root {
        --svg-ball-scale: 90%;
        --svg-star-scale: 65%;
        --svg-ball-animation-scale: 1000%;
        --svg-star-animation-scale: 65%;
    }

    #loadingScreen > * {
        font-family: Arial, Helvetica, sans-serif;
    }

    #loadingScreen {
        padding: 150px 0;
    }

    #title {
        font-size: 1em;
        margin-top: 40%;
    }

    svg:last-child {
        translate: -10% -35%;
    }

    #loadingText {
        font-size: 0.6em;
    }

    #loadingText::after {
        content: "";
    }

    #play {
        font-size: 0.6em;
    }

}
