:root {
  --bg-color: #242222;
  --text-color: white;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg-color: white;
    --text-color: black;
  }
}

#theme-toggle:checked~.body {
  --bg-color: white;
  --text-color: black;
}

#theme-toggle:checked::before {
  opacity: 1;
}

#theme-toggle:checked::after {
  opacity: 0;
}

#theme-toggle {
  position: fixed;
  right: 10px;
  bottom: 10px;
  appearance: none;
  width: 50px;
  height: 50px;
  border: 2px solid black;
  border-radius: 15px;
  background: none;
  cursor: pointer;
}

#theme-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('../resources/global/light_mode.svg');
  background-size: cover;
  transition: opacity 0.5s ease;
  opacity: 0;
}

#theme-toggle::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../resources/global/dark_mode.svg");
  background-size: cover;
  transition: opacity 0.5s ease;
  opacity: 1;
}

.body {
  width: 100%;
  min-height: 100vh;
  padding: 20px;
  background-color: var(--bg-color);
  color: var(--text-color);
  box-sizing: border-box;
  transition: background-color 0.5s ease, color 0.5s ease;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

a {
  color: inherit;
}
