/* Page background */

/* Loading wrapper (single div) */
#index-loading {
    position: fixed;
    z-index: 99;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: black;
    overflow: hidden;
}

/* Logo bounce animation */
#index-loading::before {
    content: '';
    width: 300px;
    height: 300px;
    background: url(/images/logo/loading.png) no-repeat center;
    background-size: 100% 100%;
    animation: imageBounce 1.4s ease infinite;
}

/* 777 variant */
#index-loading.seven::before {
    background-image: url(/images/logo/loading-777.png);
}

/* Loading bar container */
#index-loading::after {
    content: '';
    width: 260px;
    height: 10px;
    margin-top: 15px;
    border-radius: 0.5rem;
    background: linear-gradient(90deg, #151c26 0%, #151c26 0%, #156af3 0%, #156af3 10%, #151c26 10%, #151c26 100%);
    background-size: 200% 100%;
    animation: lineSliding 1.4s ease infinite;
}

/* Light mode */
.light body {
    background-color: #f4f6f7;
}

.light #index-loading {
    background-color: white;
}

.light #index-loading::before {
    background-image: url(/images/logo/loading-light.png);
}

.light #index-loading::after {
    background: linear-gradient(90deg, #dedede 0%, #dedede 0%, #77abff 0%, #77abff 10%, #dedede 10%, #dedede 100%);
    background-size: 200% 100%;
}

/* Mobile size */
@media screen and (max-width: 768px) {
    #index-loading::before {
        width: 200px;
        height: 200px;
    }
    #index-loading::after {
        width: 160px;
        height: 8px;
    }
}

/* Bounce animation */
@keyframes imageBounce {
    0% {
        transform: scale(1);
        filter: blur(0);
    }
    50% {
        transform: scale(0.9);
        filter: blur(1.4);
    }
    100% {
        transform: scale(1);
    }
}

/* Sliding bar animation */
@keyframes lineSliding {
    0% {
        background-position: 0 0;
    }
    50% {
        background-position: -100% 0;
    }
    100% {
        background-position: 0 0;
    }
}

/* No-JavaScript Overlay */
.noscript-overlay {
    position: fixed;
    z-index: 999999999;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    color: white;
    background: #111922;
}
