:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --accent: #4895ef;
    --danger: #f72585;
    --success: #4cc9f0;
    --light: #f8f9fa;
    --dark: #212529;
}

/* Animation Keyframes */
@keyframes particleAnim {
    0% {
        transform: translateY(0) translateX(0);
    }

    100% {
        transform: translateY(-1000px) translateX(-500px);
    }
}

@keyframes flip {
    0%, 100% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(180deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes shake {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(5deg);
    }

    50% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow-x: hidden;
    position: relative; /* Needed for the sticky footer to work */
    padding-bottom: 60px; /* Add padding to prevent content from being hidden by the footer */
}

/* Animated Background */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(67,97,238,0.1)" stroke-width="2"/></svg>');
    animation: particleAnim 60s linear infinite;
}

/* Dashboard Styles */
.dashboard {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 2rem;
}

    header h1 {
        color: var(--primary);
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

        header h1 i {
            animation: pulse 2s infinite;
        }

.stats {
    color: var(--dark);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

    .stats span {
        font-weight: bold;
        color: var(--primary);
    }

.progress-bar {
    width: 100px;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-left: 10px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.5s ease;
}

/* Input Section Styles */
.input-container {
    margin-bottom: 2rem;
}

.add-task {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
}

#todo-input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    border: 1px solid #dee2e6;
}

    #todo-input:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(72, 149, 239, 0.2);
    }

#add-btn {
    padding: 0 25px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

    #add-btn:hover {
        background: var(--secondary);
        transform: translateY(-2px);
    }

    #add-btn i {
        animation: bounce 1s infinite;
    }

/* Task History Styles */
.task-history {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

    .history-header h3 {
        color: var(--dark);
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 8px;
    }

        .history-header h3 i {
            animation: spin 4s linear infinite;
        }

#clear-history {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

    #clear-history:hover {
        transform: scale(1.1);
    }

    #clear-history i {
        animation: shake 0.5s infinite;
    }

.history-tasks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.history-task {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    border: 1px solid rgba(67, 97, 238, 0.2);
    display: flex;
    align-items: center;
    gap: 5px;
}

    .history-task:hover {
        background: rgba(67, 97, 238, 0.2);
        transform: translateY(-1px);
    }

    .history-task i {
        transition: transform 0.3s;
    }

    .history-task:hover i {
        transform: rotate(-30deg);
    }

/* Task Boards Styles */
.task-boards {
    display: flex;
    gap: 2rem;
}

.task-column {
    flex: 1;
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

    .task-column h2 {
        color: var(--dark);
        margin-bottom: 1rem;
        padding-bottom: 10px;
        border-bottom: 2px solid #e9ecef;
        display: flex;
        align-items: center;
        gap: 10px;
    }

.pending-column h2 {
    color: var(--primary);
}

    .pending-column h2 i {
        animation: flip 2s infinite ease-in-out;
    }

.completed-column h2 {
    color: var(--success);
}

    .completed-column h2 i {
        animation: pulse 1.5s infinite;
    }

/* Task Items Styles */
ul {
    list-style: none;
}

.todo-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

    .todo-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    .todo-item::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        width: 5px;
        background: var(--primary);
    }

.completed-list .todo-item::before {
    background: var(--success);
}

.todo-item input[type="checkbox"] {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
    transition: transform 0.2s;
}

    .todo-item input[type="checkbox"]:hover {
        transform: scale(1.2);
    }

.todo-item span {
    flex: 1;
    font-size: 1.1rem;
}

.todo-item small {
    color: #6c757d;
    font-size: 0.9rem;
    margin-right: 15px;
}

.todo-item button.delete {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .todo-item button.delete:hover {
        background: #d11a6b;
    }

    .todo-item button.delete i {
        transition: transform 0.3s;
    }

    .todo-item button.delete:hover i {
        transform: rotate(15deg);
    }

.completed-list .todo-item {
    opacity: 0.9;
}

    .completed-list .todo-item span {
        text-decoration: line-through;
        color: #6c757d;
    }
.todo-item small {
    color: #6c757d;
    font-size: 0.8rem;
    margin-right: 15px;
    font-style: italic;
}

.completed-list .todo-item small {
    color: var(--success);
}

/* Notification Styles */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

    .notification.show {
        transform: translateY(0);
        opacity: 1;
    }

    .notification.success {
        background: var(--success);
    }

    .notification.error {
        background: var(--danger);
    }

/* Footer Styles */
.footer {
    text-align: center;
    padding: 15px 0;
    color: #888;
    background-color: #f8f9fa; /* Consistent with other light backgrounds */
    border-top: 1px solid #e9ecef;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 999; /* Higher than particles, lower than notifications */
}

/* Responsive Design */
@media (max-width: 768px) {
    .task-boards {
        flex-direction: column;
    }

    .dashboard {
        padding: 1rem;
        margin: 1rem;
    }

    .add-task {
        flex-direction: column;
    }

    #add-btn {
        width: 100%;
        justify-content: center;
    }
}
