@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@500&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #f5f5f5;
  font-family: "Roboto", sans-serif;
}

.container {
  position: relative;
  width: 500px;
  margin: 20vh auto;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.yellow_top {
  width: 100%;
  height: 28px;
  background: #ffdc40;
  border-radius: 10px 10px 0 0;
}

.header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.to_do {
  font-weight: 900;
  font-size: 26px;
}

.filters {
  display: flex;
  gap: 10px;
}

.filter {
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 15px;
  transition: all 0.3s ease;
}

.filter.active {
  background: #833ae0;
  color: white;
}

.input_box {
  padding: 20px;
}

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

.input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.input:focus {
  border-color: #833ae0;
  outline: none;
}

.add-btn {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #833ae0;
  color: white;
  font-size: 24px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.add-btn:hover {
  transform: rotate(90deg);
}

.task-item {
  display: flex;
  align-items: center;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  animation: slideIn 0.3s ease;
}

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

.task-checkbox {
  margin-right: 10px;
  cursor: pointer;
}

.task-text {
  flex: 1;
  padding: 5px;
}

.task-delete {
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  color: #ff4444;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  font-size: 20px;
}

.task-edit {
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  color: #833ae0;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s ease;
  margin-right: 8px;
}

.task-edit:hover {
  opacity: 1;
}

.task-delete:hover {
  opacity: 1;
}

.list-info {
  display: flex;
  justify-content: space-between;
  padding: 15px 20px;
  border-top: 1px solid #ddd;
}

.clear-completed {
  border: none;
  background: none;
  color: #833ae0;
  cursor: pointer;
}

.sort-icon {
  font-size: 20px;
  color: #833ae0;
  cursor: pointer;
  transition: transform 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .container {
    width: 95%;
    margin: 20px auto;
  }
}
