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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #eee;
}

h1 {
    color: #333;
    font-size: 28px;
    margin-bottom: 20px;
    text-align: center;
}

.filters {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.filter-btn:hover {
    background: #f0f0f0;
}

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.add-todo {
    padding: 20px 30px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
}

#titleInput {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 10px;
    outline: none;
    transition: border-color 0.3s;
}

#titleInput:focus {
    border-color: #667eea;
}

#descriptionInput {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 10px;
    outline: none;
    transition: border-color 0.3s;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

#descriptionInput:focus {
    border-color: #667eea;
}

#addBtn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

#addBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

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

.todo-item {
    padding: 16px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: background-color 0.2s;
}

.todo-item:hover {
    background: #f8f9fa;
}

.todo-item.completed .todo-title {
    text-decoration: line-through;
    color: #999;
}

.todo-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-top: 3px;
    flex-shrink: 0;
}

.todo-content {
    flex: 1;
}

.todo-title {
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
    transition: all 0.3s;
}

.todo-description {
    font-size: 14px;
    color: #666;
}

.todo-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.edit-btn, .delete-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s;
}

.edit-btn {
    background: #ffc107;
    color: #333;
}

.edit-btn:hover {
    background: #e0a800;
}

.delete-btn {
    background: #dc3545;
    color: white;
}

.delete-btn:hover {
    background: #c82333;
}

.empty-state {
    padding: 40px;
    text-align: center;
    color: #999;
    display: none;
}

.empty-state.show {
    display: block;
}

.todo-item.hidden {
    display: none;
}

/* Edit mode */
.edit-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #667eea;
    border-radius: 4px;
    font-size: 16px;
    margin-bottom: 8px;
    outline: none;
}

.edit-description {
    width: 100%;
    padding: 8px;
    border: 1px solid #667eea;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 8px;
    outline: none;
    resize: vertical;
    min-height: 50px;
    font-family: inherit;
}

.save-btn, .cancel-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 4px;
}

.save-btn {
    background: #28a745;
    color: white;
}

.cancel-btn {
    background: #6c757d;
    color: white;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    header {
        padding: 20px 20px 15px;
    }

    .add-todo {
        padding: 15px 20px;
    }

    .todo-item {
        padding: 12px 20px;
    }
}
