body {
    font-family: sans-serif;
    color: lightgray;
    margin: 0;
    width: 100%;
    height: 100%;
    font-size: 25px;
}

/* ------------------------------------------------------------------------------------------- Background Image */

.background-image {
    width: 100%;
    height: auto;
    background: url("https://i.imgur.com/GmbJoQx.jpg") no-repeat bottom right fixed; /* Background image, hosted on Imgur to save load times */
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    justify-content: center;
    border: 0;
}

/* ------------------------------------------------------------------------------------------- Intro page */

.black-background {
    background-color: #000; /* Black background whilst animation is happening */
    opacity: 1;
}

.solemnly-page-content {
    width: 100%;
}

.js-solemnly-swear {
    width: 100%;
    height: 100%;
}

.solemnly-overlay {
    margin: auto;
    margin-top: 25%;
    border-radius: 25px;
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
}

#solemnly {
    font-size: 200%;
    font-family: monospace;
    color: #fff;
    animation: fade 8s;
    animation-fill-mode: forwards;
    z-index: 6;
}

#solemnly-banner {
    background-color: rgb(88, 88, 88);
    font-size: 75%;
}

.solemnly-button {
    padding: 5px;
}

/* ------------------------------------------------------------------------------------------- Animation */

@keyframes fade {
    0% {
        opacity: 0;
    }
    60% {
        opacity: 0.8;
    }
    100% {
        opacity: 0;
    }
}

@keyframes fade-in {
    0% {
        opacity: 0;
    }
    80% {
        opacity: 0;
    }
    100% {
        opacity: 0.8;
    }
}

@keyframes fade-out {
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

.click-to-enter {
    width: 100%;
    align-items: center;
}

#enter {
    font-size: 150%;
    font-family: monospace;
    color: #fff;
    text-align: center;
    animation: fade-in 10s;
}

/* ------------------------------------------------------------------------------------------- Core page */

#navButtons {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    margin: auto;
}

.button {
    padding: 10px;
}

.button, .solemnly-button {
    background-color: rgba(218,165,32,0.9);
    border-radius: 10px;
    color: #000;
    text-align: center;
    border: 2px solid #000;
    box-shadow: 1px 1px 2px black, 0 0 5px rgb(255,255,255);
    font-size: 60%;
}

#logo {
    margin: 0 auto;
    margin-top: 5%;
    background-color: rgba(218,165,32,0.5);
    border-radius: 25px;
    padding: 25px;
    width: 60%;
}

a {
    text-decoration: none;
}

.hide {
    display: none;
}

/* ------------------------------------------------------------------------------------------- House selectors and Q+As */

.main-section {
    display: flex;
    justify-content: center;
    align-content: center;
    height: 100%;
    margin-bottom: 50px;
}

.page-content {
    width: 90%;
}

.page-content, .solemnly-page-content {
    height: 85%;
    flex-direction: row;
    text-align: center;
    margin: auto;
}

.choose-house, .question-text {
    font-size: 300%;
    text-shadow: 3px 3px 4px black;
    text-align: center;
    background-color: rgba(218,165,32,0.8);
    border-radius: 25px;
    width: 65%;
    margin: auto;
    margin-top: 3%;
    margin-bottom: 3%;
}

.overlay {
    background-color: rgba(255,255,255,0.2);
    border-radius: 25px;
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
    width: 100%;
    height: 125px;
}

.house, .answer {
    width: 100%;
    height: 80%;
    justify-content: space-evenly;
    border-radius: 25px;
    border: 2px solid #000;
    box-shadow: 1px 1px 2px black, 0 0 5px rgb(255,255,255);
}

.house-text, .answer-text {
    text-align: center;
    font-size: 140%;
    font-weight: bold;
}

.house-selector, .answer-selector {
    width: 24%;
    height: 100%;
}

.gryffindor .answer, .gryffindor-color {
    background-color: #d74f40;
    color: #fbb928;
}

.slytherin .answer, .slytherin-color {
    background-color: #005d4a;
    color: #a7acaf;
}

.hufflepuff .answer, .hufflepuff-color {
    background-color: #fbb92f;
    color: #07080c;
}

.ravenclaw .answer, .ravenclaw-color {
    background-color: #203268;
    color: #886031;
}

#question-text, #how-to-play-text {
    font-size: 250%;
    color: #07080c;
    text-shadow: 2px 2px 3px white;
    background-color: rgba(218,165,32,0.5);
    border-radius: 25px;
    padding: 25px;
    margin: auto;
    margin-bottom: 2%;
    margin-top: 5%;
    width: 75%;
    text-align: center;
}

.answer-color {
    background-color: #d74f40;
    color: #fbb928;
}

.answer-overlay {
    width: 100%;
    margin: 0 auto;
}

.progress-position {
    height: 25px;
    z-index: 0;
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
    margin-left: auto;
    margin-right: auto;
    margin-top: 5%;
}

.progress-overlay {
    background-color: rgba(255,255,255,0.2);
    border-radius: 25px;
    height: 200%;
    width: 50%;
    display: flex;
    justify-content: center;
}

/* Thanks to https://css-tricks.com/html5-progress-element/ for the progress bar */

progress {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    z-index: 2;
    height: 70%;
    width: 90%;
    border-radius: 15px;
    align-self: center;
}

progress[value]::-moz-progress-bar { /* Edit styling on Mozilla Firebox web browser */
    background-image:
        -moz-linear-gradient(-45deg, 
	                        transparent 33%, rgba(0, 0, 0, .1) 33%, 
	                        rgba(0,0, 0, .1) 66%, transparent 66%),
	    -moz-linear-gradient(top, 
	                        rgba(255, 255, 255, .25), 
	                        rgba(0, 0, 0, .25)),
	    -moz-linear-gradient(left, #07080c, #000);

    border-radius: 15px; 
    background-size: 35px 20px, 100% 100%, 100% 100%;
}   

progress[value]::-webkit-progress-bar { /* Edit outer styling on other web browsers */
  background-color: #a0a150;
  border-radius: 15px;
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.25) inset;
}

progress[value]::-webkit-progress-value { /* Edit inner styling on other web browsers */
    background-image:
	    -webkit-linear-gradient(-45deg, 
	                        transparent 33%, rgba(0, 0, 0, .1) 33%, 
	                        rgba(0,0, 0, .1) 66%, transparent 66%),
	    -webkit-linear-gradient(top, 
	                        rgba(255, 255, 255, .25), 
	                        rgba(0, 0, 0, .25)),
	    -webkit-linear-gradient(left, #07080c, #000);

    border-radius: 15px; 
    background-size: 35px 20px, 100% 100%, 100% 100%;
}

#score, #timer {
    background: rgba(255,255,255,0.6);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    align-items: center;
    color: #07080c;
    font-size: 25px;
}

/* ------------------------------------------------------------------------------------------- Results */

.result-text {
    font-size: 250%;
    color: #07080c;
    text-shadow: 2px 2px 3px white;
    background-color: rgba(218,165,32,0.5);
    border-radius: 25px;
    padding: 15px;
    width: 75%;
    margin: auto;
    text-align: center;
    margin-top: 1%;
    margin-bottom: 1%;
}

.score {
    font-size: 100%;
    color: #07080c;
    background-color: rgba(255,255,255,0.6);
    border-radius: 25px;
    padding: 10px;
    margin: auto;
    margin-bottom: 2%;
    height: 50px;
    width: 25%;
    text-align: center;
}

h2 {
    margin: 0;
    margin-bottom: 5%;
}

.result-image-container {
    text-align: center;
}

.result-image {
    width: 40%;
    height: auto;
    border-radius: 25px;
}

.quote {
    font-size: 25px;
    color: #07080c;
    background-color: rgba(255,255,255,0.6);
    border-radius: 25px;
    padding: 10px;
    margin: 0 auto;
    text-align: center;
    width: 75%;
}

.result-quote {
    font-size: 100%;
}

#result-button {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
    padding: 15px;
}

/* ------------------------------------------------------------------------------------------- Instructions */

#how-to-play-overlay {
    width: 75%;
    background-color: rgba(255,255,255,0.5);
    border-radius: 25px;
    z-index: 0;
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
    padding: 25px;
    margin: 0 auto;
}

.how-to-play-p {
    color: #000;
    font-size: 125%;
    font-weight: bold;
    list-style: none;
}

ul {
    padding: 0;
}

/* ------------------------------------------------------------------------------------------- Footer */

footer {
    background-color: rgba(255,255,255,0.4);
    padding: 3px;
    border-radius: 5px;
}

.copyright {
    position: fixed;
    bottom: 0;
    left: 10px;
}

footer p {
    font-size: 14px;
    margin: 0;
    color: black;
}

/* ------------------------------------------------------------------------------------------- Responsive design */

@media screen and (max-width: 1200px) { /* Media queries for smaller computer screens */
    #logo {
        margin-top: 2%;
    }
    .choose-house, .question-text {
        font-size: 200%;
    }
    .overlay {
        height: 150px;
    }
}

@media screen and (max-width: 1100px) and (orientation: landscape) { /* Media queries for landscape tablet */
    .solemnly-overlay {
        margin-top: 20%;
    }
    #solemnly {
        font-size: 200%;
    }
    #enter {
        font-size: 150%;
    }
    #logo {
        margin-top: 5%;
        width: 50%;
    }
    .house-text, .answer-text {
        font-size: 125%;
    }
    .overlay {
        height: 125px;
        width: 50%;
        margin: auto;
    }
    .choose-house, .question-text {
        margin-top: 2%;
        margin-bottom: 2%;
        font-size: 150%;
    }
    #question-text, #how-to-play-text {
        font-size: 150%;
        margin-top: 5%;
    }
    .house-selector, .answer-selector {
        width: 100%;
        height: 40%;
        margin-bottom: 3px;
    }
    #score, #timer {
        font-size: 80%;
    }
    .progress-position {
        margin-top: 18%;
    }
    .progress-overlay {
        height: 150%;
    }
    .result-text {
        margin-top: 2%;
        margin-bottom: 2%;
        font-size: 200%;
    }
    .score {
        margin-bottom: 0;
    }
    .result-image {
        width: 50%;
    }
    .result-image-container {
        margin-bottom: 2%;
        margin-top: 2%;
    }
    .quote {
        width: 100%;
    }
    .result-quote {
        margin-top: 1%;
        margin-bottom: 1%;
    }
    .how-to-play-p {
        font-size: 90%;
    }
}

@media screen and (max-width: 992px) and (orientation: portrait) { /* Media queries for portrait tablet */
    .solemnly-overlay {
        margin-top: 40%;
    }
    #solemnly {
        font-size: 200%;
    }
    #enter {
        font-size: 150%;
    }
    #logo {
        margin-top: 5%;
        width: 80%;
    }
    .house-text, .answer-text {
        font-size: 125%;
    }
    .overlay {
        height: 125px;
    }
    .choose-house, .question-text {
        margin-top: 10%;
        margin-bottom: 10%;
        font-size: 150%;
        width: 80%;
    }
    #question-text, #how-to-play-text {
        font-size: 200%;
        margin-top: 5%;
    }
    .house-selector, .answer-selector {
        width: 100%;
        height: 55%;
        margin-bottom: 3px;
    }
    #score, #timer {
        font-size: 80%;
    }
    .progress-position {
        margin-top: 35%;
    }
    .progress-overlay {
        height: 150%;
    }
    .result-text {
        margin-top: 10%;
        margin-bottom: 5%;
        font-size: 200%;
    }
    .score {
        margin-bottom: 5%;
    }
    .result-image {
        width: 70%;
    }
    .result-image-container {
        margin-bottom: 5%;
    }
    .how-to-play-p {
        font-size: 90%;
    }
}

@media screen and (max-width: 800px) and (orientation: landscape) { /* Media queries for landscape mobile */
    #solemnly {
        font-size: 125%;
    }
    .solemnly-overlay {
        margin-top: 10%;
    }
    #enter {
        font-size: 100%;
    }
    #logo {
        width: 45%;
    }
    .house-text, .answer-text {
        font-size: 75%;
    }
    .button {
        font-size: 45%;
    }
    .overlay {
        height: 50px;
        margin-top: 10px;
    }
    .choose-house, .question-text {
        margin-top: 0;
        margin-bottom: 0;
        font-size: 150%;
    }
    #question-text, #how-to-play-text {
        font-size: 100%;
        margin-bottom: 2%;
        padding: 10px;
    }
    .house-selector, .answer-selector {
        height: 100%;
    }
    #score, #timer {
        font-size: 60%;
        height: 100%;
    }
    .score {
        padding: 0;
        margin-bottom: 0;
        height: 40px;
    }
    figure {
        margin: 2px;
    }
    .result-text {
        font-size: 100%;
        padding: 10px;
    }
    h2 {
        font-size: 100%;
        padding-top: 5%;
    }
    .result-quote {
        font-size: 60%;
    }
    .quote {
        padding: 1px;
        width: 100%;
    }
    .result-image {
        width: 45%;
    }
    .how-to-play-p {
        font-size: 60%;
    }
    #how-to-play-overlay {
        padding: 7px;
    }
    footer {
        display: none;
    }
}

@media screen and (max-width: 600px) and (orientation: portrait) { /* Media queries for portrait mobile */
    #solemnly {
        font-size: 125%;
    }
    #enter {
        font-size: 100%;
    }
    .house-text, .answer-text {
        font-size: 75%;
    }
    .button {
        font-size: 45%;
    }
    .overlay {
        height: 100px;
    }
    .choose-house, .question-text {
        margin-top: 10%;
        margin-bottom: 5%;
        font-size: 150%;
    }
    #question-text, #how-to-play-text {
        font-size: 100%;
        margin-bottom: 5%;
    }
    .house-selector, .answer-selector {
        height: 45%;
    }
    #score, #timer {
        font-size: 60%;
        height: 100%;
    }
    .result-text {
        font-size: 150%;
    }
    h2 {
        font-size: 100%;
        padding-top: 5%;
    }
    .result-quote {
        font-size: 75%;
    }
    .quote {
        padding: 10px;
    }
    .result-image {
        width: 80%;
    }
    .how-to-play-p {
        font-size: 60%;
    }
    footer {
        display: none;
    }
}