* {
    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: 40px 20px;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 30px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: #333;
    font-size: 2rem;
    margin-bottom: 5px;
}

.subtitle {
    color: #888;
    font-size: 0.9rem;
}

.todo-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.todo-form input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.todo-form input:focus {
    outline: none;
    border-color: #667eea;
}

.todo-form button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.todo-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.loading {
    text-align: center;
    color: #888;
    padding: 20px;
}

.loading.hidden {
    display: none;
}

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

.todo-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

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

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

.todo-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    cursor: pointer;
    accent-color: #667eea;
}

.todo-item .todo-title {
    flex: 1;
    font-size: 1rem;
    color: #333;
    transition: all 0.2s;
}

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

.todo-item .delete-btn {
    background: none;
    border: none;
    color: #ff6b6b;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    padding: 5px 10px;
}

.todo-item:hover .delete-btn {
    opacity: 1;
}

.todo-item .delete-btn:hover {
    color: #ee5253;
}

footer {
    margin-top: 20px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

.empty-state {
    text-align: center;
    color: #aaa;
    padding: 40px 20px;
}
