@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800;900&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

:root {
  --primary-color: rgb(58 125 206);
  --secondary-color: rgb(7 203 255);
  --accent-color-1: rgb(210 227 243);
  --accent-color-2: rgb(196 242 237);
  --dark-color: rgb();
}

ul {
  list-style: none;
}

body {
  width: 100%;
  overflow-x: hidden;
  min-height: 100vh;
  background: linear-gradient(
    to right,
    var(--primary-color),
    var(--secondary-color)
  );
}

main {
  background: linear-gradient(
    to right,
    var(--accent-color-1),
    var(--accent-color-2)
  );
  width: 90%;
  box-shadow: 0 0 15px rgb(0 0 0 / 0.2);
  border-radius: 0.5rem;
  margin: 3rem auto 1rem;
  padding: 1rem;
  max-width: 500px;
}

form {
  background: var(--primary-color);
  display: flex;
  padding: 0.2rem;
  border-radius: 0.2rem;
}

input,
button {
  outline: none;
  border: none;
  padding: 0.5rem;
}
input {
  flex: 1;
  color: var(--primary-color);
}
button {
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  background-color: transparent;
  color: white;
  font-size: 1.05rem;
}

.todos__wrapper {
  margin: 1rem 0;
}
.todos__type-divider {
  border: 1px inset rgba(244, 238, 238, 0.436);
}

.info {
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.5;
  font-style: italic;
  display: none;
}

.info.show {
  display: block;
}

.todos__list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.todos__item {
  position: relative;
  display: flex;
  align-items: center;
  background-color: rgb(255, 251, 251);
  padding: 0.3rem;
  border-radius: 0.2rem;
  box-shadow: 0 0 5px rgb(0 0 0 / 0.04);
  animation: slideIn 1s forwards;
}

.todos__item p {
  flex: 1;
  font-size: 0.9rem;
  color: var(--primary-color);
}
.todos__item p::selection {
  background-color: var(--primary-color);
  color: var(--accent-color-2);
}

.todos__item div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.todos__item div button {
  background-color: var(--accent-color-1);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  width: 2rem;
  border-radius: 50%;
  color: var(--primary-color);
}

.completed .todos__item {
  background-color: var(--primary-color);
}
.completed .todos__item p {
  color: var(--accent-color-2);
}

@media screen and (min-width: 600px) {
  main {
    padding: 1.5rem;
  }
  form {
    padding: 0.3rem;
  }
  input {
    padding: 0.8rem;
  }
  .todos__item {
    padding: 1rem;
  }
  .todos__item p {
    font: 1.05rem;
  }
}

@keyframes slideIn {
  0% {
    opacity: 0;
    transform: scale(0.6);
    top: -6rem;
  }
  50% {
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    top: 0;
  }
}
