.sad-overlay[hidden] {
    display: none !important;
}

.sad-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    box-sizing: border-box;
}

.sad-overlay * {
    box-sizing: border-box;
}

.sad-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 12, 22, 0.88);
    backdrop-filter: blur(5px);
}

.sad-modal {
    position: relative;
    width: min(560px, 94vw);
    max-height: 92vh;
    overflow: auto;
    background: #ffffff;
    color: #1f2937;
    border-radius: 22px;
    padding: 32px 28px 28px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    text-align: center;
    outline: none;
    animation: sadFadeScale 0.25s ease-out;
}

@keyframes sadFadeScale {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.sad-icon {
    width: 76px;
    height: 76px;
    border-radius: 999px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    background: #fff2f2;
    font-size: 42px;
    line-height: 1;
}

.sad-title {
    margin: 0 0 10px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
    color: #111827;
}

.sad-message {
    margin: 0 auto 20px;
    max-width: 470px;
    color: #4b5563;
    font-size: 16px;
    line-height: 1.65;
}

.sad-steps {
    margin: 0 0 22px;
    padding: 16px 18px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    text-align: left;
}

.sad-steps h3 {
    margin: 0 0 10px;
    font-size: 16px;
    line-height: 1.3;
    color: #111827;
}

.sad-steps ol {
    margin: 0;
    padding-left: 22px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.7;
}

.sad-steps li + li {
    margin-top: 5px;
}

.sad-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 28px;
    border: 0;
    border-radius: 999px;
    background: #111827;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(17, 24, 39, 0.22);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.sad-refresh:hover,
.sad-refresh:focus {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(17, 24, 39, 0.26);
    opacity: 0.95;
}

html.sad-overlay-active,
body.sad-overlay-active {
    overflow: hidden !important;
}

@media (max-width: 600px) {
    .sad-overlay {
        padding: 14px;
    }

    .sad-modal {
        padding: 24px 18px 22px;
        border-radius: 18px;
    }

    .sad-title {
        font-size: 23px;
    }

    .sad-message {
        font-size: 15px;
    }

    .sad-icon {
        width: 64px;
        height: 64px;
        font-size: 34px;
    }
}
