/* change the box model for all elements on the web page to the new box model. */

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

body {
  height: 100vh;
  display: flex;
  /* background: #060AB2; */
}

/* Button new game */

.new-game {
  width: 160px; 
  height: 120px;
  margin: 5px;
}

#container {
  width: 640px;
  height: 640px;
  margin: auto;
  display: flex;
  flex-wrap: wrap;
}

h1 {
  margin-top: 100px;
  text-align: center;
}

.game-card {
  width: calc(25% - 10px);
  height: calc(33.333% - 10px);
  margin: 5px;
  position: relative;
  /* box-shadow: 1px 1px 1px rgba(0,0,0,.3); */
  perspective: 1000px;
}

/*Necessary on positioning sides*/
.game-card-inner {

    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}


/* Flip on mouse click */
.game-card.active .game-card-inner {
    transform: rotateY(180deg);
  }

  /* Position the front and back side */
  .front, .back {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 20px;
    border-radius: 5px;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
  }

.front {
    background-color: #CDB5CD;
    color: #ffff;
  }

  .back {
    background-color: #000000;
    color: #ffff;
    font-size: 80px;
    padding-top: 16px;
    transform: rotateY(180deg);
  }