/* Gold Coin Celebration Effects for QuizZL */

/* Gold Coin Animations */
.gold-coin {
    position: fixed;
    width: 24px;
    height: 24px;
    background: radial-gradient(circle at 30% 30%, #ffd700, #ffb347);
    border-radius: 50%;
    z-index: 2000;
    pointer-events: none;
    box-shadow: 
        0 0 10px rgba(255, 215, 0, 0.8),
        inset 2px 2px 4px rgba(255, 255, 255, 0.3),
        inset -2px -2px 4px rgba(0, 0, 0, 0.1);
    animation: coinSpin 0.8s linear infinite;
}

.gold-coin::before {
    content: '$';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: bold;
    color: #8B4513;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

@keyframes coinSpin {
    0% { transform: rotateY(0deg); }
    50% { transform: rotateY(90deg) scaleX(0.3); }
    100% { transform: rotateY(180deg); }
}

/* Coin Rain Effect */
.coin-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 1500;
}

.coin-rain .gold-coin {
    animation: coinFall 3s linear forwards, coinSpin 0.8s linear infinite;
}

@keyframes coinFall {
    0% {
        transform: translateY(-50px) rotate(0deg);
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Coin Fountain Effect */
.coin-fountain {
    position: absolute;
    pointer-events: none;
    z-index: 1600;
}

.coin-fountain .gold-coin {
    animation: coinFountain 2s ease-out forwards, coinSpin 0.6s linear infinite;
}

@keyframes coinFountain {
    0% {
        transform: translateY(0) scale(0.5);
        opacity: 1;
    }
    30% {
        transform: translateY(-80px) scale(1);
        opacity: 1;
    }
    70% {
        transform: translateY(-40px) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translateY(60px) scale(0.8);
        opacity: 0;
    }
}

/* Quizzy Digital Mascot */
.digital-mascot {
    position: fixed;
    bottom: 120px;
    right: 20px;
    width: 80px;
    height: 100px;
    z-index: 1400;
    transition: all 0.3s ease;
}

.mascot-body {
    position: relative;
    width: 60px;
    height: 80px;
    background: linear-gradient(45deg, #4CAF50, #81C784);
    border-radius: 30px 30px 10px 10px;
    margin: 0 auto 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: mascotIdle 3s ease-in-out infinite;
}

.mascot-head {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: radial-gradient(circle at 30% 30%, #FFE082, #FFC107);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mascot-eyes {
    position: absolute;
    top: 12px;
    left: 8px;
    width: 6px;
    height: 6px;
    background: #333;
    border-radius: 50%;
    box-shadow: 16px 0 0 #333;
    animation: mascotBlink 4s ease-in-out infinite;
}

.mascot-mouth {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 6px;
    background: #333;
    border-radius: 0 0 12px 12px;
}

.mascot-arms {
    position: absolute;
    top: 15px;
    left: -8px;
    width: 16px;
    height: 30px;
    background: #4CAF50;
    border-radius: 8px;
    box-shadow: 60px 0 0 #4CAF50;
}

.mascot-legs {
    position: absolute;
    bottom: -15px;
    left: 15px;
    width: 12px;
    height: 20px;
    background: #2E7D32;
    border-radius: 6px;
    box-shadow: 18px 0 0 #2E7D32;
}

/* Merch Gun Effect */
.merch-gun {
    position: absolute;
    top: 20px;
    right: -25px;
    width: 30px;
    height: 15px;
    background: linear-gradient(45deg, #795548, #A1887F);
    border-radius: 2px 8px 8px 2px;
    transform: rotate(-10deg);
    opacity: 0;
    transition: all 0.3s ease;
}

.merch-gun::before {
    content: '';
    position: absolute;
    top: -3px;
    right: -5px;
    width: 8px;
    height: 8px;
    background: #424242;
    border-radius: 50%;
}

.mascot-celebrating {
    animation: mascotCelebrate 1s ease-in-out;
}

.mascot-celebrating .merch-gun {
    opacity: 1;
    animation: gunRecoil 0.5s ease-in-out;
}

@keyframes mascotIdle {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

@keyframes mascotBlink {
    0%, 90%, 100% { height: 6px; }
    95% { height: 1px; }
}

@keyframes mascotCelebrate {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

@keyframes gunRecoil {
    0% { transform: rotate(-10deg) translateX(0); }
    50% { transform: rotate(-15deg) translateX(-5px); }
    100% { transform: rotate(-10deg) translateX(0); }
}

/* Enhanced floating score with coins */
.floating-score-with-coins {
    position: fixed;
    z-index: 1700;
    font-size: 24px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    pointer-events: none;
    animation: floatUpWithCoins 2s ease-out forwards;
}

@keyframes floatUpWithCoins {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    70% {
        transform: translateY(-80px) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translateY(-120px) scale(0.8);
        opacity: 0;
    }
}

/* Streak celebration enhancement */
.streak-celebration {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1800;
    text-align: center;
    pointer-events: none;
}

.streak-message {
    font-size: 36px;
    font-weight: bold;
    color: #FFD700;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    animation: streakPulse 1.5s ease-in-out;
}

@keyframes streakPulse {
    0%, 100% { 
        transform: scale(0.5);
        opacity: 0;
    }
    50% { 
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Coin collection effect */
.coin-collection {
    position: fixed;
    bottom: 100px;
    right: 100px;
    font-size: 18px;
    color: #FFD700;
    font-weight: bold;
    z-index: 1300;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: all 0.3s ease;
}

.coin-collection.active {
    opacity: 1;
    animation: coinCountUp 0.5s ease-out;
}

@keyframes coinCountUp {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Enhanced button interactions */
.submit-button-enhanced {
    position: relative;
    overflow: hidden;
}

.submit-button-enhanced::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.3), transparent);
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.submit-button-enhanced:hover::before {
    width: 200px;
    height: 200px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .digital-mascot {
        width: 60px;
        height: 80px;
        right: 10px;
        bottom: 80px;
    }
    
    .mascot-body {
        width: 45px;
        height: 60px;
    }
    
    .mascot-head {
        width: 30px;
        height: 30px;
        top: -20px;
    }
    
    .gold-coin {
        width: 20px;
        height: 20px;
    }
    
    .gold-coin::before {
        font-size: 12px;
    }
}