* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    background: var(--bg);
    color: var(--text);
    transition: 0.3s;
}

:root {
    --bg: #f5f5f5;
    --text: #222;
    --card: #fff;
    --shadow: rgba(0,0,0,.1);
}

.dark {
    --bg: #121212;
    --text: #fff;
    --card: #1e1e1e;
    --shadow: rgba(255,255,255,.1);
}

.container {
    width: 450px;
    margin: 60px auto;
    padding: 25px;
    background: var(--card);
    border-radius: 12px;
    box-shadow: 0 5px 15px var(--shadow);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#themeToggle {
    padding: 8px 12px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
}

.task-input {
    display: flex;
    margin-top: 20px;
}

.task-input input {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.task-input button {
    margin-left: 10px;
    padding: 10px 18px;
    border: none;
    background: #007bff;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

.options {
    display: flex;
    align-items: center;
    margin: 20px 0;
    gap: 10px;
}

.filter {
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    background: var(--bg);
    color: var(--text);
}

.filter.active {
    background: #007bff;
    color: white;
}

#search {
    flex: 1;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

#taskList {
    list-style: none;
    margin-top: 10px;
}

.task {
    background: var(--card);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 3px 8px var(--shadow);
}

.task.completed .text {
    text-decoration: line-through;
    opacity: .6;
}

.task button {
    margin-left: 10px;
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
}

.edit {
    background: #ffc107;
}

.delete {
    background: #dc3545;
    color: white;
}
