@font-face {
  font-family: "AtarianBold";
  src: url("Assets/Fonts/sf-atarian-system/Atarian/SF\ Atarian\ System\ Bold.ttf") format("woff");
       
}

@font-face {
  font-family: "AtarianBoldExtended";
  src: url("Assets/Fonts/sf-atarian-system/Atarian/SF\ Atarian\ System\ Extended\ Bold.ttf") format("woff");
       
}
* {
  box-sizing: border-box;
}

html {
  min-height: 100vh;
  cursor:auto;
}

body {
  margin: 0;
  background: #ddd;
}

h2{
  color: #ffffff;
  font-family: AtarianBoldExtended, serif;
  font-weight: normal;
  text-align: center;
  font-size: 125px;
}

h3 {
  font-family: AtarianBold, serif;
  color: #ffffff;
  text-align: center;
  font-size: 40px;
}
h3>span{
  cursor: pointer;
}
a{
  text-decoration: none;
  color: #fff;
}
.page-title {
  color: #111;
  font-family: AtarianBoldExtended, serif;
  font-weight: normal;
  text-align: center;
  font-size: 2.5em;
  margin: auto;
  padding-top: 1.5em;
}
.rule{
  font-size: 20px;
  padding: 0 50px;
}
.overlay-text>h2{
  cursor: pointer;
}
.game-info-container {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
}

.game-info {
  font-family: AtarianBold, serif;
  color: #000000;
  font-size: 2em;
}

.game-container {
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, auto);
  grid-gap: 10px;
  justify-content: center;
  perspective: 500px;
  margin-bottom:3em;
}
.game-container3 {
  margin: 3em auto;
  display: grid;
  grid-template-columns: repeat(5, auto);
  grid-gap: 10px;
  justify-content: center;
  perspective: 500px;
}

.card {
  position: relative;
  cursor: auto;
  height: 180px;
  width: 120px;
}

.card-face {
  position: absolute;
  display: fill;
  justify-content: center;
  align-items: center;
  width: 120px;
  height: 180px;
  border-radius: 5px;
  border-width: 1px;
  border-style: solid;
  overflow: hidden;
  transition: transform 500ms ease-in-out;
  backface-visibility: hidden;
}

.card.visible .card-back {
  transform: rotateY(-180deg); 
}

.card.visible .card-front {
  transform: rotateY(0); 
}

.card.matched .card-front .card-value {
  animation: dance 1s linear infinite 500ms;
}

.card-back {
  /*background-color: #D672FA;
  border-color: #333;*/
  transform: rotateY(0); 
}

.back-card {
  align-self: flex-start;
  transition: transform 100ms ease-in-out;
  transform: translateY(-1px);
  /*width: 125px;
  height: 175px;
  background-size: 100%;*/
}

.card-back:hover .back-card {
  transform: translateY(0);
}

.card-value {
  position: relative;
  transition: transform 100ms ease-in-out;
  transform: scale(.99);
  width:100%;
  /*width: 125px;
  height: 175px;
  background-size: 100%;*/
}

.card-front:hover .card-value {
  transform: scale(1);
}

.card-front {
  /*background-color: #D672FA;
  border-color: #333;*/
  transform: rotateY(180deg);
}

.overlay-text {
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  display: none;
  position: fixed;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: #ffffff;
  font-family: Creepy, serif;
  transition: background-color 500ms, font-size 500ms;
}

.overlay-text-small {
  font-size: 3em;
}
.overlay-text.visible {
  display: flex;
  animation: overlay-grow 500ms forwards;
}

@keyframes dance {
  0%, 100% {
    transform: rotate(0)
  }
  25% {
    transform: rotate(-1.5deg)
  }
  75% {
    transform: rotate(1.5deg)
  }
}

@keyframes overlay-grow {
  from {
    background-color: rgba(0, 0, 0, 0);
    font-size: 0;
  }
  to {
    background-color: rgba(0, 0, 0, .8);
    font-size: 10em;
  }
}

@media (max-width: 600px) {
  .game-container {
    grid-template-columns: repeat(4, auto)
  }

  .game-info-container {
    margin-top: 0em;
    font-size:14px;
  }

  .card, .card-face{
    /*height: 85px;
    width: 56px;*/
    height: 135px;
    width: 92px;
  }
  h2{
    font-size: 40px;
  }
  h3{
    font-size: 25px;
  }
  
}