/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #f4f4f4;
    color: #333;
    transition: background 0.3s, color 0.3s;
}

.container {
    max-width: 600px;
    margin: 50px auto;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
    color: #007bff;
}

/* Task Input */
.task-input {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.task-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.task-input button {
    padding: 10px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.task-input button:hover {
    background: #0056b3;
}

/* Task List */
.task-list {
    list-style: none;
}

.task-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    padding: 12px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    transition: transform 0.2s;
}

.task-list li:hover {
    transform: scale(1.02);
}

/* Task Text */
.task-text {
    flex: 1;
    font-size: 16px;
    cursor: pointer;
}

.completed {
    text-decoration: line-through;
    color: #999;
}

/* Buttons */
.task-buttons {
    display: flex;
    gap: 8px;
}

.task-buttons button {
    border: none;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 14px;
}

.task-buttons .edit {
    background: #ffc107;
    color: white;
}

.task-buttons .edit:hover {
    background: #e0a800;
}

.task-buttons .delete {
    background: #dc3545;
    color: white;
}

.task-buttons .delete:hover {
    background: #c82333;
}

/* Dark Mode */
.dark-mode {
    background: #1e1e1e;
    color: white;
}

.dark-mode .container {
    background: #2a2a2a;
}

.dark-mode .task-input input {
    background: #3a3a3a;
    color: white;
    border: 1px solid #555;
}

.dark-mode .task-list li {
    background: #333;
    color: white;
}

.dark-mode-toggle {
    display: block;
    margin: 20px auto 0;
    padding: 10px;
    background: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.dark-mode-toggle:hover {
    background: #555;
}
