* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --background: #000430;
  --secondaryBackground: #171c48;
  --text: #fff;
  --purple: #828dff;
  --teal: #24feee;
}

body {
  background-color: var(--background);
  color: var(--text);
}

.container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 120px auto 0 auto;
  max-width: 500px;
}

.stats-container {
  padding: 30px;
  border-radius: 20px;
  border: 2px solid var(--purple);
  display: flex;
  justify-content: space-between;
  gap: 50px;
  width: 100%;
}

.details {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-left: 7px;
}

#progress {
  width: 50%;
  height: 10px;
  background-color: var(--teal);
  border-radius: 10px;
  transition: all 0.3s ease;
}

#numbers {
  width: 100px;
  height: 100px;
  background-color: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 20px;
  font-weight: bold;
}

#progressbar {
  width: 100%;
  height: 10px;
  background-color: var(--secondaryBackground);
  border-radius: 5px;
  margin-top: 27px;
}

form {
  margin-top: 60px;
  width: 100%;
  display: flex;
  gap: 10px;
  padding: 0 20px;     
  box-sizing: border-box;
}

input {
  flex: 1;
  background-color: var(--secondaryBackground);
  padding: 16px;
  border: 1px solid var(--purple);
  border-radius: 10px;
  outline: none;
  color: var(--text);
}

button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--purple);
  color: var(--text);
  font-size: 30px;
  font-weight: bold;
  outline: none;
}

#task-list {
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch; 
}

.taskItem {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--secondaryBackground);
  padding: 10px 20px;
  border-radius: 10px;
  margin-top: 25px;
}

.taskText {
  flex: 1;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  padding-right: 20px;
}


.icons {
  display: flex;
  gap: 10px;
  min-width: 60px;
  justify-content: flex-end;
}


.taskItem img {
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.task {
  display: flex;
  align-items: center;
  gap: 10px;
}

.task input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  max-width: 20px;
  max-height: 20px;
  margin-left: 7px;
  flex-shrink: 0;
  flex-grow: 0;
}

.task p {
  flex: 1;
  word-break: break-word;
  white-space: pre-wrap;
  margin: 0;
}

.completed p {
  text-decoration: line-through;
  color: var(--teal);
}


@media (max-width: 1200px) {
  .container {
    max-width: 90vw;
    padding: 0 10px;
  }
  .stats-container {
    gap: 30px;
    padding: 20px 10px;
  }
}

@media (max-width: 900px) {
  .container {
    max-width: 98vw;
    padding: 0 5px;
  }
  .stats-container {
    gap: 20px;
    padding: 15px 5px;
  }
  #numbers {
    width: 80px;
    height: 80px;
    font-size: 18px;
  }
}

@media (max-width: 700px) {
  .container {
    max-width: 100vw;
    margin: 20px auto 0 auto;
    padding: 0 2vw;
  }
  .stats-container {
    flex-direction: row; 
    gap: 10px;
    padding: 10px 2vw;
    width: 100%;
    align-items: center;
  }
  .details {
    flex: 1 1 0;
    min-width: 0;
  }
  #numbers {
    width: 60px;
    height: 60px;
    font-size: 15px;
    margin-left: auto;
  }
  form {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  button {
    width: 100%;
    height: 40px;
    border-radius: 10px;
    font-size: 20px;
  }
  #task-list, .taskItem {
    width: 100%;
    min-width: 0;
  }
  .taskItem {
    flex-direction: row;
    align-items: center;
    padding: 8px;
    margin-top: 10px;
  }
  .icons {
    justify-content: flex-end;
    gap:7px;
    margin-top: 0;
    margin-right: 10px;
  }
  .taskText {
    padding-right: 0;
  }
  .taskItem img {
    width: 20px;
    height: 20px;
  }
  #progressbar {
    height: 8px;
  }
  #progress {
    height: 8px;
  }
}

@media (max-width: 400px) {
  .container {
    margin-top: 5px;
    padding: 0 1vw;
  }
  .stats-container {
    padding: 5px 1vw;
  }
  #numbers {
    width: 40px;
    height: 40px;
    font-size: 10px;
  }
  .taskItem {
    padding: 4px;
  }
  input, button {
    font-size: 14px;
    padding: 10px;
  }
  #progressbar {
    height: 6px;
  }
  #progress {
    height: 6px;
  }
}
#progressbar {
  width: 100%;
  min-width: 60px;
  max-width: 100vw;
  background-color: var(--secondaryBackground);
  border-radius: 5px;
  margin-top: 20px;
  overflow: hidden;
}

#progress {
  width: 50%;
  min-width: 0;
  max-width: 100%;
  height: 10px;
  background-color: var(--teal);
  border-radius: 10px;
  transition: all 0.3s ease;
}

