* * {
  box-sizing: border-box;
} 

html {
  min-height: 100vh;
 
}

body {
  margin: 0;
  background: radial-gradient(rgb(0, 0, 0), rgb(0, 0, 0));
}
p {
    font-size: 20px;
    margin: 10px;
    margin-left: 40px;
    margin-right: 40px;
    text-align: center;
    font-family: 'Ubuntu', sans-serif;
}

.game-details{
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  font-family: 'Ubuntu', sans-serif;
}
/* game details */
.details{
  color: rgb(226, 222, 222);
  font-size: 35px;
}

.game-container {
  display: grid;
  grid-template-columns: repeat(8, auto);
  grid-gap: 8px;
  justify-content: center;
}

.card {
  position: relative;
  height: 175px;
  width: 125px;
}


.face-val {
  position: absolute;
  height: 175px;
  width: 125px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  backface-visibility: hidden;
  border-radius: 9px;
  border-width: 1px;
  border-style: solid;
  transition: transform 500ms ease-in-out;
  
}

.card.visible .back {
  transform: rotateY(-180deg);
}

.card.visible .front {
  transform: rotateY(0);
  
}

.card.matched .value {
  animation: dance 1s linear infinite 500ms;
}

.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  justify-content: center;
  align-items: center;
  z-index: 100;
  color: #d8d3d3;
}
.overlay > h2{
    font-size: 30px;
    font-family: 'Ubuntu', sans-serif;
}
.overlay > h3{
    font-size: 40px;
    color: #d8d3d3;
    font-family: 'Ubuntu', sans-serif;
}


.overlay-small {
  font-size: 20px;
  font-family: 'Ubuntu', sans-serif;
}

.overlay.visible {
  display: flex;
  flex-direction: column;
  animation: overlay-grow 500ms forwards;

}

.logo-overlay{
    height: 100px;
    width: 323px;
    border-radius: 5px;

}
@keyframes overlay-grow {
  from {
    background-color: rgba(0, 0, 0, 0);
    font-size: 0;
  }
  to {
    background-color: rgba(0, 0, 0, .8);
    font-size: 1px;
  }
}

@keyframes dance {
  0%, 100%  {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-30deg);
  }
  75% {
    transform: rotate(30deg);
  }
}

.back {
   background-image:  url('../img/marvellogo4.jpg') ;
  border-color: rgb(151, 29, 29);
}

.front {
  background-color: rgb(189, 19, 19);
  border-color: #333;
  transform: rotateY(180deg);
}

.value {
  transition: transform 100ms ease-in-out;
  transform: scale(.9);
  height: 194px;
  width: 165px;
}

.front-val:hover .value {
  transform: scale(1);
}

  .logo{
  position: absolute;
  height: 67px;
  width: 124px;
  margin-top: 57px;
  transition: width 100ms ease-in-out, height 100ms ease-in-out;
}  

.face:hover {
  width: 52px;
  height: 52px;
}


.logo {
  align-self: flex-start;
  transform: translateY(-10px);
  transition: transform 100ms ease-in-out;
}

.back:hover .logo {
  transform: translateY(0)
}

@media (max-width: 600px) {
  .game-container {
    grid-template-columns: repeat(2, auto);
  }

  .game-details {
    flex-direction: column;
    align-items: center;
  }
}








