body {
	font-family: 'Montserrat', sans-serif;
	font-size: clamp(1rem, 0.8vw + 1rem, 1.1rem); /* Base font size responsive to viewport */
	background-color: var(--body-bg-color);
	color: var(--text-color);
	padding-top: 5px;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: background-color 1.0s, color 1.0s;
}

#quiz-container {
	background-color: var(--container-bg-color);
	color: var(--text-color);
	padding: 0.7rem;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	/* max-width: 400px; */
	text-align: center;
	display: none; /* Initially hidden for fade-in effect */
	transition: background-color 1.0s, color 1.0s;
	position: relative; /* Make the container a positioned element, enables correct theme toggle positioning */
	z-index: 1; /* Above the loading spinner */
}

/* Dark theme colors */
:root {
	--body-bg-color: #2c2c2c;
	--container-bg-color: #444444;
	--text-color: #f5f5f5;
	--button-bg: #c6c6c6;
	--button-text: #444;
	--toggle-color: #b3b3b3;
}

/* Light theme colors */
@media (prefers-color-scheme: light) {
	:root {
		--body-bg-color: #eaeaea;
		--container-bg-color: #ffffff; 
		--text-color: #333;
		--button-bg: #dfdfdf;
		--button-text: #000;
		--toggle-color: #333;
	}
}

/* Dark theme (manual override if user chooses dark theme) */
[data-theme="dark"] {
	--body-bg-color: #2c2c2c;
	--container-bg-color: #444444;
	--text-color: #f5f5f5;
	--button-bg: #c6c6c6;
	--button-text: #444;
	--toggle-color: #b3b3b3;
}

/* Light theme (when manually switched) */
[data-theme="light"] {
	--body-bg-color: #eaeaea;
	--container-bg-color: #ffffff;
	--text-color: #333;
	--button-bg: #dfdfdf;
	--button-text: #000;
	--toggle-color: #333;
}

.results-card {
	width: 300px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	margin: 0 auto;
}

button {
	background-color: var(--button-bg);
	color: var(--button-text);
	padding: 10px 30px;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

#question-div {
	transition: opacity 1s ease-in-out;
}

#image-wrapper {
	position: relative;
	overflow: hidden;
	border-radius: 5px;
}

#quiz-image {
	max-width: 90vw;
	width: auto;
	height: auto;
	max-height: 70vh;
	min-height: 400px;
	border-radius: 5px;
	display: block;
	transition: transform 0.5s ease; /* Zooming transition */
	will-change: transform; /* Optimize zooming performance */
}

#image-wrapper:hover #quiz-image {
	transform: scale(2);
	cursor: zoom-in;
	border-radius: inherit;
}

#buttons {
	margin: 0px;
}

button {
	padding: 10px 40px;
	font-family: 'Montserrat', sans-serif;
	font-size: clamp(0.8rem, 1.0vw + 0.5rem, 1.0rem);
	font-weight: bold;
	cursor: pointer;
	border: none;
	border-radius: 20px;
	margin: 5px;
	transition: background-color 0.3s ease;
}

#yes-btn,#no-btn {
	min-width: 125px;
}

#yes-btn,#no-btn,#next,#reset-btn {
	justify-content: center;
	align-items: center;
	position: relative;
}

#yes-btn i,#no-btn i,#next i,#reset-btn i {
	color: grey;
	visibility: hidden; /* Initially hidden */
}

#yes-btn i,#next i,#reset-btn i {
	position: absolute;
	left: 12px;
	top: 12px;
}

#no-btn i {
	position: absolute;
	right: 12px;
	top: 12px;
}

#reset-btn {
	margin-bottom: 8px;
	width: auto;
}

/* Feedback and stats styling */
#feedback {
	font-size: 18px;
	margin: 10px 0;
	height: 30px;
	color: #ffcc00;
}

#stats {
	/* margin-top: 30px; */
}

p {
	margin: 5px 0;
}

h3 {
	padding: 0px;
	margin: 10px;
}

a {
	color: #76c7c0;
	text-decoration: none; /* Remove underline */
	font-weight: bold; /* Make the link bold */
	transition: color 0.3s ease; /* Smooth color change on hover */
}

a:hover {
	color: #50a0a0; /* Slightly darker shade for hover effect */
	text-decoration: underline; /* Underline on hover */
}

#theme-toggle {
	position: absolute;
	bottom: 15px;
	left: 15px;
	cursor: pointer;
	color: var(--toggle-color);
	transition: color 1.0s ease;
	z-index: 1;
}

#settings-menu .theme-toggle-clone {
	position: absolute;
	bottom: 15px;
	left: 15px;
	cursor: pointer;
	color: #b3b3b3;
	transition: color 1.0s ease;
	z-index: 2;
}

#settings-toggle {
	position: absolute;
	bottom: 15px;
	right: 15px;
	cursor: pointer;
	color: var(--toggle-color);
	transition: color 1.0s ease;
}

#close-button {
	position: absolute;
	bottom: 15px;
	right: 15px;
	cursor: pointer;
	color: #b3b3b3;
	transition: color 1.0s ease;
}

#theme-toggle, .theme-toggle-clone, #settings-toggle, #close-button {
	font-size: clamp(1.5rem, 1.5vw + 0.5rem, 2rem);
}

.advanced-mode-icon {
	position: absolute;
	top: 19px;
	right: 22px;
	font-size: 24px;
	color: white;
	opacity: 0.8;
	z-index: 10;
	text-shadow: 2px 2px 5px rgba(0, 0, 0, 1.0); /* Shadow with blur */
	cursor: pointer;
}

#hint {
	position: absolute;
	background-color: rgba(0, 0, 0, 0.7); /* Transparent black background */
	color: white;
	text-align: center;
	padding: 10px;
	font-size: 18px;
	border-radius: 5px;
	width: 92%;
	bottom: 5%;
	left: 50%; /* Move to the middle of the parent */
	transform: translateX(-50%); /* Center it horizontally */
	display: none; /* Initially hidden */
}

#loading-spinner {
	position: absolute;
	top: 40%;
	left: 50%;
	transform: translate(-50%, -0%);
	z-index: 0;
	font-size: 36px;
	color: var(--toggle-color);
}

#settings-menu {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.80);
	backdrop-filter: blur(6px);
	color: #f5f5f5;
	display: none;
	opacity: 0;
	padding: 20px;
	box-sizing: border-box;
	z-index: 2;
	transition: opacity 0.5s ease;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	font-size: clamp(1rem, 1vw + 0.8rem, 1.2rem); /* Base font size for settings */
}

#quiz-container, #settings-menu {
	border-radius: clamp(8px, 1vw, 13px);
}

.setting-wrapper { /* Light grey transparent background with rounded corners */
	background-color: rgba(255, 255, 255, 0.14);
	padding: 12px;
	padding-top: 6px;
	padding-bottom: 5px;
	width: 99%;
	border-radius: 20px;
	margin-bottom: 5px;
}

.settings-menu h2 {
	font-size: clamp(1.2rem, 1.5vw + 0.8rem, 1.6rem); /* Heading in settings */
}

.settings-menu label, .settings-menu input, .settings-menu select {
	font-size: clamp(1rem, 1vw + 0.6rem, 1.2rem); /* Labels, inputs, and dropdowns */
}

.setting-wrapper p {
	/* font-size: 15px; */
}

#settings-menu select {
	padding: 5px;
	border-radius: 5px;
	border: 0;
	margin-top: 4px;
	margin-bottom: 6px;
	cursor: pointer;
	/* Dark colors */
	appearence: none;
	background-color: #333;
	color: #f5f5f5;
	border: 1px solid #555;
}

#settings-menu label {
}

label[for=language-select] {
	margin-bottom: 10px;
}

#language-select {
	font-family: 'Montserrat', sans-serif;
}

#settings-menu input[type="checkbox"] {
	margin-top: 10px;
	width: 15px;
	height: 15px;
	/* Dark colors */
	appearence: none;
	background-color: #333;
	border: 1px solid #555;
}

label[for=advanced-mode-toggle] {
	margin-bottom: 0;
	cursor: pointer;
}

#advanced-desc,#timer-desc {
	font-size: 13px;
	margin-bottom: 7px;
}

.thumb-up-icon {
	position: absolute;
	bottom: 5%;
	left: 50%;
	transform: translateX(-50%);
	font-size: 120px;
	color: white;
	text-shadow: 2px 2px 5px rgba(0, 0, 0, 1.0); /* Shadow with blur */
	z-index: 20;
	opacity: 0;
	transition: opacity 0.5s ease;
}

.flash-icon {
	opacity: 0.9;
}

#time {
	font-family: "Share Tech Mono", monospace;
	font-size: 20px;
	position: absolute;
	top: 9px;
	left: 13px;
	background-color: rgba(0, 0, 0, 0.7); /* Transparent black background */
	padding: 8px;
	border-radius: 5px;
	z-index: 10;
}
