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 {
    text-align: center;
    font-family: 'Trocchi', cursive;
    font-weight: 300;
    font-size: 50px;
    color: #b30000;
}

/*
 * 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);
    color: blue;
}

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

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

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

.deck .card.disable {
    pointer-events: none;
}

.deck .card.unmatch {
    cursor: default;
    background: red;
    font-size: 33px;
}

/*
 * Styles for the Score Panel
 */

.score-panel {
    text-align: left;
    font-family: 'Trocchi', cursive;
    color: #b30000;
    font-size: 25px;
    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;
}

#totalStars li { 
    display: inline-block;
}

#timer {
    display: inline-block;
    margin: 0 1rem;
}

#stella1 {
    color: red;
}

#stella2 {
    color: blue;
}

#stella3 {
    color: yellow;
}
.score-panel .restart {
    float: right;
    cursor: pointer;
}

.modal {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: #adebad;
    transition: opacity 4s;
    visibility: hidden;
}

#popup {
    font-family: 'Trocchi', cursive;
    text-align: center;
    margin: 120px auto;
    padding: 20px;
    background: #5bd75b;
    border-radius: 4px;
    border: 4px solid #239023;
    width: 80%;
    position: relative;
    transition: all 4s ease-in-out; 
}

#popup button {
    background-color: #ffff4d;
    border-radius: 4px;
    width: 40%;
}

/*Responsive*/
@media screen and (min-width: 320px) {
    .deck {
        padding: 32px;
        min-height: 290px;
        width: 270px;
    }

    .deck .card {
        height: 50px;
        width: 50px;
    }
    .score-panel {
       text-align: left;
       font-size: 20px;
    }
    h1 {
        font-size: 35px;
    }
}

@media screen and (min-width: 520px) {
    .deck {
        min-height: 480px;
        width: 450px;
    }

    .deck .card {
        height: 80px;
        width: 80px;
    }
    .score-panel {
       text-align: left;
       font-size: 20px;
    }
    h1 {
        font-size: 40px;
    }
}

@media screen and (min-width: 900px) {
    .deck {
        padding: 32px;
        width: 660px;
        min-height: 680px;
    }

    .deck .card {
        height: 125px;
        width: 125px;
    }
    .score-panel {
       text-align: left;
       font-size: 25px;
    }
    h1 {
        font-size: 50px;
    }
}



