/* ------ IMPORTANT CSS TO ENABLE LIGHT AND DARK THEME IN TREX GAME ----- */

/* Smooth day / night transition. The base filter (invert(0)) is explicit so
   the browser can interpolate it when the .inverted class is toggled on the
   <html> element. */
html {
  filter: invert(0);
  transition: filter 0.8s ease;
}

.inverted {
  background-color: #fff;
  filter: invert(1);
}

.inverted body {
  background-color: #fff;
  transition: background-color 0.8s ease;
}

@media (prefers-color-scheme: dark) {
  .icon {
    filter: invert(1);
  }

  .runner-canvas {
    filter: invert(1);
  }

  .inverted {
    background-color: white;
    filter: invert(0);
  }

  .inverted body {
    background-color: black;
  }
}
