html {
    box-sizing: border-box;
}

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

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

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

header,
main,
footer {
    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
 */
.game-board {
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.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.show {
    font-size: 33px;
}

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

.deck .card.no-match {
    background: #eb043e;
}

/*
 * Styles for the Score Panel
 */

.score-panel {
    text-align: left;
    width: 345px;
    margin-bottom: 10px;
}

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

.score-panel time {
    display: inline-block;
    padding: 5px;
}

.score-panel .restart {
    float: right;
    cursor: pointer;
    background: linear-gradient(160deg, #02ccba 0%, #aa7ecd 100%);
    border-radius: 8px;
    box-shadow: 5px 2px 20px 0 rgba(46, 61, 73, 0.5);
    padding: 5px;
}

.stars {
    padding: 5px;
    display: inline-block;
    margin: 0 5px 0 0;
    color: goldenrod;

}

.stars li {
    font-size: 1em;
    list-style: none;
    display: inline-block;
}

/*
 * Styles for the Congrats Panel
 */
.congrats-panel {
    background: rgba(0, 0, 0, 0.67);
    z-index: 99;
    position: absolute;
    display: flex;
    flex-wrap: wrap;
    text-align: center;
    border-radius: 10px;
    color: snow;
    font-size: 1em;
}
.congrats-panel h1 {
    width: 100%;
    font-size: 1.5em;
}

.congrats-panel .stars {
    width: 100%;
    font-size: 2em;
}

.congrats-panel p {
    width: 100%;
    margin: 0;
}

.congrats-panel time {
    width: 100%;
}

.congrats-panel .restart {
    width: 100%;
    cursor: pointer;
}



.hide {
    display: none;
}

/* footer */

footer p {
    width: 660px;
    font-size: 0.5em;
    text-align: right;
    margin-right: 10px;
}

@media screen and (max-width: 768px) {
    h1 {
        margin: 0.25em;
    }

    .deck {
        width: calc(100% - 1em);
        min-height: 100%;
        padding: 0.125em;
        margin: 0 0.5em 0 0.5em;
        box-shadow: 2px 5px 20px 0 rgba(46, 61, 73, 0.5);
    }

    .deck .card {
        height: 160px;
        width: 175px;
        margin: 5px;
    }

    footer p {
        width: 100%;
    }
}

@media screen and (max-width: 680px) {
    .deck .card {
        height: 90px;
        width: 140px;
        margin: 5px;
    }
}

@media screen and (max-width: 567px) {
    .deck .card {
        height: 90px;
        width: 100px;
        margin: 5px;
    }
}

@media screen and (max-width: 462px) {
    .deck .card {
        height: 90px;
        width: 100px;
        margin: 5px;
    }
}

@media screen and (max-width: 444px) {

    .score-panel {
        width: calc(100% - 25px);
        margin-bottom: 0.5em;
        margin-top: 5px;
    }

    .score-panel .stars {
        padding: 8px 0 0;
    }

    .score-panel .restart i {
        padding-left: 5px;
        padding-right: 5px;
    }

    .score-panel .restart-title {
        display: none;
    }

    .deck .card {
        height: 70px;
        width: 80px;
        margin: 5px;
    }


}

@media screen and (max-width: 320px) {
    .deck .card {
        height: 65px;
        width: 65px;
        margin: 5px;
    }
}
