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;
}

.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);
}

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

.show {
    font-size: 33px;
}

.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;
}

.restart {
    float: right;
    cursor: pointer;
}

/* The Modal (background) */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1; /* Sit on top */
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    background-color: #ffffff;
}

/* Modal Content/Box */
.modal-content {
    background-color: #ffffff;
    width: 50%;
    margin: auto;
    text-align: center;
    padding: 100px 0;
    font-family: Arial;
}

.fa-check-circle {
  font-size: 90px;
  color: #9acd32;
  margin: 20px;
}

.congrats {
    font-weight: bold;
    font-size: xx-large;
    margin: 20px;
}

.results,
.happy {
    margin: 0;
}

/* The Play Again Button */
.play-again {
    color: #ffffff;
    background-color: #20b2aa;
    font-size: large;
    margin: 20px;
    padding: 10px 40px;
    border-radius: 5px;
}

.play-again:hover,
.play-again:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Media Queries */

@media screen and (min-width: 376px) and (max-width: 425px) {
  .deck {
    width: 390px;
    min-height: 390px;
    padding: 10px;
  }

  .card {
    height: 85px;
    width: 85px;
  }

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

@media screen and (min-width: 321px) and (max-width: 375px) {
  .deck {
    width: 345px;
    min-height: 345px;
    padding: 10px;
  }

  .card {
    height: 75px;
    width: 75px;
  }

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

@media screen and (min-width: 1px) and (max-width: 320px) {
  .score-panel {
      width: 300px;
  }

  .deck {
    width: 290px;
    min-height: 290px;
    padding: 10px;
  }

  .card {
    height: 65px;
    width: 65px;
  }

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