*{
    margin: 0;
    padding: 0;
}
*,

*::before,

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

.home-btn{
    font-size: 200%;
}

.home{
   margin-top: 10px; 
}

html{
    box-sizing: border-box;
}

body{
    background: url(../images/background.jpg);
    font-family: "Open Sans", sans-serif;
    font-size: 62.5%;
    letter-spacing: 1.5px;
    margin: 0;
    text-align: center;
}

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

ul > li {
    list-style: none;
}

.card,

.reset-btn{
    cursor: pointer;
}

.btn {
    border-radius: 1em;
    border: none;
    color: white;
    box-shadow: 5px 2px 20px 0 rgba(46,61, 73, 0.5);
    padding:0.8em;
}

h1 {
    font-size: 2.5em;
    font-weight: 600;
}

p{
    font-size: 1.6em;
}

h3{
    font-weight:400;
}

.score-card {
    font-size: 1.4em;
    padding:1em 0 2em;
}

.star-rating > li {
    display: inline-block;
    padding: 0.5em;
}

.moves-counter {
    padding: 0.5em;
}

.reset-btn {
    background-color:black;
}

.timer-container {
    background: white;
    border-radius: 0.5em;
    color: black;
    margin: auto;
    padding: 10px;
    width: 200px;
    align-items: center;
}

.timer {
    font-size: 1em;
}

.modal {
    display: none;
    position: fixed;
    z-index: 99;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(46, 61, 73);
    background-color: rgba(46, 61, 73, 0.6);
}

.modal-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: white;
    margin: 5% auto;
    border: 0.8em solid #fc4;
    padding-right: 2em;
    width: 80%;
}

.close {
    align-self: flex-end;
    color: #28e;
    font-size: 5em;
}

.close:hover,

.close:focus {
    color: #5cf;
    text-decoration: none;
    cursor: pointer;
}

.modal-img {
    display: inline-block;
    margin: 1em 0 1em;
    width: 20em;
}

p.stats {
    font-weight: 600;
}

p.stats:last-child {
    margin-bottom: 1em;
}

.play-again-btn {
    background: #28e;
    margin-bottom: 1em;
}

.deck {
    background: linear-gradient(to bottom, rgb(94, 93, 93), black);
    border-radius: 1.5em;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    height: 35em;
    margin: auto;
    padding: 0.5em;
    width: 35em;
}

.deck,

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

.card {
    background: linear-gradient(to bottom, rgb(94, 93, 93), rgb(41, 5, 5));
    border-radius: 0.5em;
    height: 7em;
    width: 7em;
}

img {
    user-select: none;
    width: 6em;
}

.deck img {
    visibility: hidden;
}

.deck .card.flip {
    background: white;
    cursor: default;
    transform: rotateY(180deg);
    transition: transform 0.32 linear;
    pointer-events: none;
}

.flip img {
    background: white;
    visibility: visible;
}

.deck .card.match {
    background: rgb(118, 145, 54);
    visibility: visible;
    cursor: default;
    animation: pulse 1s;
}

.match img {
    background: rgb(118, 145, 54);
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    80% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@media screen and (min-width: 550px) {
    .deck {
        height: 50em;
        padding: 2em;
        width: 50em;
    }

    .card {
        height: 10em;
        width: 10em;
    }

    .deck img {
        width: 9em;
    }

    .modal-content h2 {
        font-size: 4em;
    }

    .play-again-btn {
        font-size: 1.8em;
    }
}

@media screen and (min-width: 800px) {
    h1 {
        font-size: 6em;
    }

    p {
        font-size: 2.3em;
    }

    .deck {
        height: 90em;
        width: 70em;
    }

    .card {
        height: 20em;
        width: 15em;
    }

    .deck img {
        width: 13em;
    }

    .reset-btn {
        font-size: 0.8em;
    }

    .footer {
        font-size: 1.2em;
    }

    .modal-content h2 {
        font-size: 5em;
    }

    .modal-img {
        width: 30em;
    }

    .play-again-btn {
        font-size: 2em;
    }
}