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/subtle_dots.png');
    font-family: 'Coda', cursive;
    color: #1a3263;
}

.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, #fab95b 0%, #fab95b 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: #e8e2db;
    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: all 0.3s;
}

.deck .card:hover{
    transform: scale(1.05);
}

.deck .card.open {
    transform: rotateY(0);
    background: white;
    color: #f5564e;
    cursor: default;
    font-size: 35px;
    transition: all 0.3s;
}

.deck .card.match {
    transform: rotateY(0);
    cursor: default;
    background: #1a3263;
    font-size: 33px;
}

/*
 * Styles for the Score Panel
 */

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

.score-panel .stars {
    margin: 0;
    padding: 0;
    display: inline-block;
    margin: 0 5px 0 0;
    color: #fab95b;
}

.score-panel .timer {
    display: inline-block;
    width: 35%;
}

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

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

/*
 * Modal
 */

 .modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgb(0, 0, 0);
    background-color: rgba(0,0,0,0.4);
  }

  .modal-content {
    background-color: #fefefe;
    margin: 30% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 50%;
  }

  .close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
  }

  .play-again {
    background-color: #f5564e;
    color: white;
    padding: 15px 32px;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
  }

  @media screen and (min-width: 660px) and (max-width: 770px) {
    .deck {
        width: 580px;
        min-height: 597px;
        background: linear-gradient(160deg, #fab95b 0%, #fab95b 100%);
        padding: 28px;
    }

    .deck .card {
        height: 109px;
        width: 109px;
        box-shadow: 5px 2px 10px 0 rgba(46, 61, 73, 0.5);
    }
  }

  @media screen and (max-width: 660px) {
    .deck {
        width: 330px;
        min-height: 340px;
        background: linear-gradient(160deg, #fab95b 0%, #fab95b 100%);
        padding: 16px;
    }

    .deck .card {
        height: 61px;
        width: 61px;
        box-shadow: 5px 2px 10px 0 rgba(46, 61, 73, 0.5);
    }

    .score-panel {
        width: 330px;
        font-size: 15px;
    }

    .score-panel .timer {
        display: inline-block;
        width: 30%;
    }

    .modal-content {
        width: 80%;
      }
  }