body.modalbex-open {
    overflow: hidden;
}

.modalbex-overlay {
    align-items: center;
    background: rgba(15, 23, 42, .56);
    backdrop-filter: blur(4px);
    bottom: 0;
    display: flex;
    left: 0;
    opacity: 0;
    padding: 24px;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: 0;
    transition: opacity .24s ease;
    z-index: 999999;
}

.modalbex-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.modalbex-position-center {
    align-items: center;
    justify-content: center;
}

.modalbex-position-top-right {
    align-items: flex-start;
    justify-content: flex-end;
}

.modalbex-position-top-left {
    align-items: flex-start;
    justify-content: flex-start;
}

.modalbex-position-top-center {
    align-items: flex-start;
    justify-content: center;
}

.modalbex-popup {
    animation: modalbexEnter .32s cubic-bezier(.2,.9,.2,1) both;
    background: #fff;
    border: 1px solid rgba(255,255,255,.7);
    border-radius: 24px;
    box-shadow: 0 30px 90px rgba(15, 23, 42, .32);
    color: #111827;
    max-height: calc(100vh - 48px);
    max-width: 520px;
    overflow: auto;
    position: relative;
    width: min(100%, 520px);
}

.modalbex-overlay.is-leaving .modalbex-popup {
    animation: modalbexLeave .22s ease both;
}

.modalbex-close {
    align-items: center;
    background: rgba(255, 255, 255, .95);
    border: 1px solid rgba(148, 163, 184, .4);
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(15, 23, 42, .12);
    color: #979797;
    cursor: pointer;
    display: flex;
    font-size: 25px;
    height: 35px;
    justify-content: center;
    line-height: 20px;
    position: absolute;
    right: 14px;
    top: 14px;
    transition: transform .18s ease, background .18s ease;
    width: 35px;
    z-index: 2;
    padding: 0;
}

.modalbex-close:hover {
    background: #cbcbcb;
    transform: scale(1.04);
}

.modalbex-cover {
    background: #e2e8f0;
    border-radius: 24px 24px 0 0;
    max-height: 260px;
    overflow: hidden;
}

.modalbex-cover img {
    display: block;
    height: 100%;
    max-height: 260px;
    object-fit: cover;
    width: 100%;
}

.modalbex-content {
    padding: 30px;
    text-align: center;
}

.modalbex-content h2 {
    color: #0f172a;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.13;
    margin: 0 0 10px;
}

.modalbex-subtitle {
    color: #475569;
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 16px;
}

.modalbex-body {
    color: #334155;
    font-size: 16px;
    line-height: 1.62;
    margin-top: 15px;
    text-align: left
}

.modalbex-body p:last-child {
    margin-bottom: 0;
}

.modalbex-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.modalbex-btn {
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 800;
    min-height: auto;
    padding: 0px 25px;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.modalbex-btn:hover {
    transform: translateY(-1px);
}

.modalbex-btn-primary {
    background-image: linear-gradient(135deg, #2563eb, #4f46e5);
    box-shadow: 0 14px 30px rgba(37, 99, 235, .28);
    color: #fff;
}

.modalbex-btn-light {
    background: #f1f5f9;
    color: #334155;
}

@keyframes modalbexEnter {
    from { opacity: 0; transform: translateY(18px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modalbexLeave {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(12px) scale(.98); }
}

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

    .modalbex-popup {
        border-radius: 20px;
        width: 100%;
    }

    .modalbex-cover,
    .modalbex-cover img {
        border-radius: 20px 20px 0 0;
    }

    .modalbex-content {
        padding: 24px 18px;
    }

    .modalbex-actions {
        flex-direction: column-reverse;
    }

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