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 modal*/
.modal {
    width: 660px;
    height: 620px;
    padding: 5%;
    font-size: 3em;
    position: fixed; 
    z-index: 1; 
    background-color: rgba(200,200,200,0.5); 
    text-align: center;
}
.modal.show {
    display: block; 
}
.modal.hide {
    display: none;
}

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

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

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

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

/*
 * 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;
}
/*
 * Media queries
 */

/* For mobile phone */
@media screen and (max-width: 715px) {
    body {
        display: flex;
        justify-content: center;
    }
    
    .deck {
        
        min-height: auto;
        padding: 5;
        width: 100%;
    }
    
    .deck .card {
        flex-basis: 24%;
        margin: 1px;
    }
    
    .modal-box {
        top: 10%;
    }
    
}

/* Tablet and higher resolution screens */
@media only screen and (max-width: 760px){
  .deck .card{
    width: 70px;
    height: 70px;
    line-height: 70px;
  }

  .deck {
    width: 370px;
  }
}

@media only screen and (max-width: 450px){
  .deck .card{
    width: 50px;
    height: 50px;
    line-height: 50px;
    margin: 0 10px 10px 0 !important;
  }

  .deck {
    width: 240px;
  }
}