* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #f3f4f6;
    color: #1f2937;
}

.app {
    max-width: 760px;
    margin: 40px auto;
    padding: 20px;
}

.card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
}

.form-card {
    margin-bottom: 20px;
}

h1, h2 {
    margin-top: 0;
}

.task-form {
    display: flex;
    gap: 10px;
}

.task-form input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
}

.task-form button,
.secondary-btn,
.task-actions button {
    border: none;
    border-radius: 10px;
    cursor: pointer;
    padding: 10px 14px;
    color: #ffffff;
    background-color: #2563eb;
}

.secondary-btn {
    background-color: #4f46e5;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

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

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

.task-actions {
    display: flex;
    gap: 8px;
}

.task-actions .delete-btn {
    background-color: #dc2626;
}

.task-actions .toggle-btn {
    background-color: #16a34a;
}

.task-actions .toggle-btn[data-state='S'] {
    background-color: #2563eb;
}

.empty {
    padding: 16px;
    text-align: center;
    color: #6b7280;
    border: 1px dashed #d1d5db;
    border-radius: 12px;
}

@media (max-width: 600px) {
    .task-form {
        flex-direction: column;
    }

    .task-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .task-actions {
        width: 100%;
    }

    .task-actions button {
        flex: 1;
    }
}
