:root {
  --main-color: #2196f3;
}
* {
  box-sizing: border-box;
}
body {
  background-color: #eee;
  position: relative;
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
.control {
  position: absolute;
  background-color: rgba(0, 68, 124, 0.8);
  width: 100%;
  height: 100vh;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}
.control span {
  padding: 20px;
  color: rgb(255, 255, 255);
  background-color: var(--main-color);
  font-size: 50px;
  font-weight: bold;
  cursor: pointer;
}
.statics-box {
  margin: auto;
  width: 830px;
  display: flex;
  justify-content: space-between;
  background-color: white;
  padding: 10px 20px;
  border: 4px solid var(--main-color);
  margin-bottom: 20px;
  font-size: 20px;
}
@media (max-width: 991px) {
  .statics-box {
    width: calc(95% - 20px);
    font-size: 16px;
  }
}
.game-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 830px;
  margin: auto;
}
.game-box.no-clicking {
  pointer-events: none;
}
@media (max-width: 767px) {
  .game-box {
    gap: 10px;
    width: 95%;
  }
}
.game-box .unit-box {
  width: 150px;
  height: 150px;
  border: 4px solid var(--main-color);
  padding: 10px;
  cursor: pointer;
  position: relative;
  transition: transform 0.5s;
  transform-style: preserve-3d;
}
@media (max-width: 767px) {
  .game-box .unit-box {
    width: 70px;
    height: 70px;
    padding: 5px;
  }
}
.game-box .unit-box.flipp,
.game-box .unit-box.has-match {
  transform: rotateY(180deg);
  pointer-events: none;
}
.game-box .unit-box .back {
  background-color: rgb(255, 255, 255);
  transform: rotateY(180deg);
}
.game-box .unit-box .front {
  background-color: black;
  position: relative;
  display: grid;
  place-items: center;
}
.game-box .unit-box .front::after {
  content: "!";
  color: white;
  font-size: 100px;
  font-weight: bold;
}
.game-box .unit-box .face {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
}
.game-box .back img {
  max-width: 100%;
  padding: 10px;
}
