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
 */

.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);
    animation-duration: 0.5s;
    animation-delay: 0s
}

.deck .card.open {
    background: #02b3e4;
    cursor: default;
}

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

.deck .card.match {
    cursor: default;
    background: #02ccba;
    font-size: 33px;
    animation-duration: 0.5s;
    animation-delay: 0s 
}

.deck .card.nomatch{
    background: #f00;
    animation-duration: 0.5s;
    animation-delay: 0s    
}

/*
 * Styles for the Score Panel
 */

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

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

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

span.zero::before { /*.score-panel not mentioned to use class for modal as well*/
    content: '0';
    margin-right: 2px;
}

.fa-star.invisible { /*.score-panel not mentioned to use class for modal as well*/
    visibility: hidden;
}

.score-panel .timer {
    margin-left: 20px;
}

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

/*
 * Styles for Modal
 */

.modal-back {
    background-color: rgba(0, 0, 0, 0.7);
    position: fixed;
    top: 0;
    bottom: 100vh;
    left: 100vw;
    right: 0;
    opacity: 0;
    transition: all 400ms ease;
}

.modal-back.show{
    bottom: 0;
    left: 0;
    opacity: 1;
}

.modal-body{
    background: white;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 500px;
    height: 280px;
    margin:auto;
    padding: 20px 10px 10px 10px;
    border-radius: 10px;
    display: flex;
    flex-flow: column nowrap;
}

.msg {
    width: 100%;
    height: 30px;
    margin-bottom: 5px;
    font-size: 28px;
    text-align: center;
}

hr{
    border-top: 1.3px solid #ccc;
    width: 95%;
    align-self: center;
    margin-bottom: 20px;
}

.stats {
    align-self: flex-start;
    margin-left: 8%;
    font-size: 22px;
}

.rating li {
    list-style: none;
    display: inline-block;
}

.rating,
.final-moves,
.final-time {
    margin-bottom: 10px;
    align-self: flex-end;
    margin-right: 12%;
}

.buttons {
    align-self: flex-end;
    margin: 20px 0 0 0;
}

#reset,
#close {
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    padding: 5px;
}

#reset {
    font-size: 20px;
    background-color: #14DF;
    color: #fff;
    margin-left: 10px;
}

#close {
    font-size: 17px;
}
