html {
    box-sizing: border-box;
}

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

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

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

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

h1 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 300;
}


/*
 * Styles for the deck of cards
 */

.deckContainer {
    width: 80vw;
    height: 80vw;
    min-height: 300px;
    min-width: 300px;
    max-width: 70vh;
    max-height: 70vh;
    ;
}

.deck {
    /*position: absolute;*/
    width: 100%;
    height: 100%;
    padding: 35px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 1.2vw;
    background: linear-gradient(160deg, #02ccba 0%, #aa7ecd 100%);
    border-radius: 10px;
    box-shadow: 12px 15px 20px 0 rgba(46, 61, 73, 0.5);
    margin: 0 0 3em;
}

.deck .card {
    width: 100%;
    height: 100%;
    background: #2e3d49;
    font-size: 0px;
    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:after,
.deck .card:before {
    content: ".";
    font-size: 35px;
    visibility: hidden;
}

.deck .card.show {
    font-size: 35px;
    transition: .3s;
    transform: rotateY(0);
    background: #02b3e4;
    cursor: default;
}

.deck .card.match {
    cursor: default;
    background: #02ccba;
    font-size: 35px;
}


/*
 * Styles for the Score Panel
 */

.score-panel {
    text-align: left;
    width: 445px;
    margin-bottom: 10px;
    position: relative;
    /* display: flex; */
}

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

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

.score-panel .restart {
    float: right;
    cursor: pointer;
}

#timer,
.value {
    position: absolute;
    left: 160px;
}

.elapsed {
    position: absolute;
    left: 210px;
}


/* modal styles */

#winModal {
    height: 100vh;
    width: 100vw;
    background-color: #fff;
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    top: 0;
    left: 0;
    text-align: center;
}

.button {
    background-color: #02ccba;
    color: #fff;
    padding: 15px 22px;
    margin: 40px auto 0 auto;
    width: 200px;
    cursor: pointer;
}

#starsWinMessage {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: -20px;
}

#starsWinMessage ul {
    display: flex;
    margin-left: -30px;
}

#starsWinMessage .stars li {
    margin: 0 2px !important;
}

.hidden {
    display: none !important;
}


/* card antimatons */

.flipping {
    transform: rotateY(180deg);
    transition: 0s;
    transform-style: preserve-3d;
}

.incorrect {
    background-color: #e66b30 !important;
    transition: .3s;
}


/* animated checkmark from https://codepen.io/haniotis/pen/KwvYLO*/

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #02ccba;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #fff;
    stroke-miterlimit: 10;
    margin: 30px auto;
    box-shadow: inset 0px 0px 0px #02ccba;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    0%,
    100% {
        transform: none;
    }
    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 30px #02ccba;
    }
}

@media only screen and (max-width: 575px) {
    .score-panel {
        width: 445px;
        display: flex;
        flex-direction: column;
        align-items: center;

    }
    .movesContainer, .timerContainer, .restart {
        display: block;
        margin: 20px 0 0 0;
    }
    .score-panel .stars {
        margin: 0;
        padding: 0;
        display: inline-block;
        margin: 0 5px 0 0;
    }
    .score-panel .stars li,
    #winModal .winStars li {
        list-style: none;
        display: inline-block;
    }
    .score-panel .restart {
        cursor: pointer;
        float: none;
        margin-top: 40px;
    }
}