@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP&family=Roboto:wght@700&display=swap');

/****************************
	Table of Contents
	1. Global Styles
	2. NavBar
	3. Modal
	4. Buttons
	5. Homepage
	6. Footer
	7. Containers and cards
	8. Progress Header
	9. Quiz End page
	10. Utilities
****************************/

/* 1. Global Styles */

:root {
	/* sets REM to 10px */
	font-size: 62.5%;
	/* custom variants used for the site colour scheme which allows easy changing of the colour scheme if needed */
	--clr-dark: #484747;
	--clr-accent: #1f79b4;
	--clr-light: #fff;
    --gradient: linear-gradient(90deg, #6eb0fa, #7fbef9, #93ccf8, #abd9f7, #cee8f6)
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}
html,
body {
	font-family: 'Noto Sans JP', sans-serif;
}

h1,
h2,
h3,
h4 {
	margin-bottom: 1rem;
	font-family: 'Roboto', sans-serif;
}

/* 2. NavBar */
/* navbar component has been built using bootstrap but has been given custom styling to fit in with the sites aesthetic */
.container-fluid {
	padding: 1rem 0;
}

.navbar-brand {
	margin-left: 1rem;
	margin-bottom: 1rem;
	padding: 1.5rem;
	background: var(--clr-light);
	border-radius: 50%;
	box-shadow: 0.2rem 0.2rem 1rem #484747;
}

.navbar-brand img {
	height: 5rem;
	width: 12rem;
}

.navbar {
	background: var(--clr-accent);
	color: var(--clr-light);
	padding: 0 1.5rem;
}

.navbar-nav {
	margin: 0 auto;
}

.nav-item {
	padding: 0 1rem;
}

.nav-item a {
	text-decoration: none;
	font-size: 2rem;
	color: var(--clr-light);
}

.nav-item:hover {
	transform: scale(1.05);
	transition: transform 300ms ease-in-out;
}

.active {
	border-bottom: 2px solid #fff;
}
/* Media queries used to provide a responsive site. */
@media screen and (max-width: 992px) {
	.nav-item {
		margin: 0 auto;
	}	
}

@media screen and (min-width: 992px) {
	.collapse > .btn {
		display: inline-block;
	}
}

/* 3. Modal */
/* Modal components have been built using bootstrap but have been given custom styling to fit in with the sites aesthetic */
.form label {
    width: 20%;
    vertical-align: top;
}

.form input,
.form textarea {
    width: 60%;
}

.validate {
	height: 4rem;
	width: 100%;
	text-align: center;
	padding: 1rem 0;
}
/* credit to W3Schools for loader */
.loader {
	border: 16px solid var(--clr-light);
	border-top: 16px solid var(--clr-accent);
	border-radius: 50%;
	width: 120px;
	height: 120px;
	margin: 0 auto;
	animation: spin 2s linear infinite;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* 4. Buttons */

.btn {
	background: var(--clr-light);
	color: var(--clr-dark);
	font-size: 1.5rem;
	width: max-content;
	align-self: center;
	box-shadow: 0.2rem 0.2rem 0.2rem #484747;
}

.btn:hover {
	transform: scale(1.05);
	transition: transform 150ms ease;
}

.navbar > .btn {
	margin-right: 1rem;
}

@media screen and (max-width: 991px) {
	.navbar > .btn {
		display: none;
	}
}

.modal-footer > .btn-primary {
    background-color: green;
    color: var(--clr-light);
}

.modal-footer > .btn-secondary {
    background-color: red;
    color: var(--clr-light);
}

#quiz-close {
    background: var(--clr-accent);
    height: 5rem;
    max-width: 80rem;
    margin: 0 auto;
}

#quiz-close i {
    color: var(--clr-light);
    font-size: 3rem;
    padding: 1rem 2rem;
    float: right;
}

.stats-btns {
	max-width: 80rem;
	margin: 0 auto;
	text-align: center;
	display: flex;
	justify-content: space-around;
}

.stats-btns .tab:hover {
	transform: scale(1.01);
	transition: transform 150ms ease;
}

#mobile-feedback-btn  {
	font-size: 2rem;
}
/* Media queries used to provide a responsive site. */
@media screen and (min-width: 992px) {
	#mobile-feedback-btn {
		display: none;
	}
}

/* 5. Homepage */
/* Credit to unsplash for the image */
#homepage-hero {
	background: url(https://charliewatson1504.github.io/CI_MS2_PLQuiz/assets/images/homepage-hero.webp) no-repeat center center;
	height: 45rem;
	width: 100%;
	background-size: cover;
}

#introduction h1 {
    padding: 3rem;
    text-align: center;
}

.homepage-container {
	width: 100%;
	display: flex;
	justify-content: space-around;
	padding: 6rem 2rem;
}

.card {
	width: 20%;
	text-align: center;
	height: 40rem;
	border: 0.1rem solid #484747;
	box-shadow: 0.2rem 0.2rem 0.8rem #484747;
}
/* Media queries used to provide a responsive site. */
@media screen and (max-width: 1200px) {
    .homepage-container {
        padding: 0.5rem;
        margin-bottom: 1.5rem;
    }
    .card {
        width: 30%;
    }
}

@media screen and (max-width: 768px) {
    .homepage-container{
        display: block;
        padding: 2rem;
	text-align: center;
    }
    .card {
        margin: 1rem auto;
        width: 80%;
    }
    .homepage-container .card p {
	    width: 100%;
    }
}

@media screen and (max-width: 576px) {
	.card {
		margin: 1rem auto;
		width: 95%;
	}
}

.card:hover {
	transform: scale(1.05);
	transition: transform 250ms ease-in-out;
}

.homepage-container .card p,
.homepage-container .card a {
    font-size: 2rem;
    padding: 1.5rem;
}

.homepage-container .card p {
    margin-top: 5rem;
    height: 8rem;
}

.homepage-container .card a {
    margin: 0 auto;
    text-decoration: none;
    color: var(--clr-light);
    box-shadow: 0.1rem 0.1rem 0.1rem #484747;
    width: 50%;
    border: 1px solid #484747;
    background-size: 300%;
    background-image: var(--gradient);
    animation: bg-animation 20s infinite;
}

#stats-card-bg {
	background: url(https://charliewatson1504.github.io/CI_MS2_PLQuiz/assets/images/stats-card.webp) no-repeat center center;
	height: 15rem;
	width: 100%;
	background-size: cover;
}

#twitter-card-bg {
	background: url(https://charliewatson1504.github.io/CI_MS2_PLQuiz/assets/images/twitter-card.webp) no-repeat center center;
	height: 15rem;
	width: 100%;
	background-size: cover;
}

#quiz-card-bg {
	background: url(https://charliewatson1504.github.io/CI_MS2_PLQuiz/assets/images/quiz-card.webp) no-repeat center center;
	height: 15rem;
	width: 100%;
	background-size: cover;
}
/* animation gives movement on screen so site isn't static and keeps user engaged */
@keyframes bg-animation {
    0% {background-position: left;}
    50% {background-position: right;}
    100% {background-position: left;}
}

/* 6.Footer */
/* Flexbox used to provide a responsive site. */
.footer-container{
	width: 100%;
	border-top: 2px solid var(--clr-dark);
	display: flex;
	background: var(--clr-accent);
}

.footer-item {
	width: 50%;
	padding: 1rem 2rem;
	align-self: center;
	text-align: center;
	color: var(--clr-light);
}

.footer-item > a > i {
	font-size: 4rem;
	padding: 0 2rem;
	cursor: pointer;
	color: var(--clr-light);
}
/* Media queries used to provide a responsive site. */
@media screen and (max-width: 768px) {
	.footer-item > a > i {
		font-size: 2rem;
		padding: 1rem 2rem;
	}
}

.footer-item > a > i:hover {
	transform: scale(1.05);
	transition: transform 150ms ease;
}

/* 7. Containers and cards */
/* Flexbox used to provide a responsive site. */
.container {
	width: 100vw;
	height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	max-width: 80rem;
	margin: 0 auto;
   	 background: var(--clr-accent);
    	padding: 0.5rem 6rem;
}

.container > * {
	width: 100%;
}

.scroll {
	overflow: scroll;
}

.container.scroll {
	align-items: flex-start;
}

.quiz-container {
	max-width: 70%;
	height: 60rem;
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0 auto;
}

.quiz-card {
	width: 60rem;
	text-align: center;
	height: 55rem;
	border: 0.1rem solid #484747;
	box-shadow: 0.2rem 0.2rem 0.8rem #484747;
}

.quiz-hero {
    background: url(https://charliewatson1504.github.io/CI_MS2_PLQuiz/assets/images/quiz-hero.webp) no-repeat center center;
    width: 100%;
    height: 30rem;
    text-align: center;
    border-bottom: 1px solid #484747;
}

.quiz-card h1 {
    padding: 1rem 0;
    font-size: 4rem;
    color: var(--clr-accent);
}

.quiz-card a {
    cursor: pointer;
    text-decoration: none;
    font-size: 2rem;
    display: block;
    padding: 1rem 0;
    width: 20rem;
    border: 1px solid #484747;
    margin: 1rem auto;
    color: var(--clr-light);
    background: var(--clr-accent);
    box-shadow: 0.2rem 0.2rem 0.2rem #484747;
}

.quiz-card a:hover {
    transform: scale(1.03);
    transition: transform 150ms ease;
}

.option-container {
	display: flex;
	width: 100%;
	margin-bottom: 0.5rem;
}

.option-container:hover {
	cursor: pointer;
}

.option-prefix {
	padding: 1.5rem 2.5rem;
    border: 1px solid #484747;
    background: var(--clr-dark);
    font-size: 2rem;
    color: var(--clr-light);
}

.option-text {
	padding: 1.5rem;
    width: 100%;
    font-size: 2rem;
    color: var(--clr-dark);
    background: var(--clr-light);
}

.right {
	background: rgb(12, 221, 12);
    color: #fff;
}

.wrong {
	background: rgb(177, 7, 7);
    color: #fff;
}

.row {
    display: block;
    text-align: center;
}

.tab {
	background: var(--clr-accent);
	width: 100%;
	margin: 0.1rem;
	border: 1.25px solid #484747;
	cursor: pointer;
	background-size: 300%;
	background-image: var(--gradient);
	animation: bg-animation 20s infinite;
}
    
    @keyframes bg-animation {
	0% {background-position: left;}
	50% {background-position: right;}
	100% {background-position: left;}
}

#question {
    font-size: 3rem;
    padding: 1rem 0;
}

#stats {
	overflow: scroll;
	align-items: flex-start;
	height: 80vh;
}

#err404-card-bg {
	background: url(https://charliewatson1504.github.io/CI_MS2_PLQuiz/assets/images/404.webp) no-repeat center center;
	height: 15rem;
	width: 100%;
	background-size: cover;
}

#table-list {
	background: var(--clr-light);
	text-align: center;
}

#table-list th {
	font-size: 2rem;
	padding: 1rem 0;
}

#table-list td {
	font-size: 1.25rem;
	padding: 0.5rem 0;
}

#table-list img {
	height: 4rem;
	width: 4rem;
}

@media screen and (max-width: 576px) {
	#question {
		font-size: 2rem;
	}
	#stats {
		justify-content: flex-start;
		padding: 0.25rem 0.25rem;
	}
}

#stats-introduction {
	width: 100%;
	text-align: center;
	padding: 1rem 0;
}

/* 8. Progress Header */

.progress-header {
	display: flex;
	justify-content: space-between;
    background: var(--clr-light);
    padding: 1rem 1.5rem;
    font-size: 3rem;
    margin-bottom: 1rem;
    border: 1px solid #484747;
}

.progress-header div p {
    display: inline-block;
}

#progress-bar-outer {
	height: 2.2rem;
	border: 1px solid #484747;
	width: 100%;
    background: var(--clr-light);
    box-shadow: 0.1rem 0.1rem 0.1rem #484747;
    margin-bottom: 2rem;
}

#progress-bar-inner {
	background: var(--gradient);
	height: 2rem;
	width: 20%;
    background-size: 300%;
    background-image: var(--gradient);
    animation: bg-animation 20s infinite;
}

@keyframes bg-animation {
    0% {background-position: left;}
    50% {background-position: right;}
    100% {background-position: left;}
}

@media screen and (max-width: 576px) {
	.container {
		padding: 0.5rem 1rem;
	}
	.progress-header {
		text-align: center;
		display: block;
	}
	.progress-header div p {
		font-size: 2rem;
	}
}

/* 9. Quiz end page */

#quiz-end {
	overflow: scroll;
	align-items: flex-start;
}

#quiz-end h2 {
	color: var(--clr-light);
}

#q-and-a {
	background: var(--clr-light);
	margin-bottom: 2rem;
}

#q-and-a td,
#q-and-a th {
	font-size: 1.5rem;
	padding: 0.5rem;
	border: 0.6px solid black;
}

.quiz-end {
    padding: 1rem;
}

.quiz-end a {
    background: var(--gradient);
    margin: 0 2rem 5rem 2rem;
    font-size: 2rem;
    background-image: var(--gradient);
    background-size: 300%;
    animation: bg-animation 20s infinite;
}

#final-score {
    font-size: 6rem;
    color: var(--clr-light);
    text-shadow: 0.1rem 0.1rem 0.1rem #484747;
}

@media screen and (max-width: 576px) {
	#final-score {
		font-size: 4rem;
	}
	#q-and-a td,
	#q-and-a th {
	font-size: 1rem;
	padding: 0.5rem;
	border: 0.6px solid black;
}
}

/* 10. Utilities */

.width50 {
	width: 50%;
}

.width25 {
	width: 25%;
}

.hidden {
	display: none;
}