/* Fun Animations & Easter Eggs CSS */

/* 1. Konfetti Animation */
@keyframes confetti-fall {
    0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    z-index: 9999;
    pointer-events: none;
}

/* 2. Shake Animation bei Fehlern */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.shake-error {
    animation: shake 0.5s ease-in-out;
    border-color: #ff4444 !important;
}

/* 3. Loading Animation mit Spaß */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(102, 126, 234, 0.5); }
    50% { box-shadow: 0 0 20px rgba(102, 126, 234, 1); }
}

.loading-icon {
    display: inline-block;
    animation: bounce 1s infinite;
}

.loading-spinner {
    display: inline-block;
    animation: rotate 1s linear infinite;
}

/* 4. Button Hover Effekte */
.btn-fun {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-fun:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-fun::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-fun:active::before {
    width: 300px;
    height: 300px;
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
}

.sparkle {
    position: absolute;
    width: 5px;
    height: 5px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    animation: sparkle 0.6s ease-out;
}

/* 5. Klick-Feedback Wellen */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    width: 20px;
    height: 20px;
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

/* 6. Regenbogen-Modus (Easter Egg) */
@keyframes rainbow-bg {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.rainbow-mode {
    background: linear-gradient(270deg, #ff0080, #ff8c00, #40e0d0, #ff0080);
    background-size: 600% 600%;
    animation: rainbow-bg 3s ease infinite;
}

@keyframes rainbow-text {
    0% { color: #ff0080; }
    25% { color: #ff8c00; }
    50% { color: #40e0d0; }
    75% { color: #7b68ee; }
    100% { color: #ff0080; }
}

.rainbow-text {
    animation: rainbow-text 2s linear infinite;
}

/* 7. Floating Emojis */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.floating-emoji {
    position: fixed;
    font-size: 30px;
    animation: float 3s ease-in-out infinite;
    pointer-events: none;
    opacity: 0.3;
    z-index: 1;
}

/* 8. Smooth Transitions */
.page-transition {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideInRight 0.4s ease-out;
}

/* 9. Success Celebration */
@keyframes celebrate {
    0% { transform: scale(1); }
    50% { transform: scale(1.2) rotate(5deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.celebrate {
    animation: celebrate 0.5s ease-in-out;
}

/* 10. Wobble Effect */
@keyframes wobble {
    0% { transform: translateX(0%); }
    15% { transform: translateX(-25px) rotate(-5deg); }
    30% { transform: translateX(20px) rotate(3deg); }
    45% { transform: translateX(-15px) rotate(-3deg); }
    60% { transform: translateX(10px) rotate(2deg); }
    75% { transform: translateX(-5px) rotate(-1deg); }
    100% { transform: translateX(0%); }
}

.wobble {
    animation: wobble 0.8s ease-in-out;
}

/* 11. Glitch Effect (für Easter Egg) */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

.glitch {
    animation: glitch 0.3s infinite;
}

/* 12. Heartbeat */
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    10%, 30% { transform: scale(0.9); }
    20%, 40% { transform: scale(1.1); }
}

.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* 13. Neon Glow Effect */
@keyframes neon-glow {
    0%, 100% {
        text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #667eea, 0 0 40px #667eea;
    }
    50% {
        text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 15px #667eea, 0 0 20px #667eea;
    }
}

.neon-text {
    animation: neon-glow 1.5s ease-in-out infinite;
}

/* 14. Typing Effect */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

.typing-text {
    overflow: hidden;
    border-right: 2px solid;
    white-space: nowrap;
    animation: typing 3s steps(40) 1s 1 normal both, blink 0.75s step-end infinite;
}

/* 15. Pop-in Animation */
@keyframes pop-in {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.pop-in {
    animation: pop-in 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* 16. Flip Animation */
@keyframes flip {
    0% { transform: perspective(400px) rotateY(0); }
    100% { transform: perspective(400px) rotateY(360deg); }
}

.flip {
    animation: flip 0.6s ease-in-out;
}

/* 17. Gradient Animation */
@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-animated {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

/* 18. Typing Speed Notification */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(50px);
    }
}

.typing-speed-notification {
    animation: slideInRight 0.5s ease-out, fadeOut 0.5s ease-out 2.5s;
}

/* 19. Double-Click Protection Pulse */
@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(102, 126, 234, 0.5);
    }
    50% { 
        box-shadow: 0 0 20px rgba(102, 126, 234, 1), 0 0 30px rgba(102, 126, 234, 0.5);
    }
}

.pulse-glow {
    animation: pulse-glow 1s ease-in-out infinite;
}

/* Button Processing State */
button[disabled],
button.processing {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

button.processing::after {
    content: '⏳';
    margin-left: 8px;
    animation: rotate 1s linear infinite;
}
