/* ══════════════════════════════════
   PRELOADER — Cubo 3D + barra de progresso
   Animação: loading → exploding → done
══════════════════════════════════ */

#loader-container {
    position: fixed;
    inset: 0;
    background: #000000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Canvas Three.js */
#canvas-wrapper {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
#canvas-wrapper canvas { display: block; }

/* UI sobreposta ao canvas */
#loader-ui {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 10;
}

/* Barra de progresso */
.progress-wrapper {
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    width: min(280px, 60vw);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0;
}

.progress-numbers {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 10px;
    letter-spacing: 0.15em;
    color: rgba(255,255,255,0.25);
    font-family: var(--font-mono);
}

.progress-track {
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.12);
    position: relative;
    overflow: hidden;
}

.progress-fill {
    position: absolute;
    left: 0; top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #090979, #00D4FF);
    box-shadow: 0 0 8px rgba(0,212,255,0.5);
    transition: width 0.1s linear;
}

/* Cortina de fade para revelar o conteúdo */
#loader-curtain {
    position: absolute;
    inset: 0;
    background: #000000;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
}

/* Conteúdo principal oculto até o loader terminar */
#main-content {
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
}
