@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

* {
  margin: 0%;
  padding: 0;
  font-family: "Press Start 2P";
}

::selection {
  background-color: #eeeeee;
  color: #222222;
}

body {
  background-color: #222222;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  color: #eeeeee;
}

#to-do-heading {
  font-size: 3rem;
  margin: 2rem;
}

form {
  display: flex;
  gap: 1rem;
}

#text-input-new-task {
  border-radius: 10px;
  background-color: #222222;
  color: white;
  padding: 1rem;
  width: 70%;
  font-size: 1rem;
  border: 2px solid #eeeeee;
}

#btn-new-task {
  font-size: 1rem;
  padding: 0.5rem;
  border-radius: 10px;
  color: white;
  background-color: #222222;
  border: 2px solid #eeeeee;
}

.tasks {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.task {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  width: 40rem;
  word-break: normal;
  hyphens: manual;
  border-radius: 10px;
  background-color: #222222;
  color: white;
  padding: 1rem;
  font-size: 1rem;
  border: 2px solid #eeeeee;
  line-height: 1.5rem;
}

.task-text {
  max-width: 83%;
  hyphens: auto;
}

img {
  width: 1.3rem;
}

img:hover {
  scale: 120%;
  cursor: pointer;
}
button:hover {
  scale: 120%;
  cursor: pointer;
}

.completed {
  text-decoration: line-through 2px;
  -webkit-text-decoration: line-through 2px;
}

.modal-edit-task {
  position: sticky;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 2rem;
  background-color: #757575;
  color: white;
  font-family: "Press Start 2P";
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
  z-index: 1;
  width: 50%;
  padding: 1rem;
}

.hidden {
  display: none;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(5px);
  z-index: 0;
}

#input-edit-task {
  padding: 0.5rem;
  font-size: 1rem;
}
#input-edit-task ::selection {
  color: #eeeeee;
  background: #222222;
}

#close-modal {
  position: absolute;
  top: 5%;
  right: 1%;
  font-size: 1.5rem;
}

.checked {
  text-decoration: line-through 1.7px;
}

#form-new-task {
  position: sticky;
  display: flex;
  justify-content: center;
  top: 1rem;
}

@media only screen and (max-width: 768px) {
  .task {
    max-width: 65%;
  }
  .modal-edit-task {
    width: 90%;
    transform: translate(0%, -50%);
    top: 50%;
    left: 50%;
  }
  #input-edit-task {
    padding: 0.4rem;
    font-size: 0.8rem;
  }
  .task-text {
    max-width: 90%;
  }
  .tasks {
    width: 100%;
  }
  .commands {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  #close-modal {
    font-size: 1rem;
  }
}
