#preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#preloader-canvas {
    display: block;
    width: 600px;
    height: 600px;
    max-width: 100vw;
    max-height: 100vw;
}

.loader-ui {
    margin-top: -30px;
    text-align: center;
    font-family: 'Inter', sans-serif;
}
.estado {
    color: #77708f;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 4px;
    text-transform: uppercase;
    opacity: 0;
    animation: mostrarEstado 0.6s ease 0.5s forwards;
    margin-bottom: 15px;
}
.barra {
    width: 180px;
    height: 4px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 999px;
    background: #e8e5f0;
}
.barra-progreso {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #5559e8, #a000a8);
    animation: cargarProgreso 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes mostrarEstado { to { opacity: 1; } }
@keyframes cargarProgreso {
    0% { width: 0%; }
    40% { width: 50%; }
    80% { width: 85%; }
    100% { width: 100%; }
}