html {
    box-sizing: border-box;
}

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

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

body {
    background: #fff 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
 */

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

.card {
    height: 125px;
    width: 125px;
    background: #344;
    font-size: 0;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 5px 2px 20px 0 #344;
    margin: 5px 5px;
}

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

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

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

/*
 * Styles for the Score Panel
 */

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

.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;
}

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

/* styles for congratulation pop up*/

.win {
    color: black;
    text-align: center;
}

.replay {
    width: 700px;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: -1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    flex-flow: column;
    justify-content: center;
    margin: auto;
}
.replay.gameOver {
    z-index: 1;
    border-radius: 6px;
    border: 2px solid transparent;
    background: #fff;
}

.play-again {
    outline: none;
    border: 2px solid transparent;
    border-radius: 5px;
    font-size: 1em;
    padding: 6px;
    min-width: 105px;
    cursor: pointer;
    color: white;
    background: #0cb;
    margin-top: 15px;
}

.inline-block {
    display: inline-block;
}

/** styles for responsive page **/

@media only screen and (max-width: 450px) {
    .deck {
        justify-content: center;
        margin: 0;
        width: 100%;
    }
    .card {
        height: calc(100vw/3);
        width: calc(100vw/3);
        margin: 10px;
    }

    .score-panel {
        width: 200px;
    }
    .replay {
        width: 300px;
    }
}

@media only screen and (min-width: 450px) and (max-width: 768px) {
    .deck {
        justify-content: space-between;
        margin: 0;
        width: 100%;
    }
    .card {
        height: calc(100vw/5);
        width: calc(100vw/5);
        margin: 10px 5px;
    }

    .score-panel {
        width: 250px;
    }
    .replay {
        width: 450px;
    }
}
/*
@media only screen and (min-width: 768px) {
    .deck {
        width: 660px;
        justify-content: space-between;
        margin: 0 0 3em;
        margin-left: auto;
        margin-right: auto;
    }
    .card {
        height: 125px;
        width: 125px;
    }

    .replay {
        width: 700px;
    }
}
*/
