html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
}

body {
    background: #fff url('../img/planetexpress.png') no-repeat center center fixed; /* Background pattern from Colour Lovers */
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    font-family: 'Anton', sans-serif;
}

.container {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Header */
h1 {
    font-weight: 300;
}

/*
 * Styles for the deck of cards
 */

.deck {
    align-items: center;
    background: #33c1ba;
    border-radius: 10px;
    box-shadow: 12px 15px 20px 0 rgba(46, 61, 73, 0.5);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 0 0 3em;
    min-height: 680px;
    padding: 32px;
    width: 660px;
}

.deck .card {
    align-items: center;
    background: #99358b;
    border-radius: 8px;
    box-shadow: 5px 2px 20px 0 rgba(46, 61, 73, 0.5);
    color: #fff;
    cursor: pointer;
    display: flex;
    font-size: 0;
    height: 125px;
    justify-content: center;
    width: 125px;   
}

/* animations for cards */
.deck .card:hover {
    animation: shake 0.5s;
    animation-iteration-count: infinite;
}

@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

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

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

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

/*
 * Styles for the Score Panel
 */

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

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

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

.score-panel .restart {
    cursor: pointer;
    float: right;
    padding-left: 20px; 
}

/* modal styles */

.modal-background {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: rgba(0,0,0,0.438);
    z-index: 2;
}

.hide{
    display: none;
}

.modal-body {
    position: relative;
    width: 400px;
    top: 50%;
    left: 50%;
    background: #fff;
    transform: translate(-50%, -70%);
}

.modal-heading{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid gray;
}

.modal-title {
    text-align: center;
    padding-top: 15px;
    color: #F99120;
}

.modal-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid gray;
    color: #99358b;
}

.modal-buttons {
    display: flex;
    justify-content: space-around;
    padding: 1rem;
    border: 1px solid gray;
}

.modal-button {
    width: 60px;
    height: 30px;
}

/* Responsive */
/* Responsive */

@media screen and (max-width: 400px) {
    body {
        margin: 20px;
    }
    h1 {
    font-size: 30px;
    text-align: center;
  }
  .clock {
    padding-right: 20px;
  }
  .deck {
    width: 200px;
    min-height: 200px;
    padding: 15px;
  }
  .deck .card {
    height: 50px;
    width: 50px;
  }
  .score-panel {
    text-align: left;
    width: 150px;
    margin-bottom: 10px;
  }
}

@media screen and (max-width: 800px) {
  h1 {
    font-size: 34px;
    text-align: center;
  }
  .deck {
    width: 400px;
    min-height: 400px;
    padding: 22px;
  }
  .deck .card {
    height: 75px;
    width: 75px;
  }
}