* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background-color: #f0f4f8;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px;
}

.container {
  background-color: white;
  padding: 30px 25px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 500px;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
  font-size: 1.6rem;
}

input[type="text"] {
  flex: 1;
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 70%;
  margin-right: 20px;
}

button {
  padding: 10px 15px;
  font-size: 1rem;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
}

button:hover {
  background-color: #0056b3;
}

ol {
  margin-top: 20px;
}

li {
  list-style: none;
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: #d7cdcd;
  padding: 10px;
  border-radius: 8px;
}

li span {
  flex: 1;
  font-size: 1rem;
  word-break: break-word;
}

.edit-input {
  flex: 1;
  padding: 6px;
  font-size: 1rem;
  display: none;
  border: 1px solid #999;
  border-radius: 4px;
}

.clear, .edit {
  background-color: #dc3545;
  margin-left: 4px;
}

.clear:hover {
  background-color: #a71d2a;
}

.edit {
  background-color: #ffc107;
  color: black;
}

.edit:hover {
  background-color: #e0a800;
}

.check {
  height: 20px;
  width: 20px;
  cursor: pointer;
  margin-right: 5px;
}

@media (max-width: 480px) {
  .container {
    padding: 20px 15px;
  }

  h1 {
    font-size: 1.4rem;
  }

  button {
    padding: 8px 12px;
    font-size: 0.95rem;
  }

  input[type="text"] {
    font-size: 0.95rem;
    width: 100%;
  }

  li {
    flex-direction: column;
    align-items: flex-start;
  }

  .edit-input, li span {
    width: 100%;
  }

  .clear, .edit {
    width: 100%;
  }

  #addTaskButton{
    margin-top: 10px;
    width: 100%;
  }
}
