* {
    margin: 0;
    padding: 0;
}

body {
    background-color: black;
    color: white;
    font-size: 16px;
}

.board-container {
    width: 40em;
    height: 40em;
    position: relative;
}

.board {
    border-spacing: 0;
    border-collapse: collapse;
}

.board td {
    overflow: hidden;
}

.square {
    width: 5em;
    height: 5em;
    position: relative;
    padding: 0;
}

.square-light {
    background-color: #eee;
}

.square-dark {
    background-color: #aaa;
}

.piece-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.piece {
    width: 2em;
    height: 2em;
    font-size: 100%;
}

.piece:only-child {
    width: 4em;
    height: 4em;
}

.piece.obsidian {
    filter: invert(1);
}

.piece.petrified {
    opacity: 0.4;
}

.circle {
    width: 2em;
    height: 2em;
    border-radius: 2em;
    position: absolute;
    left: 1.5em;
    top: 1.5em;
}

.circle.alabaster {
    border: 0.1em solid black;
    background-color: white;
}

.circle.obsidian {
    border: 0.1em solid white;
    background-color: black;
}

.turn-indicator {
    width: 40em;
    height: 2em;
    text-align: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.turn-indicator.alabaster {
    background-color: #fff;
    color: #000;
}

.turn-indicator.obsidian {
    background-color: #000;
    color: #fff;
}

.ichor-indicator {
    position: absolute;
    left: 0;
    top: 0;
    color: black;
}

.menu {
    position: absolute;
    left: 0;
    top: 0;
    width: 40em;
    height: 40em;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.menu.alabaster {
    background-color: rgba(255, 255, 255, 0.5);
    color: #000;
}

.menu.obsidian {
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
}

.menu-text {
    font-size: 300%;
    text-align: center;
}

.menu button {
    font: inherit;
    font-size: 150%;
    margin: 0.5em auto;
    padding: 0.5em;
    width: 16em;
}

.pgn {
    width: 40em;
    height: 5em;
    overflow-y: auto;
}

/* Loading spinner (CC0), from https://loading.io/css/ */

.lds-spinner-container {
  width: 40em;
  height: 40em;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lds-spinner {
  width: 80px;
  height: 80px;
}
.lds-spinner div {
  transform-origin: 40px 40px;
  animation: lds-spinner 1.2s linear infinite;
}
.lds-spinner div:after {
  content: " ";
  display: block;
  position: absolute;
  top: 3px;
  left: 37px;
  width: 6px;
  height: 18px;
  border-radius: 20%;
  background: #fff;
}
.lds-spinner div:nth-child(1) {
  transform: rotate(0deg);
  animation-delay: -1.1s;
}
.lds-spinner div:nth-child(2) {
  transform: rotate(30deg);
  animation-delay: -1s;
}
.lds-spinner div:nth-child(3) {
  transform: rotate(60deg);
  animation-delay: -0.9s;
}
.lds-spinner div:nth-child(4) {
  transform: rotate(90deg);
  animation-delay: -0.8s;
}
.lds-spinner div:nth-child(5) {
  transform: rotate(120deg);
  animation-delay: -0.7s;
}
.lds-spinner div:nth-child(6) {
  transform: rotate(150deg);
  animation-delay: -0.6s;
}
.lds-spinner div:nth-child(7) {
  transform: rotate(180deg);
  animation-delay: -0.5s;
}
.lds-spinner div:nth-child(8) {
  transform: rotate(210deg);
  animation-delay: -0.4s;
}
.lds-spinner div:nth-child(9) {
  transform: rotate(240deg);
  animation-delay: -0.3s;
}
.lds-spinner div:nth-child(10) {
  transform: rotate(270deg);
  animation-delay: -0.2s;
}
.lds-spinner div:nth-child(11) {
  transform: rotate(300deg);
  animation-delay: -0.1s;
}
.lds-spinner div:nth-child(12) {
  transform: rotate(330deg);
  animation-delay: 0s;
}
@keyframes lds-spinner {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.lds-ellipsis {
  position: absolute;
  top: 0;
  right: 0;
  width: 5em;
  height: 8em;
}
.lds-ellipsis div {
  position: absolute;
  top: 5px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #888;
  animation-timing-function: cubic-bezier(0, 1, 1, 0);
}
.lds-ellipsis div:nth-child(1) {
  left: 8px;
  animation: lds-ellipsis1 0.6s infinite;
}
.lds-ellipsis div:nth-child(2) {
  left: 8px;
  animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(3) {
  left: 32px;
  animation: lds-ellipsis2 0.6s infinite;
}
.lds-ellipsis div:nth-child(4) {
  left: 56px;
  animation: lds-ellipsis3 0.6s infinite;
}
@keyframes lds-ellipsis1 {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes lds-ellipsis3 {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(0);
  }
}
@keyframes lds-ellipsis2 {
  0% {
    transform: translate(0, 0);
  }
  100% {
    transform: translate(24px, 0);
  }
}
