/* error.css –  Error Pages */

/* Layout */

html, body
{
    height: 100%;
    overflow: hidden;
}

.xd-site
{
    height: 100%;
    display: flex;
    flex-direction: column;
}

.xd-error-page
{
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Background Grid */

.xd-error-bg-grid
{
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

/* Card */

.xd-error-card
{
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 60px 48px;
    text-align: center;
    max-width: 560px;
    width: calc(100% - 48px);
    background: var(--surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    box-shadow: var(--shadow);
    animation: xd-error-fade-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes xd-error-fade-in
{
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Error Code */

.xd-error-code-wrap
{
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.xd-error-code
{
    font-family: var(--font-mono);
    font-size: clamp(80px, 18vw, 120px);
    font-weight: 800;
    letter-spacing: -4px;
    line-height: 1;
    color: var(--accent);
    position: relative;
    z-index: 2;
}

.xd-error-code-glow
{
    position: absolute;
    inset: -20px;
    background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
    animation: xd-error-pulse 3s ease-in-out infinite;
}

@keyframes xd-error-pulse
{
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.08); }
}

/* Content */

.xd-error-content
{
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.xd-error-title
{
    font-family: var(--font);
    font-size: clamp(20px, 4vw, 26px);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.xd-error-message
{
    font-family: var(--font);
    font-size: 15px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

.xd-error-meta
{
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--accent);
    opacity: 0.7;
    margin-top: 4px;
}

.xd-error-meta:empty
{
    display: none;
}

/* Actions */

.xd-error-actions
{
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Footer */

.xd-footer
{
    flex-shrink: 0;
}

/* Responsive */

@media (max-width: 900px)
{
    .xd-error-card
    {
        padding: 40px 24px;
    }

    .xd-error-actions
    {
        flex-direction: column;
        width: 100%;
    }

    .xd-error-actions .xd-btn
    {
        width: 100%;
        justify-content: center;
    }
}
