#splash {
    position: fixed;
    inset: 0;
    overflow: hidden;
    background: var(--auth-frame-edge-fill);
    z-index: 100000;
    transition: opacity 0.7s ease;
}

html.auth-acces-qcm #splash { display: none; }

#splash::before {
    content: "";
    position: absolute;
    inset: -48px;
    z-index: 0;
    background: var(--auth-frame-edge-fill);
}

#splash.splash-fin {
    opacity: 0;
    pointer-events: none;
}

#opened,
#closed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

#opened {
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 1.5s ease, transform 2s ease;
    z-index: 1;
}

#opened.show {
    opacity: 1;
    transform: scale(1);
}

#closed {
    z-index: 3;
    transition: transform 2s cubic-bezier(.7, 0, .2, 1), opacity 2s ease;
}

#closed.slide-up {
    transform: translateY(-110%);
    opacity: 0;
}

#matrix {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
    pointer-events: none;
    opacity: 0.35;
    transition: opacity 1.5s ease;
}

#matrix.hide {
    opacity: 0;
}

#blue-scan {
    position: absolute;
    top: -30%;
    left: -100%;
    width: 60%;
    height: 160%;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(90deg,
        transparent,
        rgba(0, 140, 255, 0.08),
        rgba(0, 160, 255, 0.65),
        rgba(0, 140, 255, 0.08),
        transparent);
    filter: blur(12px);
    transform: skewX(-20deg);
}

#blue-scan.animate {
    opacity: 1;
    animation: splash-scan 2s ease-in-out forwards;
}

@keyframes splash-scan {
    0% { left: -100%; }
    100% { left: 150%; }
}

#loading {
    position: absolute;
    z-index: 10;
    bottom: 6%;
    left: 15%;
    width: 70%;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 12px;
    letter-spacing: 2px;
    text-shadow: 0 0 8px #00aaff;
    opacity: 1;
    transition: opacity 1s ease;
}

#loading.hide {
    opacity: 0;
}

.loading-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 9px;
}

.loading-track {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(0, 160, 255, 0.6);
    overflow: hidden;
}

#loading-progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #004cff, #00cfff, #ffffff);
    box-shadow: 0 0 12px #00aaff;
    transition: width 0.1s linear;
}

@media (max-width: 768px) {
    #loading {
        left: 8%;
        width: 84%;
        bottom: 5%;
        font-size: 10px;
        letter-spacing: 1px;
    }
}
