@font-face {
  font-family: kidpixies;
  src: url(./KidpixiesRegular-p0Z1.ttf);
}

body {
  min-height: 100vh;
  min-width: 100vw;
  padding: 0;
  margin: 0;
  background-image: linear-gradient(45deg, #6e53ce,#00972d, #db2727, #a8be26,#6e53ce);
  color: white;
  font-family: "kidpixies", monospace;
  overflow: hidden;
  user-select: none;
  text-align: center;
}
#main-container{
  display: none;
  width: 100%;
  height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.heading-container{
    min-height: 100px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}
.heading-container img{
  height: 150px;
}
.absolute-top-right{
  position: absolute;
  top: 0;
  right: 0;
}
.absolute-top-left{
  position: absolute;
  top: 0;
  left: 0;
}
#win-container, #menu-container{
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  position: absolute;
  padding: 0px;
  width: 100%;
  height: 100%;
  top: 0px;
}
#menu-container{
  display: flex;
  flex-direction: column;
  background-image: linear-gradient(45deg, #6e53ce,#00972d, #db2727, #a8be26,#6e53ce);
  z-index: 10;
}
.fade-in{ animation: fade-in 0.4s ease-in 0s 1 forwards; }
.fade-out { animation: fade-out 0.4s ease-in 0s 1 forwards; }
@keyframes fade-in {
  from {opacity: 0;}
  to {opacity: 1;}
}
@keyframes fade-out {
  from {opacity: 1;}
  to {opacity: 0;}
}
#menu-container img{ width: 250px; }
#menu-container span{ width: 100%; }

.blur-box{
  position: absolute;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(5px);
}
#win-box{
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  box-sizing: border-box;
  position: relative;
  padding: 20px;
  width: 70%;
  height: 70%;
  background-image: linear-gradient(45deg, #6e53ce,#00972d, #db2727, #a8be26,#6e53ce);
  border: #000 1px solid;
  border-radius: 10px;
  text-align: center;
}
h1{
  font-size: 50px;
  margin: 10px;
  font-weight: 10;
  text-shadow: 2px 2px 2px #000;
  
}
span {
  text-align: center;
  font-size: 50px;
  color: white;
  text-shadow: 2px 2px 2px #000;
}

.actions {
    display: flex;
    width: 100%;
    justify-content: space-around;
    margin-bottom: 30px;
    margin-top: 30px;
}
.button-container{
  width: 50%;
}
button {
    padding: 6px 12px;
    font-family: "kidpixies", monospace;
    font-size: 30px;
    border-radius: 10px;
    background-image: linear-gradient(#27ae60, #00682b, #27ae60);
    color: white;
    justify-self: center;
    box-shadow: 2px 2px 5px #000;
}
/* .actions button{ width: 45%; } */
button:hover{ background-image: linear-gradient(#1b7c44, #01411b, #1b7c44); }

.grid-container {
  display: grid;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  grid-gap: 16px;
  grid-template-columns: repeat(6, calc(100% / 9));
  grid-template-rows: repeat(3, calc(100vh / 5 ));
}
.scale-down-tosize{ animation: scale-down-tosize 0.4s ease-out 0s 1 normal; }

@keyframes scale-down-tosize {
  0% {
    scale: 3;
    opacity: 0;
  }
  50%{
    opacity: 0;
  }
  100%{
    scale: 1;
    opacity: 1;
  }
}

.card {
  height: 100%;
  width: 100%;
  max-width: 140px;
  min-width: 70px;
  max-height: calc(140px / 2 * 3);
  border-radius: 10px;
  background-color: white;
  position: relative;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  perspective: 800px;
  transition: all 0.4s ease-in-out;
}

.front-image { width: 100%; }

.card.flipped { transform: rotateY(180deg); }
.card.matched { box-shadow: inset 1px 1px 30px rgb(100, 200, 100), inset -1px -1px 30px rgb(100, 200, 100); }

.front, .back {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    position: absolute;
    border-radius: 10px;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    box-shadow: 3px 3px 5px black;
}

.card .front {
  display: flex;
  justify-content: center;
  align-items: center;
  transform: rotateY(180deg);
}

.card .back {
  background-image: url('./assets/SQUISH-MEMORY.png');
  background-position: center center;
  background-size: 30%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

span{
  font-size: 40px;
  width: 33%;
}

.credits{ font-size: 30px; }


@media (max-width: 690px) {
  h1{ font-size: 35px; }
  span{ font-size: 30px; }
  .credits{ font-size: 20px; }
  #menu-container img{ width: 200px; }
}

@media (max-height: 700px) and (min-width: 850px) {
  .front-image{height: 100%;}
}

@media (max-height: 550px) and (min-width: 600px){
  .heading-container {min-height: 50px;}
}

@media (max-width: 500px),(max-height: 650px){
  .heading-container img{ height: 70px; }
  h1{ font-size: 30px; }
  span{ font-size: 25px; }
  .credits{ font-size: 15px; }
  button{ font-size: 25px; }

  .card {
    max-width: 140px;
    min-width: 50px;
    max-height: 120px;
  }
}
@media (max-height: 390px){
  .actions{margin: 10px;}
}


/* For particle system */
.particle{
  /*SIZE IS SET BY PARTICLE CLASS*/
  display: block;
  position: absolute;
  background-image: url(./assets/Star.png);
  background-position: center;
  background-size: cover;
  border-radius: 50%;
  z-index: 3;
}
