* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f2f3f3;
  font-family: "Montserrat", sans-serif;
  font-size: 20px;
  color: rgb(202, 220, 224);
}
h1 {
  font-size: 4rem;
  font-weight: 300;
  text-align: center;
}
main {
  margin: 0 auto;
  width: 90%;
  background: #fff;
  box-shadow: 0px 3px 6px rgb(109, 137, 145);
}

/* HEADER/INPUT */

#header {
  display: flex;
}
#select-all {
  width: 60px;
  height: 60px;
  margin-left: 10px;
  margin-right: 10px;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  visibility: hidden;
}
input {
  width: 100%;
  border: 0;
  font-family: "Montserrat", sans-serif;
  font-size: 1em;
  font-weight: 300;
  line-height: 1.4;
  outline: none;
}
[placeholder]::-webkit-input-placeholder {
  color: rgb(202, 220, 224);
  font-style: italic;
}

/* TO-DO LIST */

#list {
  border-top: 1px solid rgb(109, 137, 145);
  display: none;
}
.item {
  padding: 15px;
  height: 60px;
  display: flex;
  font-weight: 300;
  line-height: 1.4;
  position: relative;
  border-bottom: 1px solid rgb(202, 220, 224);
  color: rgb(109, 137, 145);
}
.item:hover .delete {
  opacity: 1;
}
.completed {
  color: rgb(202, 220, 224);
  text-decoration: line-through;
}
.check {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgb(109, 137, 145);
  margin-right: 25px;
}
input[type="checkbox"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transform: scale(0.5);
}
input[type="checkbox"]:checked::before {
  position: absolute;
  font-size: 32px;
  font-weight: 700;
  left: 2px;
  top: -14px;
  transform: rotate(40deg);
  color: rgb(115, 208, 138);
}

input[type="checkbox"]:after {
  line-height: 1.5em;
  content: "";
  display: inline-block;
  width: 45px;
  height: 45px;
  margin-top: -15px;
  margin-left: -12px;
  border: 2px solid rgb(109, 137, 145);
  background: #fff;
  border-radius: 50%;
}
input[type="checkbox"]:checked:after {
  background: rgb(109, 137, 145);
}
.todo {
  width: 100%;
}
.todo:focus {
  outline: 0;
  border-bottom: 1px solid rgb(202, 220, 224);
}
.delete {
  margin-right: 15px;
  position: absolute;
  right: 0;
  opacity: 0;
  color: rgb(232, 125, 92);
}
.delete:hover {
  cursor: pointer;
}

/* STATUS BAR */

#status-bar {
  border-top: 1px solid rgb(109, 137, 145);
  font-weight: 300;
  padding: 10px 20px;
  color: rgb(109, 137, 145);
  font-size: 12px;
  display: none;

  grid-template: 2fr / repeat(2, 1fr);
  grid-template-areas: "count clear" "filter filter";
  grid-gap: 10px;
}
.status {
  width: 100%;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
}
.count {
  grid-area: count;
}
#filters {
  grid-area: filter;
  padding: 5px;
  display: flex;
  justify-content: center;
  margin: 0 auto;
  max-width: 50%;
}
#filters div {
  display: inline-block;
  padding: 5px;
  margin: 0 auto;
  border-radius: 5px;
  border: 1px solid #fff;
}
#filters div:hover {
  border: 1px solid rgb(202, 220, 224);
  cursor: pointer;
}
#filters .active {
  border: 1px solid rgb(109, 137, 145);
}
#clear {
  grid-area: clear;
  text-align: right;
  visibility: hidden;
}
#clear:hover {
  text-decoration: underline;
  cursor: pointer;
}

/* WIDTH < 500 */

@media only screen and (min-width: 500px) {
  #status-bar {
    grid-template: 1fr / repeat(3, 1fr);
    grid-template-areas: "count filter clear";
  }
  .count {
    padding: 5px;
  }
  #filters {
    padding: 0;
  }
  #clear {
    padding: 5px;
  }
}
footer {
  margin-top: 40px;
  width: 100%;
  font-size: 14px;
  font-weight: 300;
  text-align: center;
  color: rgb(109, 137, 145);
}
footer span {
  font-size: 12px;
  color: rgb(232, 125, 92);
}
footer a {
  color: rgb(109, 137, 145);
  text-decoration: none;
}
footer a:visited {
  color: rgb(109, 137, 145);
  text-decoration: none;
}
footer a:hover {
  font-weight: 400;
}

@media only screen and (min-width: 620px) {
  main {
    max-width: 600px;
  }
  input[type="checkbox"]:checked::before {
    content: "\02143";
    transform: rotate(40deg);
    color: rgb(115, 208, 138);
  }
  input[type="checkbox"]:checked:after {
    background: #fff;
  }
}
