/* ====== GAMIFICATION ENHANCEMENTS ====== */

/* Progress Bar Styles */
.brewing-progress {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    background: rgba(0,0,0,0.3);
    border-radius: 10px;
    padding: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.progress-bar {
    height: 30px;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 8px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Cauldron Liquid Animation */
.cauldron-liquid {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 150px;
    border-radius: 0 0 100px 100px;
    background: linear-gradient(180deg, transparent 0%, #8B4513 100%);
    opacity: 0.7;
    transition: all 0.8s ease;
    overflow: hidden;
}

.liquid-bubble {
    position: absolute;
    bottom: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    animation: bubble-rise 3s infinite ease-in;
}

@keyframes bubble-rise {
    0% {
        bottom: 0;
        opacity: 0.8;
        transform: translateX(0) scale(1);
    }
    50% {
        opacity: 0.5;
    }
    100% {
        bottom: 100%;
        opacity: 0;
        transform: translateX(20px) scale(1.5);
    }
}

/* Ingredient Added Animation */
@keyframes ingredient-splash {
    0% {
        transform: translateY(-50px) scale(1);
        opacity: 1;
    }
    50% {
        transform: translateY(0) scale(1.2);
        opacity: 0.8;
    }
    100% {
        transform: translateY(20px) scale(0.5);
        opacity: 0;
    }
}

.ingredient-splash {
    position: fixed;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    animation: ingredient-splash 1s ease-out;
    pointer-events: none;
}

/* Ingredients List in Cauldron */
.cauldron-contents {
    background: rgba(92, 70, 44, 0.9);
    border: 2px solid #d4a574;
    border-radius: 10px;
    padding: 15px;
    margin: 20px auto;
    max-width: 600px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.cauldron-contents h4 {
    color: #f0e68c;
    text-align: center;
    margin-bottom: 15px;
    font-family: 'Magismo', serif;
}

.ingredient-item {
    display: flex;
    align-items: center;
    padding: 8px;
    margin: 5px 0;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    animation: fade-in-slide 0.5s ease-out;
}

.ingredient-item img {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.ingredient-item span {
    color: #ffffff;
    font-size: 14px;
}

@keyframes fade-in-slide {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Success/Error Messages */
.brew-message {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    padding: 20px 40px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: bold;
    z-index: 2000;
    animation: message-bounce 0.6s ease-out;
    box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.brew-message.success {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    color: white;
}

.brew-message.error {
    background: linear-gradient(135deg, #f44336, #e91e63);
    color: white;
}

@keyframes message-bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-20px);
    }
}

/* Sparkle Effect for Correct Ingredient */
.sparkle {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #ffd700;
    border-radius: 50%;
    pointer-events: none;
    animation: sparkle-burst 1s ease-out forwards;
}

@keyframes sparkle-burst {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--x), var(--y)) scale(0);
    }
}

/* Enhanced Ingredient Hover */
.ingredient-clickable {
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.ingredient-clickable:hover {
    transform: scale(1.1) translateY(-5px);
    filter: brightness(1.2) drop-shadow(0 8px 16px rgba(255,215,0,0.5));
}

.ingredient-clickable::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255,215,0,0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ingredient-clickable:hover::after {
    opacity: 1;
}

/* Quality Rating Display */
.quality-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 10px 5px;
    animation: badge-glow 2s ease-in-out infinite;
}

.quality-excellent {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    box-shadow: 0 0 20px rgba(255,215,0,0.8);
}

.quality-good {
    background: linear-gradient(135deg, #4CAF50, #8BC34A);
    color: white;
    box-shadow: 0 0 15px rgba(76,175,80,0.6);
}

.quality-poor {
    background: linear-gradient(135deg, #9E9E9E, #757575);
    color: white;
    box-shadow: 0 0 10px rgba(158,158,158,0.4);
}

@keyframes badge-glow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

/* Potion Completion Celebration */
.celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #f0f;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}