.app-loader {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease, visibility 180ms ease;
}

.app-loader[hidden] {
    display: none;
}

.app-loader.is-visible {
    opacity: 1;
    visibility: visible;
}

.app-loader__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(240, 244, 246, 0.88);
    backdrop-filter: blur(6px);
}

.app-loader__content {
    position: relative;
    display: grid;
    width: min(300px, 100%);
    justify-items: center;
    gap: 9px;
    padding: 24px;
    border: 1px solid rgba(16, 62, 111, 0.16);
    border-radius: 8px;
    background: #ffffff;
    color: #103e6f;
    box-shadow: 0 18px 48px rgba(16, 62, 111, 0.18);
    text-align: center;
}

.app-loader__mark {
    position: relative;
    width: 68px;
    height: 68px;
    margin-bottom: 3px;
}

.app-loader__ring {
    position: absolute;
    inset: 0;
    border: 4px solid rgba(16, 62, 111, 0.12);
    border-top-color: #103e6f;
    border-right-color: #64cdd1;
    border-radius: 50%;
    animation: app-loader-spin 1s linear infinite;
}

.app-loader__ring--inner {
    inset: 12px;
    border-width: 3px;
    border-top-color: #64cdd1;
    border-right-color: #103e6f;
    animation-direction: reverse;
    animation-duration: 0.75s;
}

.app-loader__dot {
    position: absolute;
    inset: 28px;
    border-radius: 50%;
    background: #103e6f;
    animation: app-loader-core 1.2s ease-in-out infinite;
}

.app-loader__title {
    font-size: 0.98rem;
    letter-spacing: 0;
}

.app-loader__text {
    color: rgba(16, 62, 111, 0.68);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.5;
}

.app-loader__pulse {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 8px;
    margin-top: 3px;
}

.app-loader__pulse i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #64cdd1;
    animation: app-loader-pulse 0.9s ease-in-out infinite;
}

.app-loader__pulse i:nth-child(2) {
    animation-delay: 0.15s;
}

.app-loader__pulse i:nth-child(3) {
    animation-delay: 0.3s;
}

body.is-app-loading {
    overflow: hidden;
    cursor: wait;
}

@keyframes app-loader-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes app-loader-core {
    50% {
        transform: scale(0.55);
        opacity: 0.55;
    }
}

@keyframes app-loader-pulse {
    0%,
    100% {
        transform: translateY(0);
        opacity: 0.45;
    }

    50% {
        transform: translateY(-4px);
        opacity: 1;
    }
}

@media (max-width: 640px) {
    .app-loader {
        padding: 16px;
    }

    .app-loader__content {
        width: min(280px, 100%);
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-loader,
    .app-loader__ring,
    .app-loader__dot,
    .app-loader__pulse i {
        animation: none;
        transition: none;
    }
}
