/* -------------------- General styles -------------------- */
html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
    background-image: url("../media/Wallpaper.jpg");
    background-size: cover;
}

.hidden {
    visibility: hidden;
}

/* -------------------- Configuration menu -------------------- */
#configurationContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 35%;
    padding: 20px;
    border-radius: 10px;
    background-image: url("../media/Configuration_Wallpaper.jpg");
    background-size: cover;
    box-shadow: 10px 10px 10px #202020;
    text-align: center;
}

#configurationContainer h1 {
    margin-bottom: 20px;
    font-size: 40px;
}

#configurationForm {
    display: flex;
    flex-direction: column;
    width: 100%;
}

#configurationForm label {
    margin-top: 20px;
    font-size: 25px;
}

.configurationInput {
    width: 100%;
    font-size: medium;
    height: 40px;
    margin: 8px 0;
    border-radius: 5px;
    padding: 5px;
    border: 1px solid #b3b3b3;
    box-shadow: 5px 5px 5px #4c4c4c;
}

#startButton, #resetButton {
    background-color: #c7c7c7;
    border-radius: 28px;
    border: 1px solid #949494;
    cursor: pointer;
    font-size: 17px;
    padding: 15px 30px;
}

#startButton {
    margin-top: 20px;
}

#startButton:hover, #resetButton:hover {
    background-color: #a1a1a1;
}

/* -------------------- Game view components -------------------- */
#gameContainer {
    /* Set display to none by default because the gameContainer gets displayed as flex container dynamically. */
    display: none;
    width: 100vw;
    height: 100vh;
    align-items: center;
    justify-content: space-evenly;
    flex-wrap: wrap;
    flex-direction: row;
}

#scoreboard {
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    background-image: url("../media/Configuration_Wallpaper.jpg");
    border-radius: 10px;
    padding: 10px;
    width: 20vw;
}

#totalPlayerCount, #totalAttempts, #timer {
    font-weight: bold;
    font-size: larger;
}

.player {
    padding: 5px;
    border: 1px solid black;
    margin-top: 5px;
}

.player.active {
    background-color: rgb(83, 230, 37);
}

#playerName {
    font-weight: bold;
    font-size: large;
    text-decoration: underline;
}

#field {
    display: grid;
}

#resetButton {
    height: 70px;
    width: 300px;
    font-size: larger;
}

/* -------------------- Memory Card -------------------- */
.cardWrapper {
    margin: 5px;
    width: 0;
    height: 0;
    perspective: 1000px;
    box-shadow: 5px 5px 5px #4c4c4c;
    background-color: transparent;
    border-radius: 15px;
}

.cardWrapper:hover {
    cursor: pointer;
}

.card {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.cardFront, .cardBack {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 0.8s;
}

.cardBack {
    border: 1px solid black;
    background-size: cover;
    background-position: center;
    transform: rotateY(180deg);
    background-color: #ffffff;
    border-radius: 15px;
}

.cardFront {
    border: 1px solid black;
    background-image: url("../media/Card_Wallpaper.png");
    background-size: cover;
    border-radius: 15px;
}

@media only screen and (max-width: 900px) {
    /* -------------------- Configuration menu -------------------- */
    #configurationContainer {
        width: 80vw;
    }

    #configurationContainer h1 {
        margin-bottom: 20px;
        font-size: 40px;
    }

    /* -------------------- Game view components -------------------- */
    #gameContainer {
        order: 1;
    }

    #scoreboard {
        margin: 20px 0;
        width: 90%;
        order: 2;
    }

    #resetContainer {
        order: 3;
    }
}