/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background-color 0.3s, color 0.3s;
}

h1, h2 {
    color: #007BFF;
    text-align: center;
    margin-bottom: 15px;
}

.container {
    max-width: 800px;
    width: 100%;
    margin: 20px auto;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    padding: 20px;
}

.todo-input {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.todo-input label {
    font-size: 1rem;
    color: #555;
    margin-bottom: 5px;
}

.todo-input input {
    width: 100%;
    max-width: 600px;
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s;
}

.todo-input input:focus {
    border-color: #007BFF;
}

.todo-input #char-count {
    margin-top: 5px;
    font-size: 0.9rem;
    color: #888;
}

.todo-input button {
    margin-top: 15px;
    padding: 10px 20px;
    font-size: 1rem;
    color: #fff;
    background-color: #007BFF;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.todo-input button:hover {
    background-color: #0056b3;
}

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

.filters button {
    padding: 8px 15px;
    font-size: 0.9rem;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.filters button:hover,
.filters .active-filter {
    background-color: #007BFF;
    color: white;
    border-color: #007BFF;
}

/* Lista de tarefas */
#task-list {
    list-style: none;
    padding: 0;
}

#task-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin: 10px 0;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s;
}

#task-list li.completed {
    background: #d4edda;
    border-color: #c3e6cb;
}

#task-list li.completed span {
    text-decoration: line-through;
    color: #155724;
}

#task-list li span {
    font-size: 1rem;
    flex: 1;
    padding-right: 10px;
    cursor: pointer;
}

#task-list li button {
    margin-left: 10px;
    padding: 5px 10px;
    font-size: 0.9rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

#task-list li button:nth-child(2) {
    background-color: #28a745;
    color: white;
}

#task-list li button:nth-child(2):hover {
    background-color: #218838;
}

#task-list li button:nth-child(3) {
    background-color: #dc3545;
    color: white;
}

#task-list li button:nth-child(3):hover {
    background-color: #c82333;
}

/* Botão limpar todas */
#clear-tasks-btn {
    margin-top: 15px;
    padding: 10px 20px;
    font-size: 1rem;
    background: #ffc107;
    color: #333;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#clear-tasks-btn:hover {
    background-color: #e0a800;
}

/* Rodapé */
footer {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    background: #007BFF;
    color: white;
    width: 100%;
}

footer a {
    color: white;
    text-decoration: underline;
}

footer a:hover {
    text-decoration: none;
}

footer button {
    margin-top: 10px;
    padding: 10px 15px;
    font-size: 0.9rem;
    border: none;
    border-radius: 5px;
    background: white;
    color: #007BFF;
    cursor: pointer;
    transition: all 0.3s;
}

footer button:hover {
    background-color: #0056b3;
    color: white;
}

/* Modo escuro */
.dark-mode {
    background-color: #121212;
    color: #eeeeee;
}

.dark-mode input,
.dark-mode button,
.dark-mode #task-list li {
    background-color: #333333;
    color: #ffffff;
    border-color: #555555;
}

.dark-mode #task-list li.completed {
    background-color: #2d6a4f;
    border-color: #1b4332;
}

.dark-mode .filters button {
    color: #dddddd;
}

.dark-mode footer {
    background-color: #222222;
    color: #dddddd;
}
