* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, 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 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

h1 {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin: 0;
    font-size: 2em;
    font-weight: 300;
}

.add-todo {
    display: flex;
    padding: 20px;
    gap: 10px;
    border-bottom: 1px solid #eee;
}

#todoInput {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

#todoInput:focus {
    border-color: #667eea;
}

#addBtn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: transform 0.2s ease;
}

#addBtn:hover {
    transform: translateY(-2px);
}

#addBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.stats {
    display: flex;
    justify-content: space-between;
    padding: 15px 20px;
    background: #f8f9fa;
    font-size: 14px;
    color: #666;
    border-bottom: 1px solid #eee;
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-style: italic;
}

.todo-list {
    list-style: none;
    padding: 0;
}

.todo-item {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

.todo-item:hover {
    background-color: #f8f9fa;
}

.todo-item.completed {
    opacity: 0.6;
}

.todo-checkbox {
    margin-right: 15px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.todo-text {
    flex: 1;
    font-size: 16px;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.todo-item.completed .todo-text {
    text-decoration: line-through;
    color: #888;
}

.todo-date {
    font-size: 12px;
    color: #999;
    margin-right: 15px;
}

.delete-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.delete-btn:hover {
    background: #ff3742;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 15px 20px;
    border-left: 4px solid #c62828;
    margin: 10px 20px;
    border-radius: 4px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
}

@media (max-width: 480px) {
    .container {
        margin: 10px;
        border-radius: 8px;
    }
    
    .add-todo {
        flex-direction: column;
    }
    
    .stats {
        flex-direction: column;
        gap: 5px;
    }
}