* {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    font-size: 16px;
    background-color: #f5f5f5;
    color: #333;
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

main {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.1);
    padding: 10px 20px;
}

h1 {
    font-size: 32px;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
}

#add-container {
    display: flex;
    margin-bottom: 20px;
}

#add-task {
    flex: 1;
    padding: 10px;
    border-radius: 4px 0 0 4px;
    border: 1px solid #ddd;
    font-size: 16px;
}

#add-task:focus, #search-task:focus {
    outline: none;
    border-color: #3498db;
}

.generic-btn {
    background-color: #ecf0f1;
    color: black;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
}

#add-task-btn {
    background-color: #3498db;
    color: white;
    font-size: 16px;
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 10px 15px;
    cursor: pointer;
}

#add-task-btn:hover {
    background-color: #2980b9;
}

#search-container {
    display: flex;
    margin-bottom: 20px;
    position: relative;
}

#search-task {
    flex: 1;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding-left: 36px;
}

#search-img {
    position: absolute;
    top: 10px;
    left: 10px;
    cursor: pointer;
}

#clear-img {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: none;
    display: none;
    cursor: pointer;
}

#clear-img:hover {
    color: #e74c3c;
}

#clear-img.show {
    display: block;
}

#btn-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

#all-btn, #completed-btn, #active-btn {
    cursor: pointer;
    transition: all 0.3s;
}

#all-btn:hover, #completed-btn:hover, #active-btn:hover {
    color: white;
    background-color: #3498db;
}


.selected {
    color: white;
    background-color: #3498db;
}

ul#task-container {
    list-style: none;
    margin: 0;
    padding: 0;
    margin-bottom: 20px;
}

li.task-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    border: none;
    font-size: 16px;
    border-radius: 4px;
    transition: all 0.3s;
    animation: fadeIn 0.5s;
}

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

input[type="checkbox"] {
    height: 18px;
    width: 18px;
    margin-right: 15px;
    cursor: pointer;
}

.todo-text {
    flex: 1;
    word-break: break-word;
}

.edit-btn, .del-btn, .cancel-btn, .save-btn {
    cursor: pointer;
    border: none;
    border-radius: 4px;
    color: white;
    padding: 5px 10px;
    transition: background 0.3s;
}

.edit-btn {
    background-color: #f39c12;
}

.edit-btn:hover {
    background-color: #e67e22;
}

.del-btn {
    background-color: #e74c3c;
}

.del-btn:hover {
    background-color: #c0392b;
}

.save-btn {
    background: #2ecc71;
}

.save-btn:hover {
    background: #27ae60;
}

.cancel-btn {
    background: #95a5a6;
}

.cancel-btn:hover {
    background: #7f8c8d;
}

li.completed {
    background-color: #e8f5e9;
}

li.completed > label.todo-text {
    text-decoration: line-through;
    color: #7f8c8d;
}

.edit-task {
    padding: 5px 8px;
    border: 1px solid #3498db;
    color: black;
    background-color: white;
    border-radius: 4px;
    font-size: 16px;
}

.edit-task:focus {
    border: 2px solid black;
}

.stats {
    color: #7f8c8d;
    font-size: 18px;
    text-align: center;
    margin-top: 20px;
}

.filter-text {
    font-size: 15px;
    margin-bottom: 10px;
}

.filter-none {
    margin: 30px;
    font-style: italic;
}

.highlighted {
    background-color: #ffffcc;
}
