/* Confetti Animation Styles for FocusBuddy */

.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 10;
}

.confetti {
    position: absolute;
    width: 8px;
    height: 12px;
    background-color: var(--color, #ffd89b);
    top: -20px;
    left: calc(var(--x, 50%) - 5px);
    opacity: 0;
    animation: confetti-fall 3s var(--delay, 0s) linear forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    40% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(500px) rotate(360deg);
        opacity: 0;
    }
}

.confetti-heart::before {
    content: '❤️';
    font-size: 14px;
    position: absolute;
    top: 0;
    left: 0;
}

.confetti-star::before {
    content: '⭐';
    font-size: 14px;
    position: absolute;
    top: 0;
    left: 0;
}

/* Completion Modal Celebration */
.celebration-content {
    position: relative;
    padding: 40px 20px;
    border-radius: 30px;
    background: linear-gradient(145deg, var(--primary-color), var(--accent-color));
    color: white;
    text-align: center;
    overflow: hidden;
    max-width: 90%;
    width: 300px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(254, 197, 187, 0.4);
    animation: celebration-bounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes celebration-bounce {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    60% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.celebration-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1),
                inset 0 5px 10px rgba(255, 255, 255, 0.2);
    animation: celebration-pulse 3s infinite;
}

@keyframes celebration-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1),
                    inset 0 5px 10px rgba(255, 255, 255, 0.2);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2),
                    inset 0 5px 15px rgba(255, 255, 255, 0.3);
    }
}

.points-earned {
    display: inline-block;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    margin-top: 15px;
    margin-bottom: 20px;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    animation: points-glow 2s infinite;
}

@keyframes points-glow {
    0%, 100% {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
    }
}

.points-earned i {
    color: #ffeb3b;
    margin-right: 8px;
    filter: drop-shadow(0 0 5px rgba(255, 235, 59, 0.5));
    animation: star-spin 3s linear infinite;
}

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

.celebration-content .btn {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 12px 30px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.celebration-content .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

/* Sparkle Effect */
.sparkle-effect {
    position: absolute;
    width: 8px;
    height: 8px;
    pointer-events: none;
    z-index: 100;
}

.sparkle-effect::before {
    content: "✨";
    position: absolute;
    font-size: 18px;
    animation: sparkle-spin 1s linear infinite;
}

@keyframes sparkle-spin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    50% {
        transform: rotate(180deg) scale(1.2);
    }
    100% {
        transform: rotate(360deg) scale(1);
    }
}

/* Celebration Background */
.celebration-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9;
    background: radial-gradient(circle, rgba(254, 197, 187, 0.2) 0%, rgba(254, 197, 187, 0) 70%);
    animation: bg-pulse 2s ease-in-out infinite;
}

@keyframes bg-pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

/* Level Up Animation */
.level-up-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.7);
    animation: level-bg-fade 0.5s forwards;
}

@keyframes level-bg-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.level-up-content {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    color: white;
    box-shadow: 0 20px 50px rgba(254, 197, 187, 0.5);
    position: relative;
    overflow: hidden;
    animation: level-content-appear 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes level-content-appear {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    70% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.level-up-text {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.level-up-number {
    font-size: 4rem;
    font-weight: 800;
    margin: 20px 0;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: level-number-pulse 2s infinite;
}

@keyframes level-number-pulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    }
    50% {
        transform: scale(1.2);
        text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.5);
    }
}