* {
  padding: 0;
  margin: 0;
  list-style: none;
  box-sizing: border-box;
  cursor: pointer;
}

/*Variables*/
:root {
  --txtColor: #777;
  --backgroundColor: linear-gradient(120deg, #fdfbfb 0%, #ebedee 100%);
  --transduration: 0.3s;
  --primaryColor: linear-gradient(135deg, #1f1c2c, #928dab);
}

body {
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  background-image: var(--backgroundColor);
}

.container {
  padding: 10px;
  height: 100vh;
  display: flex;
  align-items: flex-start;
}

.settings {
  flex-basis: 220px;
  height: 100%;
  padding: 20px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  color: var(--txtColor);
  box-shadow: 4px 0 10px rgba(0, 0, 0, 0.2);
  background-image: var(--primaryColor);
  transform: translateX(-220px);
  transition: transform var(--transduration) ease;
  position: relative;
}

.settings.active {
  transform: translateX(-10px);
}

#toggle-btn {
  position: absolute;
  width: 40px;
  height: 40px;
  top: 20px;
  left: 20px;
  font-size: 20px;
  color: var(--txtColor);
  border-radius: 50%;
  border: none;
  background: var(--primaryColor);
  transition: background-color var(--transduration);
}

.settings .title {
  display: block;
  position: absolute;
  top: -30px;
  left: 5px;
  padding: 10px 0;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--txtColor);
}

.settings ul {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  position: relative;
}

.themes label {
  color: var(--txtColor);
  font-size: 14px;
}

.themes input[type="radio"] {
  accent-color: var(--txtColor);
}

.colors li {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  transition: var(--transduration);
}

.colors li:hover {
  transform: scale(1.2);
  border-color: white;
}

.colors li:nth-of-type(1) {
  background-color: brown;
}

.colors li:nth-of-type(2) {
  background-color: black;
}

.colors li:nth-of-type(3) {
  background-color: rgb(207, 207, 207);
}

.colors li:last-child {
  background-color: var(--txtColor);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  position: relative;
  font-size: 14px;
}

.colors li:last-child input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
}

.gradients li {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid #777;
  transition: var(--transduration);
}
.gradients li:hover {
  transform: scale(1.2);
  border-color: white;
}

.gradients li:first-of-type {
  background-image: linear-gradient(
    120deg,
    rgb(253, 251, 251) 0%,
    rgb(235, 237, 238) 100%
  );
}
.gradients li:nth-of-type(2) {
  background-image: linear-gradient(
    -225deg,
    rgb(255, 5, 124) 0%,
    rgb(124, 100, 213) 48%,
    rgb(76, 195, 255) 100%
  );
}
.gradients li:nth-of-type(3) {
  background-image: linear-gradient(
    120deg,
    rgb(161, 196, 253) 0%,
    rgb(194, 233, 251) 100%
  );
}
.gradients li:nth-of-type(4) {
  background-image: linear-gradient(
    -225deg,
    rgb(255, 60, 172) 0%,
    rgb(86, 43, 124) 52%,
    rgb(43, 134, 197) 100%
  );
}
.gradients li:nth-of-type(5) {
  background-image: linear-gradient(
    to top,
    rgb(251, 194, 235) 0%,
    rgb(166, 193, 238) 100%
  );
}

.gradients li:nth-of-type(6) {
  background-image: linear-gradient(
    -225deg,
    rgb(61, 78, 129) 0%,
    rgb(87, 83, 201) 48%,
    rgb(110, 127, 243) 100%
  );
}

.gradients li:nth-of-type(7) {
  background-image: linear-gradient(-225deg, rgb(71, 59, 123) 0%, rgb(53, 132, 167) 51%, rgb(48, 210, 190) 100%);
}
.gradients li:last-child {
  background-image: linear-gradient(
    -225deg,
    rgb(35, 21, 87) 0%,
    rgb(68, 16, 122) 29%,
    rgb(255, 19, 97) 67%,
    rgb(255, 248, 0) 100%
  );
}
.colors .active,
.gradients .active {
  border: 3px solid white;
}

form {
  flex-basis: 600px;
  margin: 50px auto;
  padding: 10px;
  background: var(--primaryColor);
  border-radius: 10px;
}
form .title {
  margin: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--txtColor);
}

@media (max-width: 767px) {
  .container {
    height: auto;
  }
  form {
    flex-basis: 300px;
  }
  .settings {
    flex-basis: 180px;
  }
  .settings ul {
    margin-top: 60px;
  }
  .settings .title{
    font-size: 12px;
    white-space: nowrap;
  }
}

form .task-input {
  display: flex;
  gap: 10px;
  border-radius: 20px;
  background-color: white;
  position: relative;
}
.task-input input:first-child {
  flex-grow: 1;
  border: none;
  border-radius: inherit;
  padding: 10px;
  text-indent: 5px;
  background-color: #eee;
}
.task-input input:first-child:focus {
  outline: none;
}

.task-input input:last-child {
  position: absolute;
  right: 0px;
  border-radius: inherit;
  border: none;
  width: 70px;
  background-color: orange;
  height: 100%;
  color: var(--txtColor);
}
.task-input input:last-child:focus-visible {
  outline: none;
}

.tasks {
  border-radius: inherit;
  margin: 10px 0px;
}

.tasks .task:not(:last-child) {
  margin-bottom: 10px;
}

.tasks .task {
  background-color: #eee;
  padding: 10px;
  display: flex;
  border-radius: inherit;
  align-items: center;
  opacity: 0.8;
  transition: padding-left var(--transduration), opacity var(--transduration);
}
.task:hover {
  padding-left: 20px;
  opacity: 1;
}

.task span {
  width: 20px;
  height: 20px;
  font-size: 12px;
  border-radius: 50%;
  color: var(--txtColor);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transduration);
}
.task span:last-child:hover {
  background-color: #ddd;
}
.task span:first-child {
  background-color: #ddd;
}

.task[status="to-do"] span:first-child {
  color: transparent;
}
.task[status="to-do"] p {
  text-decoration: none;
}
.task[status="done"] span:first-child {
  color: orange;
}
.task[status="done"] p {
  text-decoration: line-through;
}

.task p {
  flex-grow: 1;
  margin: 0px;
  margin-left: 5px;
  color: rgb(0 0 0 / 70%);
}

.error {
  display: block;
  text-transform: capitalize;
  color: var(--txtColor);
  font-weight: bold;
  text-align: center;
  opacity: 0;
  transform: translateX(-100%);
  transition: var(--transduration);
}
.error.show {
  transform: translateX(0);
  opacity: 1;
}
