body {
  font-family: Arial, sans-serif;
  background: #f4f4f4;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 50px;
}

.container {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 400px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.input-section {
  display: flex;
  flex-wrap: wrap; /* NEW: handles overflow */
  gap: 10px;
  margin-bottom: 20px;
}

.input-section input[type="text"],
.input-section input[type="date"] {
  flex: 1;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#add-btn {
  padding: 10px 20px;
  font-size: 16px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

#add-btn:hover {
  background: #0056b3;
}

ul {
  margin-top: 20px;
  list-style: none;
  padding: 0;
}

li {
  padding: 10px;
  background: #eee;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

li.done {
  text-decoration: line-through;
  color: gray;
}

.task-actions {
  display: flex;
  gap: 10px;
}

.task-actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 5px;
  border-radius: 50%;
  transition: background 0.3s;
}

.task-actions button:hover {
  background: #e0e0e0;
}

.edit-btn {
  color: #007bff;
}

.delete-btn {
  color: #dc3545;
}

.task-text {
  flex-grow: 1;
  cursor: pointer;
}

/* 🔁 NEW: Responsive fix for small screens */
@media (max-width: 500px) {
  .input-section {
    flex-direction: column;
  }

  #add-btn {
    width: 100%;
  }
}