/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    padding: 30px;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
    font-size: 28px;
}

/* Input styles */
.todo-input {
    display: flex;
    margin-bottom: 20px;
}

#task-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

#task-input:focus {
    border-color: #4caf50;
}

#add-task-btn {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

#add-task-btn:hover {
    background-color: #45a049;
}

/* Filter buttons */
.filters {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.filter-btn {
    background-color: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-btn:hover {
    background-color: #f1f1f1;
}

.filter-btn.active {
    background-color: #4caf50;
    color: white;
    border-color: #4caf50;
}

/* Task list styles */
#task-list {
    list-style-type: none;
    margin-bottom: 20px;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    animation: fadeIn 0.3s ease;
}

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

.task-item:last-child {
    border-bottom: none;
}

.task-checkbox {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #4caf50;
}

.task-text {
    flex: 1;
    font-size: 16px;
    color: #333;
    transition: color 0.3s, text-decoration 0.3s;
}

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

.delete-btn {
    background-color: transparent;
    color: #ff5252;
    border: none;
    cursor: pointer;
    font-size: 18px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.delete-btn:hover {
    opacity: 1;
}

/* Stats and clear button */
.todo-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #777;
}

#clear-completed {
    background-color: transparent;
    border: none;
    color: #777;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.3s;
}

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

/* Responsive adjustments */
@media (max-width: 500px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    #task-input, #add-task-btn {
        padding: 10px;
        font-size: 14px;
    }
    
    .task-text {
        font-size: 14px;
    }
}