/* import google fonts */
@import url('https://fonts.googleapis.com/css2?family=Crimson+Text&family=Italianno&display=swap');


/* root */
*,
*::before,
*::after {
    box-sizing: border-box;
}

:root {
    /* navy blue */
    --theme-one: 26, 29, 44;
    /* sky blue */
    --theme-two: 18, 233, 251;
    /* light green */
    --theme-three: 2, 71, 50;
    /* yellow */
    --theme-four: 252, 252, 0;
}

/* Classes for showing/hiding sections called from script.js */
.show-block {
    display: block;
}

.show-inline-flex {
    display: inline-flex;
}

.hidden {
    display: none;
}

/* Color classes */
.navy-blue {
    color: rgb(var(--theme-one));
}

.sky-blue {
    color: rgb(var(--theme-two));
}

.light-green {
    color: rgb(var(--theme-three));
}

.yellow {
    color: rgb(var(--theme-four));
}


/* Body, Header, Footer styling */
body {
    color: white;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    color: white;
    font-family: 'Crimson', arial, sans-serif;
    background: url(../images/background.png) no-repeat center / cover;
    min-height: 100vh;
}

header {
    background-color: rgba(var(--theme-one), 0.85);
    position: fixed;
    top: 0;
    border-bottom-left-radius: 60% 80%;
    border-bottom-right-radius: 60% 80%;
}

header h1 {
    margin-bottom: 0;
}

header span {
    color: rgb(var(--theme-two));
    font-size: 1.2em;
    font-family: 'Italianno';
}

header p {
    margin-top: 0;
    font-size: 0.75em;
}

footer {
    background-color: rgba(var(--theme-one), 0.85);
    position: fixed;
    bottom: 0;
    border-top-left-radius: 60% 80%;
    border-top-right-radius: 60% 80%;
}

footer p {
    margin: 0.5em 0;
}


/* General styling classes for reuse */
.social {
    font-size: 2em;
}

.social :hover {
    color: rgba(var(--theme-two));
    animation: wiggle 0.6s;
}

.italianno {
    font-family: 'Italianno';
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-center {
    text-align: center;
}

.rounded-border {
    border-radius: 10px;
}

.padding {
    padding: 0.5em;
}

.margin {
    margin: 0.5em;
}

.margin-zero {
    margin: 0;
}

.width {
    width: 100vw;
}

.max-width {
    max-width: 600px;
}

.bold {
    font-weight: bold;
}


/* Animations */
.wiggle {
    animation: wiggle 0.6s;
}

@keyframes wiggle {
    0% {
        transform: translate(1px, 1px) rotate(0deg);
    }

    10% {
        transform: translate(-1px, -2px) rotate(-1deg);
    }

    20% {
        transform: translate(-3px, 0px) rotate(1deg);
    }

    30% {
        transform: translate(3px, 2px) rotate(0deg);
    }

    40% {
        transform: translate(1px, -1px) rotate(1deg);
    }

    50% {
        transform: translate(-1px, 2px) rotate(-1deg);
    }

    60% {
        transform: translate(-3px, 1px) rotate(0deg);
    }

    70% {
        transform: translate(3px, 1px) rotate(-1deg);
    }

    80% {
        transform: translate(-1px, -1px) rotate(1deg);
    }

    90% {
        transform: translate(1px, 2px) rotate(0deg);
    }

    100% {
        transform: translate(1px, -2px) rotate(-1deg);
    }
}


/* Landing section and call to action element */
#landing {
    display: inline-flex;
}

#play-quiz-btn {
    font-size: 200px;
    border-radius: 50%;
}

#play-quiz-btn:hover {
    font-size: 200px;
    border-radius: 50%;
    background-color: rgba(var(--theme-one), 0.85);
    color: rgba(var(--theme-two), 1);
    animation: wiggle 0.6s;
}


/* Game start section */
#new-game {
    background-color: rgba(var(--theme-one), 0.85);
    width: calc(90% - 1em);
    display: none;
}

#player-name {
    font-size: 1.25em;
    width: calc(90% - 1em);
}

.start-game-btn-holder {
    display: flex;
    justify-content: space-evenly;
    width: calc(90% - 1em);
}

#quiz-start-btn,
#quiz-leave-btn {
    background-color: rgba(var(--theme-three), 0.85);
    color: white;
    font-size: 1.25em;
    text-align: center;
    padding: 0.25em 0.5em;
}


/* Question numbers and timers */
.quiz-info-top {
    display: inline-flex;
    justify-content: space-around;
    width: 80vw;
    margin: 2.25em 0;
    background-color: rgba(var(--theme-one), 0.85);
}

#total-time {
    width: 30%;
    height: 1em;
    border: 2px solid var(--theme-one);
    background: lightgray;
    overflow: hidden;
}

#time-left {
    height: 100%;
    width: 100%;
    text-align: right;
    background-color: green;
    transition: all 0.5s ease-in-out;
}


/* Quiz section */
#quiz {
    display: none;
}

#question-box {
    background-color: rgb(var(--theme-three), 0.85);
    border: 2px solid rgb(var(--theme-one));
    color: white;
    display: inline-flex;
    width: 80vw;
}

#answers-box {
    display: inline-flex;
    width: 80vw;
    margin: 1em 0;
}

.answer {
    background-color: white;
    color: black;
    border: 2px solid rgb(var(--theme-one));
    border-radius: 15px;
    border: 2px solid rgb(var(--theme-one));
    margin: 0.5em 0;
    width: 100%;
    padding: 0.5em;
}

.answer-selected {
    background-color: rgba(var(--theme-one), 0.85);
    color: white;
    border-radius: 15px;
    border: 2px solid rgba(var(--theme-three));
    margin: 0.5em 0;
    width: 100%;
    padding: 0.5em;
}

#quiz-nav {
    display: inline-flex;
}

#next-btn {
    background-color: rgba(var(--theme-one), 0.85);
    font-size: 1.25em;
}


/* User feedback [during quiz] */
#score-tracker {
    display: inline-flex;
    justify-content: space-around;
    margin-bottom: 0.5em;
    background-color: rgba(var(--theme-one), 0.85);
    border-radius: 15px;
    width: 80vw;
}

.circle {
    height: 25px;
    width: 25px;
    border: 2px solid black;
    border-radius: 50%;
    background-color: white;
    margin: 0.5em 0;
}


/* Results section */
#results {
    display: none;
    justify-content: space-around;
    width: 80vw;
    margin: 2.25em 0;
    background-color: rgba(var(--theme-one), 0.85);
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

#results>* {
    z-index: 1;
}

#results::before {
    content: '';
    position: absolute;
    width: 250vw;
    height: 250%;
    background: linear-gradient(rgba(var(--theme-two), 0.85), rgba(var(--theme-four), 0.85));
    animation: animate 1.35s linear infinite;
}

#results::after {
    content: '';
    position: absolute;
    inset: 4px;
    background: rgb(var(--theme-one));
    border-radius: 10px;
}

@keyframes animate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#user-feedback a,
#home-link a {
    text-decoration: none;
    color: rgba(var(--theme-two), 1);
}

/* for screen resolutions less than 400px remove curved header/footer */
@media only screen and (max-width: 768px) {
    header {
        background-color: rgba(var(--theme-one), 0.85);
        position: fixed;
        top: 0;
        border-bottom-left-radius: 0%;
        border-bottom-right-radius: 0%;
    }

    header p {
        display: none;
    }

    .quiz-info-top {
        margin: 0.5em 0;
    }

    footer {
        background-color: rgba(var(--theme-one), 0.85);
        position: fixed;
        bottom: 0;
        border-top-left-radius: 0%;
        border-top-right-radius: 0%;
    }
}