html {
    box-sizing: border-box;
    font-size: 1.3rem;
}

*,
*::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: Coda, sans-serif;
    font-size: 3rem;
    text-align: center;
}

/** styles for the deck of cards for responsive design */

@media screen and (min-width:320px) and (max-width:660px) {
    .deck {        
        width: 320px;
        min-height: 340px;
        background: linear-gradient(160deg, #02ccba 0%, #aa7ecd 100%);
        padding: 12px;
        border-radius: 10px;
        box-shadow: 6px 8px 10px 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: 65px;
        width: 65px;
        background: #2e3d49;
        font-size: 0;
        color: #fff;
        border-radius: 8px;
        cursor: pointer;
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: 2px 2px 10px 0 rgba(46, 61, 73, 0.5);
    }

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

    .deck .card.match {
        cursor: default;
        background: #02ccba;
        font-size: 23px;
        animation: rotation 2s  linear;
    }

}

@media screen and (min-width:661px) and (max-width:2000px) {
    .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: #fff;
        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.show {
        font-size: 33px;
    }

    .deck .card.match {
        cursor: default;
        background: #02ccba;
        font-size: 33px;
        animation: rotation 2s  linear;
    }
}

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

/* animation for matched cards */

@keyframes rotation {
    from {
        -webkit-transform: rotate(0deg);
    }
    to {
        -webkit-transform: rotate(359deg);
    }
}

/** styles for the Score Panel */

.score-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    width: 300px;
}

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

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

.modal_background {
    text-align: center;
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal_background::before {
    content: '';
    display: inline-block;
    height: 100%;
    vertical-align: -webkit-baseline-middle;
}
.modal_body {
    width: 300px;
    display: inline-block;
    vertical-align: -webkit-baseline-middle;
    position: fixed;        
    background: linear-gradient(160deg, #02ccba 0%, #aa7ecd 100%);
    transform: translate(-150px, 40%);
}

.modal_heading {
    text-align: center;
    padding: 1em;
    margin: 1em;
    border-bottom: 1px solid #ddd;
}

.modal_title {
    text-align: center;
    font-size: 2rem;
}

.modal_stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1em;
    margin: 1em;
    border-bottom: 1px solid #ddd;
}

.modal_buttons {
    display: flex;
    justify-content: space-around;
    padding: 1rem;
}

.modal_cancel  {
    width: 60px;
    height: 30px;
    background-color: #2e3d49;
    color: #fff;
    border-radius: 6px;
    border: none;
}

.modal_replay  {
    width: 60px;
    height: 30px;
    background-color: #fff;
    color: #2e3d49;
    border-radius: 6px;
    border: none;
}

.hide {
    display: none;
}
