*,
*::before,
*::after {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

body {
  margin: 20px 0;
  background: url("../img/background_day.png");
  background-size: cover;
  overflow: hidden;
}

.grid {
  max-width: 960px;
  margin: 0 auto;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
  flex-wrap: wrap;
  -webkit-box-pack: space-evenly;
  -ms-flex-pack: space-evenly;
  justify-content: space-evenly;
}

.card {
  position: relative;
  -webkit-transition: all 0.4s linear;
  -o-transition: all 0.4s linear;
  transition: all 0.4s linear;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  margin: 5px;
}

.card,
.back,
.front {
  height: 130px;
  width: 130px;
  border-radius: 25px;
}

.back,
.front {
  position: absolute;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.front {
  z-index: 2;
  background: transparent url("../img/back.JPG") no-repeat center center /
    contain;
}

.back {
  -webkit-transform: rotateY(180deg);
  transform: rotateY(180deg);
  background-color: transparent;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
}

.selected {
  -webkit-transform: rotateY(180deg);
  transform: rotateY(180deg);
}

.match .front {
  background: transparent !important;
}

.main-score {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
  -ms-flex-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  text-align: center;
  max-width: 70%;
  margin: 0 auto;
}
.score,
.time {
  font-family: "Press Start 2P", sans-serif;
  font-size: 1.7rem;
  color: white;
  margin: 1rem;
}

.paused,
.start,
.scoreboard {
  height: 100vh;
  width: 100vw;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  font-family: "Press Start 2P", sans-serif;
  font-size: 2rem;
  text-align: center;
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(224, 153, 22, 0.8);
}
.paused,
.scoreboard {
  display: none;
}

.paused {
  background: #fefefe;
}

.scoreboard {
  font-size: 1.2rem;
}

.scoreboard p {
  color: #124dff;
}

.start {
  background: #0e849e85;
  color: white;
}

.start-btn:hover {
  color: #124dff64;
}
.start span,
.scoreboard span {
  color: #fefefe;
  cursor: pointer;
}

.play-btn,
.scoreboard span:hover {
  text-decoration: underline;
}

.controls,
.social {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
  -ms-flex-direction: column;
  flex-direction: column;
}

.social {
  left: 20px;
  width: 0;
}

.social i,
.controls i {
  margin: 1rem;
  color: #fab942;
  cursor: pointer;
}

.social i {
  color: white;
}

.fa:hover {
  -webkit-transform: scale(1.1);
  -ms-transform: scale(1.1);
  transform: scale(1.1);
}


@media screen and (max-width: 767px) {
	.card,
	.back,
	.front {
		height: 80px;
		width: 80px;
	}

  .score,
  .time {
    font-size: 1rem;
  }

}

@media screen and (max-width: 360px) {
	.card,
	.back,
	.front {
		height: 70px;
		width: 70px;
	}
}

@media screen and (max-width: 250px) {
	.card,
	.back,
	.front {
		height: 60px;
		width: 60px;
	}

  .score,
  .time {
    font-size: .75rem;
  }
}