/* ==========================================================================
   Boot loader (#pqfx) v6 — glass card over a night-city trading scene.
   Markup is built by /fx-splash.js. Brand text lives in /fx-brand.config.js.
   ========================================================================== */
html.pqfx-lock, html.pqfx-lock body { overflow: hidden !important; }

#pqfx {
    --blue: #2f6bff;
    --blue-2: #4f8dff;
    --cyan: #38d0ff;
    --ice: #e6f0ff;
    --muted: #9db2d6;
    --ok: #34d399;
    --sans: 'IBM Plex Sans', 'Sora', 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

    position: fixed; inset: 0; z-index: 2147483000;
    display: flex; align-items: flex-end; justify-content: center;
    padding: max(20px, env(safe-area-inset-top)) 20px calc(max(14px, env(safe-area-inset-bottom)) + 34px);
    overflow: hidden; color: var(--ice); font-family: var(--sans);
    background:
        radial-gradient(ellipse 80% 50% at 50% 28%, rgba(47, 107, 255, .35), transparent 70%),
        linear-gradient(180deg, #04112b 0%, #082455 42%, #040d26 100%);
    -webkit-font-smoothing: antialiased;
    transition: opacity .75s cubic-bezier(.4, 0, .2, 1), transform .75s cubic-bezier(.4, 0, .2, 1), filter .75s;
    animation: pqfxIn .5s ease-out both;
}
#pqfx * { box-sizing: border-box; }
#pqfx.pqfx--out { opacity: 0; transform: scale(1.05); filter: blur(8px); pointer-events: none; }

/* ---------- scene ---------- */
.pqfx__scene { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pqfx__city {
    position: absolute; inset: 0; width: 100%; height: 100%;
    filter: blur(2.4px) saturate(1.25); opacity: .5;
    animation: pqfxDrift 24s ease-in-out infinite alternate;
}
.pqfx__bokeh { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: screen; }
.pqfx__haze {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 70% 40% at 50% 100%, rgba(8, 20, 52, .95), transparent 70%),
        radial-gradient(ellipse 120% 90% at 50% 50%, transparent 45%, rgba(2, 6, 20, .75) 100%);
}
.pqfx__desk {
    position: absolute; left: 0; right: 0; bottom: 0; height: 34%;
    background:
        linear-gradient(180deg, transparent, rgba(4, 12, 34, .85) 55%),
        repeating-linear-gradient(90deg, rgba(56, 208, 255, .07) 0 1px, transparent 1px 46px);
    -webkit-mask-image: linear-gradient(180deg, transparent, #000 60%);
    mask-image: linear-gradient(180deg, transparent, #000 60%);
}
.pqfx__coin {
    position: absolute; left: var(--l); right: var(--r); bottom: var(--b);
    width: var(--s); height: var(--s); border-radius: 50%;
    background: radial-gradient(circle at 34% 28%, #ffe6b8 0, #e8ad5c 26%, #b06a22 60%, #5e3411 100%);
    box-shadow:
        inset 0 0 0 calc(var(--s) * .05) rgba(255, 220, 160, .5),
        inset 0 0 0 calc(var(--s) * .095) rgba(94, 52, 17, .55),
        0 calc(var(--s) * .07) 0 #7a4616,
        0 calc(var(--s) * .2) calc(var(--s) * .3) rgba(0, 0, 0, .65),
        0 0 calc(var(--s) * .6) rgba(255, 150, 60, .28);
    filter: blur(var(--bl, 0px));
    transform: rotateX(58deg) rotateZ(var(--rz));
    animation: pqfxCoin var(--d) ease-in-out infinite;
}
.pqfx__coin::after {
    content: attr(data-s); position: absolute; inset: 0; display: grid; place-items: center;
    font: 700 calc(var(--s) * .5)/1 var(--sans); color: rgba(122, 64, 14, .8); text-shadow: 0 1px 0 rgba(255, 226, 170, .7);
}
.pqfx__coin--a { --l: 6%; --r: auto; --b: 7%; --s: clamp(64px, 20vmin, 150px); --rz: -14deg; --d: 7s; }
.pqfx__coin--b { --l: auto; --r: 7%; --b: 17%; --s: clamp(44px, 13vmin, 100px); --rz: 18deg; --d: 8.5s; --bl: .6px; }
.pqfx__coin--c { --l: auto; --r: 24%; --b: 3%; --s: clamp(52px, 16vmin, 120px); --rz: -6deg; --d: 6.2s; }

/* ---------- lion emblem ---------- */
.pqfx__lion-halo {
    position: absolute; left: 50%; top: 4%; width: min(150vw, 125vh); aspect-ratio: 1; transform: translateX(-50%);
    background: radial-gradient(circle, rgba(47, 107, 255, .42), rgba(29, 79, 208, .14) 45%, transparent 68%);
    animation: pqfxBreath 5s ease-in-out infinite;
}
.pqfx__lion {
    --lw: min(116vw, 72vh);
    position: absolute; left: 50%; top: max(6px, env(safe-area-inset-top)); width: var(--lw); aspect-ratio: 1100 / 1238;
    transform: translateX(-50%) scale(.94); opacity: 0; will-change: transform, opacity;
    -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent 97%); mask-image: linear-gradient(180deg, #000 60%, transparent 97%);
    transition: opacity 1.1s ease-out, transform 1.4s cubic-bezier(.2, .8, .2, 1);
}
.pqfx__lion img { display: block; width: 100%; height: 100%; animation: pqfxBreathe 7s ease-in-out infinite alternate; will-change: transform; }
.pqfx__eye {
    position: absolute; top: 44%; width: 24%; aspect-ratio: 1.7; transform: translate(-50%, -50%); border-radius: 50%;
    background: radial-gradient(ellipse, rgba(255, 190, 70, .85), rgba(255, 140, 30, .3) 45%, transparent 70%);
    mix-blend-mode: screen; animation: pqfxEye 3s ease-in-out infinite alternate;
}
.pqfx__eye--l { left: 40.4%; }
.pqfx__eye--r { left: 59.6%; animation-delay: .25s; }
@keyframes pqfxBreathe { from { transform: scale(1); } to { transform: scale(1.025); } }
@keyframes pqfxEye { from { opacity: .25; } to { opacity: .95; } }
.pqfx__lion.is-in { opacity: 1; transform: translateX(-50%) scale(1); }

/* wide screens: lion on the left, card on the right so nothing covers the face */
@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
    #pqfx { align-items: center; justify-content: flex-end; padding: 20px 8vw 20px 20px; }
    .pqfx__lion { --lw: min(62vw, 92vh * .889); left: 32%; top: 50%; transform: translate(-50%, -50%) scale(.94); }
    .pqfx__lion.is-in { transform: translate(-50%, -50%) scale(1); }
    .pqfx__lion { -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent 99%); mask-image: linear-gradient(180deg, #000 80%, transparent 99%); }
    .pqfx__lion-halo { left: 32%; top: 50%; width: min(80vw, 150vh); transform: translate(-50%, -50%); }
    .pqfx__foot { justify-content: flex-start; padding-left: 8vw; }
}

/* ---------- card ---------- */
.pqfx__wrap {
    position: relative; z-index: 2; width: min(420px, 100%);
    display: flex; flex-direction: column; align-items: center; gap: 18px;
}
.pqfx__card {
    position: relative; width: 100%; padding: 30px 26px 22px; border-radius: 22px; overflow: hidden;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    background:
        linear-gradient(180deg, rgba(22, 36, 66, .58), rgba(8, 16, 36, .74)) padding-box,
        linear-gradient(150deg, rgba(120, 190, 255, .6), rgba(255, 255, 255, .08) 38%, rgba(56, 208, 255, .35)) border-box;
    border: 1px solid transparent;
    box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 60px -20px rgba(47, 107, 255, .55), inset 0 1px 0 rgba(255, 255, 255, .08);
    -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3);
    animation: pqfxRise .8s .1s cubic-bezier(.2, .8, .2, 1) both;
}
.pqfx__card::before {                     /* slow light sweep across the glass */
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .09) 50%, transparent 60%);
    transform: translateX(-120%); animation: pqfxSweep 5s 1.2s ease-in-out infinite;
}
.pqfx__card::after {                      /* light running along the top edge */
    content: ''; position: absolute; top: 0; left: -40%; width: 40%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    animation: pqfxScan 3s ease-in-out infinite;
}

/* badge with a light that travels around its rim */
.pqfx__badge { position: relative; width: 108px; height: 108px; margin-bottom: 18px; animation: pqfxFloat 5s ease-in-out infinite; }
.pqfx__badge-glow { position: absolute; inset: -30%; border-radius: 50%; background: radial-gradient(circle, rgba(47, 107, 255, .5), transparent 65%); animation: pqfxBreath 3.6s ease-in-out infinite; }
.pqfx__badge-core {
    position: absolute; inset: 8px; border-radius: 26px; display: grid; place-items: center; overflow: hidden;
    background: linear-gradient(150deg, #153a8c 0%, #0a1f58 55%, #061338 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), inset 0 -10px 22px rgba(0, 0, 0, .35), 0 14px 30px -8px rgba(0, 0, 0, .8), 0 0 0 1px rgba(110, 170, 255, .35);
}
.pqfx__badge-core b {
    font-size: 38px; font-weight: 700; letter-spacing: .02em; color: #fff;
    text-shadow: 0 2px 14px rgba(79, 141, 255, .9);
}
.pqfx__badge-core::after { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .22) 50%, transparent 62%); transform: translateX(-120%); animation: pqfxSweep 3.6s 1s ease-in-out infinite; }
.pqfx__rim { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pqfx__rim path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pqfx__rim-base { stroke: rgba(110, 170, 255, .22); stroke-width: 1.5; }
.pqfx__rim-run {
    stroke: url(#pqfxRimG); stroke-width: 2.6; stroke-dasharray: 26 74;
    filter: drop-shadow(0 0 5px rgba(56, 208, 255, .95)); animation: pqfxRim 2.8s linear infinite;
}

.pqfx__name { margin: 0; font-size: clamp(17px, 5.2vw, 24px); font-weight: 700; letter-spacing: .12em; white-space: nowrap; text-transform: uppercase; color: #fff; line-height: 1.2; text-shadow: 0 2px 16px rgba(47, 107, 255, .55); animation: pqfxRise .7s .3s cubic-bezier(.2, .8, .2, 1) both; }
.pqfx__sub { margin: 7px 0 0; font-size: 14px; letter-spacing: .04em; color: var(--muted); animation: pqfxRise .7s .38s cubic-bezier(.2, .8, .2, 1) both; }

.pqfx__dots { display: flex; gap: 10px; margin: 20px 0 16px; height: 12px; align-items: center; animation: pqfxRise .7s .46s cubic-bezier(.2, .8, .2, 1) both; }
.pqfx__dots i { width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #8fb8ff, var(--blue)); box-shadow: 0 0 12px rgba(47, 107, 255, .9); animation: pqfxDot 1.2s ease-in-out infinite; }
.pqfx__dots i:nth-child(2) { animation-delay: .16s; }
.pqfx__dots i:nth-child(3) { animation-delay: .32s; }

.pqfx__status { margin: 0; min-height: 1.4em; font-size: 15px; font-weight: 600; color: #fff; animation: pqfxRise .7s .54s cubic-bezier(.2, .8, .2, 1) both; }
.pqfx__ell i { font-style: normal; animation: pqfxEll 1.2s infinite both; }
.pqfx__ell i:nth-child(2) { animation-delay: .2s; }
.pqfx__ell i:nth-child(3) { animation-delay: .4s; }

/* progress */
.pqfx__prog { width: 100%; margin-top: 22px; animation: pqfxRise .7s .62s cubic-bezier(.2, .8, .2, 1) both; }
.pqfx__bar { position: relative; height: 7px; border-radius: 7px; background: rgba(255, 255, 255, .13); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .4); }
.pqfx__fill {
    position: absolute; inset: 0; border-radius: inherit; transform-origin: 0 50%; transform: scaleX(0); overflow: hidden;
    background: linear-gradient(90deg, #1d4ed8, var(--blue) 40%, var(--cyan) 85%, #dff4ff);
    box-shadow: 0 0 16px rgba(56, 208, 255, .6);
}
.pqfx__fill::after {
    content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
    background-size: 30% 100%; background-repeat: no-repeat; animation: pqfxGlint 1.5s ease-in-out infinite;
}
.pqfx__head { position: absolute; top: 50%; left: 0; width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(56, 208, 255, .3), 0 0 18px 4px rgba(56, 208, 255, .85); }
.pqfx__meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 11px; font-size: 12.5px; color: var(--muted); }
.pqfx__pct { font-size: 15px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 0 14px rgba(56, 208, 255, .6); }

/* skip + footer */
.pqfx__skip {
    font: 600 13px/1 var(--sans); color: #fff; cursor: pointer; padding: 11px 20px; border-radius: 999px;
    border: 1px solid rgba(56, 208, 255, .5); background: linear-gradient(135deg, rgba(47, 107, 255, .6), rgba(56, 208, 255, .25));
    box-shadow: 0 8px 24px -8px rgba(47, 107, 255, .9); opacity: 0; transform: translateY(6px); pointer-events: none;
    transition: opacity .4s, transform .4s;
}
.pqfx__skip.is-ready { opacity: 1; transform: none; pointer-events: auto; }
.pqfx__skip:hover { filter: brightness(1.15); }
.pqfx__skip:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.pqfx__foot {
    position: absolute; z-index: 2; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom));
    display: flex; justify-content: center; gap: 8px 18px; flex-wrap: wrap; padding: 0 16px;
    font-size: 11.5px; letter-spacing: .06em; color: rgba(190, 208, 238, .75);
    animation: pqfxRise .7s .9s cubic-bezier(.2, .8, .2, 1) both;
}
.pqfx__foot span { display: inline-flex; align-items: center; gap: 7px; }
.pqfx__foot i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: pqfxPing 1.8s infinite; }
.pqfx__foot svg { width: 12px; height: 12px; color: var(--cyan); }
.pqfx__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* finish */
#pqfx.pqfx--done .pqfx__card { box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 90px -10px rgba(56, 208, 255, .75), inset 0 1px 0 rgba(255, 255, 255, .1); transition: box-shadow .4s; }
#pqfx.pqfx--done .pqfx__dots i { animation: none; background: var(--ok); box-shadow: 0 0 12px rgba(52, 211, 153, .9); }
#pqfx.pqfx--done .pqfx__ell { display: none; }

@media (max-height: 640px) {
    .pqfx__badge { width: 88px; height: 88px; margin-bottom: 12px; }
    .pqfx__badge-core { border-radius: 22px; }
    .pqfx__badge-core b { font-size: 31px; }
    .pqfx__card { padding: 22px 22px 18px; }
    .pqfx__dots { margin: 14px 0 12px; }
    .pqfx__prog { margin-top: 16px; }
    .pqfx__foot { display: none; }
}

@keyframes pqfxIn { from { opacity: 0; } }
@keyframes pqfxRise { from { opacity: 0; transform: translateY(14px); } }
@keyframes pqfxFloat { 50% { transform: translateY(-4px); } }
@keyframes pqfxBreath { 50% { transform: scale(1.1); opacity: .7; } }
@keyframes pqfxSweep { 0% { transform: translateX(-120%); } 45%, 100% { transform: translateX(120%); } }
@keyframes pqfxScan { 0% { left: -40%; } 100% { left: 100%; } }
@keyframes pqfxRim { to { stroke-dashoffset: -100; } }
@keyframes pqfxDot { 0%, 100% { transform: scale(.7); opacity: .45; } 50% { transform: scale(1.12); opacity: 1; } }
@keyframes pqfxEll { 0%, 80%, 100% { opacity: 0; } 30% { opacity: 1; } }
@keyframes pqfxGlint { 0% { background-position: -40% 0; } 100% { background-position: 140% 0; } }
@keyframes pqfxPing { 70% { box-shadow: 0 0 0 7px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
@keyframes pqfxDrift { to { transform: translateX(-10px) scale(1.02); } }
@keyframes pqfxCoin {
    0%, 100% { transform: translateY(0) rotateX(58deg) rotateZ(var(--rz)); }
    50% { transform: translateY(-12px) rotateX(52deg) rotateZ(calc(var(--rz) + 6deg)); }
}

@media (prefers-reduced-motion: reduce) {
    #pqfx, #pqfx *, #pqfx *::before, #pqfx *::after { animation: none !important; transition-duration: .01s !important; }
    .pqfx__fill::after { display: none; }
    .pqfx__eye { opacity: .6; }
}
