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

body {
  background: #333;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 20px;
}

.container {
  background: #fff;
  padding: 20px 25px;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 500px;
  margin: 20px auto;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.8rem;
  color: #444;
}

.task-input {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.task-input input {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

.task-input button {
  background: #2575fc;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.3s;
}

.task-input button:hover {
  background: #1b5edc;
}

#task-list {
  list-style: none;
}

#task-list li {
  background: #f8f8f8;
  padding: 8px 12px;
  border-radius: 10px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: 0.3s;
  word-break: break-word;
}
.button-group {
  display: flex;
  gap: 8px;
}

#task-list li button {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
}
#task-list li:hover {
  background: #e9f1ff;
}

#task-list li.completed {
  text-decoration: line-through;
  color: #999;
  background: #e0e0e0;
}

#task-list li span.completed {
  text-decoration: line-through;
  color: #999;
}

@media (max-width: 450px) {
  .container {
    padding: 15px;
    width: 95%;
  }

  .task-input {
    flex-direction: column;
  }

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

  h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 320px) {
  h1 {
    font-size: 1.3rem;
  }

  #task-list li {
    padding: 6px 8px;
  }

  #task-list li button {
    font-size: 16px;
  }
}
