/* Success Animation Styles */
.success-animation-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(116, 61, 151, 0.85); /* Purple background like other modals */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.success-animation-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Blur background content when success animation is shown */
body:has(.success-animation-overlay.show) .main-content,
body:has(.success-animation-overlay.show) header,
body:has(.success-animation-overlay.show) .navbar {
    filter: blur(8px);
    transition: filter 0.3s ease;
}

.success-animation-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
    max-width: 400px;
    width: 90%;
}

.success-animation-overlay.show .success-animation-content {
    transform: scale(1);
}

.success-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #28a745, #20c997);
    margin: 0 auto 20px;
    position: relative;
    animation: checkmark-bounce 0.6s ease-in-out;
}

.success-checkmark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 25px;
    height: 15px;
    border: 3px solid white;
    border-top: none;
    border-right: none;
    transform: translate(-50%, -60%) rotate(-45deg);
    animation: checkmark-draw 0.3s ease-in-out 0.3s both;
}

@keyframes checkmark-bounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes checkmark-draw {
    0% {
        opacity: 0;
        transform: translate(-50%, -60%) rotate(-45deg) scale(0);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -60%) rotate(-45deg) scale(1);
    }
}

.success-title {
    font-size: 24px;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 10px;
    animation: fade-in-up 0.5s ease-in-out 0.4s both;
}

.success-message {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    animation: fade-in-up 0.5s ease-in-out 0.5s both;
}

.success-confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--mm-yellow);
    animation: confetti-fall 2s ease-in-out infinite;
}

.success-confetti:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    background: var(--mm-purple);
}

.success-confetti:nth-child(2) {
    left: 20%;
    animation-delay: 0.2s;
    background: var(--mm-yellow);
}

.success-confetti:nth-child(3) {
    left: 30%;
    animation-delay: 0.4s;
    background: var(--mm-purple);
}

.success-confetti:nth-child(4) {
    left: 70%;
    animation-delay: 0.1s;
    background: var(--mm-yellow);
}

.success-confetti:nth-child(5) {
    left: 80%;
    animation-delay: 0.3s;
    background: var(--mm-purple);
}

.success-confetti:nth-child(6) {
    left: 90%;
    animation-delay: 0.5s;
    background: var(--mm-yellow);
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .success-animation-content {
        padding: 30px 20px;
    }
    
    .success-checkmark {
        width: 60px;
        height: 60px;
    }
    
    .success-title {
        font-size: 20px;
    }
    
    .success-message {
        font-size: 14px;
    }
}
