/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    width: 100%;
    max-width: 550px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    margin-bottom: 2rem;
    overflow: hidden;
}

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

header h1 {
    color: #764ba2;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

header p {
    color: #666;
    font-size: 1rem;
}

/* Task form styles */
.task-form {
    display: flex;
    margin-bottom: 1.5rem;
}

#task-input {
    flex: 1;
    padding: 1rem;
    border: none;
    background-color: #f5f5f5;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

#task-input:focus {
    outline: none;
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(118, 75, 162, 0.3);
}

#add-task-btn {
    background-color: #764ba2;
    color: white;
    border: none;
    padding: 0 1.5rem;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

#add-task-btn:hover {
    background-color: #667eea;
}

/* Filters styles */
.filters {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    gap: 0.5rem;
}

.filter-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    color: #666;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    color: #764ba2;
}

.filter-btn.active {
    background-color: #764ba2;
    color: white;
}

/* Task list styles */
.task-list-container {
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

#task-list {
    list-style-type: none;
}

.task-item {
    background-color: #fff;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    animation: slideIn 0.3s ease-out forwards;
    position: relative;
    overflow: hidden;
}

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

.task-item.removing {
    animation: slideOut 0.3s ease-out forwards;
}

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

.task-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    border: 2px solid #764ba2;
    border-radius: 50%;
    position: relative;
    transition: all 0.3s ease;
}

.task-checkbox:checked {
    background-color: #764ba2;
}

.task-checkbox:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.task-text {
    flex: 1;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: #999;
}

.task-delete {
    background: none;
    border: none;
    color: #ff5252;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0;
    transition: all 0.3s ease;
}

.task-item:hover .task-delete {
    opacity: 1;
}

.task-delete:hover {
    color: #ff0000;
    transform: scale(1.2);
}

/* Task stats styles */
.task-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
}

#clear-completed {
    background: none;
    border: none;
    color: #764ba2;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

#clear-completed:hover {
    color: #ff5252;
}

/* Footer styles */
footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

footer p {
    margin-bottom: 0.5rem;
}

/* Responsive styles */
@media (max-width: 600px) {
    .container {
        padding: 1.5rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .task-form {
        flex-direction: column;
    }
    
    #task-input {
        border-radius: 8px;
        margin-bottom: 0.5rem;
    }
    
    #add-task-btn {
        border-radius: 8px;
        padding: 0.8rem;
    }
}

/* Custom scrollbar */
.task-list-container::-webkit-scrollbar {
    width: 6px;
}

.task-list-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.task-list-container::-webkit-scrollbar-thumb {
    background: #764ba2;
    border-radius: 10px;
}

/* Task editing styles */
.edit-input {
    flex: 1;
    font-size: 1rem;
    padding: 0.3rem;
    border: 1px solid #764ba2;
    border-radius: 4px;
    font-family: inherit;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 2rem 0;
    color: #999;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ddd;
}