:root {
  --neutral-900: hsl(227, 75%, 14%);
  --neutral-800: hsl(226, 25%, 17%);
  --neutral-700: hsl(225, 23%, 24%);
  --neutral-300: hsl(0, 0%, 78%);
  --neutral-200: hsl(217, 61%, 90%);
  --neutral-100: hsl(0, 0%, 93%);
  --neutral-0: hsl(200, 60%, 99%);
  --red-500: hsl(3, 71%, 56%);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  padding: 20px;
}

body.light-mode {
  background-color: var(--neutral-200);
}

body.dark-mode {
  background-color: var(--neutral-900);
}

body.light-mode {
  .header,
  .filter-btn,
  .extension,
  .remove-btn {
    background-color: var(--neutral-0);
  }

  .header,
  .filter-container,
  .filter-btn,
  .extension,
  .remove-btn {
    color: var(--neutral-900);
  }

  .filter-btn.selected {
    background-color: var(--red-500);
    color: var(--neutral-200);
  }
}

body.dark-mode {
  .header,
  .filter-btn,
  .extension,
  .remove-btn {
    background-color: var(--neutral-800);
  }

  .header,
  .filter-container,
  .filter-btn,
  .extension,
  .remove-btn {
    color: var(--neutral-0);
  }

  .filter-btn.selected {
    background-color: var(--red-500);
    color: var(--neutral-900);
  }
}

.header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  border-radius: 10px;
  padding: 10px;
}

#toggle-bg {
  cursor: pointer;
  height: 45px;
  width: 45px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#icon-moon,
#icon-sun {
  display: none;
  padding: 10px;
  border-radius: 10px;
}

#icon-moon.active,
#icon-sun.active {
  display: block;
  height: 100%;
  width: 100%;
}

#icon-sun {
  background-color: var(--neutral-700);
}

#icon-moon {
  background-color: var(--neutral-100);
}

.filter-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 30px 20px 20px 20px;
}

.filter-btn {
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 10px;
  border: 1px solid gray;
  font-weight: 600;
}

.extensions-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.extension {
  border: 1px solid gray;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 30px;

  > * {
    width: 100%;
  }

  .info {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 10px;

    .text {
      h2 {
        margin-bottom: 5px;
        font-size: 24px;
      }

      p {
        font-size: 18px;
      }
    }
  }

  .buttons {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;

    .remove-btn {
      border: 1px solid gray;
      border-radius: 10px;
      padding: 5px 10px;
      cursor: pointer;
    }

    .switch {
      position: relative;
      display: inline-block;
      width: 58px;
      height: 28px;
    }
  }
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--neutral-300);
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: 0.4s;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: var(--red-500);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--red-500);
}

input:checked + .slider:before {
  -webkit-transform: translateX(30px);
  -ms-transform: translateX(30px);
  transform: translateX(30px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

@media screen and (min-width: 768px) {
  .extensions-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (min-width: 1440px) {
  body {
    padding-left: 100px;
    padding-right: 100px;
  }

  .filter-container {
    flex-direction: row;
    justify-content: space-between;
    padding-top: 40px;
    padding-left: 0;
    padding-right: 0;
  }

  .extensions-container {
    grid-template-columns: repeat(3, 1fr);
  }
}
