* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

body {
  background: linear-gradient(to right, #00c6ff, #0072ff);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem;
  color: #333;
}

.container {
  background: #ffffff;
  padding: 2rem;
  border-radius: 15px;
  width: 100%;
  max-width: 650px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2);
}

header h1 {
  text-align: center;
  color: #2c3e50;
  margin-bottom: 0.4rem;
  font-size: 2rem;
}

header p {
  text-align: center;
  color: #555;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.add-task form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.add-task input,
.add-task select {
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  flex: 1;
  min-width: 130px;
  font-size: 1rem;
}

.add-task button {
  padding: 0.5rem 1rem;
  border: none;
  background-color: #0097e6;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
  font-size: 1rem;
}

.add-task button:hover {
  background-color: #007acc;
}

#taskList {
  list-style: none;
  padding: 0;
}

.task-item {
  background-color: #f4f6f9;
  border-left: 5px solid #0097e6;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center; 
  justify-content: space-between;
  transition: transform 0.2s ease;
}

.task-item:hover {
  transform: scale(1.002);
  background-color: #e6f2ff;
}

.task-item.completed {
  background-color: #dff9fb;
  border-left-color: #10ac84;
}

.task-item.completed .task-text {
  text-decoration: line-through;
  color: #888;
}

.task-left {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  flex: 1;
}

.task-checkbox {
  margin-top: 4px;
  transform: scale(1.2);
  cursor: pointer;
}

.task-text {
  font-weight: 700;
  color: #2f3542;
}

.task-meta {
  font-size: 0.85rem;
  color: #625252;
  font-weight: 500;
}

.delete-btn {
  background-color: #e9e3e3;
  border: none;
  padding: 0.3rem 0.7rem;
  color: white;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
  height: fit-content;
}

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

@media (max-width: 520px) {
  .add-task form {
    flex-direction: column;
  }

  .add-task input,
  .add-task select,
  .add-task button {
    width: 100%;
  }

  .task-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .task-left {
    flex-direction: row;
  }

  .delete-btn {
    align-self: flex-end;
    margin-top: 0.5rem;
  }
}
