* {
    padding: 0;
    margin: 0;
}

body {
    background-color: darkslategrey;
}

.container {
    padding: 10px;
}

.instructions {
    background-color: aquamarine;
    padding: 20px;
    border-radius: 5px;
}

.instruction-details {
    font-size: 0.8em;
}

.game-info {
    display: flex;
    flex-wrap: wrap;
}

.rating-box {
    width: 100%;
    color: antiquewhite;
}

.timer-box,
.moves-box {
    margin: 10px auto;
    width: 40%;
    background-color: yellow;
    padding: 10px;
    border-radius: 10px;
}

.restart-box {
    width: 100%;
    text-align: center;
}

.restart-btn {
    padding: 10px;
}

.stars {
    width: 200px;
    height: 43px;
    background: url(../img/stars.png) 0 0;
    display: inline-block;
}

.canvas {
    display: flex;
    flex-wrap: wrap;
    background-color: cadetblue;
    border-radius: 5px;
    padding: 10px;
    margin: 10px auto;
    width: 90%;
}

.card {
    border: 1px solid black;
    border-radius: 10px;
    margin: 2px auto;
    width: 22%;
    height: 80px;
    text-align: center;
    font-size: 4em;
    color: darkslategrey;
    background-color: darkslategrey;
    transform: rotateY(180deg);
    transition: 0.6s;
}

.flip {
    transform: rotateY(0deg);
    transition: 0.6s;
    color: black;
}

.disable {
    background-color: cadetblue;
    margin: 2px auto;
    width: 22%;
    height: 80px;
}

.success-message {
    background-color: bisque;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    margin: 20px auto;
    line-height: 2em;
    animation: fadein 2s;
}

.success-time {
    font-weight: bold;
    text-decoration: underline;
}

@keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.start-again-btn {
    padding: 10px;
}

@media screen and (min-width: 861px) {
    .container {
        width: 860px;
        margin: auto;
    }
}


@media screen and (max-width: 540px) {
    .timer-box,
    .moves-box {
        width: 100%;
    }
    .instructions {
        font-size: 1.5em;
    }
}


@media screen and (max-width: 320px) {
    * {
        font-size: 1em;
    }
}
