/* ============================================================
   BRODI – Loader Overlay (Lightweight)
   public/css/loader.css

   Pure CSS animation. Ciri khas BRODI:
     – Tiga ring orbit dengan kecepatan berbeda
     – Gold accent dot berputar di ring terluar
     – Palet biru gelap + glow biru
   ============================================================ */

/* ── Overlay ─────────────────────────────────────────────── */
#brodi-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    min-width: 100vw;
    min-height: 100vh;
    z-index: 99999;
    /* Selalu solid dark — tidak bergantung pada backdrop-filter */
    background: #04081c;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    transition: opacity 0.45s ease;
    touch-action: none;
    overscroll-behavior: contain;
}

#brodi-loader.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* ── Ring container ──────────────────────────────────────── */
.bl-rings {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

/* ── Base ring ───────────────────────────────────────────── */
.bl-ring {
    position: absolute;
    border-radius: 50%;
}

/* Outer ring: dashed, slow CW, carries gold dot */
.bl-ring-outer {
    inset: 0;
    border: 2px dashed rgba(100, 160, 255, 0.75);
    animation: bl-spin 4s linear infinite;
    box-shadow: 0 0 18px rgba(74, 130, 255, 0.25);
}

/* Mid ring: solid top arc, counter-CW */
.bl-ring-mid {
    inset: 14px;
    border: 2px solid transparent;
    border-top-color: rgba(80, 140, 255, 0.95);
    border-left-color: rgba(80, 140, 255, 0.55);
    animation: bl-spin-rev 2.2s linear infinite;
    box-shadow: inset 0 0 10px rgba(50, 100, 220, 0.15);
}

/* Inner ring: solid, fast CW, accent arc */
.bl-ring-inner {
    inset: 28px;
    border: 2.5px solid transparent;
    border-top-color: rgba(160, 210, 255, 1);
    border-right-color: rgba(160, 210, 255, 0.6);
    border-bottom-color: rgba(160, 210, 255, 0.2);
    animation: bl-spin 1.4s linear infinite;
}

/* Gold dot – positioned on outer ring's top-center */
.bl-gold-dot {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f5c842;
    box-shadow:
        0 0 10px rgba(245, 200, 50, 1),
        0 0 24px rgba(245, 200, 50, 0.6);
}

/* Center pulse glow */
.bl-center {
    position: absolute;
    inset: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(80, 140, 255, 0.7) 0%, rgba(40, 80, 200, 0.25) 70%);
    animation: bl-pulse 2s ease-in-out infinite;
}

/* ── Label & App Info ────────────────────────────────────── */
.bl-text-wrapper {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.bl-label {
    font-family: 'Barlow Condensed', 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.5em;
    color: rgba(180, 215, 255, 0.8);
    text-transform: uppercase;
    margin: 0;
    animation: bl-breathe 2.5s ease-in-out infinite;
}

.bl-app-opening {
    font-family: 'Barlow', 'Outfit', sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.3em;
    color: rgba(180, 215, 255, 0.7);
    margin: 4px 0 0 0;
    text-transform: uppercase;
}

.bl-app-name {
    font-family: 'Barlow Condensed', 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #f5c842;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin: 2px 0 0 0;
    text-shadow:
        0 0 20px rgba(245, 200, 50, 0.5),
        0 0 40px rgba(245, 200, 50, 0.2);
    animation: bl-pulse 2s ease-in-out infinite;
}

/* ── Progress bar ────────────────────────────────────────── */
#loader-bar {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: opacity 0.5s ease;
}

#loader-bar.hide {
    opacity: 0;
    pointer-events: none;
}

.loader-track {
    width: 180px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    overflow: hidden;
}

.loader-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #1a3a9a 0%, #4a82ff 65%, #f5c842 100%);
    box-shadow: 0 0 10px rgba(74, 130, 255, 0.8);
    transition: width 0.15s linear;
    border-radius: 99px;
}

/* ── Keyframes ───────────────────────────────────────────── */
@keyframes bl-spin {
    to { transform: rotate(360deg); }
}

@keyframes bl-spin-rev {
    to { transform: rotate(-360deg); }
}

@keyframes bl-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

@keyframes bl-breathe {
    0%, 100% { opacity: 0.6; }
    50%       { opacity: 1; }
}