/* ============================================================
   Mulanui — Errors (404 / 501)
   ------------------------------------------------------------
   ⚠️ يعتمد على: themes.css + style.css + page-shell.css
   ============================================================ */

/* ============================================================
   1. Content wrapper
   ============================================================ */
.error-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
}

/* ============================================================
   2. Icon
   ============================================================ */
.error-icon {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    border: 2px solid var(--primary-border);
    box-shadow: 0 8px 28px var(--primary-soft);
    margin-bottom: 6px;
    animation: errorIconIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

@keyframes errorIconIn {
    from { opacity: 0; transform: scale(0.5) rotate(-15deg); }
    to   { opacity: 1; transform: scale(1) rotate(0); }
}

/* ============================================================
   3. Code number
   ============================================================ */
.error-code {
    font-size: clamp(64px, 12vw, 100px);
    font-weight: var(--fw-black);
    line-height: 1;
    letter-spacing: -3px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: var(--font-mono);
    margin: 2px 0 4px;
}

/* ============================================================
   4. Title + message
   ============================================================ */
.error-title {
    font-size: clamp(20px, 3vw, 26px);
    font-weight: var(--fw-black);
    color: var(--text-main);
    margin: 0;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.error-message {
    font-size: var(--fs-base);
    color: var(--text-muted);
    line-height: 1.75;
    margin: 0;
    max-width: 440px;
}

/* ============================================================
   5. Actions
   ============================================================ */
.error-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.error-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: var(--radius-full);
    font-family: var(--font-family);
    font-size: var(--fs-sm);
    font-weight: var(--fw-bold);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-fast);
    min-height: 46px;
    border: 1.5px solid transparent;
    white-space: nowrap;
}

.error-btn i { font-size: 13px; }

.error-btn--primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    box-shadow: 0 6px 20px var(--primary-soft);
}

.error-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px var(--primary-soft);
    filter: brightness(1.05);
}

.error-btn--secondary {
    background: transparent;
    color: var(--text-main);
    border-color: var(--border-color);
}

.error-btn--secondary:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-soft);
}

/* ============================================================
   6. 501-specific — warning color
   ============================================================ */
.error-icon--warning {
    background: var(--warning-soft);
    color: var(--warning-color);
    border-color: var(--warning-border);
    box-shadow: 0 8px 28px var(--warning-soft);
}

.error-code--warning {
    background: linear-gradient(135deg, var(--warning-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   7. Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .error-icon { animation: none !important; }
}

/* ============================================================
   8. Mobile
   ============================================================ */
@media (max-width: 640px) {
    .error-icon {
        width: 76px;
        height: 76px;
        font-size: 32px;
    }

    .error-content { gap: 12px; }

    .error-actions {
        flex-direction: column;
        width: 100%;
        margin-top: 10px;
    }

    .error-btn { width: 100%; }
}

/* ============================================================
   9. Gaming theme
   ============================================================ */
[data-theme="gaming"] .error-icon {
    box-shadow:
        0 8px 28px var(--primary-soft),
        0 0 40px rgba(168, 85, 247, 0.3);
}

[data-theme="gaming"] .error-code {
    filter: drop-shadow(0 0 14px rgba(168, 85, 247, 0.4));
}

[data-theme="gaming"] .error-btn--primary {
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.4);
}

[data-theme="gaming"] .error-btn--primary:hover {
    box-shadow: 0 0 32px rgba(168, 85, 247, 0.6);
}

[data-theme="gaming"][data-gaming-effects="reduced"] .error-icon,
[data-theme="gaming"][data-gaming-effects="reduced"] .error-btn--primary,
[data-theme="gaming"][data-gaming-effects="reduced"] .error-btn--primary:hover {
    box-shadow: none;
}

[data-theme="gaming"][data-gaming-effects="reduced"] .error-code {
    filter: none;
}