/* =============================================================
   error.css – Error page styles (404, 403, 500)
   Depends on: style.css (theme tokens, pulse, font)
   ============================================================= */

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

html,
body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    background-color: var(--bg);
}

/* ── Dark background (fallback) ── */
body {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-image: url(/image/BackgroundDark.png);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 0;
    pointer-events: none;
}

[data-theme="light"] body {
    background-image: url(/image/BackgroundLight.png) !important;
}

[data-theme="light"] body::before {
    background-color: rgba(255, 255, 255, 0.88) !important;
}

/* ── Error container ── */
.error-card {
    width: min(100%, 520px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.error-code {
    font-size: 5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--accent);
    margin-bottom: 1rem;
    letter-spacing: -2px;
}

.error-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 0.75rem;
}

.error-message {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-primary-custom {
    background: var(--accent);
    color: #ffffff;
}

.btn-primary-custom:hover {
    opacity: 0.9;
    color: #ffffff;
}

.btn-secondary-custom {
    background: var(--surface-alt);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary-custom:hover {
    background: var(--border);
    color: var(--text-strong);
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .error-code {
        font-size: 64px;
    }

    .error-title {
        font-size: 22px;
    }

    .error-message {
        font-size: 14px;
        padding: 0 16px;
    }

    .error-actions {
        flex-direction: column;
        align-items: center;
    }

    .error-actions .btn-primary,
    .error-actions .btn-ghost {
        width: 100%;
        justify-content: center;
    }
}