*, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    background: #000;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    -webkit-overflow-scrolling: touch;
}

#PrePreLoader {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 1000000;
    opacity: 1;
}

#PrePreLoader.fadeOut{
    animation-name: fadeOut;
    animation-duration: 0.75s;
    animation-timing-function: linear;
    animation-delay: 0.5s;
    animation-iteration-count: 1;
    animation-fill-mode:forwards;
}

#PrePreLoader #relaxLogo, #forLeafLogo, #fortuneLogo {
    background-image: url('relax_sb_logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 10%;
    height: 6.0%;
    position: absolute;
    top: 80%;
    opacity: 0;

    animation-name: fadeIn;
    animation-timing-function: linear;
    animation-duration: 1.5s, 3s;
    animation-iteration-count: 1, infinite;
    animation-fill-mode: forwards;
    animation-direction: alternate;
}

#PrePreLoader #forLeafLogo {
    background-image: url('four_leaf_logo.png');
    animation-name: fadeOut;
    animation-delay: 2.0s;
    animation-duration: 1.0s;
    width: 20%;
    height: 26.5%;
    left: 40%;
    top: 31.5%;

    opacity: 1;
}

#PrePreLoader #fortuneLogo {
    --fortune-logo-max-width: 160px;
    background-image: url('relax_logo.png');
    width: 18.5%;
    max-width: var(--fortune-logo-max-width);
    height: 13.5%;
    position: absolute;
    top: 80%;
    left: 3%;
}

#PrePreLoader #relaxLogo {
    --relax-logo-max-width: 140px;
    width: 12.5%;
    max-width: var(--relax-logo-max-width);
    height: 12.5%;
    position: absolute;
    top: 80%;
    right: 3%;
}

#PrePreLoader #gameLogoLoading {
    background-image: url('game_logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;

    animation-name: fadeIn;
    animation-delay: 3.0s;
    animation-duration: 1.0s;
    animation-fill-mode: forwards;
    opacity: 0;

    width: 40%;
    height: 46.5%;
    left: 30%;
    top: 21.5%;
    position: absolute;
}

@media (orientation: portrait) {
    #PrePreLoader #forLeafLogo {
        width: 50%;
        height: 26.5%;
        left: 25%;
        top: 27%;
    }

    #PrePreLoader #fortuneLogo {
        width: 30%;
        height: 10.0%;
        left: calc((100% - min(30%, var(--fortune-logo-max-width))) * 0.5);
        top: 62.0%;
    }

    #PrePreLoader #relaxLogo {
        width: 30%;
        height: 11.0%;
        top: 75.5%;
        left: calc((100% - min(30%, var(--relax-logo-max-width))) * 0.5);
    }

    #PrePreLoader #gameLogoLoading {
        width: 70%;
        height: 46.5%;
        left: 15%;
        top: 17%;
    }
}

@media (max-aspect-ratio: 1/2) {
    #PrePreLoader #relaxLogo, #forLeafLogo, #fortuneLogo {
        top: 70.5%;
    }
}

@keyframes fadeOut{
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

@keyframes fadeIn{
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
