@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #3b82f6;
    --primary-light: #93c5fd;
    --primary-dark: #1d4ed8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    min-height: 100vh;
    background-color: #f8fafc;
    background-image: url(background\ image.jpg);
}

.todo-app {
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.todo-app:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.tasks-list {
    max-height: 400px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-light) transparent;
}

.tasks-list::-webkit-scrollbar {
    width: 6px;
}

.tasks-list::-webkit-scrollbar-track {
    background: transparent;
}

.tasks-list::-webkit-scrollbar-thumb {
    background-color: var(--primary-light);
    border-radius: 20px;
}

.tasks-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid var(--primary-light);
}

.tasks-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-left-color: var(--primary);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tasks-list label {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    cursor: pointer;
}

.tasks-list input[type="checkbox"] {
    display: none;
}

.custom-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--primary-light);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.tasks-list input[type="checkbox"]:checked + .custom-checkbox {
    background-color: var(--primary);
    border-color: var(--primary);
}

.tasks-list input[type="checkbox"]:checked + .custom-checkbox::after {
    content: '';
    display: block;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-top: -2px;
}

.tasks-list input[type="checkbox"]:checked ~ span {
    text-decoration: line-through;
    color: #94a3b8;
}

.delete-btn {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 6px;
    border-radius: 6px;
}

.delete-btn:hover {
    color: #ef4444;
    background-color: #fee2e2;
    transform: rotate(10deg) scale(1.1);
}

.empty-message {
    opacity: 0.6;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: var(--primary);
    opacity: 0;
    animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.task-complete-animation {
    animation: taskComplete 0.5s ease-out;
}

@keyframes taskComplete {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 640px) {
    .todo-app {
        border-radius: 0;
    }
    
    .input-area {
        flex-direction: column;
    }
    
    .add-tsk-button {
        width: 100%;
    }
}