body.is-hell-loading .site-header,
body.is-hell-loading .site-main,
body.is-hell-loading .site-footer,
body.is-hell-loading .flash-container,
body.is-hell-loading .hellscape {
    filter: blur(14px) brightness(0.55);
    transform: scale(1.02);
    transition: filter 0.65s ease, transform 0.65s ease;
}

body.hell-loader-done .site-header,
body.hell-loader-done .site-main,
body.hell-loader-done .site-footer,
body.hell-loader-done .flash-container,
body.hell-loader-done .hellscape {
    filter: none;
    transform: none;
    transition: filter 0.8s ease, transform 0.8s ease;
}

.hell-loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
    transition: opacity 0.7s ease, visibility 0.7s ease;
}

.hell-loader.is-hiding {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.hell-loader-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 70% at 50% 50%, rgba(139, 0, 0, 0.35), transparent 65%),
        rgba(4, 2, 2, 0.92);
    backdrop-filter: blur(6px);
}

.hell-loader-core {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
}

.hell-loader-ring-wrap {
    position: relative;
    width: 148px;
    height: 148px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hell-loader-ring {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hell-loader-ring-outer {
    inset: 0;
    background: conic-gradient(
        from 0deg,
        transparent 0deg 30deg,
        #ff2d00 50deg,
        #ff8c00 90deg,
        #ff4500 130deg,
        #c41e3a 170deg,
        #8b0000 210deg,
        #ff6b35 250deg,
        #ffb347 290deg,
        transparent 320deg 360deg
    );
    animation: hell-ring-spin 1.4s linear infinite;
    filter: blur(0.5px) drop-shadow(0 0 18px rgba(255, 69, 0, 0.7)) drop-shadow(0 0 40px rgba(255, 45, 0, 0.4));
    mask: radial-gradient(transparent 62%, #000 64%);
    -webkit-mask: radial-gradient(transparent 62%, #000 64%);
}

.hell-loader-ring-mid {
    inset: 10px;
    background: conic-gradient(
        from 180deg,
        transparent 0deg 40deg,
        #dc143c 70deg,
        #ff4500 120deg,
        #ff2d00 180deg,
        #8b0000 230deg,
        transparent 280deg 360deg
    );
    animation: hell-ring-spin-reverse 2s linear infinite;
    opacity: 0.85;
    mask: radial-gradient(transparent 58%, #000 60%);
    -webkit-mask: radial-gradient(transparent 58%, #000 60%);
}

.hell-loader-ring-glow {
    inset: -8px;
    background: radial-gradient(circle, rgba(255, 69, 0, 0.25) 0%, transparent 70%);
    animation: hell-glow-pulse 2s ease-in-out infinite;
}

.hell-loader-ring-sparks {
    inset: -4px;
    border: 2px solid transparent;
    border-top-color: rgba(255, 180, 80, 0.6);
    border-right-color: rgba(255, 69, 0, 0.3);
    animation: hell-ring-spin 0.9s linear infinite;
    opacity: 0.7;
}

.hell-loader-center {
    position: relative;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #2a0808, #080404 75%);
    border: 1px solid rgba(255, 69, 0, 0.35);
    box-shadow:
        inset 0 0 24px rgba(255, 69, 0, 0.2),
        0 0 28px rgba(139, 0, 0, 0.5);
    animation: hell-center-pulse 2.5s ease-in-out infinite;
}

.hell-loader-pentagram {
    position: absolute;
    width: 56px;
    height: 56px;
    color: rgba(255, 69, 0, 0.45);
    animation: hell-pentagram-spin 8s linear infinite;
}

.hell-loader-icon {
    position: relative;
    z-index: 1;
    font-size: 1.75rem;
    animation: hell-icon-bounce 1.8s ease-in-out infinite;
    filter: drop-shadow(0 0 12px rgba(255, 69, 0, 0.8));
}

.hell-loader-runes {
    position: absolute;
    inset: -18px;
    animation: hell-ring-spin 12s linear infinite;
}

.hell-loader-rune {
    position: absolute;
    left: 50%;
    top: 0;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    transform-origin: 50% 89px;
    font-size: 0.65rem;
    color: rgba(255, 107, 53, 0.55);
    text-shadow: 0 0 8px rgba(255, 69, 0, 0.6);
}

.hell-loader-rune:nth-child(1) { transform: rotate(0deg); }
.hell-loader-rune:nth-child(2) { transform: rotate(60deg); }
.hell-loader-rune:nth-child(3) { transform: rotate(120deg); }
.hell-loader-rune:nth-child(4) { transform: rotate(180deg); }
.hell-loader-rune:nth-child(5) { transform: rotate(240deg); }
.hell-loader-rune:nth-child(6) { transform: rotate(300deg); }

.hell-loader-text {
    font-family: var(--font-display);
    font-size: 0.95rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-hell-glow);
    text-shadow: 0 0 20px rgba(255, 69, 0, 0.5);
    animation: hell-text-flicker 3s ease-in-out infinite;
}

.hell-loader-sub {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: -1rem;
    opacity: 0.8;
    animation: hell-sub-pulse 2s ease-in-out infinite;
}

.hell-loader-orbit {
    position: absolute;
    left: calc(50% - 3px);
    top: calc(50% - 3px);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff4500;
    box-shadow: 0 0 10px #ff6b35, 0 0 20px #ff2d00;
    animation: hell-orbit 2.2s linear infinite;
}

.hell-loader-orbit-2 {
    left: calc(50% - 2px);
    top: calc(50% - 2px);
    width: 4px;
    height: 4px;
    animation-duration: 1.6s;
    animation-direction: reverse;
    background: #ffb347;
}

@keyframes hell-ring-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes hell-ring-spin-reverse {
    to {
        transform: rotate(-360deg);
    }
}

@keyframes hell-glow-pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(0.95);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes hell-center-pulse {
    0%, 100% {
        box-shadow:
            inset 0 0 24px rgba(255, 69, 0, 0.15),
            0 0 24px rgba(139, 0, 0, 0.4);
    }
    50% {
        box-shadow:
            inset 0 0 32px rgba(255, 69, 0, 0.35),
            0 0 40px rgba(255, 69, 0, 0.55);
    }
}

@keyframes hell-pentagram-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes hell-icon-bounce {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-4px) scale(1.08);
    }
}

@keyframes hell-text-flicker {
    0%, 100% {
        opacity: 1;
    }
    45% {
        opacity: 0.75;
    }
    50% {
        opacity: 1;
    }
    55% {
        opacity: 0.85;
    }
}

@keyframes hell-sub-pulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

@keyframes hell-orbit {
    0% {
        transform: rotate(0deg) translateX(74px) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translateX(74px) rotate(-360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    body.is-hell-loading .site-header,
    body.is-hell-loading .site-main,
    body.is-hell-loading .site-footer,
    body.is-hell-loading .flash-container,
    body.is-hell-loading .hellscape {
        filter: none;
        transform: none;
    }

    .hell-loader-ring-outer,
    .hell-loader-ring-mid,
    .hell-loader-ring-sparks,
    .hell-loader-pentagram,
    .hell-loader-runes,
    .hell-loader-orbit,
    .hell-loader-icon,
    .hell-loader-center {
        animation: none;
    }
}
