﻿/* ============================================
       ERROR 500 — صفحه خطای سرور
       ============================================ */

.error-page {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    position: relative;
    overflow: hidden;
}

    .error-page::before {
        content: '';
        position: absolute;
        top: -30%;
        right: -10%;
        width: 50%;
        height: 150%;
        background: radial-gradient(circle, rgba(244, 180, 0, 0.05), transparent 60%);
        pointer-events: none;
        animation: floatBg 20s ease-in-out infinite;
    }

    .error-page::after {
        content: '';
        position: absolute;
        bottom: -20%;
        left: -5%;
        width: 40%;
        height: 100%;
        background: radial-gradient(circle, rgba(0, 51, 102, 0.04), transparent 60%);
        pointer-events: none;
        animation: floatBg 15s ease-in-out infinite reverse;
    }

@keyframes floatBg {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-20px, 30px) scale(1.05);
    }
}

.error-container {
    max-width: 560px;
    width: 100%;
    background: #ffffff;
    border-radius: 24px;
    padding: 48px 40px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.06), 0 8px 30px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

    .error-container:hover {
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.08);
        transform: translateY(-4px);
    }

/* ============================================
       ERROR ICON / IMAGE
       ============================================ */
.error-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

    .error-icon-wrapper .error-icon-bg {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.02));
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
        animation: pulseIcon 2.5s ease-in-out infinite;
        border: 2px solid rgba(239, 68, 68, 0.1);
    }

@keyframes pulseIcon {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.08);
    }

    50% {
        transform: scale(1.02);
        box-shadow: 0 0 40px rgba(239, 68, 68, 0.06);
    }
}

.error-icon-wrapper .error-icon-bg .error-icon {
    font-size: 4rem;
    color: #ef4444;
    animation: floatIcon 4s ease-in-out infinite;
}

@keyframes floatIcon {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(-4deg);
    }
}

.error-icon-wrapper .error-number {
    position: absolute;
    top: -10px;
    left: -10px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 4px 14px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
    animation: bounceBadge 2s ease-in-out infinite;
}

@keyframes bounceBadge {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ============================================
       ERROR IMAGE (fallback)
       ============================================ */
.error-image {
    max-width: 200px;
    height: auto;
    margin: 0 auto 16px;
    display: block;
    opacity: 0.8;
    filter: grayscale(0.2);
    transition: all 0.5s ease;
}

.error-container:hover .error-image {
    opacity: 1;
    transform: scale(1.02);
}

/* ============================================
       ERROR TITLE
       ============================================ */
.error-title {
    font-weight: 800;
    font-size: 1.8rem;
    color: #003366;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

    .error-title .error-code {
        background: linear-gradient(135deg, #ef4444, #dc2626);
        color: #fff;
        padding: 2px 16px;
        border-radius: 50px;
        font-size: 1.2rem;
        font-weight: 800;
        box-shadow: 0 4px 15px rgba(239, 68, 68, 0.25);
    }

/* ============================================
       ERROR MESSAGE
       ============================================ */
.error-message {
    color: #6b7280;
    font-size: 1rem;
    line-height: 1.9;
    margin: 12px 0 24px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

    .error-message i {
        color: #F4B400;
        margin-left: 6px;
    }

/* ============================================
       ACTIONS
       ============================================ */
.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 8px;
}

    .error-actions .btn-error {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 12px 28px;
        border-radius: 50px;
        font-family: 'Vazirmatn', 'Segoe UI', sans-serif;
        font-weight: 700;
        font-size: 0.95rem;
        text-decoration: none;
        transition: all 0.4s cubic-bezier(.34, 1.56, .64, 1);
        cursor: pointer;
        border: none;
    }

    .error-actions .btn-error-primary {
        background: linear-gradient(135deg, #003366, #0a4d8c);
        color: #fff;
        box-shadow: 0 4px 20px rgba(0, 51, 102, 0.2);
    }

        .error-actions .btn-error-primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 30px rgba(0, 51, 102, 0.3);
            color: #fff;
        }

        .error-actions .btn-error-primary i {
            transition: transform 0.4s ease;
        }

        .error-actions .btn-error-primary:hover i {
            transform: translateX(-4px);
        }

    .error-actions .btn-error-outline {
        background: transparent;
        color: #003366;
        border: 2px solid #e5e7eb;
    }

        .error-actions .btn-error-outline:hover {
            border-color: #003366;
            background: rgba(0, 51, 102, 0.04);
            transform: translateY(-3px);
        }

        .error-actions .btn-error-outline i {
            transition: transform 0.4s ease;
        }

        .error-actions .btn-error-outline:hover i {
            transform: rotate(-10deg);
        }

    .error-actions .btn-error-gold {
        background: linear-gradient(135deg, #F4B400, #d49d00);
        color: #003366;
        box-shadow: 0 4px 20px rgba(244, 180, 0, 0.25);
    }

        .error-actions .btn-error-gold:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 30px rgba(244, 180, 0, 0.35);
            color: #003366;
        }

/* ============================================
       SUPPORT INFO
       ============================================ */
.error-support {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f0f2f5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

    .error-support .support-item {
        display: flex;
        align-items: center;
        gap: 6px;
        color: #9ca3af;
        font-size: 0.8rem;
    }

        .error-support .support-item i {
            color: #F4B400;
        }

        .error-support .support-item a {
            color: #003366;
            text-decoration: none;
            font-weight: 500;
            transition: color 0.3s ease;
        }

            .error-support .support-item a:hover {
                color: #F4B400;
            }

/* ============================================
       RESPONSIVE
       ============================================ */
@media (max-width: 768px) {
    .error-container {
        padding: 32px 24px 28px;
    }

    .error-title {
        font-size: 1.4rem;
    }

        .error-title .error-code {
            font-size: 1rem;
            padding: 2px 12px;
        }

    .error-icon-wrapper .error-icon-bg {
        width: 90px;
        height: 90px;
    }

        .error-icon-wrapper .error-icon-bg .error-icon {
            font-size: 3rem;
        }

    .error-message {
        font-size: 0.9rem;
    }

    .error-actions .btn-error {
        padding: 10px 22px;
        font-size: 0.85rem;
    }

    .error-image {
        max-width: 150px;
    }

    .error-support {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .error-container {
        padding: 24px 16px 20px;
        border-radius: 16px;
    }

    .error-title {
        font-size: 1.1rem;
        flex-wrap: wrap;
    }

        .error-title .error-code {
            font-size: 0.85rem;
            padding: 2px 10px;
        }

    .error-icon-wrapper .error-icon-bg {
        width: 72px;
        height: 72px;
    }

        .error-icon-wrapper .error-icon-bg .error-icon {
            font-size: 2.2rem;
        }

    .error-icon-wrapper .error-number {
        font-size: 0.6rem;
        padding: 2px 10px;
        top: -8px;
        left: -8px;
    }

    .error-message {
        font-size: 0.8rem;
    }

    .error-actions {
        flex-direction: column;
        align-items: center;
    }

        .error-actions .btn-error {
            width: 100%;
            justify-content: center;
        }

    .error-image {
        max-width: 120px;
    }

    .error-support .support-item {
        font-size: 0.7rem;
    }
}

/* ============================================
       SCROLLBAR
       ============================================ */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: #f0f2f5;
}

::-webkit-scrollbar-thumb {
    background: #F4B400;
    border-radius: 10px;
}
