  
    
        .popup {
position: fixed;
    top: 20px;
    right: 20px;
    width: 200px;
    height: 150px;
    background-color: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex
;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.popup a {
    text-decoration: none;
}

.popup img {
    width: 100%;
    height: auto;
    border-radius: 10px;
}

.close-btn {
    position: absolute;
    top: 0px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
    color: #000;
}

.close-btn:hover {
    color: #f00;
}
    
    
       <div id="popup" class="popup">
        <div id="closeBtn" class="close-btn">&times;</div>
        <a href="https://nobitex.ir/signup/?refcode=213644" target="_blank">
            <img src="https://cdn.nobitex.ir/referral/share-banner-low.gif" alt="پاپ آپ">
        </a>
    </div>
<script>
    document.addEventListener('DOMContentLoaded', function() {
    const popup = document.getElementById('popup');
    const closeBtn = document.getElementById('closeBtn');

    // بستن پاپ آپ با کلیک روی علامت ضربدر
    closeBtn.addEventListener('click', function() {
        popup.style.display = 'none';
    });

    // بستن پاپ آپ با کلیک خارج از آن (اختیاری)
    window.addEventListener('click', function(event) {
        if (event.target === popup) {
            popup.style.display = 'none';
        }
    });
});
</script>
    
    