/* RJ Global — generic error pages (404, 403, 500) */

*,
*::before,
*::after {
    box-sizing: border-box;
}

.rj-error-page {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #ffffff;
    color: #111111;
    -webkit-font-smoothing: antialiased;
}

.rj-error {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.rj-error::before {
    content: "";
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle at 50% 40%, rgba(230, 34, 34, 0.06) 0%, transparent 55%);
    animation: rjBgPulse 8s ease-in-out infinite;
    pointer-events: none;
}

.rj-error__inner {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 42rem;
    width: 100%;
}

.rj-error__code-wrap {
    display: inline-block;
    animation: rjCodeDrop 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.rj-error__code {
    display: inline-block;
    background: #e62222;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(4.5rem, 14vw, 7.5rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    padding: 0.28em 0.42em;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(230, 34, 34, 0.42);
    animation: rjGlow 3.2s ease-in-out 0.9s infinite;
}

.rj-error__title {
    font-size: clamp(1.35rem, 4.5vw, 1.85rem);
    font-weight: 700;
    margin: 1.75rem 0 0.85rem;
    text-transform: none;
    letter-spacing: -0.01em;
    animation: rjFadeUp 0.75s ease-out 0.3s both;
}

.rj-error__title-accent {
    display: block;
    font-size: 0.72em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.15em;
}

.rj-error__message {
    font-size: clamp(0.95rem, 2.5vw, 1.05rem);
    font-weight: 400;
    line-height: 1.55;
    margin: 0 auto;
    max-width: 36rem;
    color: #333333;
    animation: rjFadeUp 0.75s ease-out 0.45s both;
}

.rj-error__line {
    width: 3rem;
    height: 3px;
    background: linear-gradient(90deg, transparent, #e62222, transparent);
    margin: 1.25rem auto 0;
    border-radius: 2px;
    animation: rjLineGrow 0.8s ease-out 0.6s both;
}

@keyframes rjBgPulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

@keyframes rjCodeDrop {
    from {
        opacity: 0;
        transform: translateY(-28px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes rjGlow {
    0%, 100% {
        box-shadow: 0 10px 40px rgba(230, 34, 34, 0.42);
    }
    50% {
        box-shadow: 0 14px 52px rgba(230, 34, 34, 0.58);
    }
}

@keyframes rjFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rjLineGrow {
    from {
        opacity: 0;
        transform: scaleX(0);
    }
    to {
        opacity: 1;
        transform: scaleX(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .rj-error::before,
    .rj-error__code,
    .rj-error__code-wrap,
    .rj-error__title,
    .rj-error__message,
    .rj-error__line {
        animation: none !important;
    }
}
