/* Splash — real brand mark, no frames, no SVG V */
.loading, .error {
    text-align: center;
    padding: 40px 20px;
    font-size: 18px;
}
.loading { color: var(--primary); }
.error { color: var(--error); }

.app-loader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #02060c;
    color: #f2f7fb;
    user-select: none;
    -webkit-user-select: none;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.app-loader.is-leaving {
    opacity: 0;
    pointer-events: none;
}

.app-loader-ambient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 46% at 50% 42%, rgba(46, 230, 214, 0.14), transparent 62%),
        #02060c;
    pointer-events: none;
}

.app-loader-lockup {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 280px);
    padding: 24px;
}

.app-loader-mark {
    position: relative;
    width: 168px;
    height: 168px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-loader-emblem {
    position: relative;
    width: 148px;
    height: 148px;
    border-radius: 50%;
    overflow: hidden;
    background: #02060c;
    box-shadow:
        0 0 0 1px rgba(46, 230, 214, 0.22),
        0 18px 48px rgba(0, 0, 0, 0.45),
        0 0 52px rgba(46, 230, 214, 0.16);
}

.app-loader-emblem img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.62);
    display: block;
}

.app-loader-ring {
    position: absolute;
    inset: 0;
    width: 168px;
    height: 168px;
    pointer-events: none;
    transform: rotate(-90deg);
}

.app-loader-ring circle {
    fill: none;
    stroke: #2EE6D6;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-dasharray: 502;
    stroke-dashoffset: 502;
    filter: drop-shadow(0 0 6px rgba(46, 230, 214, 0.55));
    animation: appLoaderRing 1.15s cubic-bezier(0.4, 0, 0.2, 1) 0.25s forwards;
}

.app-loader-type {
    margin-top: 22px;
    text-align: center;
}

.app-loader-type strong {
    display: block;
    font-family: "Unbounded", sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.34em;
    padding-left: 0.34em;
    line-height: 1;
    color: #f4f8fb;
}

.app-loader-type span {
    display: block;
    margin-top: 10px;
    font-family: "Unbounded", sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.22em;
    padding-left: 0.22em;
    text-transform: uppercase;
    color: rgba(122, 240, 230, 0.82);
}

.app-loader-meter {
    width: 92px;
    height: 2px;
    margin-top: 26px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.app-loader-meter span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2EE6D6, #7af0e6);
    box-shadow: 0 0 12px rgba(46, 230, 214, 0.7);
    animation: appLoaderFill 1.35s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

@keyframes appLoaderRing {
    to { stroke-dashoffset: 0; }
}

@keyframes appLoaderFill {
    to { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    .app-loader *,
    .app-loader *::before {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .app-loader-ring circle { stroke-dashoffset: 0; }
    .app-loader-meter span { width: 100%; }
}

.newyear-loader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #02060c;
}
