@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&family=Rubik:ital,wght@0,300..900;1,300..900&display=swap");

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

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  font-family: "Rubik", sans-serif;
  background: url("images/bg.jpg") no-repeat center center/cover;
}

/* scrollBar */
::-webkit-scrollbar {
  width: 6px;
}

/* Track */
::-webkit-scrollbar-track {
  background: transparent;
}

/* Handle */
::-webkit-scrollbar-thumb {
  border-radius: 50px;
  background: radial-gradient(circle at -65% -65%, rgb(225, 6, 170), #390444);
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #50054a;
}

.container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  max-height: 90vh;
  padding: 0 20px;
}

.todo-app {
  width: 100%;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  gap: 30px;
  border-radius: 20px;
  color: #fff;
  box-shadow: 0 0 100px rgba(31, 31, 31, 0.5);
  border: 3px solid rgba(225, 225, 225, 0.18);
  backdrop-filter: blur(10px);
}

.todo-app h1 {
  font-size: 2rem;
}

.progress-container {
  width: 100%;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-radius: 10px;
  border: 2px solid rgba(225, 225, 225, 0.18);
}

.details {
  width: 100%;
}

#progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 20px;
  position: relative;
  margin-top: 20px;
  background-color: rgba(235, 106, 123, 0.5);
}

#progress {
  width: 0%;
  height: 100%;
  background: #ff6f91;
  border-radius: 20px;
  transition: width 0.3s ease;
}

#numbers {
  min-width: 60px;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ff6f91;
  border: 2px solid rgba(225, 225, 225, 0.3);
  border-radius: 50%;
  font-weight: bold;
  font-size: 0.9rem;
  padding: 4px;
}

.input-area {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.input-area input {
  flex: 1;
  font-size: 1rem;
  border-radius: 22px;
  border: none;
  outline: none;
  background-color: rgba(235, 106, 123, 0.5);
  padding: 12px 16px;
  color: #dbdbdb;
}

.input-area input::placeholder {
  color: #bcbcbc;
}

.input-area input:focus {
  outline: none;
  border: 1.5px solid #ff6f91;
  box-shadow: 0 0 10px rgba(255, 111, 145, 0.6);
  transition: all 0.2s ease;
}

.input-area button {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  padding: 10px;
  border-radius: 15px;
  background: rgba(235, 106, 123, 0.5);
  border: 2px solid rgba(225, 225, 225, 0.18);
  cursor: pointer;
  transition: all 0.2s ease;
}

.input-area button:hover {
  transform: scale(1.05);
  background: #c26673;
}

.task-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

#task-list {
  width: 100%;
  height: 250px;
  overflow-y: auto;
  padding-right: 10px;
}

#task-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgb(93, 34, 107);
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 30px;
  font-size: 1.2rem;
  color: #fff;
  position: relative;
  transition: box-shadow 0.2s ease;
}

#task-list li:hover {
  box-shadow: 0 0 10px rgba(225, 225, 225, 0.3);
}

#task-list li .checkbox {
  min-width: 20px;
  height: 20px;
  border: 2px solid rgba(225, 225, 225, 0.3);
  background: transparent;
  appearance: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
}

#task-list li .checkbox:checked {
  background: #ee5b6e;
  transform: scale(1.1);
}

#task-list li .checkbox:checked::before {
  content: "\2713";
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  position: absolute;
  inset: 0;
}

#task-list li span {
  flex: 1;
  margin-left: 10px;
  word-wrap: break-word;
}

#task-list li.completed span {
  text-decoration: 2px line-through #21ee5e;
  color: #21ee5e;
}

.task-btns {
  display: flex;
  gap: 10px;
  margin-right: auto;
}

.task-btns button {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8rem;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.task-btns button:hover {
  transform: scale(1.1);
}

.task-btns .edit-btn {
  background: #ffbf00;
}

.task-btns .delete-btn {
  background: #ff6f91;
}

.task-container img {
  width: 250px;
  height: auto;
}

@media (max-width: 600px) {
  .container {
    padding: 0 10px;
    margin: 0 15px;
  }

  .todo-app h1 {
    font-size: 1.8rem;
  }

  .todo-app {
    padding: 1rem;
    gap: 15px;
  }

  #numbers {
    min-width: 40px;
    min-height: 40px;
    font-size: 0.6rem;
    padding: 2px;
  }

  .input-area input {
    font-size: 0.8rem;
  }

  #task-list {
    height: 400px;
  }

  #task-list li {
    font-size: 0.8rem;
  }
}
