@import url('https://fonts.googleapis.com/css?family=Varela+Round');

:root {
    --color1: rgb(132, 197, 184);
    --color2: #393D3F;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Varela Round', sans-serif;
}

body {
    /*background: #f3f3f3;*/
    position: relative;
}

/*////////////////////////////////////////////          NAVIGATION/TOP SECTION*/
header {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100px;
    background: var(--color2);
    color: white;
}

header h1 {
    font-size: 3rem;
}

.navbar {
    right: 4px;
}

#game { 
    -webkit-touch-callout: none; /*Game elements are not selectable*/
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 3fr 1fr;
}

/*////////////////////////////////////////////      SETUP LAYOUT FOR CARDS / MIDDLE SECTION*/
.board {
    margin-left: auto;
    margin-right: auto;
    width: 650px;
    height: 800px;
    display: flex;
    flex-wrap: wrap;
    overflow: hidden;
    perspective: 1000px; /*For 3D flipping card effect*/
}

/*////////////////////////////////////////////     CARD FLIP AND STYLING */
.card {
    position: relative;
    width: calc(25% - 8px);
    height: calc(25%-8px);
    border-radius: 20px;
    margin: 4px;
    transform-style: preserve-3d; /*Flip effect*/
    transition: transform .5s;
}

.card:active {
    transition: transform .25s; /*Card shrinks when click effect*/
    transform: scale(.95);
}

.card.flip  {
    transform: rotateY(180deg); /*flips card*/
}

.card img {
    position: absolute; /*Puts cards on top of eachother*/
    width: 100%;
    height: 100%;
    border-radius: 20px;
    border: 3px #3a3a3a solid;
    backface-visibility: hidden;
}

.front {
    transform: rotateY(180deg); /*Need to flip the front side after it got flipped before*/
}

/*////////////////////////////////////////////////      GRID LEFT SIDE*/
#feed-back {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 300px;
    height: 250px;
    background: var(--color1);
    border-radius: 30px;
    border: 8px var(--color2) solid;
    color: white;
    margin-left: auto;
    margin-right: auto;
    margin-top: 10px;
}

#feed-back * {
    padding: 5px;
}

#feed-back h2 {
    font-weight: bold;
    font-size: 24px;
}

#feed-back img {
    position: absolute;
    left: 65%;
}

#table-header {
    color: var(--color2);
}

/*////////////////////////////////////////////////////      GRID RIGHT SIDE*/
#misc {
    color: var(--color1);
    margin-top: 40px;
}

#streak-meter {
    width: 90%;
    height: 50px;
    border: 4px var(--color2) solid;
    border-radius: 25px; 
}

#meter {
    transition: width .5s;
    width: 100%;
    height: 100%;
    background: var(--color1);
    border-radius: 25px; 
}

#misc h1 {
    font-size: 2rem;
}

#misc h2 {
    color: var(--color1);
    visibility: hidden;
}

#bonus {
    opacity: 0;

}

/*///////////////////////////////////////////           END GAME SCREEN*/
#end-screen {
    visibility: hidden;
    position: absolute;
    background: white;
    text-align: center;
}

#end-screen img {
    margin: auto;
    display: block;
}

#reset-btn {
    transform: scale(1.3);
    transition: all .7s;
}

#reset-btn:hover {
    background: transparent;
    color: red;
}
/*/////////////////////////////////////////////*/
@keyframes fadein {
    from  {
        opacity: 0;
        transform: scale(.5); 
    }
    to {
        opacity: 1;
        transform: scale(1); 
    }
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}