/* Google Fonts import */
@import url('https://fonts.googleapis.com/css2?family=Averia+Sans+Libre:wght@300;400&family=Nunito+Sans:opsz,wght@6..12,200;6..12,300;6..12,400;6..12,500&display=swap');

/* Asterisk wildcard to override default styling */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    /* To make elements centred in page  */
    display: flex;
    justify-content: center;
    align-items: baseline;
    font-family: "Nunito Sans", sans-serif;
    text-align: center;
}

/* General font styling */
h1 {
    font-size: 2.2rem;
}

h2 {
    font-size: 1.4rem;
}

h3 {
    font-size: 1.5rem;
}

h1, h2, h3 {
    font-family: "Averia Sans Libre", sans-serif;
    text-align: center;
    padding: 10px;
}

p {
    padding: 0 10px 10px;
    font-size: 1.25rem;
    letter-spacing: 0.5px;
}

#bg-image-div {
    /* Move image to bottom of screen and have matching background colour */
    width: 100vw;
    height: 100vh;
    background: #76f9fb url(../images/ateez-illusion-image-600w.webp) no-repeat 0 bottom / 100%;
}

.container {
    /* Make elements appear stacked underneath each other */
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid black;
    border-radius: 4px;
    box-shadow: 5px 5px 10px;
    margin: 5% 15% -3%;
}

.hidden {
    display: none; /* Displays any element with this class as hidden by default */
}

/* To keep image within the div */
#landing-page-image > img,
#results-area > img {
    width: 85%;
    padding: 0 5%;
    align-self: center;
}

#quiz-area > hr {
    border: solid 1px black;
    margin: 2% 5%;
}

/* To allow buttons to remain in a row for responsive design */
#buttons-div {
    padding: 0 10px 15px;
    display: flex;
    justify-content: space-evenly;
    /* Allow buttons to wrap around each other on smaller screens */
    flex-wrap: wrap;
}

/* Keeps the exit and next buttons in a row underneath the option buttons */
#quiz-buttons-div {
    display: flex;
    width: 75%;
    justify-content: center;
    align-items: baseline;
    padding: 5%;
}

/* General button styling */
#start-button,
.button,
#next-button,
#exit-button {
    font-size: 1.1rem;
    font-family: "Nunito sans", sans-serif;
    font-weight: 600;
    border: 1px solid black;
    padding: 5px;
    border-radius: 4px;
    transition: ease 0.7s;
    box-shadow: 2px 2px 5px;
}

#start-button, #next-button, #home-button {
    color: black;
    background-color: #5BCCED;
    margin: 5%;
}

.button {
    color: black;
    background-color: #FAD732;
    margin: 5%;
}

#exit-button {
    color: black;
    background-color: #fc6815;
}

/* Modal styling */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    padding: 100px 10%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Allows background to be blurred when modal is opened */
    backdrop-filter: blur(2px);
}

/* Styling of modal content */
.modal-content {
    background-color: white;
    color: black;
    text-align: center;
    border: 1px solid black;
    border-radius: 4px;
}

/* Styling of the radio buttons which determine the quiz length */
#quiz-length-radio-btns {
    display: flex;
    flex-direction: column;
    width: 70%;
    margin: 0 auto;
    border-top: 1px solid black;
    border-bottom: 1px solid black;
}

/* To give breathing space to radio buttons and make text larger */
#quiz-length-radio-btns > span {
    padding: 1%;
}

#quiz-length-radio-btns > span > label {
    font-size: 1.25rem;
}

/* Gives extra breathing rooom at the bottom of the buttons for small screens */
#exit-modal-btns {
    margin-bottom: 7px;
}


/* Styling of the option buttons */
.options-button {
    font-size: 1.1rem;
    font-family: "Nunito sans", sans-serif;
    font-weight: 600;
    border: 1px solid black;
    padding: 0.6rem;
    border-radius: 4px;
    transition: ease 1s;
    box-shadow: 2px 2px 5px;
    color: black;
    background-color: #FAD732;
    margin: 2%;
    width: 70%;
}

/* Option buttons will change to these colours when clicked to indicate if the question is right or wrong */
.correct {
    background-color: #3BB561;
}

.incorrect {
    background-color: #ff5f6b;
}

#next-button {
    margin-bottom: 3%;
}

/* Styling of the Home button on the 404 page */
#home-404-btn{
    width: 25%;
    align-self: center;
    text-decoration: none;
}

/* Media query for tablet sizes and up */
@media screen and (min-width: 768px) {
    #bg-image-div {
        /* Use HD picture for larger screens */
        background-image: url(../images/ateez-illusion-image.webp);
    }
    
    /* Make fonts larger on larger screens */
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.1rem;
    }

    p {
        font-size: 1.5rem;
    }

    #start-button, .button, .options-button {
        font-size: 1.3rem;
    }

    /* Make the landing page image take up less space on larger screens  */
    #landing-page-image > img {
        width: 50%;
    }

    /* Add hover effects */
    #start-button:hover, #next-button:hover {
        background-color: #76f9fb;
    }

    /* Makes start button larger when hovered over */
    #start-button:hover {
        transform: scale(1.05);
    }

    .button:hover {
        color: #faf932;
        background-color: black;
    }

    /* Makes the options buttons smaller in width on larger screens and take up less space vertically */
    .options-button {
        width: 50%;
        margin: 1%;
    }

    /* Enlarges button when hovered over */
    .options-button:hover {
        transform: scale(1.1);
        transition: all 0.3s;
    }

    /* Lets the quiz buttons at the bottom of the option area take up less space on larger screens */
    #quiz-buttons-div {
        padding: 2%;
    }

    /* Exit button hover effect */
    #exit-button:hover {
        color: #fc6815;
        background-color: black;
        transition: all 0.5s;
        border: 1px solid #fc6815;
    }

    /* Make image smaller to stop overflow of container on larger screens*/
    #results-area > img {
        width: 47%;
        padding: 1% 5% 2%;
    }

    /* Reduce margins for results area buttons to help stop further overflow on larger screens */
    #results-area-btns > .button {
        margin: 0 1% 1.5%;
    }

    /* Allows the modal boxes to take up less space on larger screens */
    .modal {
        padding: 12% 25%;
    }

    /* Allow Home button link on 404 page to remain the same colour at all times */
    #home-404-btn:link,
    #home-404-btn:visited {
        color: black;
    }

    /* Makes link visible when hovered over */
    #home-404-btn:hover {
        color: #faf932;
        background-color: black;
    }
}

/* Media query for laptops and screens larger than 1024px */
@media screen and (min-width: 1024px) {

    /* Pushes the background image down so the top is not cut off */
    #bg-image-div {
        background-position: 0 20%;
    }
}