#successPopup {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-in-out;
}
.popup-content {
    background: linear-gradient(135deg, #97d6df, #8fbfdf);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    max-width: 320px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
    border: 3px solid #ffcc00;
    animation: popIn 0.4s ease-out;
}
.popup-content h2 {
    margin-bottom: 5px;
    color: #ff9800;
}
.subtitle {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
}
.flag-img {
    margin: 10px 0;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.2);
}
.choice-text {
    font-size: 16px;
    margin: 10px 0;
    color: #333;
}
.goto-btn {
    background: linear-gradient(45deg, #ff9800, #ff5722);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
    transition: transform 0.2s, background 0.3s;
}
.goto-btn:hover {
    transform: scale(1.05);
    background: linear-gradient(45deg, #ff5722, #e91e63);
}
.close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 22px;
    cursor: pointer;
    color: #ffffff;
}
.close-btn:hover {
    color: #000;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    flex-direction: column;
}

.loading-box {
    text-align: center;
    color: white;
    font-size: 16px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 6px solid #fff;
    border-top: 6px solid #ff9800;
    border-radius: 50%;
    animation: spin .5s linear infinite;
    margin-bottom: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}