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');
    font-family: 'Coda', cursive;
}

.container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    /* font-family: 'Berkshire Swash', cursive, 'Open Sans', sans-serif; */
}

h1 {
    /* font-family: 'Berkshire Swash', cursive, 'Open Sans', sans-serif; */
    font-family: 'Open Sans', sans-serif;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 10vw;
}
/*Styles for the deck of cards*/

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

.deck .card {
    height: 20vw;
    width: 20vw;
    margin-top: 1vh;
    margin-bottom: 1vh;
    margin-left: 1vw;
    margin-right: 1vw;
    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.show {
    font-size: 33px;
}

.deck .card.match {
    cursor: default;
    background: #02ccba;
    font-size: 33px;
    animation-timing-function: ease-in;
    animation: bounce 1s;
    -webkit-animation: bounce 1s;
}

.deck .card.unmatched {
    cursor: default;
    background: #ff3232;
    animation-delay: 1s;
    -webkit-keyframes: shake 0.5s ease-in-out;
    animation: shake 0.5s ease-in-out;
}

.deck .card.disabled {
    pointer-events: none;
}
/*Styles for the Score Panel*/

.score-panel {
    text-align: left;
    margin-bottom: 10px;
    font-size: 5vw;
}

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

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

.score-panel .restart {
    float: right;
    cursor: pointer;
}
/* --------------------------- */
.gameTimer {
    display: inline-block;
    margin: 0 1rem;
}
/*model upon completion of the game*/

.model {
    position: fixed;
    top: 10vh;
    bottom: 10vh;
    left: 10vw;
    right: 10vw;
    width: 100% height: 100%;
    transition: opacity 1000ms;
    visibility: hidden;
    font-family: 'Open Sans', sans-serif;
    font-size: 6vw;
    border-radius: 10px;
    box-shadow: 12px 15px 20px 0 rgba(46, 61, 73, 0.5);
    text-align: center;
    background: linear-gradient(30deg, #3e3ee0 0%, #8ffcf7 100%);
}

.show {
    visibility: visible !important;
    opacity: 100 !important;
}

.model h2 {
    font-size: 10vw;
    margin-top: 1px;
    margin-bottom: 1px;
    margin-left: 15px;
    margin-right: 15px;
    justify-content: center;
}

.model h3 {
    font-size: 7vw;
    margin-left: 15px;
    margin-top: 1px;
    margin-bottom: 1px;
    justify-content: center;
}

.rating li {
    display: inline-block;
    color: #ffd700;
    font-size: 7vw;
}

.replay {
    background-color: #add8e6;
    font-family: 'Open Sans', sans-serif;
    width: 40%;
    margin-left: 30%;
    margin-right: 30%;
    font-size: 5vw;
    margin-top: 5%;
    margin-bottom: 10%;
    border-radius: 15px;
    cursor: pointer;
}
/*keyframes*/

@keyframes bounce {
    from {
        transform: translateY(0px);
    }
    to {
        transform: translateY(-15px);
    }
}

@-webkit-keyframes bounce {
    from {
        transform: translateY(0px);
    }
    to {
        transform: translateY(-15px);
    }
}

@-webkit-keyframes shake {
    0% {
        -webkit-transform: translateX(0);
    }
    20% {
        -webkit-transform: translateX(-10px);
    }
    40% {
        -webkit-transform: translateX(10px);
    }
    60% {
        -webkit-transform: translateX(-10px);
    }
    80% {
        -webkit-transform: translateX(10px);
    }
    100% {
        -webkit-transform: translateX(0);
    }
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }
    20% {
        transform: translateX(-10px);
    }
    40% {
        transform: translateX(10px);
    }
    60% {
        transform: translateX(-10px);
    }
    80% {
        transform: translateX(10px);
    }
    100% {
        transform: translateX(0);
    }
}
/* media query*/

@media screen and (min-width: 601px) {
    h1 {
        font-size: 5vw;
    }
    .deck {
        width: 660px;
        min-height: 680px;
        padding: 32px;
    }
    .deck .card {
        height: 125px;
        width: 125px;
        margin: 0;
    }
    .score-panel {
        font-size: 2rem;
    }
    .model {
        font-size: 2rem;
    }
    .model h2 {
        padding-top: 20vh;
        font-size: 4vw;
    }
    .model h3 {
        font-size: 2rem;
    }
    .rating li {
        font-size: 2rem;
    }
    .replay {
        font-size: 4vw;
        max-width: 30%;
        margin-left: 30%;
        margin-right: 30%;
    }
}
