* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: #0f172a;
    color: #e2e8f0;
    min-height: 100vh;
    padding: 24px 16px;
}

.container {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

h1 {
    text-align: center;
    margin-bottom: 18px;
    font-size: clamp(1.5rem, 2.5vw, 2.1rem);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.task-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}

.task-form input {
    flex: 1;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(2, 6, 23, 0.35);
    color: #e2e8f0;
    outline: none;
}

.task-form input:focus {
    border-color: rgba(99, 102, 241, 0.7);
}

.task-form button {
    padding: 12px 16px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    background: #4f46e5;
    color: white;
}

.task-form button:hover {
    background: #4338ca;
}

.task-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(2, 6, 23, 0.35);
}

.task-item.completed {
    opacity: 0.7;
}

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

.task-item.completed .task-text {
    text-decoration: line-through;
    color: #cbd5e1;
}

.task-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.task-delete {
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    cursor: pointer;
    font-weight: 600;
}

.task-delete:hover {
    background: rgba(239, 68, 68, 0.18);
}

@media (max-width: 520px) {
    .task-form {
        flex-direction: column;
        align-items: stretch;
    }

    .task-form button {
        width: 100%;
    }
}
