/* Animationen */

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(20px, 30px) scale(1.05);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(29, 185, 84, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(29, 185, 84, 0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Partikel Effekt */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particles::before,
.particles::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-green);
    border-radius: 50%;
    box-shadow: 
        0 0 0 2px rgba(29, 185, 84, 0.1),
        100px 200px 0 0 rgba(29, 185, 84, 0.3),
        200px 400px 0 0 rgba(29, 185, 84, 0.2),
        300px 100px 0 0 rgba(29, 185, 84, 0.4),
        400px 300px 0 0 rgba(29, 185, 84, 0.2),
        500px 500px 0 0 rgba(29, 185, 84, 0.3),
        600px 200px 0 0 rgba(29, 185, 84, 0.1),
        700px 400px 0 0 rgba(29, 185, 84, 0.4),
        800px 100px 0 0 rgba(29, 185, 84, 0.2),
        900px 300px 0 0 rgba(29, 185, 84, 0.3);
    animation: particlesFloat 20s linear infinite;
}

.particles::after {
    animation-delay: 10s;
}

@keyframes particlesFloat {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-1000px) translateX(100px);
        opacity: 0;
    }
}

/* Hover Effekte */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(29, 185, 84, 0.5);
    border-color: var(--primary-green);
}

/* Button Animations */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::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:hover::before {
    width: 300px;
    height: 300px;
}

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Loading Animations */
.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(29, 185, 84, 0.2);
    border-top-color: var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(26, 31, 30, 0.8) 0%,
        rgba(29, 185, 84, 0.1) 50%,
        rgba(26, 31, 30, 0.8) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Scroll Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Gradient Animation */
.gradient-animate {
    background: linear-gradient(
        -45deg,
        #1DB954,
        #1ED760,
        #1AA34A,
        #1DB954
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Text Animations */
.text-glitch {
    position: relative;
}

.text-glitch::before,
.text-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.text-glitch::before {
    animation: glitch-1 2s infinite;
    color: var(--primary-green);
    z-index: -1;
}

.text-glitch::after {
    animation: glitch-2 2s infinite;
    color: var(--primary-green-light);
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% {
        transform: translate(0);
        opacity: 0;
    }
    20% {
        transform: translate(-2px, 2px);
        opacity: 0.8;
    }
    40% {
        transform: translate(-2px, -2px);
        opacity: 0.8;
    }
    60% {
        transform: translate(2px, 2px);
        opacity: 0.8;
    }
    80% {
        transform: translate(2px, -2px);
        opacity: 0.8;
    }
}

@keyframes glitch-2 {
    0%, 100% {
        transform: translate(0);
        opacity: 0;
    }
    20% {
        transform: translate(2px, -2px);
        opacity: 0.5;
    }
    40% {
        transform: translate(2px, 2px);
        opacity: 0.5;
    }
    60% {
        transform: translate(-2px, -2px);
        opacity: 0.5;
    }
    80% {
        transform: translate(-2px, 2px);
        opacity: 0.5;
    }
}

/* Card Flip Animation */
.flip-card {
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.flip-card-back {
    transform: rotateY(180deg);
}

/* Notification Animation */
.notification {
    position: fixed;
    top: 100px;
    right: -400px;
    width: 350px;
    background: var(--dark-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    z-index: 4000;
    animation: slideInRight 0.5s ease forwards;
}

.notification.hide {
    animation: slideOutRight 0.5s ease forwards;
}

@keyframes slideOutRight {
    to {
        right: -400px;
        opacity: 0;
    }
}

.notification.success {
    border-left: 4px solid var(--primary-green);
}

.notification.error {
    border-left: 4px solid #ff3b30;
}

.notification.info {
    border-left: 4px solid #007aff;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(29, 185, 84, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    animation: progressFill 2s ease forwards;
}

@keyframes progressFill {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 1rem;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--primary-green);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Konfetti Effekt */
@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: var(--primary-green);
    animation: confetti-fall 3s linear forwards;
    pointer-events: none;
}
