/* Animation Effects */

/* Card entrance animation */
.task-card {
    animation: cardSlideIn 0.3s ease-out;
}

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card completion celebration */
.task-card.celebrating {
    animation: celebrate 0.6s ease-out;
}

@keyframes celebrate {
    0% { transform: scale(1); }
    25% { transform: scale(1.05); }
    50% { transform: scale(0.95); }
    75% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Shake animation for errors */
.task-card.shake {
    animation: shake 0.5s ease-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Glow effect for Claude running */
.task-card.claude-running {
    box-shadow: 0 0 20px rgba(204, 120, 92, 0.3);
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 10px rgba(204, 120, 92, 0.2); }
    50% { box-shadow: 0 0 25px rgba(204, 120, 92, 0.4); }
}

/* Success checkmark animation */
.checkmark-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    pointer-events: none;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 4;
    stroke: var(--success-color);
    stroke-miterlimit: 10;
    animation: fill 0.4s ease-in-out 0.4s forwards, scale 0.3s ease-in-out 0.9s both;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 4;
    stroke-miterlimit: 10;
    stroke: var(--success-color);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

@keyframes scale {
    0%, 100% { transform: none; }
    50% { transform: scale3d(1.1, 1.1, 1); }
}

@keyframes fill {
    100% { box-shadow: inset 0 0 0 40px rgba(63, 185, 80, 0.1); }
}

/* Fade out animation */
.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* Column drop highlight */
.column-content.highlight-drop {
    animation: dropHighlight 0.5s ease-out;
}

@keyframes dropHighlight {
    0% { background-color: rgba(88, 166, 255, 0.2); }
    100% { background-color: transparent; }
}

/* Stagger animation for initial load */
.task-card:nth-child(1) { animation-delay: 0ms; }
.task-card:nth-child(2) { animation-delay: 50ms; }
.task-card:nth-child(3) { animation-delay: 100ms; }
.task-card:nth-child(4) { animation-delay: 150ms; }
.task-card:nth-child(5) { animation-delay: 200ms; }
.task-card:nth-child(6) { animation-delay: 250ms; }
.task-card:nth-child(7) { animation-delay: 300ms; }
.task-card:nth-child(8) { animation-delay: 350ms; }

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

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn:active::after {
    width: 200px;
    height: 200px;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Transition for modal */
.modal {
    transition: opacity 0.2s ease;
}

.modal.active .modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
