body {
    font-family: "Comfortaa", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    margin: 0;
    padding: 0;
    margin-left: 5%;
    margin-right: 5%;
    max-width: 90%;
    background: url("images/pngegg.png") no-repeat center center fixed;
    background-size: cover;
    overflow-x: hidden;
}

header {
    padding-top: 10px;
    padding-bottom: 5px;
    font-size: 33px;
}

.rules-title {
    text-align: center;
    font-size: 25px;
}

.rules-text {
    font-size: 20px;
}

h1 {
    text-align: center;
}

.capybara {
    display: inline-block;
    position: relative;
    color: rgb(38, 230, 67);
}
.capybara:after {
    content: "";
    position: absolute;
    width: 55px;
    height: 55px;
    background-image: url(images/Capybara-PNG-Image.png);
    background-size: cover;
    background-position: center;
    right: 96px;
    top: 6px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.card {
    text-align: center;
}

img {
    display: inline-block;
    width: 150px;
    height: 150px;
    object-fit: contain;
    cursor: pointer;
}

.first-image {
    display: block;
}

.second-image {
    display: block;
}

.card {
    position: relative;
    height: 150px;
    cursor: pointer;
    perspective: 1000px;
}

.card:focus {
    outline: 2px solid rgb(48, 137, 51);
    border-radius: 20px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.first-image,
.second-image {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
}

.second-image {
    transform: rotateY(180deg);
}

footer {
    display: flex;
    justify-content: space-between;
}

#scoreboard {
    display: flex;
    align-items: center;
    font-size: 24px;
    color: rgb(7, 2, 21);
    font-weight: bold;
}

.audio-wrapper {
    font-size: 24px;
    color: rgb(7, 2, 21);
    font-weight: bold;
    display: flex;
}

.audio-wrapper p {
    margin-right: 15px;
}

#toggle-music {
    background-color: rgb(230, 76, 99);
    display: inline-block;
    padding: 10px 30px 10px 30px;
    border-radius: 10px;
    font-size: 24px;
    cursor: pointer;
    transition: 0.4s;
    border: none;
}

#toggle-music:hover {
    background-color: rgb(50, 195, 67);
}

#scoreboard .active {
    color: red;
    font-weight: bold;
}

@media (max-width: 400px) {
    .cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 599px) {
    footer {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (min-width: 600px) and (max-width: 899px) {
}

@media (min-width: 900px) and (max-width: 1199px) {
}

@media (min-width: 1200px) {
}
