/* BASIC STYLING */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
 background: #313131;
 /* font-family: 'IBM Plex Mono', monospace; */
 font-family: 'Montserrat Alternates', sans-serif;
}

/* ANIMATIONS */
/* ------------------------ */
@keyframes flip {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(90deg); }
}

@keyframes win {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 0.8; border: 3px solid #94b455; border-radius: 3px; }
}

/* OVERLAY */
/* ------------------------ */
.overlay {
  background: #f3f3f3;
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: 3;
}

/* START GAME POPUP */
/* ------------------------ */
.start-game-popup,
.win-popup {
  text-align: center;
  width: 300px;
  height: 200px;
  border: 10px solid #73d4dd;
  border-radius: 10px;
  padding: 15px 8px 8px 8px;
  background: linear-gradient(to top right, #00243A, #F9F8EF);
  box-shadow: 0 0 30px #231f1c;
  color: #292824;
  text-transform: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
}

.start-game-popup button,
.win-popup button {
  margin: 20px;
  padding: 10px 15px;
  border-left: 15px solid #CEBB51;
  border-right: 15px solid #CEBB51;
  border-top: 8px solid #CEBB51;
  border-bottom: 8px solid #CEBB51;
  border-radius: 10px;
  background: #292824;
  color: #bea77e;
  font-weight: bold;
  text-transform: uppercase;
  box-shadow: 0 2px 10px #231f1c;
}

.start-game-popup button:hover,
.win-popup button:hover {
  cursor: pointer;
  background: #4e4c44;
}

/* WIN POPUP */
/* ------------------------ */
.win-popup {
  height: 185px;
}

/* MAIN HEADER */
/* ------------------------ */
.main-header {
  padding: 20px 0 10px 0;
}

.main-header h1 {
  text-align: center;
  color: #bea77e;
  text-transform: capitalize;
}
.main-header h2 {
	text-align: center;
	color: #ffffff;
	text-transform: capitalize;
}
/* INFOS */
/* ------------------------ */
.infos {
  display: flex;
  align-items: center;
  width: 90%;
  margin: auto;
  flex-wrap: wrap;
  justify-content: space-between;
}

.user-play-infos {
  display: flex;
}

.user-play-infos > div,
#reset {
  margin: 0 5px;
  padding: 3px 10px;
  background: #1b1a18;
  border: 2px solid #938884;
  border-radius: 20px;
  color: #938884;
  text-transform: none;
}

#reset:hover {
  cursor: pointer;
  background: #3b3935;
}

.stars,
.moves {
  display: flex;
}

.fa-heart,
.fa-hashtag {
  margin: 0 5px;
}

/* MAIN GRID */
/* ------------------------ */
.main-grid {
  display: flex;
  flex-wrap: wrap;
  width: 300px;
  height: 300px;
  margin: 10px auto;
  padding: 10px;
  justify-content: space-between;
  align-items: center;
}

.cards {
  width: 60px;
  height: 60px;
  position: relative;
}

.cards:hover {
  cursor: pointer;
}

.card-back-flip {
  animation: flip 0.1s ease-in forwards;
}

.card-front-flip {
  animation: flip 0.1s 0.1s ease-out forwards reverse;
}

.card-back-reverse {
  animation: flip 0.1s ease-in forwards reverse;
}

.card-front-reverse {
  animation: flip 0.1s 0.1s ease-out forwards;
}

.card-win {
  animation: win ease 0.5s forwards;
}

.card-front {
  background: #d7be6a;
  background-size: 92%;
  background-repeat: no-repeat;
  background-position: center;
  width: 100%;
  height: 100%;
  transform: rotateY(90deg);
  border: 2px solid #7a737a;
}

.card-back {
  background: #de5d19;
  background: linear-gradient(to bottom right, #00818D, #00243A);
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  border: 2px solid #7a737a;
  border-radius: 3px;
}

#a1 > .card-front,
#a2 > .card-front {
  background-image: url("../images/a-bread.jpg");
}

#b1 > .card-front,
#b2 > .card-front {
  background-image: url("../images/b-hot-tea.jpg");
}

#c1 > .card-front,
#c2 > .card-front {
  background-image: url("../images/c-hamburger.jpg");
}

#d1 > .card-front,
#d2 > .card-front {
  background-image: url("../images/d-french-fries.jpg");
}

#e1 > .card-front,
#e2 > .card-front {
  background-image: url("../images/e-chocolate.png");
}

#f1 > .card-front,
#f2 > .card-front {
  background-image: url("../images/f-biscuit.jpg");
}

#g1 > .card-front,
#g2 > .card-front {
  background-image: url("../images/g-pie.jpg");
}

#h1 > .card-front,
#h2 > .card-front {
  background-image: url("../images/h-cake.png");
}

/* MIN 480 PX */
/* ------------------------ */
@media screen and (min-width: 480px) {
  /* Main Grid */
  .main-grid {
    width: 440px;
    height: 440px;
  }

  .cards {
    width: 95px;
    height: 95px;
  }
}

/* MIN 760 PX */
/* ------------------------ */
@media screen and (min-width: 760px) {
  /* Main Grid */
  .main-grid {
    width: 720px;
    height: 720px;
    padding: 20px;
  }

  .cards {
    width: 155px;
    height: 155px;
  }
}

/* MIN 1024 PX */
/* ------------------------ */
@media screen and (min-width: 1024px) {
  /* Main Grid */
  .main-grid {
    width: 860px;
    height: 860px;
    padding: 20px;
  }

  .cards {
    width: 195px;
    height: 195px;
  }
}

/* INTERACTION */
/* ------------------------ */
.hidden {
  display: none;
}
