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);
    transition: linear .4s;
}

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

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

@-webkit-keyframes shake {
    from {
        -webkit-transform: rotate(10deg);
    }
    to {
        -webkit-transform-origin: center center;
        -webkit-transform: rotate(-10deg);
    }
}

.deck .card.match {
    cursor: default;
    animation: shake 0.1s ease-in-out 0.1s 3 alternate;
    -webkit-animation: shake 0.1s ease-in-out 0.1s 3 alternate;
    background: #02ccba;
    font-size: 33px;
}

.deck .card.mismatch {
    animation: shake 0.1s ease-in-out 0.1s 3 alternate;
    -webkit-animation: shake 0.1s ease-in-out 0.1s 3 alternate;
    background-color: #ff0000;
}

/*
 * 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: 0 5px 0 0;
}

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

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

.hidden {
    display: none;
}

/*
 * Styles for the success message
 */

.success-message {
    position: absolute;
    top: calc(50% - 140px);
    width: 100%;
    text-align: center;
}

.button {
    border: none;
    border-radius: 4px;
    box-shadow: 12px 15px 20px rgba(0, 0, 0, 0.1);
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0.165em;
    max-width: 100%;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    text-transform: uppercase;
    transition: 0.2s box-shadow ease-in-out, 0.2s background-color ease-in-out, 0.2s border-color ease-in-out;
    white-space: nowrap;
    padding: 1.2em 4em;
    background-color: #40b6a4;
    text-decoration: none;
}

.circle-loader {
    margin: 0 0 10px 10px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-left-color: #5cb85c;
    animation-name: loader-spin;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    position: relative;
    display: inline-block;
    vertical-align: top;
}

.circle-loader,
.circle-loader:after {
    border-radius: 50%;
    width: 50px;
    height: 50px;
}

.load-complete {
    -webkit-animation: none;
    animation: none;
    border-color: #5cb85c;
    transition: border 500ms ease-out;
}

.checkmark {
    display: none;
}

.checkmark.draw:after {
    animation-duration: 800ms;
    animation-timing-function: ease;
    animation-name: checkmark;
    transform: scaleX(-1) rotate(135deg);
}

.checkmark:after {
    opacity: 1;
    height: 1.5em;
    width: .8em;
    transform-origin: left top;
    border-right: 2px solid #5cb85c;
    border-top: 2px solid #5cb85c;
    content: '';
    left: .7em;
    top: 1.45em;
    position: absolute;
}

.show {
    display: block;
}

@keyframes loader-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes checkmark {
    0% {
        height: 0;
        width: 0;
        opacity: 1;
    }
    20% {
        height: 0;
        width: .8em;
        opacity: 1;
    }
    40% {
        height: .7em;
        width: .8em;
        opacity: 1;
    }
    100% {
        height: 1.5em;
        width: .8em;
        opacity: 1;
    }
}


/*
 * Styles for the timer
 */

.timer {
    display: inline-block;
    margin-left: 10px;
}