body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f4f4f4;
    direction: rtl; /* برای پشتیبانی از زبان فارسی */
    text-align: right; /* برای پشتیبانی از زبان فارسی */
}

#popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* پس‌زمینه نیمه شفاف */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* مطمئن شوید که پاپ‌آپ بالای همه چیز قرار گیرد */
    opacity: 0; /* ابتدا نامرئی باشد */
    visibility: hidden; /* ابتدا پنهان باشد */
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out; /* افکت Fade */
}

#popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

#popup-box {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 400px;
    transform: translateY(-20px); /* برای افکت بالا آمدن جزئی */
    transition: transform 0.3s ease-in-out; /* افکت بالا آمدن */
}

#popup-overlay.show #popup-box {
    transform: translateY(0);
}


.popup-header {
    background-color: #007bff;
    color: white;
    padding: 15px 20px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1em;
}

.popup-header h2 {
    margin: 0;
    font-size: 1.3em;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    outline: none;
    transition: color 0.2s ease;
}

.close-btn:hover {
    color: #ddd;
}

.popup-content {
    padding: 20px;
    font-size: 1.1em;
    line-height: 1.6;
    color: #333;
}

.popup-content p {
    margin: 0;
}

.popup-footer {
    padding: 10px 20px 15px;
    text-align: left; /* دکمه بستن در سمت چپ */
}

.popup-footer button {
    background-color: #dc3545; /* رنگ قرمز برای بستن */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s ease;
}

.popup-footer button:hover {
    background-color: #c82333;
}
