body {
  margin: 0;
  overflow: hidden;
}

#video {
  width: 640px;
  height: 480px;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  transform: scaleX(-1); /* Mirror video */
}

#canvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  pointer-events: none;
}

#game-board {
  position: absolute;
  top: 90px;
  left: 170px;
  width: 300px;
  height: 300px;
  display: grid;
  grid-template-columns: repeat(3, 100px);
  grid-template-rows: repeat(3, 100px);
  z-index: 3;
  transform: scaleX(-1); /* Mirror board to match video */
}

.cell {
  border: 2px solid black;
  font-size: 64px;
  text-align: center;
  line-height: 100px;
  color: black;
}

#restart {
  position: absolute;
  top: 410px;
  left: 270px;
  padding: 10px 20px;
  font-size: 16px;
  z-index: 4;
  background-color: #fff;
  border: 2px solid black;
  cursor: pointer;
}
