/* Quiz Master homepage (index.php) */

body {
	text-align: center;
}
input {
	line-height: 1.5em;
}
html,
body,
.page {
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	margin: 0;
}

body * {
	box-sizing: border-box;
}
.page {
	display: flex;
	flex-direction: column;
	height: 100%;
}
.page .banner {
	height: 30%;
	width: 100%;
	background-color: var(--primary);
	position: relative;
	overflow: hidden;
}
.page .banner:after {
	content: " ";
	width: 100%;
	height: 90%;
	position: absolute;
	left: 0;
	top: 5%;
	background-image: url(/svg/quizmasterlogo.svg);
	background-position: center;
	background-size: contain;
	background-repeat: no-repeat;
}

.page .content {
	flex: 2;
	display: flex;
	flex-direction: column;
}

.index-tagline {
	margin: 0;
	padding: 10px 14px;
	font-size: clamp(13px, 2.5vw, 16px);
	line-height: 1.4;
	color: var(--text-secondary, #555);
	background: var(--bg-secondary, rgba(0, 0, 0, 0.04));
	border-bottom: 1px solid var(--border-light, #ddd);
}

.thoughtBubble {
	position: absolute;
	width: 30vh;
	height: 30vh;
	background-position: center;
	background-size: contain;
	background-repeat: no-repeat;
	-webkit-animation: drift 30s infinite;
	animation: drift 30s infinite;
	opacity: 0.8;
}
.head {
	width: 30vh;
	height: 30vh;
	background-position: center;
	background-size: contain;
	background-repeat: no-repeat;
	background-image: url(/svg/head.svg);
	left: calc(50% - 15vh);
	top: calc(50% - 15vh);
	position: absolute;
	z-index: -1;
}

@keyframes drift {
	0% {
		left: calc(100% + 30vh);
	}
	100% {
		left: -30vh;
	}
}
@supports (-ms-ime-align: auto) {
	@keyframes drift {
		0% {
			left: 130%;
		}
		100% {
			left: -30vh;
		}
	}
}

.tab {
	height: 20%;
	overflow: hidden;
	display: flex;
	flex-direction: row;
}
.tab button {
	flex: 1;
	background-color: var(--primary-dark);
	color: var(--primary-text);
	float: left;
	border: none;
	outline: none;
	cursor: pointer;
	transition: 0.3s;
	border-radius: 0;
	font-size: 4vw;
}
.tab button:hover {
	background-color: var(--primary-light);
}
.tab button:focus-visible {
	outline: 2px solid var(--accent-blue, #3498db);
	outline-offset: 2px;
}
.tab button.active {
	background-color: inherit;
	color: inherit;
}
.tabcontent {
	height: 80%;
	width: 100%;
	display: none;
	padding: 20px;
	border-top: none;
	position: relative;
	overflow-y: auto;
}

.how {
	margin: 0;
	padding: 0;
	font-size: 3vw;
}
.how .howlist {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	width: 100%;
	justify-content: space-evenly;
	height: 100%;
}
.howlist li {
	flex: 1 1;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-evenly;
}
.howlist li span {
	flex: 0 1;
}

.advancedSettings {
	font-size: 0.5em;
	text-decoration: underline;
	cursor: pointer;
}

/* Form styling improvements */
.tabcontent form {
	display: flex;
	flex-direction: column;
	gap: 20px;
	max-width: 400px;
	margin: 0 auto;
	padding: 20px;
	background: var(--bgsep);
	border-radius: 12px;
	box-shadow: 0 4px 12px var(--shadow-light);
}

.tabcontent .form-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tabcontent label {
	font-weight: 600;
	color: var(--text-primary);
	font-size: 16px;
	margin-bottom: 4px;
}

.tabcontent input[type="text"],
.tabcontent input[type="number"] {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid var(--border-medium);
	border-radius: 8px;
	font-size: 16px;
	background-color: var(--bg-primary);
	color: var(--text-primary);
	transition: all 0.3s ease;
	box-sizing: border-box;
}

.tabcontent input[type="text"]:focus,
.tabcontent input[type="number"]:focus {
	outline: none;
	border-color: var(--accent-blue);
	box-shadow: 0 0 0 3px var(--shadow-blue-focus);
	transform: translateY(-1px);
}

.tabcontent input[type="submit"] {
	padding: 14px 24px;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	background: var(--button-primary);
	color: var(--button-primary-text);
	box-shadow: 0 2px 8px var(--shadow-light);
}

.tabcontent input[type="submit"]:hover {
	background: var(--button-primary-hover);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px var(--shadow-blue);
}

.tabcontent input[type="submit"]:active {
	transform: translateY(0);
	box-shadow: 0 2px 4px var(--shadow-light);
}

.tabcontent .form-description {
	color: var(--text-secondary);
	font-size: 14px;
	margin-bottom: 20px;
	text-align: center;
	line-height: 1.5;
}

.tabcontent .advancedSettings {
	font-size: 14px;
	margin: 0;
	text-decoration: underline;
	color: var(--accent-blue);
	cursor: pointer;
	text-align: center;
	padding: 8px;
	border-radius: 4px;
	transition: background-color 0.3s ease;
}

.tabcontent .advancedSettings:hover {
	background-color: var(--bg-secondary);
}

.tabcontent #masteradvanced {
	background: var(--bg-secondary);
	padding: 20px;
	border-radius: 8px;
	margin-top: 10px;
	border: 1px solid var(--border-light);
}

.tabcontent #masteradvanced.hidden {
	display: none;
}

@media only screen and (max-width: 800px) {
	.tabcontent form {
		max-width: 90%;
		padding: 15px;
	}

	.tabcontent input[type="text"],
	.tabcontent input[type="number"] {
		font-size: 16px; /* Prevents zoom on iOS */
	}
}
@media only screen and (max-width: 600px) {
	.tabcontent {
		padding: 15px;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.tabcontent form {
		max-width: 100%;
		padding: 15px;
		gap: 15px;
		margin-bottom: 20px;
	}

	.tabcontent label {
		font-size: 14px;
	}

	.tabcontent input[type="text"],
	.tabcontent input[type="number"] {
		padding: 10px 12px;
		font-size: 16px;
	}

	.tabcontent input[type="submit"] {
		padding: 12px 20px;
		font-size: 16px;
	}
}
.cookie-notice {
	font-size: 0.7em;
}

.cookie-privacy-link {
	color: var(--accent-blue, #3498db);
	text-decoration: underline;
}

@media only screen and (max-height: 600px) {
	.tabcontent {
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.tabcontent form {
		margin-bottom: 30px;
	}
}
@media (orientation: landscape) {
	.how {
		font-size: 3vh;
	}
	.tab button {
		font-size: 4vh;
	}

	.tabcontent {
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.tabcontent form {
		margin-bottom: 20px;
	}
}