/*IMPORT GOOGLE FONTS*/
@import url('https://fonts.googleapis.com/css2?family=Jaini&family=Merriweather:ital,opsz,wght@0,18..144,300..900;1,18..144,300..900&display=swap');

:root {
    --primary-color: #402620;
    --button-color: #2b1915;
    --primary-font: "Jaini", system-ui;
    --secondary-font: "Merriweather", serif;
}

* {
  padding: 0px;
  margin: 0px;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

/*GLOBAL RULES*/
.hide, .hide-start {
    display: none;
}

#container {
    background-color: rgba(64, 38, 32, 0.9);
    border: 3px solid var(--button-color);
    color: white;
    font-family: var(--secondary-font);
    font-size: 1.2rem;
    width: 90%;
    padding: 8px;
    border-radius: 10px;
    margin: 10px 5px;
}

button {
    background-color: white;
    font-size: 100%;
    font-family: var(--secondary-font);
    text-align: center;
    font-weight: bold;
    border: 2px solid var(--button-color);
    border-radius: 8px;
    padding: 5px;
    width: 209px;
}

button:hover {
    color: white;
    background-color: var(--button-color);
}

.buttonSelected {
    color: white;
    background-color: var(--button-color);
}

/*MAIN STYLES*/
body {
    min-height: 100vh;
    background: url("../images/background-image-quiz.webp") no-repeat center
    center/cover;
}

main {
    height: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
}

/*START WINDOW SECTION*/
h1 {
    font-family: var(--primary-font);
    text-align: center;
    letter-spacing: 2px;
    color: var(--primary-color);
    font-size: 3rem;
    margin-top: 25%;
}


#startWindow h2 {
    text-align: center;
}

#startWindow ol {
    margin-left: 20%;
}


#startForm {
    text-align: center;
}

#startForm>input {
    font-weight: bold;
    font-family: var(--secondary-font);
    font-size: 17px;
    color: var(--primary-color);
    background-color: white;
    border: 2px solid var(--button-color);
    border-radius: 6px;
    height: 30px;
}

#startForm>#chooseMode {
    margin: 10px auto;
}

#username~p {
    font-size: 15px;
    margin-right: 11px;
}

#buttonContainerStart {
    margin-top: 5px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    height: -webkit-fit-content;
    height: -moz-fit-content;
    height: fit-content;
}

#startQuiz {
    width: 250px;
    height: 50px;
    font-size: 25px;
}

/*QUIZ WINDOW SECTION*/
#questionCounter, #questionText {
    text-align: center;
}

#answersContainer {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
        -ms-flex-direction: row;
            flex-direction: row;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    -ms-flex-pack: distribute;
        justify-content: space-around;
    padding: 10px;
}

#answersContainer>button {
    margin-top: 10px;
    width: 245px;
}

#nextQuestionCon {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
        -ms-flex-direction: row;
            flex-direction: row;
    -webkit-box-pack: right;
        -ms-flex-pack: right;
            justify-content: right;
}

.right {
    border: 2px solid rgb(0, 82, 0);
    background-color: rgb(0, 82, 0);
    color: white;
}

.wrong {
    border: 2px solid rgb(109, 0, 0);
    background-color: rgb(109, 0, 0);
    color: white;
}

/*Overwrites general button:hover effect so that
the whole surface of the button turns gree/red 
depending on answer correctness*/
#answersContainer>button.right:hover {
    border: 2px solid rgb(0, 82, 0);
    background-color: rgb(0, 82, 0);
    color: white;
}

#answersContainer>button.wrong:hover {
    border: 2px solid rgb(109, 0, 0);
    background-color: rgb(109, 0, 0);
    color: white;
}

.notVisible {
    visibility: hidden;
}

/*END QUIZ WINDOW SECTION*/
#endQuizWindow {
    text-align: center;
}

#endQuizWindow > p {
    margin: 20px;
}

#takeAnotherQuiz {
    margin-top: 10px;
}

/*MEDIA QUERIES*/
/*Media query for (tablests) screens 768px and larger*/
@media screen and (min-width: 760px) {
    /*GLOBAL RULES*/
    #container {
        width: 75%;
    }


    /*START WINDOW SECTION*/
    h1 {
        margin-top: 15%;
    }

    /*QUIZ WINDOW SECTION*/
    #answersContainer>button {
        width: 45%;
    }

}

@media screen and (min-width: 992px) {
    /*GLOBAL RULES*/
    #container {
        width: 65%;
    }
    /*START WINDOW SECTION*/
    h1 {
        font-size: 3.5rem;
    }
}

@media screen and (min-width: 1200px) {
    /*GLOBAL RULES*/
    #container {
        width: 60%;
    }
}

@media screen and (min-width: 1400px) {
    /*GLOBAL RULES*/
    #container {
        width: 50%;
    }
}