/* Dbotai boot loader: "Candle Reveal".
 * The brand artwork is drawn on a canvas and revealed column by column, each column rising
 * like a candlestick (green/red cap + wick) as real loading progress advances.
 * Logic: /fx-splash.js   Brand text: /fx-brand.config.js
 */
html.pqfx-lock, html.pqfx-lock body { overflow: hidden !important; }

#pqfx {
    position: fixed; inset: 0; z-index: 2147483000;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: clamp(14px, 3vh, 28px);
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    background:
        radial-gradient(ellipse 80% 55% at 50% 38%, rgba(30, 255, 102, .32), transparent 70%),
        radial-gradient(ellipse 60% 40% at 50% 100%, rgba(255, 190, 40, .10), transparent 70%),
        #020f06;
    color: #e9fff0; overflow: hidden;
    font-family: "Poppins", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1), filter .7s ease;
    -webkit-tap-highlight-color: transparent;
}
#pqfx.pqfx--out { opacity: 0; transform: scale(1.06); filter: blur(6px); pointer-events: none; }

#pqfx .tvx__bg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .9; }
#pqfx .tvx__grid {
    position: absolute; inset: 0; pointer-events: none; opacity: .5;
    background-image:
        linear-gradient(rgba(80, 255, 132, .07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(80, 255, 132, .07) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
            mask-image: radial-gradient(ellipse 70% 60% at 50% 45%, #000 20%, transparent 75%);
}
#pqfx .tvx__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- logo stage with a spinning gold/blue ring ---- */
#pqfx .tvx__stage {
    --s: min(86vw, 56vh, 580px);
    position: relative; z-index: 2; width: var(--s); height: var(--s);
    border-radius: 9%; overflow: hidden; padding: 3px;
    box-shadow: 0 0 60px rgba(40, 255, 105, .45), 0 0 140px rgba(255, 190, 40, .12), 0 30px 80px rgba(0, 0, 0, .6);
    animation: tvxFloat 5s ease-in-out infinite;
}
#pqfx .tvx__stage::before {
    content: ""; position: absolute; left: 50%; top: 50%; width: 160%; height: 160%;
    translate: -50% -50%;
    background: conic-gradient(from 0deg, #ffd34d, #26fb62 25%, rgba(38, 251, 98, 0) 45%, #ffd34d 55%, #38ff5b 80%, rgba(56, 255, 91, 0) 95%, #ffd34d);
    animation: tvxSpin 3.2s linear infinite;
}
#pqfx .tvx__stage canvas {
    position: relative; display: block; width: 100%; height: 100%;
    border-radius: calc(9% - 2px); background: #021a0a;
}
#pqfx.pqfx--done .tvx__stage { animation: tvxPop .7s cubic-bezier(.2, .8, .2, 1) both; }

/* ---- progress: a row of candle ticks that light up ---- */
#pqfx .tvx__prog { position: relative; z-index: 2; width: min(560px, 88vw); }
#pqfx .tvx__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
#pqfx .tvx__status { margin: 0; font-size: clamp(12.5px, 3.3vw, 14.5px); letter-spacing: .04em; color: #b7f7cb; min-height: 1.4em; }
#pqfx .tvx__ell i { font-style: normal; animation: tvxBlink 1.2s infinite both; }
#pqfx .tvx__ell i:nth-child(2) { animation-delay: .2s; } #pqfx .tvx__ell i:nth-child(3) { animation-delay: .4s; }
#pqfx .tvx__pct { font-weight: 700; font-size: clamp(18px, 5vw, 24px); font-variant-numeric: tabular-nums; color: #ffd34d; text-shadow: 0 0 18px rgba(255, 190, 40, .5); }
#pqfx .tvx__ticks { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
#pqfx .tvx__ticks i {
    flex: 1 1 0; min-width: 0; border-radius: 2px; background: rgba(120, 255, 162, .16);
    transition: background .25s ease, box-shadow .25s ease, transform .25s ease; transform-origin: bottom;
}
#pqfx .tvx__ticks i.on { background: linear-gradient(180deg, #ffe08a, #f5a800); box-shadow: 0 0 10px rgba(255, 190, 40, .55); }
#pqfx .tvx__ticks i.on.dn { background: linear-gradient(180deg, #ff7a86, #e0283c); box-shadow: 0 0 10px rgba(255, 61, 79, .5); }
#pqfx .tvx__ticks i.hd { transform: scaleY(1.18); background: #fff; box-shadow: 0 0 14px #fff, 0 0 26px #26fb62; }
#pqfx .tvx__meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(183, 247, 203, .55); }

#pqfx .tvx__skip {
    position: relative; z-index: 2; appearance: none; border: 1px solid rgba(255, 211, 77, .6); cursor: pointer;
    padding: 10px 22px; border-radius: 999px; font: 600 13px/1 inherit; letter-spacing: .06em; color: #1a1200;
    background: linear-gradient(180deg, #ffe08a, #f5a800); box-shadow: 0 6px 26px rgba(245, 168, 0, .35);
    opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .4s ease, transform .4s ease;
    position: absolute; bottom: max(46px, calc(env(safe-area-inset-bottom) + 40px));
}
#pqfx .tvx__skip.is-ready { opacity: 1; transform: none; pointer-events: auto; }
#pqfx .tvx__skip:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

#pqfx .tvx__foot {
    position: absolute; z-index: 2; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom));
    display: flex; justify-content: center; gap: 22px; font-size: 11px; letter-spacing: .08em; color: rgba(183, 247, 203, .5);
}
#pqfx .tvx__foot span { display: inline-flex; align-items: center; gap: 6px; }
#pqfx .tvx__foot svg { width: 11px; height: 11px; }
#pqfx .tvx__foot i { width: 6px; height: 6px; border-radius: 50%; background: #22e07a; box-shadow: 0 0 8px #22e07a; animation: tvxBlink 1.8s infinite; }

@keyframes tvxSpin { to { rotate: 360deg; } }
@keyframes tvxFloat { 50% { transform: translateY(-6px); } }
@keyframes tvxPop { 0% { transform: scale(1); } 45% { transform: scale(1.045); } 100% { transform: scale(1); } }
@keyframes tvxBlink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

@media (max-height: 520px) { #pqfx .tvx__stage { --s: min(60vw, 52vh, 300px); } #pqfx .tvx__foot { display: none; } }
@media (prefers-reduced-motion: reduce) {
    #pqfx, #pqfx .tvx__stage, #pqfx .tvx__stage::before, #pqfx .tvx__ell i, #pqfx .tvx__foot i { animation: none !important; transition-duration: .01s !important; }
}
