:root {
    --bg-1: #eff5f8;
    --bg-2: #f8fbfd;
    --text: #1c1e3d;
    --muted: #7a8798;
    --muted-2: #92a0b0;
    --primary: #01a5b4;
    --primary-dark: #148eab;
    --primary-soft: #91cfdc;
    --danger: #e24243;
    --warning: #f3a536;
    --line: rgba(1, 165, 180, 0.14);
    --shadow: 0 20px 50px rgba(28, 30, 61, 0.07);
    --shadow-soft: 0 10px 22px rgba(28, 30, 61, 0.05);
    --radius-xl: 34px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: "Cairo", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top right, rgba(1, 165, 180, 0.07), transparent 24%), radial-gradient(circle at bottom left, rgba(243, 165, 54, 0.06), transparent 20%), linear-gradient(180deg, var(--bg-2) 0%, var(--bg-1) 100%);
}

.error-page {
    min-height: 100vh;
    height: 100vh;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-shell {
    position: relative;
    width: min(100%, 1040px);
    padding: 30px 36px 24px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.93) 0%, rgba(255, 255, 255, 0.84) 55%, rgba(247, 252, 253, 0.88) 100%);
    border: 1px solid rgba(255, 255, 255, 0.68);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    text-align: center;
    overflow: hidden;
}

    .error-shell::before {
        content: "";
        position: absolute;
        width: 320px;
        height: 320px;
        top: -160px;
        right: -120px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(1, 165, 180, 0.07) 0%, rgba(1, 165, 180, 0) 72%);
        pointer-events: none;
    }

    .error-shell::after {
        content: "";
        position: absolute;
        width: 260px;
        height: 260px;
        bottom: -140px;
        left: -90px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(243, 165, 54, 0.05) 0%, rgba(243, 165, 54, 0) 72%);
        pointer-events: none;
    }

.error-top-line {
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, #e9a73a 0%, #25b493 28%, #1dacc0 62%, #9ad6e0 100%);
}

.error-chip {
    position: relative;
    z-index: 1;
    width: fit-content;
    margin: 2px auto 16px;
    padding: 8px 15px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-dark);
    box-shadow: var(--shadow-soft);
}

.chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-soft) 100%);
    flex-shrink: 0;
}

.error-icon {
    position: relative;
    z-index: 1;
    width: 70px;
    height: 70px;
    margin: 0 auto 12px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: var(--danger);
    background: linear-gradient(135deg, rgba(226, 66, 67, 0.08), rgba(243, 165, 54, 0.10));
    box-shadow: 0 10px 24px rgba(226, 66, 67, 0.06);
}

.error-code {
    position: relative;
    z-index: 1;
    margin-bottom: 6px;
    font-size: clamp(52px, 8vw, 90px);
    line-height: 1;
    font-weight: 800;
    letter-spacing: -2px;
    color: rgba(28, 30, 61, 0.96);
}

.error-title {
    position: relative;
    z-index: 1;
    margin: 0 0 10px;
    font-size: clamp(28px, 3.5vw, 46px);
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--text);
}

.error-text {
    position: relative;
    z-index: 1;
    max-width: 740px;
    margin: 0 auto 18px;
    font-size: clamp(15px, 1.15vw, 19px);
    line-height: 1.95;
    font-weight: 600;
    color: var(--muted);
}

.error-note {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0 auto 22px;
    padding: 13px 18px;
    border-radius: var(--radius-lg);
    background: rgba(255, 249, 241, 0.95);
    border: 1px solid rgba(243, 165, 54, 0.16);
    color: #a06c1a;
    font-size: 14px;
    line-height: 1.85;
    font-weight: 700;
}

.error-actions {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.btn {
    min-width: 200px;
    height: 52px;
    padding: 0 22px;
    border-radius: 16px;
    border: none;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

    .btn:hover {
        transform: translateY(-1px);
    }

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #10a7b8 0%, #168fb2 100%);
    box-shadow: 0 12px 24px rgba(1, 165, 180, 0.16);
}

.btn-secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(28, 30, 61, 0.08);
    box-shadow: var(--shadow-soft);
}

.error-meta {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid rgba(28, 30, 61, 0.06);
    color: var(--muted-2);
    font-size: 13px;
    font-weight: 600;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

    .meta-item span:last-child {
        direction: ltr;
        unicode-bidi: plaintext;
        word-break: break-word;
    }

.meta-sep {
    width: 1px;
    height: 12px;
    background: rgba(28, 30, 61, 0.10);
}

@media (max-width: 768px) {
    html,
    body {
        height: auto;
        min-height: 100%;
        overflow: auto;
    }

    .error-page {
        min-height: 100vh;
        height: auto;
        padding: 14px;
    }

    .error-shell {
        padding: 24px 18px 20px;
        border-radius: 24px;
    }

    .error-icon {
        width: 62px;
        height: 62px;
        font-size: 24px;
        border-radius: 18px;
    }

    .error-note {
        font-size: 13px;
    }

    .btn {
        width: 100%;
        min-width: 0;
        height: 50px;
        font-size: 15px;
    }

    .error-meta {
        flex-direction: column;
        gap: 9px;
    }

    .meta-sep {
        display: none;
    }
}
