@font-face {
    font-family: "Creepy";
    src: url("assets/fonts/Creepy.woff") format("woff"),
         url("assets/fonts/Creepy.woff2") format("woff2");
}

@font-face {
    font-family: "Lunacy";
    src: url("assets/fonts/Lunacy.woff") format("woff"),
         url("assets/fonts/Lunacy.woff2") format("woff2");
}

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

html, body{
    width: 100%;
    background: radial-gradient(#9D5900, #3D2200);
    font-family: Lunacy;
}

/* OVERLAYS */
.overlay{
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0,0,0, 0.7);
    z-index: 999999;
    animation: fadeIn 0.8s ease-in forwards;
}

.hidden{
    display: none;
}

.overlay h1{
    color: #FF6D00;
    font-family: Creepy, serif;
    font-weight: normal;
    text-align: center;
    font-size: 5em;
}

.overlay button{
    width: 200px;
    border: 1px solid #FF6D00;
    height: 50px;
    border-radius: 20px;
    background-color: transparent;
    font-family: Creepy, serif;
    color: #FFBB89;
    font-size: 1.8em;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: all ease-in;
    outline: none;
}

.overlay button:hover{
    background-color: #FF6D00;
    color: #fff;
}

/* GAME AREA DESIGN */
.game{
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    width: 100%;
}

.game-area{
    height: 100vh;
    width: 54%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.game-area .header{
    display: flex;
    flex-direction: row;
    padding: 0 1rem;
    justify-content: space-between;
}
.game-area .header label{
    color: #FFBB89;
    font-size: 3em;
}

.title{
    color: #FF6D00;
    font-family: Creepy, serif;
    font-weight: normal;
    text-align: center;
    font-size: 4em;
}

/* Articles / Memory cards */

.memory-game {
    padding: 1rem;
    display: grid;
    grid-template-columns: auto auto auto auto;
    grid-gap: 0.5rem;
}

.memory-game .memory-card{
    height: 100px;
    box-shadow: 2px 5px 16px rgba(0,0,0,0.3);
    background-color: #fff;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

/* FLIP ANIMATION */
  .flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 5px;
  }

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

  .show-back-face{
    transform: rotateY(180deg);
  }

  .flip-card-back img{
      width: 100%;
      height: 100%;
      border-radius: 5px;
  }
  .flip-card-front img{
    width: 100%;
    height: 100%;
    border-radius: 5px;
  }

  /* Animations */
  @keyframes fadeIn{
      from{
          opacity: 0;
      }
      to{
          opacity: 1;
      }
  }

  /* Responsive Version */

  @media (max-width: 992px){
    .game-area{
          width: 80%;
    }
    .game-area .header label{
        color: #FFBB89;
        font-size: 2.5em;
    }
  }
  
  @media (max-width: 500px){
    .game-area{
          width: 100%;
    }
    .game-area .header label{
        color: #FFBB89;
        font-size: 2rem;
    }
    .title{
        font-size: 3em;
        margin-bottom: 10px;
    }
  }