@import url('https://fonts.googleapis.com/css2?family=Lobster&family=VT323&display=swap');

/* Clear all the default style*/
*   {
    margin: 0;
    padding: 0;
    border: none;
}

a {
    text-decoration: none;
    color: inherit;
}
/* set default font-size and color, and style the page in flex-box  */
html, body {
    height: 100%;
}

body {
    font-size: 1rem;
    font-family: 'VT323', monospace;
    color: #3a3a3a;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
}

/*animation*/
@keyframes expand {
    from {
      transform: scale(0);
      opacity: 0;
      background: darkorange;
    }
}

@keyframes switch {
    from {
        opacity: 0;
    }
}

/*  style header  */
header{
    background-color: darkorange;
    border-bottom: 5px solid #3a3a3a;
    padding-bottom: 3%;
    text-align: center;
    font-family: 'Lobster', cursive;
    font-size: 3rem;
}
/*  style welcome-section  */
#welcome-section {
    width: 100%;
    text-align: center;
    font-size: 1.6rem;
}
#wel-msg{
    font-family: 'Lobster', cursive;
    font-size: 2rem;
    padding: 0 5%;
    margin: 2%;
    animation: expand .5s ease-in-out;
}
#username{
    font-size: 2.4rem;
    font-family: 'VT323', monospace;
    width: 40%;
    text-align: center;
    border-bottom: 1px solid #3a3a3a;
    margin: 5% 25%;
    animation: expand .5s ease-in-out;
}

#username:hover{
    background-color: darkorange;
}

#startBtn{
    background-color: darkorange;
    width: 160px;
    height: 80px;
    font-family: 'VT323', monospace;
    font-size: 3rem;
    border-radius: 50px;
    animation: expand .5s ease-in-out;
}
#startBtn:hover {
    color: #fafafa;
}
#hello-user {
    margin: 1%;
    animation: switch .5s;
}
/*  style the help button to turn it into a clickable dropdown  */
#helpBtn{
    font-size: 2.2rem;
    font-family: 'VT323', monospace;
    background-color: #3a3a3a;
    color: darkorange;
    width: 160px;
    height: 80px;
    border-radius: 50px;
    position: relative;
    display: inline-block;
    animation: expand .5s ease-in-out;
}

#helpText{
    text-align: left;
    width: 20%;
    background-color: darkorange;
    color: #3a3a3a;
    display: none;
    position: absolute;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    padding: 15px;
    font-size: 1.3rem;
    bottom: 50px;
    left: 0;
    animation: switch .5s;
}

#helpBtn:hover #helpText {
    display: inline-block;
}

#helpBtn:hover {
    color: #fafafa;
}

/*  style the question section  */
#question-section{
    text-align: center;
    box-sizing: border-box;
}
/*  style question and answer tag */
#current-question {
    font-size: 2.2rem;
    animation: switch .5s;
}

#answers{
    display: flex;
    flex-direction: column;
    align-items: center;
}
/*  style answer button*/
.answer{
    background-color: darkorange;
    font-family: 'VT323', monospace;
    font-size: 1.8rem;
    border-radius: 50px;
    width: 50%;
    height: 40px;
    margin: 1%;
    animation: switch .5s;
}

.answer:hover{
    color: #fafafa;
}
/*  style the result section  */
#result-section{
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 50px;
}

#end-result{
    position: relative;
    left:25%;
    text-align: center;
    font-size: 2.6rem;
    width: 50%;
    animation: expand .5s ease-in-out;
}

#end-result button {
    background-color: #3a3a3a;
    margin-top: 5%;
    color: darkorange;
    font-size: 2rem;
    border-radius: 50px;
    width: 160px;
    height: 80px;
    animation: expand .5s ease-in-out;
}

#end-result button:hover {
    background-color: darkorange;
    color: #fafafa;
}
/*  style footer  */
footer{
    width: 100%;
    background-color: #3a3a3a;
    display: inline-flex;
    flex-shrink: 0;
    bottom: 0;
}

footer h2 {
    font-size: 160%;
}

#contacts   {
    width: 50%;
    padding-left: 5%;
    color: #fafafa;
}

#contacts p{
    box-sizing: border-box;
}

#contacts a:hover{
    color: darkorange;
}

#social-networks    {
    width: 50%;
    color: #fafafa;
}

#social-networks ul{
    list-style-type: none;
}

#social-networks ul li  {
    display: inline-block;
    margin: 0 25px;
    font-size: 240%;
}

#social-networks ul li:hover{
    color: darkorange;
}
/*  404.html  */
#error {
    font-size: 2.6rem;
    text-align: center;
}

#turnback {
    background-color: #3a3a3a;
    margin-top: 5%;
    color: darkorange;
    font-size: 1.6rem;
    border-radius: 50px;
    width: 20%;
    height: 80px;
}

#turnback:hover {
    background-color: darkorange;
    color: #fafafa;
}
/*  media queries  */
/*  for larger to medium screen size from 950px wide and down    */
@media screen and (max-width: 950px) {
    /*   fix header     */
    header{
        font-size: 2rem;
    }

    /*  welcome section  */
    #startBtn {
        margin-top: 10%;
    }
    /*  question section  */
    #question{
        margin: 5% 0;
    }

    #answers{
        margin: 5% 0;
    }
    /*  fix answer buttons  */
    .answer{
        width: 75%;
        margin-bottom: 5%;
    }
    /*  fix result section*/
    #end-result{
        left:0;
        width: 90%;
        margin: 0 5%;
    }
    #end-result button {
        font-size: 1.3rem;
    }
    /*  fix footer  */
    footer {
        flex-direction: column;
        text-align: center;
    }

    footer h2 {
        font-size: 1.8rem;
    }

    #contacts   {
        width: 100%;
        padding-left: 0;
        font-size: 1.3rem;
    }

    #social-networks    {
        width: 100%;
    }

    /*  404.html  */
    #error{
        font-size: 1.8rem;
    }

    #turnback{
        margin-top: 15%;
        margin-bottom: 15%;
        font-size: 1.8rem;
    }
}
/*  for larger to medium screen size from 750px wide and down    */
@media screen and (max-width: 750px) {
    /*  fix username input*/
    #username{
        width: 85%;
        margin: 50px 0 ;
    }
    /*  fix answer buttons  */
    .answer{
        width: 95%;
    }
    /* 404.html  */
    #error{
        font-size: 1.4rem;
    }

    #turnback{
        font-size: 1.4rem;
    }
}

/*  for larger to medium screen size from 500px wide and down    */
@media screen and (max-width: 500px) {
    /*  fix header  */
    header{
        font-size: 1.6rem;
    }
    /*  fix welcome section  */
    #welcome-section{
        margin-bottom: 50px;
    }
    #wel-msg{
        font-size: 1.4rem;
        margin-bottom: 25px;
    }
    #username {
        font-size: 1.4rem;
    }
    #username::placeholder{
        font-size: 1.4rem;
    }
    /*  fix answer buttons  */
    .answer{
        font-size: 1.4rem;
    }
    /*  fix final result message  */
    #end-result{
        font-size: 1.6rem;
    }
    /* 404.html  */
    #turnback{
        width: 40%;
    }
}