* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f5f5f5; color: #333; line-height: 1.6; } .container { max-width: 600px; margin: 40px auto; padding: 20px; background-color: white; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); } h1 { text-align: center; margin-bottom: 30px; color: #4a4a4a; } .todo-form { display: flex; margin-bottom: 20px; } #todoInput { flex: 1; padding: 12px 15px; border: 2px solid #ddd; border-radius: 4px 0 0 4px; font-size: 16px; outline: none; transition: border-color 0.3s; } #todoInput:focus { border-color: #4caf50; } #addBtn { padding: 12px 20px; background-color: #4caf50; color: white; border: none; border-radius: 0 4px 4px 0; cursor: pointer; font-size: 16px; transition: background-color 0.3s; } #addBtn:hover { background-color: #45a049; } .todo-list { list-style-type: none; } .todo-item { display: flex; align-items: center; padding: 15px; border-bottom: 1px solid #eee; animation: fadeIn 0.3s ease-in; } @keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } } .todo-text { flex: 1; margin-left: 10px; font-size: 16px; transition: text-decoration 0.3s, color 0.3s; } .completed .todo-text { text-decoration: line-through; color: #888; } .complete-btn { background-color: #2196F3; color: white; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; margin-right: 8px; transition: background-color 0.3s; } .complete-btn:hover { background-color: #0b7dda; } .delete-btn { background-color: #f44336; color: white; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; transition: background-color 0.3s; } .delete-btn:hover { background-color: #d32f2f; } .empty-message { text-align: center; color: #888; font-style: italic; padding: 20px; } @media (max-width: 600px) { .container { margin: 20px 10px; padding: 15px; } .todo-form { flex-direction: column; } #todoInput { border-radius: 4px; margin-bottom: 10px; } #addBtn { border-radius: 4px; width: 100%; } }