/* Whole page styles */
/* The following line of code assists in text-scaling and was taken from https: //sjorswijsman.medium.com/3-easy-css-tricks-for-responsive-websites-i-use-in-every-project-68ec334a1522 */
html {
    font-size: calc(60% + 0.8vmin);
}

/* The linear gradient on the background (and intro modal) was proposed by a fellow student in peer code review. I slightly edited and adapted the code he suggested */
body {
    text-align: center;
    font-family: 'Carme', sans-serif;
    color: white;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    margin: 0 auto;
    min-height: 100vh;
    background: linear-gradient(14deg, rgba(5, 2, 51, 0.793) 0%, rgba(4, 16, 26, 0.656) 6%, rgba(12, 47, 22, 0.39) 100%), url(../images/forest.webp) center / cover no-repeat;
}

.background {
    background-attachment: fixed;
    width: 100%;
    height: 100%;
    position: relative;
}

.heading {
    font-family: 'Denk One', sans-serif;
    text-align: center;
    font-size: 350%;
    color: white;
    margin-bottom: 10px;
    text-shadow: 2px 3px black;
    padding: 0.2em;
}

h2 {
    font-size: 180%;
    text-shadow: 2px 2px black;
}

.intro-modal,
.info-modal {
    font-family: 'Denk One', sans-serif;
    height: 70vh;
    width: 50vw;
    position: absolute;
    z-index: 2;
    text-align: center;
    margin: 0 25%;
    padding: 0 5%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    top: 20%;
    border: 1px solid rgb(255, 255, 255);
    text-shadow: 1px 1px black;
    background: linear-gradient(14deg, rgba(2, 0, 36, 0.793) 0%, rgba(3, 13, 21, 0.656) 6%, rgba(11, 43, 20, 0.39) 100%), url(../images/bg.webp) center / cover no-repeat;
}

.intro-btns {
    justify-content: space-between;
}

#btn-general {
    background: rgb(53, 62, 118);
    border-radius: 15%;
    color: white;
    cursor: pointer;
    width: 100px;
    justify-content: center;
    cursor: pointer;
    font-family: 'Denk One', sans-serif;
}

#btn-PGF {
    background: rgb(53, 62, 118);
    border-radius: 15%;
    color: white;
    cursor: pointer;
    width: 100px;
    justify-content: center;
    cursor: pointer;
    font-family: 'Denk One', sans-serif;

}

#btn-science {
    background: rgb(53, 62, 118);
    border-radius: 15%;
    color: white;
    cursor: pointer;
    width: 100px;
    justify-content: center;
    cursor: pointer;
    font-family: 'Denk One', sans-serif;

}

#modal-close,
#try-again {
    background: rgb(53, 62, 118);
    border-radius: 15%;
    color: white;
    cursor: pointer;
    width: 100px;
    justify-content: center;
    cursor: pointer;
    font-family: 'Denk One', sans-serif;
}

/* blur overlay behind modals */
.overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
    z-index: 1;
}

/* To add/remove from modals */
.hidden {
    display: none;
}

h2 {
    font-family: 'Alegreya Sans SC', sans-serif;
    margin-top: 0;
    margin-bottom: 20px;
}


/* Quiz section layout */
.quiz-section {
    width: 80vw;
    margin: 0 auto;
    background-color: rgb(211, 211, 211, 0.5);
    border-radius: 10px;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;
}

.flex-container {
    flex-direction: row;
    text-align: center;
}

.questions {
    margin: 20px auto;
    width: 80%;
    background-color: rgb(128, 128, 128, 0.6);
    border-radius: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: start;
    padding: 2em;
}

#qtext {
    vertical-align: middle;
    text-align: center;
    font-family: 'Carme', sans-serif;
    text-shadow: 1px 1px black;
}

#answer-a,
#answer-b,
#answer-c {
    padding: 0 3px;
}

.answer-text {
    font-size: 130%;
    padding: 20px 0;
    width: 100%;
    margin: 20px auto;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    text-shadow: 1px 1px black;
}

.answers {
    background-color: rgb(128, 128, 128, 0.6);
    border-radius: 10px;
    width: 80%;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    height: 60%;
    margin: 0 auto;
    bottom: 5%;
    padding: 2em;
}

#btn-A,
#btn-B,
#btn-C {
    max-height: 100px;
    max-width: 100px;
    min-height: 50px;
    min-width: 50px;
    height: 80%;
    width: 15%;
    border-radius: 10px;
    opacity: 0.9;
    margin: auto;
    font-size: 150%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    background: linear-gradient(rgb(34, 45, 120), rgb(75, 77, 97));
    text-shadow: 1px 1px black;
}

.score-tally {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    padding: 0 1.2rem;
    margin-top: 1em;
}

#info-text {
    width: 90%;
    padding: 20px;
    text-shadow: 1px 1px black;
    font-size: 120%;
}

#gameScore {
    color: rgb(150, 194, 255);
    font-size: 120%;
}

.answer:hover,
.intro-btns:hover,
.close:hover,
.close:focus {
    color: rgb(84, 64, 215);
    text-decoration: none;
    cursor: pointer;
}

/* Socials */
/* Footer styling was adapted from https: //www.w3schools.com/howto/howto_css_fixed_footer.asp */
.footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.339);
    color: white;
    text-align: center;
}

.socials ul {
    list-style-type: none;
    text-align: center;
}

.socials.mobile ul {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
}

.networks i {
    text-align: center;
    color: rgba(255, 255, 255, 0.317);
    font-size: 150%;
    padding: 10px 10px;
    margin: 0 0 15px 0;
    padding-inline-start: 0px;
}

ul.networks {
    margin: 0;
    padding-inline-start: 0px;
}

.fa-brands:hover {
    text-shadow: 0px 0px 2px rgb(255, 255, 255);
}

/* Max width media queries */
@media screen and (max-width: 768px) {

    .intro-modal,
    .info-modal {
        width: 80vw;
        margin: 0 10%;
    }

    .answers {
        height: 40%;
        margin: 20px auto;
        bottom: 5%;
    }

    .answer-text {
        margin-top: 0;
        padding-top: 0;
        font-size: 90%;
    }

    .questions {
        padding: 1em;
    }

    .answers {
        padding: 1em;
    }
}

/* Max height media queries */
@media screen and (max-height: 850px) {
    #qtext {
        font-size: 140%;
        padding: 0;
    }

    .questions {
        margin: 0;
    }
}

@media screen and (max-height: 700px) {
    .answers {
        margin: 10px;
    }

    .answer-text {
        margin: 0px auto;
    }

    #info-text {
        padding: 10px;
    }
}

@media screen and (max-height: 550px) {

    .intro-modal,
    .info-modal {
        font-size: 60%;
    }
}