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

html, body {
  height: 100%;
}

:root {
  --light-background: #fff;
  --light-base-colour: #5e5a66;
  --dark-background: #1a1625;
  --dark-base-colour: #5e5a66;
  --pokemon-opacity: 0.8;
  --pokemon-picked-opacity: 0.4;
  --pokemon-picked-background: #378b2e;
  --pokemon-light-picked-background: #67d256;
  --pokemon-cover-opacity: 0.5;
}

div.theme-dark, div.theme-light {
  min-height: 100%;
}

.theme-dark {
  background-color: var(--dark-background);
  color: var(--dark-base-colour);
}

.theme-light {
  background-color: var(--light-background);
  color: var(--light-base-colour);
}

.theme-dark a {
  color: var(--dark-base-colour);
}

.board {
  width: 510px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

h1 {
  text-align: center;
  padding: 1em;
  width: 510px;
  margin: 0 auto;
  position: relative;
}

.reset {
  display: block;
  width: 510px;
  text-align: center;
  margin-right: auto;
  margin-left: auto;
  margin-top: 20px;
  text-decoration: none;
  background-color: black;
  color: #faa;
  padding: 0.5em 0;
  font-size: 2em;
  cursor: pointer;
  border: none;
  outline: inherit;
}

a, a:hover {
  color: var(--light-base-colour);
}

span {
  display: inline-block;
  width: 100px;
  height: 100px;
  text-align: center;
  line-height: 100px;
  border: 1px solid #aaa;
  position: relative;
  font-weight: bold;
}

span > img {
  position: absolute;
  top: 0;
  left: 0;
  filter: opacity(var(--pokemon-opacity));
}

span[selected="1"] {
  background-color: var(--pokemon-light-picked-background);
  font-weight: bold;
}

.theme-dark span[selected="1"] {
  background-color: var(--pokemon-picked-background);
  font-weight: bold;
}

span[selected="1"] > img {
  filter: opacity(var(--pokemon-picked-opacity));
}

span[selected="1"]::after {
  background-image: url("./pokeball.png");
  position: absolute;
  content: "";
  top: 0px;
  right: 0px;
  bottom: 0px;
  left: 0px;
  background-size: cover;
  filter: opacity(var(--pokemon-cover-opacity));
}

footer {
  font-size: 0.8em;
  display: block;
  width: 510px;
  text-align: center;
  margin-right: auto;
  margin-left: auto;
  margin-top: 2em;
}

footer a {
  text-decoration: none;
}

.mode-switcher {
  position: absolute;
  top: 1em;
  right: 0;

  cursor: pointer;
}

