body {
    background-color: white;
}
.main {
    background-color: #1c301a;
    font-family: sans-serif;
    font-size: x-large;
    color: white;
    text-align: center;
    border-radius: 30px;
    padding: 20px;
}
.controls {
  display: grid;
  justify-content: center;
  grid-template-columns: repeat(auto-fit, 200px);
  gap: 30px;
}
.controls button {
  font-size: x-large;
}
.game-board {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 30px;
    padding: 30px;
}
.tile {
  perspective: 1000px;  /* Gives the flip 3D depth */
}
.tile-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
  transform-style: preserve-3d; /* Keeps children in 3D space */
}

.tile.flipped .tile-inner {
  transform: rotateY(180deg);
}

.front, .back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}

.front img, .back img {
  width: 100%;
  height: 100%;
  display: block;
}
.tile.empty {
    border: 1px solid #999999;
}
.tile.empty.hovered {
    border: 1px solid yellow;
}
.tile.empty img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0;
  pointer-events: none;
}
.promotion {
    padding: 20px;
}
.won {
    font-size: xx-large;
}
.back {
  transform: rotateY(0deg);
}

.front {
  transform: rotateY(180deg);
}
