#popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#popup.show {
    display: flex;
    opacity: 1;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

#popup-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    color: #333;
    position: relative;
    transform: scale(0) rotate(-10deg);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    transition: transform 0.5s ease, box-shadow 0.5s ease, opacity 0.5s ease;
}

#popup.show #popup-content {
    transform: scale(1) rotate(0deg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    opacity: 1;
}

#popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    background-color: #f9f9f9;
}

#popup-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
}

#popup-close:hover {
    color: #333;
}

#popup-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
}

#popup-loader.hidden {
    display: none;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}