body {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-flow: column;
  min-height: 90vh;
  margin: 0;
  padding: 0;
  text-transform: capitalize;
}

header {
  text-align: center;
}

main {
  position: relative;
}

#currentPlayer {
  position: absolute;
  padding: 7px;
  top: 0px;
  border-radius: 15px;
  left: 10px;
  background-color: rgb(31, 41, 5);
  transition: 0.4s;
}

#currentPlayer[player="1"] {
  color: red;
}

#currentPlayer::after {
  display: inline-block;
  padding-left: 7px;
}

#currentPlayer[player="1"]::after {
  content: "1";
}

#currentPlayer[player="2"] {
  color: yellow;
}

#currentPlayer[player="2"]::after {
  content: "2";
}

#gameContainer {
  display: grid;
  grid-template: repeat(1, 1fr) / repeat(7, 1fr);
  max-width: 800px;
  width: calc(800 / (800 / 7) * (90vw / 7));
  max-height: 700px;
  height: calc(700 / (700 / 6) * (90vw / 6));
  margin: auto;
  margin-top: 50px;
  background-color: rgb(0, 110, 255);
  border-radius: 35px;
  padding: 10px;
}

.column {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  position: relative;
}

.column:hover .cell,
.column:focus .cell {
  background-color: rgb(11, 206, 131);
}

.cell {
  border: 10px solid darkblue;
  border-radius: 50%;
  background-color: #e4e4e4;
  margin: 3px;
  transition-property: background-color;
  transition-duration: 0.15s;
  display: grid;
}

.cell .piece {
  opacity: 0;
  border-radius: 50%;
  transition: 0.4s, 0.5s transform ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(calc((700 / (700 / 6) * (90vw / 6)) * -1));
}

.cell[checked="true"] .piece {
  transform: translateY(0);
}

.cell .piece::after {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid black;
  border-radius: 50%;
  width: 85%;
  height: 85%;
  font-size: 1.5em;
}

.cell[player="1"] .piece {
  background-color: red;
  opacity: 1;
}
.cell[player="1"] .piece::after {
  content: "I";
}

.cell[player="2"] .piece {
  background-color: yellow;
  opacity: 1;
}
.cell[player="2"] .piece::after {
  content: "II";
}

#winModal {
  visibility: hidden;
  transition-duration: 1s;
  position: fixed;
}

body[finished="true"] #winModal {
  visibility: visible;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  align-content: center;
  display: flex;
  justify-content: center;
  flex-flow: column;
  align-items: center;
  background: #111111ee;
  color: white;
  z-index: 1;
}

@media only screen and (max-width: 599px) {
  .cell {
    border-width: 2px;
    margin: 2px;
  }

  .cell .piece::after {
    border-width: 2px;
    width: 75%;
    height: 75%;
    font-size: 1em;
  }
}
