* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #f3f4f6;
    color: #1f2937;
    display: flex;
    justify-content: center;
    padding: 3rem 1rem;
}

.card {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    align-self: flex-start;
}

h1 { margin: 0 0 1rem; font-size: 1.5rem; }

.add-form { display: flex; gap: 0.5rem; margin-bottom: 1rem; }

.add-form input {
    flex: 1;
    padding: 0.6rem 0.8rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
}

.add-form button {
    padding: 0.6rem 1rem;
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
}

.add-form button:hover { background: #1d4ed8; }

.todo-list { list-style: none; margin: 0; padding: 0; }

.todo-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.todo-list li:last-child { border-bottom: 0; }
.todo-list form { margin: 0; }
.todo-list .title { flex: 1; word-break: break-word; }
.todo-list li.done .title { text-decoration: line-through; color: #9ca3af; }
.todo-list .empty { color: #9ca3af; justify-content: center; }

.check {
    width: 22px;
    height: 22px;
    border: 2px solid #9ca3af;
    border-radius: 50%;
    background: #fff;
    color: #fff;
    font-size: 0.75rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

li.done .check { background: #16a34a; border-color: #16a34a; }

.delete {
    border: 0;
    background: none;
    color: #9ca3af;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.delete:hover { color: #dc2626; }
