* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
body{
  background: linear-gradient(to right, #f0f4f8, #e8f5e9);
}

.todo-app {
  margin: 10px auto;
  width: 600px;
}
/* form style */
.form {
  width: 100%;
  display: flex;
  justify-content: space-between;
}
.form input {
  width: 65%;
  outline: none;
  padding: 10px;
  border: 1px solid rgb(161, 153, 153);
  border-radius: 7px;
}

/* add task button */
.form button {
  width: 30%;
  background-image: linear-gradient(
    to right,
    #4caf50,
    #45a049
  );
  border: none;
  outline: none;
  padding: 10px 20px;
  color: white;
  border-radius: 7px;
  cursor: pointer;
  transition: 0.3s ease;
  font-weight: bold;
}
.form button:hover {
  background-image: linear-gradient(
    to right,
    #66bb6a,
    #57a957
  );
}

/* tasks style */
.tasks {
  margin-top: 20px;
  border-radius: 10px;
  background:none ;
  overflow: hidden;
  color: #222;
  padding: 10px;
}
.tasks .task {
  position: relative;
  padding:15px 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: 0.3s linear;
  margin-bottom: 10px;
 background-color: #f9f9f9;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.1);
  border-radius: 20px;
}
.tasks .task:hover {
  background-color: #f1f1f1;
  transform: translateX(5px);
}


/* task done */
.tasks .task.done {
 background-color: #e0f2f1;
  text-decoration: line-through;
  color: #777;
  box-shadow: inset 2px 2px 6px rgba(0,0,0,0.1);
}

/* icons style */
.task i.del {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
   color: #e53935;
  transition: 0.3s ease;
  cursor: pointer;
}
.task i.del:hover {
  color: #b71c1c;
  transform: scale(1.2);
}

.task i.edit {
  position: absolute;
  right: 45px;
  top: 50%;
  transform: translateY(-50%);
  
  color: #ff9800;
  transition: 0.3s ease;
  cursor: pointer;
}
.task i.edit:hover {
  color: #ef6c00;
  transform: scale(1.2);
}


/* alert */
div.alert {
  position: fixed;
  right: 50px;
  top: -100px;
  width: 200px;
  color: white;
  border-radius: 6px;
  /* padding-left: 10px;
  padding-right: 5px; */
  padding:5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: alert 4s ease;
}
.alert.success{
  background-color: rgb(11, 192, 57);
}
.alert.error{
  background-color: red;
}
.alert button {
  /* position: absolute; */
  padding: 10px;
  display: flex;
  margin: 0;
  justify-content: center;
  align-items: center;
  color: white;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
/*  */
/* animation */
@keyframes alert {
   0% {
    top: -100px;
    opacity: 0;
    transform: translateY(-20px);
  }
  20% {
    top: 20px;
    opacity: 1;
    transform: translateY(0);
  }
  80% {
    top: 20px;
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    top: -100px;
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* mobile responsive */
@media screen and (max-width: 767px) {
  .todo-app {
    width: 90%;
  }
  .form {
    flex-wrap: wrap;
    gap: 10px;
  }
  .form button,
  .form input {
    width: 100%;
    padding: 10px;
  }
  .tasks .task {
    padding: 10px 20px;
    box-shadow: 2px 2px 2px inset whitesmoke;
    border-radius: inherit;
  }
}
