body {
    --background: #040;
    --player1: #fff;
    --player2: #000;
    --size: 64px;
}

.board {
    display: grid;
    grid-template-columns: auto auto auto auto auto auto auto auto;
    width: calc(var(--size) * 8);
    height: calc(var(--size) * 8);
    margin: auto;
}

.board > div {
    box-sizing: border-box;
    width: var(--size);
    height: var(--size);
    background-color: var(--background);
    border: 1px solid black;
    position: relative;
    transition: transform 0.5s;
}

.score {
    width: 32px;
    height: 32px;
    text-align: center;
    line-height: 32px;
    font-size: 20px;
    margin: 8px;
}
.score-player1 {
    border-radius: 50% 0% 0% 50%;
    background-color: var(--player1);
    color: var(--player2);
    margin-right: 0;
}
.score-player2 {
    border-radius: 0% 50% 50% 0%;
    background-color: var(--player2);
    color: var(--player1);
    margin-left: 0;
}

.currentPlayer1,
.player1-inner {
    background-color: var(--player1);
}
.currentPlayer2,
.player2-inner {
    background-color: var(--player2);
}

.board > div.empty > * {
    display: none;
}

.player1 > .player1-inner,
.player2 > .player2-inner {
    transform: rotateX(0deg);
}
.player1 > .player2-inner,
.player2 > .player1-inner {
    transform: rotateX(180deg);
}

.currentPlayer1,
.currentPlayer2 {
    position: absolute;
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    border-radius: 50%;
}
.player1-inner,
.player2-inner {
    position: absolute;
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    backface-visibility: hidden;
    transition: transform 0.5s;
    border-radius: 50%;
}
