html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: url('../img/geometry2.png'); /* Background pattern from Subtle Patterns */
   font-family: 'Indie Flower', cursive;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width:100vw;
    height:100vhs;
}

h1 {
    font-weight: 300;
    font-size:4em;
    font-family: 'Indie Flower', cursive;

}



/*
 * Styles for the deck of cards
 */

.deck {
    width: 660px;
    min-height: 680px;
    background: linear-gradient(160deg, #02ccba 0%, #aa7ecd 100%);
    padding: 32px;
    border-radius: 10px;
    box-shadow: 12px 15px 20px 0 rgba(46, 61, 73, 0.5);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 3em;
}

.deck .card {
    height: 125px;
    width: 125px;
    background: #2e3d49;
    font-size: 0;
    color: #ffffff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 5px 2px 20px 0 rgba(46, 61, 73, 0.5);
}

.deck .card.open {
    transform: rotateY(0);
    background: #02b3e4;
    cursor: default;
}

.deck .card.close {
    animation-name: shake;
    animation-duration: 1s;

}

.deck .card.show {
    font-size: 33px;
}


.deck .card.match {
    cursor: default;
    background: #02ccba;
    font-size: 33px;
    animation-name: makebig;
    animation-duration: 1s;
}



.score-panel {
    display: flex;
    flex-wrap: wrap;
    text-align: center;
    width: 100%;
    margin-bottom: 10px;
    
}

.score-panel .stars {
    margin: 0;
    padding-left: 10px;
    display: inline-block;
    margin: 0 5px 0 0;
}

.score-panel .stars li {
    list-style: none;
    display: inline-block;
}

.stars {
    width: 100%;
    text-align:center;
}
.moves-container {
    width: 50%;
    text-align: center;
}
.score-panel .restart {
    text-align: center;
    cursor: pointer;
    width: 50% ;
    font-family: 'Playfair Display', serif;
}

.score-panel .timer {
    width:100%;
    text-align:center;
    padding-top: 5px;
    padding-bottom:5px;
}

.deckArea {
    position: relative;
    z-index: 1;
    min-width: 330px;
    width: 660px;
    min-height: 680px;
    text-align: center;
   
}

.score-panel .move {
    float:left;
    width:50%;

}

.cardArea {
    position: absolute;
    z-index: 2; 
}

/* Pop Up Window */
.popup {
    display: inline-block;
    cursor: pointer;
    padding:; 10px;
    z-index: 3; 
    margin:-50%;
    
}

/* The actual popup (appears on top) */
.popup .popuptext {
    visibility: hidden;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    font-size: 1.5em;
    position: absolute;
    z-index: 4;
    opacity: 0.9;
    width:50%;
    margin: -25%;
    height: 60%;
}


/* Toggle this class when clicking on the popup container (hide and show the popup) */
.popup .show {
    visibility: visible;
    -webkit-animation: fadeIn 1s;
    animation: fadeIn 1s
}

.playagain {
    background-color:#fff;
    color: black;
    text-align: center;
    border-radius: 6px;
    padding: auto;
    font-size: 1.2em;
    position:absolute;
    opacity: 1;
    width: 250px;
    height:50px;
    margin:10%;
    vertical-align: middle;
    line-height: 50px; 
}

.finalStars {
    margin:0;
    padding: 0;
    list-style-type: none;
    text-align:center;
}

.finalStars li {
    display: inline;
}

/*Animations*/

@keyframes shake {
  10%, 90% {
    transform: translate3d(-1px, 0, 0);
    background: #02b3e4;
    font-size: 33px;
  }
  
  20%, 80% {
    transform: translate3d(2px, 0, 0);
    background: #2e3d49;
    font-size: 33px;
  }

  30%, 50%, 70% {
    transform: translate3d(-4px, 0, 0);
    background: #02b3e4;
    font-size: 33px;
  }

  40%, 60% {
    transform: translate3d(4px, 0, 0);
     background: #2e3d49;
     font-size: 33px;
  }
}

@keyframes makebig {
    20% {transform: scale(1); }
    60% {transform: scale(1.5);}
    100% {transform: scale(1);}
}



/* Add animation (fade in the popup) */
@-webkit-keyframes fadeIn {
    from {opacity: 0;} 
    to {opacity: 1;}
}

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



