/* 管理后台错误页 — 与 login-pro.css / SoybeanAdmin 色调一致 */
:root {
    --err-bg: #f5f7fb;
    --err-card: #ffffff;
    --err-text: #1f2225;
    --err-muted: #606266;
    --err-muted-light: #909399;
    --err-border: #e8e8ed;
    --err-primary: #646cff;
    --err-primary-hover: #535bf2;
    --err-gradient: linear-gradient(145deg, #646cff 0%, #7b83ff 55%, #8b5cf6 100%);
    --err-radius: 16px;
    --err-shadow: 0 4px 24px rgba(100, 108, 255, 0.1), 0 1px 3px rgba(15, 23, 42, 0.06);
    --err-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
    --err-accent: #646cff;
    --err-accent-soft: rgba(100, 108, 255, 0.12);
    --err-accent-glow: rgba(100, 108, 255, 0.35);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body.err-page {
    margin: 0;
    min-height: 100%;
    font-family: var(--err-font);
    background: var(--err-bg);
    color: var(--err-text);
    -webkit-font-smoothing: antialiased;
}

/* 背景装饰 */
.err-bg-deco {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.err-bg-deco::before,
.err-bg-deco::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.45;
}

.err-bg-deco::before {
    width: 420px;
    height: 420px;
    top: -120px;
    right: -80px;
    background: var(--err-accent-glow);
}

.err-bg-deco::after {
    width: 320px;
    height: 320px;
    bottom: -100px;
    left: -60px;
    background: rgba(139, 92, 246, 0.18);
}

.err-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 24px 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--err-muted);
    letter-spacing: 0.02em;
}

.err-brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--err-gradient);
    box-shadow: 0 4px 12px var(--err-accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.err-wrap {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - 52px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px 40px;
}

.err-card {
    width: 100%;
    max-width: 440px;
    background: var(--err-card);
    border-radius: var(--err-radius);
    padding: 36px 32px 32px;
    box-shadow: var(--err-shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
    text-align: center;
    animation: err-fade-in 0.45s ease-out;
}

@keyframes err-fade-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.err-visual {
    margin-bottom: 20px;
}

.err-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 16px;
    border-radius: 20px;
    background: var(--err-accent-soft);
    color: var(--err-accent);
}

.err-icon svg {
    width: 36px;
    height: 36px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.err-code {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -3px;
    background: var(--err-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.err-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    color: var(--err-accent);
    background: var(--err-accent-soft);
    border-radius: 999px;
}

.err-title {
    margin: 18px 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: var(--err-text);
}

.err-msg {
    margin: 0 0 28px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--err-muted);
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}

.err-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.err-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #fff;
    background: var(--err-primary);
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 2px 8px var(--err-accent-glow);
}

.err-btn:hover {
    background: var(--err-primary-hover);
    color: #fff;
    transform: translateY(-1px);
}

.err-btn:active {
    transform: translateY(0);
}

.err-btn--ghost {
    background: var(--err-card);
    color: var(--err-primary);
    border: 1px solid var(--err-border);
    box-shadow: none;
}

.err-btn--ghost:hover {
    background: var(--err-accent-soft);
    color: var(--err-primary-hover);
    border-color: var(--err-border);
}

.err-foot {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--err-border);
    font-size: 12px;
    color: var(--err-muted-light);
}

/* 按状态码主题色 */
.err-theme-404 {
    --err-accent: #646cff;
    --err-accent-soft: rgba(100, 108, 255, 0.12);
    --err-accent-glow: rgba(100, 108, 255, 0.32);
    --err-gradient: linear-gradient(145deg, #646cff 0%, #7b83ff 55%, #8b5cf6 100%);
}

.err-theme-403 {
    --err-accent: #f59e0b;
    --err-accent-soft: rgba(245, 158, 11, 0.14);
    --err-accent-glow: rgba(245, 158, 11, 0.28);
    --err-primary: #e6a23c;
    --err-primary-hover: #cf9236;
    --err-gradient: linear-gradient(145deg, #f59e0b 0%, #fbbf24 55%, #f97316 100%);
}

.err-theme-500,
.err-theme-502,
.err-theme-default {
    --err-accent: #ef4444;
    --err-accent-soft: rgba(239, 68, 68, 0.1);
    --err-accent-glow: rgba(239, 68, 68, 0.22);
    --err-primary: #f56c6c;
    --err-primary-hover: #e85a5a;
    --err-gradient: linear-gradient(145deg, #ef4444 0%, #f87171 55%, #fb7185 100%);
}

.err-theme-100 {
    --err-accent: #0ea5e9;
    --err-accent-soft: rgba(14, 165, 233, 0.12);
    --err-accent-glow: rgba(14, 165, 233, 0.28);
    --err-primary: #409eff;
    --err-primary-hover: #337ecc;
    --err-gradient: linear-gradient(145deg, #0ea5e9 0%, #38bdf8 55%, #6366f1 100%);
}

@media (max-width: 480px) {
    .err-card {
        padding: 28px 20px 24px;
        border-radius: 14px;
    }

    .err-code {
        font-size: 48px;
    }

    .err-btn {
        min-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .err-card {
        animation: none;
    }

    .err-btn:hover {
        transform: none;
    }
}
