html:not(.page-ready) body {
    visibility: hidden;
}

html:not(.page-ready)::before {
    content: var(--loading-message, 'Przygotowujemy Twój grafik');
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #212529;
    background-image: url('Logo.png'), radial-gradient(circle at 50% 42%, rgba(124, 77, 255, 0.2), transparent 18rem);
    background-position: center calc(50% - 4.9rem), center;
    background-repeat: no-repeat;
    background-size: 6rem, auto;
    color: #f8f9fa;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--bs-body-font-family, system-ui, -apple-system, "Segoe UI", sans-serif);
    letter-spacing: 0;
    line-height: 1.5;
    text-align: center;
}

html:not(.page-ready)::after {
    content: '';
    position: fixed;
    top: calc(50% + 2.3rem);
    left: calc(50% - 1.1rem);
    z-index: 10000;
    width: 2.2rem;
    height: 2.2rem;
    border: 0.2rem solid rgba(255, 255, 255, 0.2);
    border-top-color: #38bdf8;
    border-right-color: #7c4dff;
    border-radius: 50%;
    box-shadow: 0 0 1.5rem rgba(124, 77, 255, 0.35);
    animation: page-loading-spin 0.9s linear infinite;
    font-family: var(--bs-body-font-family, system-ui, -apple-system, "Segoe UI", sans-serif);
}

@keyframes page-loading-spin {
    to {
        transform: rotate(360deg);
    }
}
