:root {
    --translateX-start: translateX(-100%);
    --translateX-end: translateX(100%);
}
#loading {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: #15191f;
    opacity: 1;
    transition: opacity 1s;
    padding-inline: 20%;
}
#loading > span {
    display: none;
    width: 100%;
    color: #fff;
    overflow: hidden;
    min-height: 50px;
    text-align: center;
}
#loading.stop {
    opacity: 0;
}
.i-block.loading-block > span::before,
#loading > span::before {
    content: "";
    display: block;
    background: #fff;
    position: relative;
    height: 2px;
    width: 100%;
    margin: 0 auto 10px;
    animation: loadbar 1.7s ease-in-out infinite;
    will-change: transform;
}
#loading.stop > span::before {
    animation-iteration-count: 0;
}
@keyframes loadbar {
    0% {
        transform: var(--translateX-start);
    }
    50% {
        transform: translateX(0);
    }
    100% {
        transform: var(--translateX-end);
    }
}

/* Desktop */
@media (min-width: 1024px) {
    #loading {
        align-items: flex-start;
        padding-inline: 0;
    }
    #loading > span {
        line-height: 100vh;
    }
    .i-block.loading-block > span::before,
    #loading > span::before {
        background: #ec2525;
        height: 3px;
    }
}
