/* خلفية التعتيم */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999998;
}
.popup-overlay.show { display: flex; }

/* النافذة */
.popup-box {
    position: relative;
    width: 75%;
    max-width: 420px;
    background-image: url("img/bg/bg_4.png"); /* ← الصورة الجديدة */
    background-size: cover;
    background-position: center;
    border-radius: 14px;
    border: 2px solid #24A1DE;
    padding: 25px 20px 65px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    color: #ffffff;
}



.popup-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    border-radius: 12px;
}

/* المحتوى */
.popup-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding-bottom: 20px;
}

.popup-text {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.5;
}

/* زر X خارج النافذة */
.popup-close {
    position: absolute;
    top: -14px;
    right: -14px;
    background: #ff2f2f;
    color: #fff;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}

/* زر Join Us */
.telegram-btn {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: #24A1DE;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 30px;
    border: 2px solid #24A1DE;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    z-index: 3;
    overflow: hidden;
}
.telegram-icon {
    width: 18px;
    height: 18px;
}

/* ⚡ تأثير البرق */
.telegram-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -80%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        120deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.8) 45%,
        rgba(255,255,255,0) 100%
    );
    transform: skewX(-25deg);
    animation: lightningShine 2.3s infinite;
    opacity: 0;
}

@keyframes lightningShine {
    0% { left: -80%; opacity: 0; }
    10% { opacity: 1; }
    22% { left: 130%; opacity: 0; }
    100% { opacity: 0; }
}