@import url("https://fonts.googleapis.com/css2?family=Josefin+Sans:ital,wght@0,100..700;1,100..700&display=swap");

* {
  box-sizing: border-box;
  border: 0;
  margin: 0;
  padding: 0;
}
body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  background: var(--bg);
  --bg: hsl(235, 21%, 11%);
  --fg: hsl(234, 39%, 85%);
  --top-img: url("./images/bg-mobile-dark.jpg");
  --tgl-btn: url("./images/icon-sun.svg");
  --bg-todo: hsl(235, 24%, 19%);
  color: var(--fg);
  font-family: "Josefin Sans", sans-serif;
}
.light {
  --bg: hsl(236, 33%, 92%);
  --fg: hsl(237, 14%, 26%);
  --top-img: url("./images/bg-mobile-light.jpg");
  --tgl-btn: url("./images/icon-moon.svg");
  --bg-todo: hsl(0, 0%, 98%);
}
.top-img {
  width: 100%;
  height: 225px;
  background-size: cover;
  background-image: var(--top-img);
}
main {
  position: absolute;
  top: 0;
  height: 100vh;
  width: 100%;
  padding: 25px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  letter-spacing: 10px;
  padding-top: 10px;
}
.tgl-btn {
  background: var(--tgl-btn);
  background-size: cover;
  width: 30px;
  height: 30px;
}
.type-todo {
  margin-top: 24px;
  width: 100%;
  background: var(--bg-todo);
  display: grid;
  padding: 10px;
  height: 55px;
  grid-template-columns: 10% auto;
  align-items: center;
}
.circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid hsl(237, 14%, 26%);
  position: relative;
  cursor: pointer;
}
.circle::before {
  content: "";
  position: absolute;
  top: 51%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 95%;
  width: 95%;
  background: var(--bg-todo);
  border-radius: 50%;
}
.todo:hover .circle {
  background-image: linear-gradient(hsl(192, 100%, 67%), hsl(280, 87%, 65%));
}
#todo-input {
  background: transparent;
  width: 100%;
  height: 100%;
  font-size: 20px;
  border: none;
  color: var(--fg);
  caret-color: hsl(220, 98%, 61%);
}
#todo-input:focus {
  outline: none;
}
.todos {
  margin-top: 24px;
  background: var(--bg-todo);
}
.todo {
  width: 100%;
  height: 55px;
  display: grid;
  grid-template-columns: 10% auto 10%;
  align-items: center;
  padding: 10px;
  font-size: 20px;
}
.todo input[type="checkbox"] {
  display: none;
}
.active {
  position: relative;
  background-image: linear-gradient(hsl(192, 100%, 67%), hsl(280, 87%, 65%));
}
.active.circle::before {
  z-index: 999999;
  content: "";
  position: absolute;
  background: transparent;
  display: grid;
  place-items: center;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  transform: scale(0.5);
  background-size: cover;
  background-image: url("./images/icon-check.svg");
}
.remarks {
  position: relative;
  background: var(--bg-todo);
  height: 55px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.remarks div {
  padding: 0, 10px;
}
.filters {
  background: var(--bg-todo);
  height: 55px;
  position: absolute;
  bottom: -70px;
  width: 100%;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
}
.filterActive {
  color: hsl(220, 98%, 61%);
}

footer {
  opacity: 0;
  font-size: 13px;
  color: hsl(234, 11%, 52%);
  text-align: center;
  margin-top: 100px;
}

@media screen and (min-width: 800px) {
  body {
    --top-img: url("./images/bg-desktop-dark.jpg");
  }
  .light {
    --top-img: url("./images/bg-desktop-light.jpg");
  }

  main {
    padding-top: 80px;
  }

  header,
  .type-todo,
  .todos,
  .remarks {
    width: 60%;
    margin-left: auto;
    margin-right: auto;
  }
  .filters {
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-58%);
    width: 40%;
    background: transparent;
  }
  .type-todo {
    grid-template-columns: 5% auto;
  }
  .todo {
    grid-template-columns: 5% auto 5%;
    padding: 10px 5px;
  }
  footer {
    opacity: 1;
    text-align: center;
    margin-top: 24px;
  }
}
