body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(to right, #83a4d4, #b6fbff);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: start;
  padding-top: 60px;
  margin: 0;
}

.container {
  background-color: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  width: 90%;
  max-width: 450px;
}

h1 {
  margin-bottom: 25px;
  color: #333;
}

.input-section {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

input {
  flex: 1 1 200px;
  padding: 10px;
  font-size: 16px;
  border: 2px solid #ddd;
  border-radius: 6px;
  outline: none;
}

button {
  padding: 10px 16px;
  font-size: 16px;
  border: none;
  background-color: orangered;
  color: white;
  border-radius: 40px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.input-section button:hover {
  background-color: rgb(207, 58, 4);
}

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

li {
  background: #f4f4f4;
  margin-bottom: 12px;
  padding: 12px 16px;
  border-radius: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

li:hover {
  background-color: rgba(169, 169, 169, 0.326);
}

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

.task-text {
  flex-grow: 1;
  margin-right: 10px;
  font-size: 17px;
  color: #333;
  word-break: break-word;
}

li button {
  margin-left: 6px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  font-size: 18px;
  transition: transform 0.2s ease;
}

li button:hover {
  transform: scale(1.2);
}

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

.delete-btn:hover {
  background-color: #007bff;
}

/* ✅ Responsive Fixes */
@media (max-width: 500px) {
  .input-section {
    flex-direction: column;
  }

  input,
  .input-section button {
    width: 100%;
    margin: 0;
  }

  .input-section button {
    margin-top: 5px;
  }
}
