/* Celebration Modal Styles */
.celebration-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.celebration-modal.show {
    opacity: 1;
    visibility: visible;
}

.celebration-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    color: white;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.7) translateY(50px);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 400px;
    width: 90%;
}

.celebration-modal.show .celebration-content {
    transform: scale(1) translateY(0);
}

.celebration-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out infinite alternate;
}

.celebration-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.celebration-message {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

.celebration-close {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.celebration-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Confetti Animation */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff6b6b;
    animation: confetti-fall 3s linear infinite;
}

.confetti:nth-child(2n) { background: #4ecdc4; }
.confetti:nth-child(3n) { background: #45b7d1; }
.confetti:nth-child(4n) { background: #96ceb4; }
.confetti:nth-child(5n) { background: #ffeaa7; }
.confetti:nth-child(6n) { background: #dda0dd; }

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

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-20px); }
}

/* Milestone-specific backgrounds */
.celebration-content.protein-milestone {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
}

.celebration-content.calorie-milestone {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.celebration-content.fiber-milestone {
    background: linear-gradient(135deg, #96fbc4 0%, #f9f047 100%);
}

.celebration-content.macro-balance-milestone {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.celebration-content.daily-goal-milestone {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.celebration-content.streak-milestone {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Pulse animation for special milestones */
.celebration-content.special-milestone {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 20px 60px rgba(255, 255, 255, 0.4);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .celebration-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .celebration-icon {
        font-size: 3rem;
    }
    
    .celebration-title {
        font-size: 1.5rem;
    }
    
    .celebration-message {
        font-size: 1rem;
    }
}