body {
  font-family: Arial, sans-serif;
  background: rgb(37, 36, 68);
  margin: 0;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100dvh;
}

* {
  box-sizing: border-box;
}

main {
  min-width: 450px;
  max-width: 900px;
  background: rgb(10, 10, 38);
  border: 2px solid white;
  margin: 30px;
  transition: box-shadow 0.18s ease, transform 0.12s ease, border 0.12s ease;
  color: white;
  display: flex;
  justify-content: center;
  flex-direction: column;
  position: relative;
  flex: 1 0 auto;
}

@keyframes wipeDown {
  100% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(40px);
  }
}

@keyframes wipeUp {
  100% {
    transform: translateY(40);
  }

  100% {
    transform: translateY(0px);
  }
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.container input:checked~.checkmark:after {
  display: block;
}

.container .checkmark:before {
  content: "";
  position: absolute;
  left: 10px;
  top: 4px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  box-shadow: 0 4px 2px rgba(0, 0, 0, 0.34);
}

.title-container {
  width: 70%;
  max-width: 70%;
  box-sizing: border-box;
  display: inline-block;
  transform: translateY(20px);
}

.task-title {
  color: #000000;
  width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-size: 20px;
}

.actions {
  display: flex;
  flex-direction: row;
  align-items: start;
  transform: translateY(20px);
}

.edit {
  background: transparent;
  border: none;
  font-size: x-large;
  color: rgb(0, 0, 0);
}

.edit:hover {
  scale: 1.2;
  color: rgb(52, 167, 164);
}

.delete {
  color: rgb(216, 57, 57);
  background: transparent;
  border: none;
  font-size: x-large;
}

.delete:hover {
  scale: 1.2;
  color: red;
}

header {
  display: flex;
  justify-content: space-between;
  margin: 9px;
}

.name-moto {
  margin-top: 0px;
  display: inline-block;
  justify-content: space-around;
}

.moto {
  margin-top: 0px;
  margin-bottom: 0px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.678);
}
.search {
  position: relative;
  display: inline-block;
  margin-bottom: 0;
  margin-top: 15px;
}

.search-input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  font-size: 14px;
  box-sizing: border-box;
  border-radius: 15px;
  background: rgb(52, 167, 164);
  border: none;
}

.search-input::placeholder {
  color: white;
}

.search i.fa-search {
  position: absolute;
  left: 12px;
  top: 7px;
  color: white;
  pointer-events: none;
}

.error {
  background: rgb(221, 43, 43);
  position: fixed;
  min-width: 450px;

  height: 40px;
  top: 100px;
  text-align: center;
  display: inline-block;
  align-content: center;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 0px 0px 30px 30px;
  z-index: 11;
  animation: popup 3.2s ease-in-out;
}

@keyframes popup {
  0% {
    opacity: 0;
    height: 0;
  }

  33% {
    opacity: 1;
    height: 40px;
  }

  66% {
    opacity: 1;
    height: 40px;
  }

  100% {
    opacity: 0;
    height: 0;
  }
}
.add-task {

  display: inline-block;
  justify-content: center;
  place-items: center;
  color: rgb(255, 255, 255);
  padding: 30px;
  border-bottom: 2px solid white;
  margin: 0;
  gap: 10px;
}

.add-task * {
  height: 30px;
  margin: 4px 5px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0);
  border: 1px solid whitesmoke;
  color: white;
}

.add-task *::placeholder {
  color: white;
}

#taskText {
  width: 230px;
}


#taskDeadline {
  background: #ffffff;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 85%, rgba(255, 255, 255, 1) 100%);
}

.priority {
  border: none;
  margin: 0;
  font-size: 13px;
  align-content: center;
}

#priority {
  border-radius: 6px;
  margin: 0;
}


#option,
#option2,
#option3 {
  color: black;

}
#addBtn {
  border-radius: 0;
  margin: 0 5px;
  width: 70px;
  color: rgb(255, 255, 255);
  font-weight: 900;
  background: #ffffff;
  background: linear-gradient(121deg, rgba(255, 255, 255, 0) 15%, rgba(52, 167, 164, 1) 62%);
  border-color: rgb(52, 167, 164);
}

#addBtn:hover {
  background: rgba(52, 167, 164);
}

.controls {
  /* background: wheat; */
  display: flex;
  justify-content: space-between;
}

.remaining-tasks-container {
  margin-top: 0;
}

.remaining-tasks {
  color: rgb(13, 224, 13);
}

#filter {
  height: 30px;
  padding: 4px 15px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0);
  border: 1px solid whitesmoke;
  color: white;
}

#filter1,
#filter2,
#filter3 {
  color: black;
}

#filter4 {
  color: red;
}

#filter5 {
  color: rgba(255, 38, 0, 0.459);
}

#filter6 {
  color: rgba(255, 115, 0, 0.664);
}

#filter7 {

  color: rgb(51, 255, 0);

}
li {
  background: rgba(255, 255, 255, 0.24);
  margin: 10px 0;
  padding: 0px 0 20px 0;
  border-radius: 5px;
  display: grid;
  grid-template-columns: 70fr 10fr 10fr 10fr;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  cursor: grab;

}

li.overdue {
  border-left: 5px solid red;
}

/* Highlight the whole list item when any of its children (e.g. the
   checkbox) receives keyboard focus. This uses :focus-within so the
   decoration disappears as soon as focus moves away. */
li:focus-within {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18), 0 0 0 4px rgba(52, 167, 164, 0.14);
  /* outline: none; */
  border: 2px solid rgba(52, 167, 164, 0.35);
}

li.completed .task-title {
  text-decoration: line-through;
  color: gray;
}

.main-row input[type="checkbox"] {
  display: inline-block;
  transform: translateY(20px);
}

/* From Uiverse.io by elijahgummer */
/* Hide the default checkbox */
.container input {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.container {
  display: inline-block;
  position: relative;
  cursor: pointer;
  font-size: 20px;
  user-select: none;
  border: 3px solid #beddd0;
  border-radius: 10px;
  overflow: hidden;
  width: 30px;
}

.checkmark {
  position: relative;
  top: 0;
  left: 0;
  height: 1.3em;
  width: 1.3em;
  background-color: #2dc38c;
  border-bottom: 1.5px solid #2dc38c;
  box-shadow: 0 0 1px #cef1e4, inset 0 -2.5px 3px rgb(52, 167, 164),
    inset 0 3px 3px rgba(0, 0, 0, 0.34);
  border-radius: 8px;
  transition: transform 0.3s ease-in-out;
}

.container input:checked~.checkmark {

  transform: translateY(0px);
  /* animation: wipeUp 0.6s ease-in-out forwards;  */
}

.container input:not(:checked)~.checkmark {
  transform: translateY(40px);
  /* animation: wipeDown 0.6s ease-in-out forwards; */
}
.fa-pencil {
  pointer-events: none;
}

.priority-div {
  font-size: small;
  color: gray;
  transform: translateY(20px);
}

.priority-level {
  font-size: 16px;
}

.priority-level[name="LOW"] {
  color: rgba(255, 38, 0, 0.459);
}

.priority-level[name="MEDIUM"] {
  color: rgba(255, 115, 0, 0.664);
}

.priority-level[name="HIGH"] {
  color: rgb(51, 255, 0);
}

.details-toggle:hover {
  scale: 1.2;
}

.deadline {
  transform: translateY(20px);
  color: gray;
  font-size: small;
}

.subtask-checkbox:checked+.subtask-text {
  text-decoration: line-through;
  color: #999;
  opacity: 0.7;
}

.task-details {
  margin-top: 10px;
  padding-top: 8px;
  font-size: 0.92em;
  color: white;
  background: transparent;
  position: relative;

}

.task-details .details-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;

}

.task-details .details-label {
  font-weight: 500;
  font-size: 0.95em;
  color: #444;
}

.task-details .details-controls button {
  background: transparent;
  border: 0;
  color: #007bff;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.9em;
}

.task-details .details-body {
  transition: max-height 0.15s ease;
  height: fit-content;

}

.task-details.collapsed .details-body {
  display: none;
}

.subtasks .subtask-list {
  list-style: none;
  padding-left: 0;
  margin: 6px 0;
}

.subtasks .subtask-list li {
  display: grid;
  grid-template-columns: 1fr 8fr 1fr;
  align-items: center;
  padding: 4px 0;
}

.subtask-delete {
  background: transparent;
  border: 1px solid rgba(255, 0, 0, 0.575);
}

.subtask-delete:hover {
  background: rgba(255, 0, 0, 0.575);
}
.fa-trash {
  pointer-events: none;
}

.subtask-delete .fa-trash {
  color: rgba(252, 46, 46, 0.774);
}

.subtask-delete .fa-trash:hover {
  color: rgb(247, 247, 247);
  cursor: pointer;
  pointer-events: none;

}

.subtask-input {
  padding: 6px;
  font-size: 0.9em;
  background: transparent;
}

.subtask-add {
  padding: 6px 8px;
  font-size: 0.9em;
  background: transparent;
  margin-top: 10px;
  border: 2px dashed rgba(255, 255, 255, 0.541);
  color: rgba(255, 255, 255, 0.541);
}

.subtask-add:hover {
  border-style: solid;
}

.edit-task {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40%;
  height: 250px;
  padding: 20px;
  min-width: 250px;

  background: linear-gradient(0deg,
      rgba(34, 193, 195, 1) 0%,
      rgba(255, 255, 255, 0.3) 10%);

  border-radius: 20px;
  z-index: 10;

  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.edit-task * {
  margin-bottom: 20px;
  background: transparent;
  color: white;
  border: 0;
  height: 30px;
  border: 1px solid black;
}
.newName,
.newDate {
  width: 90%;
  border: 1px solid black;
  border-radius: 10px;
}

.newName::placeholder {
  color: white;
}

.editBtn {
  width: 200px;
  border-radius: 20px;

}

.editBtn:hover {
  color: #000000;
  background: rgba(34, 193, 195, 1);
  border: 0;
}

.cancel {
  background-color: white;
  color: red;
  border: 0;
  width: 200px;
  border-radius: 10px;
}

.cancel:hover {
  background-color: rgb(219, 139, 139);
  color: white;
  border: 0;
}

.select-box {
  display: none;
  justify-content: center;

}

.dragging {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18), 0 0 0 4px rgba(52, 167, 164, 0.14);
  outline: none;
  border: 2px solid rgb(52, 167, 164);

}
footer {
  width: 100%;
  max-width: 100vw;
  margin: 0 30px 30px 30px;
  margin-top: auto;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  font-size: 0.95rem;
  background: black;
  padding: 0 0 30px 0;
}

@media (width<450px) {
  body {
    scale: 0.9;
    width: 100%;
    margin-top: 0;
  }
}

@media (width<390px) {
  body {
    position: relative;
    scale: 0.6;
    margin: 0;
    top: -80px;
  }
}

@media (width<350px) {
  body {
    position: relative;
    scale: 0.6;
    margin: 0;
    top: -100px;
  }
}

@media (width<300px) {
  body {
    position: relative;
    scale: 0.6;
    margin: 0;
    top: -100px;
  }

}
