/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8fafc; /* slate-50 */
    color: #0f172a; /* slate-900 */
    line-height: 1.6;
    padding: 1rem;
    padding-top: 1rem;
}

.container {
    max-width: 42rem; /* max-w-2xl */
    margin: 0 auto;
    padding: 1rem 0;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: #2563eb; /* blue-600 */
}

@media (min-width: 768px) {
    .title {
        font-size: 2.5rem;
    }
}

.subtitle {
    color: #64748b; /* slate-600 */
    font-size: 1rem;
}

/* Add Form */
.add-form {
    background-color: #ffffff; /* white */
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0; /* slate-200 */
}

.input-group {
    display: flex;
    gap: 0.5rem;
}

#newTodoInput {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #cbd5e1; /* slate-300 */
    border-radius: 0.375rem;
    font-size: 1rem;
    background-color: #ffffff; /* white */
    color: #0f172a; /* slate-900 */
}

#newTodoInput:focus {
    outline: none;
    border-color: #3b82f6; /* blue-500 */
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

#addBtn {
    background-color: #2563eb; /* blue-600 */
    color: #ffffff; /* white */
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

#addBtn:hover {
    background-color: #1d4ed8; /* blue-700 */
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    background-color: #e2e8f0; /* slate-200 */
    color: #374151; /* slate-700 */
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

.filter-btn:hover {
    background-color: #cbd5e1; /* slate-300 */
}

.filter-btn.active {
    background-color: #2563eb; /* blue-600 */
    color: #ffffff; /* white */
}

/* Todo List */
.todo-list-container {
    background-color: #ffffff; /* white */
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e2e8f0; /* slate-200 */
}

.todo-list {
    list-style: none;
}

.todo-item {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e2e8f0; /* slate-200 */
    transition: background-color 0.2s;
}

.todo-item:hover {
    background-color: #f1f5f9; /* slate-50 */
}

.todo-item:last-child {
    border-bottom: none;
}

.todo-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.todo-checkbox {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0.25rem;
    border: 1px solid #cbd5e1; /* slate-300 */
    accent-color: #2563eb; /* blue-600 */
    cursor: pointer;
}

.todo-checkbox:focus {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); /* blue-500 */
}

.todo-text {
    font-size: 1rem;
    color: #0f172a; /* slate-900 */
}

.todo-text.completed {
    text-decoration: line-through;
    color: #94a3b8; /* slate-500 */
}

.delete-btn {
    background: none;
    border: none;
    color: #dc2626; /* red-600 */
    padding: 0.25rem;
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.2s;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    color: #b91c1c; /* red-800 */
}

.delete-icon {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
    stroke-width: 2;
}

/* Empty State */
.empty-state {
    padding: 2rem;
    text-align: center;
    color: #64748b; /* slate-500 */
    font-size: 1rem;
}

/* Footer */
.footer {
    margin-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #64748b; /* slate-600 */
}

.clear-btn {
    background: none;
    border: none;
    color: #dc2626; /* red-600 */
    cursor: pointer;
    transition: color 0.2s;
    font-size: 0.875rem;
}

.clear-btn:hover {
    color: #b91c1c; /* red-800 */
}

/* Responsive */
@media (max-width: 640px) {
    .container {
        padding: 0.5rem;
    }

    .input-group {
        flex-direction: column;
    }

    #addBtn {
        width: 100%;
    }

    .filter-buttons {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .todo-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .todo-content {
        width: 100%;
    }

    .delete-btn {
        align-self: flex-end;
    }
}
