:root {
    --sje-tg: #26A5E4; --sje-vk: #0077FF; --sje-ok: #EE8208;
    --sje-w: #ffffff; --sje-b: #000000; --sje-t: #2c3e50; --sje-m: #7f8c8d;
    --sje-ov: rgba(0, 0, 0, 0.75); --sje-sh: 0 15px 35px rgba(0, 0, 0, 0.2);
    --sje-f: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --sje-r: 12px; --sje-br: 8px; --sje-spd: 0.4s;
}

.sje-popup-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--sje-ov); z-index: 999999; display: flex;
    justify-content: center; align-items: center; opacity: 0;
    visibility: hidden; transition: opacity var(--sje-spd), visibility var(--sje-spd);
    backdrop-filter: blur(4px);
}
.sje-popup-overlay.sje-active { opacity: 1; visibility: visible; }

.sje-popup-content {
    background: var(--sje-w); padding: 32px; border-radius: var(--sje-r);
    width: 90%; max-width: 380px; position: relative; box-shadow: var(--sje-sh);
    font-family: var(--sje-f); text-align: center; box-sizing: border-box;
    background-position: center; background-size: cover; background-repeat: no-repeat;
    overflow: hidden;
}

.sje-overlay-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: #000; z-index: 1; pointer-events: none; }
.sje-close { position: absolute; top: 12px; right: 12px; background: 0 0; border: 0; font-size: 24px; cursor: pointer; color: var(--sje-m); transition: color .2s; z-index: 10; }
.sje-close:hover { color: #fff; }

.sje-inner-wrapper { position: relative; z-index: 2; display: flex; flex-direction: column; width: 100%; }

/* Исправленное выравнивание для wrapper и body одновременно */
.sje-align-left, .sje-align-left .sje-body { align-items: flex-start; text-align: left; }
.sje-align-center, .sje-align-center .sje-body { align-items: center; text-align: center; }
.sje-align-right, .sje-align-right .sje-body { align-items: flex-end; text-align: right; }

.sje-header { font-size: 22px; font-weight: 800; margin-bottom: 12px; color: var(--sje-t); line-height: 1.2; width: 100%; }
.sje-body { margin: 20px 0; display: flex; flex-direction: column; gap: 12px; width: 100%; }

.sje-text-light .sje-header { color: #ffffff; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.sje-text-light .sje-footer { color: #eeeeee; }

.sje-plate {
    display: flex; align-items: center; justify-content: center; padding: 14px 20px;
    text-decoration: none; color: #fff !important; border-radius: var(--sje-br);
    font-weight: 600; transition: transform .2s ease, filter .2s;
    width: 100%; 
}
.sje-plate:hover { transform: scale(1.03); filter: brightness(1.1); }
.sje-tg { background: var(--sje-tg); } .sje-vk { background: var(--sje-vk); } .sje-ok { background: var(--sje-ok); }

.sje-footer { font-size: 13px; color: var(--sje-m); margin-top: 16px; width: 100%; }

/* Анимации */
.sje-active.sje-animation-fade .sje-popup-content { opacity: 1; transition: opacity var(--sje-spd); }
.sje-active.sje-animation-slide .sje-popup-content { transform: translateY(0); opacity: 1; transition: transform var(--sje-spd), opacity var(--sje-spd); }
.sje-active.sje-animation-scale .sje-popup-content { transform: scale(1); opacity: 1; transition: transform var(--sje-spd), opacity var(--sje-spd); }
@keyframes sjeB { 0% { transform: scale(.3); opacity: 0; } 50% { transform: scale(1.05); opacity: 1; } 100% { transform: scale(1); } }
.sje-active.sje-animation-bounce .sje-popup-content { animation: sjeB .6s both; }

@media (max-width: 480px) {
    .sje-popup-content { padding: 24px 20px; }
    .sje-pos-bottom_right { bottom: 0; right: 0; left: 0; margin: 0 auto 20px; }
}