body {
    font-family: sans-serif;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to top */
    min-height: 100vh;
    margin: 0;
    padding-top: 50px; /* Add some space at the top */
}

.container {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.input-area {
    display: flex;
    gap: 10px; /* Space between input and button */
    margin-bottom: 20px;
}

#taskInput {
    flex-grow: 1; /* Input takes available space */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

#addTaskBtn {
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

#addTaskBtn:hover {
    background-color: #0056b3;
}

#taskList {
    list-style: none; /* Remove default bullet points */
    padding: 0;
    margin: 0;
}

#taskList li {
    background-color: #eee;
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between; /* Push text and buttons apart */
    align-items: center;
    word-break: break-word; /* Prevent long words from overflowing */
}

#taskList li.completed span {
    text-decoration: line-through;
    color: #888;
}

#taskList li .task-content {
   display: flex;
   align-items: center;
   gap: 10px; /* Space between checkbox and text */
   flex-grow: 1; /* Allow content to take space */
   margin-right: 10px; /* Space before delete button */
}

#taskList li input[type="checkbox"] {
    cursor: pointer;
    /* Optional: Make checkbox slightly larger */
    transform: scale(1.2);
}

#taskList li .delete-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

#taskList li .delete-btn:hover {
    background-color: #c82333;
}