html,
body {
	-webkit-touch-callout: none; /* iOS Safari */
	-webkit-user-select: none; /* Safari */
	-khtml-user-select: none; /* Konqueror HTML */
	-moz-user-select: none; /* Old versions of Firefox */
	-ms-user-select: none; /* Internet Explorer/Edge */
	user-select: none; /* Non-prefixed version, currently
                                    supported by Chrome, Edge, Opera and Firefox */
	-o-user-select: none;
	-webkit-user-drag: none;
}

body {
	margin: 0;
	background-color: lightblue;
	font-family: Arial, Tahoma, Geneva, sans-serif;
	color: rgb(39, 19, 0);
	font-size: 16px;
	font-weight: 400;
	font-style: normal;
}

.wrapper {
	width: 100%;
	height: 100%;
	box-sizing: border-box;
}

/* #question-screen::before {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 50px;
	outline: 1px solid red;
	z-index: 100;
} */

.screen {
	background-color: rgba(255, 255, 255, 0.5);
	margin: 0.95rem auto;
	padding: 0.95rem;
	width: calc(100vw - 1.9rem);
	height: calc(100vh - 1.9rem);
	box-sizing: border-box;
}

#answer-set,
#category-set,
#question, #thankyou-screen-buttons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

button {
	background-color: rgba(208, 221, 26, 0.836);
	border: none;
	outline: none;
	border-radius: 1.19rem;
	box-shadow: 0.19rem 0.19rem 0.44rem black;
	font-weight: bold;
	display: block;
	margin: 0.5rem auto;
	min-height: 2rem;
	width: 100%;
	padding: 0.8rem 0.8rem;
	cursor: pointer;
	font-size: clamp(0.83rem, 5.5vw, 1.8rem);
	font-family: Arial, Tahoma, Geneva, sans-serif;
}

.our-games-btn {
	background-color: #6eb4d1 !important;
	color: #fff;	
}

.next-test-btn {
	background-color: #34c924;    
	color: #fff;	
}

#question,
#category-screen {
	font-size: clamp(1rem, 6vw, 2rem);
}

#question {
	margin: 10px 0;
}

#thankyou-screen h2,
#thankyou-screen h3 {
	font-size: clamp(1rem, 6vw, 2rem);
}

.start-btn {
	display: block;
	margin: auto;
}

.highlight {
	background-color: green;
	color: white;
}

canvas {
	min-width: 100%;
	min-height: 100%;
	position: absolute;
	top: 0;
	z-index: -1;
}

#feedback {
	font-weight: bold;
}

.start-btn,
#feedback {
	margin: 1rem auto;
}

#questionBar {
	text-align: right;
	margin-top: 0.8rem;
	font-size: 1.3rem;
}

#top-layer {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2rem;
	background-color: black;
	color: white;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

div.start-top,
div.rating-btn,
div.info-btn {
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	color: white;
	width: 2rem;
	height: 2rem;
}

div.rating-btn {
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
}

div.start-top {
	margin-left: 1rem;
	margin-top: 0;
	margin-bottom: 0;
}

div.info-btn {
	margin-right: 1rem;
	margin-top: 0.5rem;
}

.info-popup,
.rating-popup {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-color: #fef9db !important;
    color: #181a77 !important;
	padding: 1rem;
	border: 1px solid black;
	border-radius: 0.5rem;
	z-index: 1000;
	max-height: 90%; /* максимальная высота 90% от экрана */
	overflow-y: auto; /* прокрутка, если контент не умещается */
	width: 80%; /* ширина окна 80% от экрана */
	text-align: left;
	font-size: clamp(0.63rem, 6vw, 1rem);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.close-popup {
	position: absolute;
	top: 0.5rem;
	right: 0.5rem;
	cursor: pointer;
	width: 2rem;
	height: 2rem;
}

#welcome-screen h1 {
	font-size: clamp(1rem, 6vw, 2rem);
}

#welcome-screen h2,
#category-screen h2,
#question-screen h2,
#thankyou-screen h2,
#thankyou-screen h3 {
	font-size: clamp(0.8rem, 6vw, 1.5rem);
}

#welcome-screen p,
#feedback {
	font-size: clamp(0.63rem, 6vw, 1rem);
}

#adImage, #iapImage {
	position: absolute;
	right: 2rem;
	width: 8em;
	height: 8em;
	margin: 1rem 5rem 0 0;
	cursor: pointer;
}

.crossed-out {
	text-decoration: line-through;
}

.our-games-link
{
	text-decoration: none;
}

.rating-txt
{
	color: #721c24;
}

.rating-pos-popup
{
	text-align: left;
}

/* Медиа запрос для мобильных устройств */
@media only screen and (max-width: 768px) {
	.info-popup,
	.rating-popup {
		width: 95%; /* увеличиваем ширину окна на мобильных устройствах */
	}

	#adImage, #iapImage {
		width: 6em;
		height: 6em;
		margin: 0rem 0rem 0 0;
		cursor: pointer;
	}
}

@media (min-width: 1600px) {
	#welcome-screen p {
		font-size: 20px;
	}
}

@media (min-width: 1350px) and (min-height: 800px) {
	#welcome-screen h2,
	#welcome-screen h1,
	#adv-screen h2,
	#thankyou-screen h2,
	#thankyou-screen h3,
	#category-screen h2,
	#question-screen h2,
	#question {
		font-size: 40px;
	}
	#welcome-screen p {
		font-size: 30px;
	}
	#questionBar {
		font-size: 25px;
	}

	.answer-btn, .next-test-btn, .our-games-btn {
		font-size: 40px;
	}

	#top-layer {
		height: 4rem;
	}

	#top-layer div {
		font-size: 40px;
		width: 4rem;
		height: 4rem;
	}

	.screen {
		margin-top: 2rem;
		padding-top: 2rem;
		height: calc(100vh - 4rem);
	}

	.info-popup {
		font-size: 22px;
	}
}

/* Медиа запрос для устройств с большим разрешением */
@media screen and (min-width: 1200px) and (min-height: 2000px) /*and (orientation: landscape) */ {
	#welcome-screen h1 {
		font-size: clamp(3.5rem, 15vw, 7.5rem);
	}

	#welcome-screen h2,
	#adv-screen h2,
	#thankyou-screen h2,
	#thankyou-screen h3,
	#category-screen h2,
	#question-screen h2,
	#question {
		font-size: clamp(3rem, 12vw, 6.5rem);
	}

	#welcome-screen p,
	#questionBar {
		font-size: clamp(2.5rem, 10vw, 5.5rem);
	}

	button,
	.answer-btn, .next-test-btn, .our-games-btn {
		margin: 1.5rem auto;
		min-height: 6rem;
		padding: 2rem 2rem;
		font-size: clamp(3rem, 12vw, 6.5rem);
		border-radius: 2.19rem;
		box-shadow: 0.59rem 0.59rem 0.84rem black;
	}

	#questionBar {
		margin-top: 4rem;
	}

	#top-layer {
		height: 8rem;
	}

	#top-layer div {
		font-size: 5rem;
		width: 8rem;
		height: 8rem;
	}

	#adImage, #iapImage {
		width: 16rem;
		height: 16rem;
	}
}

/* Медиа запрос для устройств с большим разрешением */
@media screen and (min-width: 1200px) and (min-height: 1000px) and (max-height: 2000px) /*and (orientation: landscape) */ {
	#welcome-screen h1 {
		font-size: clamp(2.5rem, 12vw, 5.5rem);
	}

	#welcome-screen h2,
	#adv-screen h2,
	#thankyou-screen h2,
	#thankyou-screen h3,
	#category-screen h2,
	#question-screen h2,
	#question {
		font-size: clamp(2rem, 10vw, 3.3rem);
	}

	#welcome-screen p,
	#questionBar,
	#feedback {
		font-size: clamp(1.5rem, 8vw, 2.5rem);
	}

	button,
	.answer-btn, .next-test-btn, .our-games-btn {
		margin: 1rem auto;
		min-height: 4rem;
		padding: 1rem 1rem;
		font-size: clamp(2rem, 10vw, 2.8rem);
		border-radius: 2.19rem;
		box-shadow: 0.59rem 0.59rem 0.84rem black;
	}

	#questionBar {
		margin-top: 1.5em;
	}

	#top-layer {
		height: 4rem;
	}

	div.start-top,
	div.rating-btn,
	div.info-btn {
		font-size: 3rem;
		width: 4rem;
		height: 4rem;
	}

	#adImage, #iapImage {
		width: 8em;
		height: 8em;
	}

	#question {
		margin: 10px 0;
	}
}

/* Медиа запрос для устройств с большим разрешением */
@media screen and (min-width: 1000px) and (max-width: 1199px) and (min-height: 2000px) /*and (orientation: landscape) */ {
	#welcome-screen h1 {
		font-size: clamp(2.5rem, 12vw, 5.5rem);
	}

	#welcome-screen h2,
	#adv-screen h2,
	#thankyou-screen h2,
	#thankyou-screen h3,
	#category-screen h2,
	#question {
		font-size: clamp(2rem, 10vw, 4.5rem);
	}

	#welcome-screen p,
	#questionBar,
	#feedback {
		font-size: clamp(1.5rem, 8vw, 2.5rem);
	}

	button {
		margin: 1.5rem auto;
		min-height: 4rem;
		padding: 1rem 1rem;
		font-size: clamp(2rem, 10vw, 3rem);
		border-radius: 2.19rem;
		box-shadow: 0.59rem 0.59rem 0.84rem black;
	}

	#questionBar {
		margin-top: 2rem;
	}

	#top-layer {
		height: 4rem;
	}

	div.start-top,
	div.rating-btn,
	div.info-btn {
		font-size: 3rem;
		width: 4rem;
		height: 4rem;
	}

	#adImage, #iapImage {
		width: 8em;
		height: 8em;
	}
}

/* Медиа запрос для iphone3G */
@media only screen and (max-height: 600px) /*and (orientation: portrait) */ {
	button {
		margin: 0.33rem auto;
		min-height: 1rem;
		padding: 0.2rem 0.2rem;
		font-size: clamp(0.63rem, 10vw, 1.5rem);
	}

	#adImage, #iapImage {
		width: clamp(5em, 20vw, 7em);
		height: clamp(5em, 20vw, 7em);
		margin: 0;
	}
}

@media screen and (max-width: 430px) and (max-height: 550px) {
	.answer-btn, .next-test-btn, .our-games-btn {
		font-size: 16px;
	}

	#questionBar {
		margin: 5px 0px 0px 0px;
	}

	#question {
		margin: 10px 0;
		font-size: 17px !important;
	}

	#adImage, #iapImage {
		width: 60px;
		height: 60px;
	}
}

@media only screen and (max-height: 500px) {
	#answer-set, #thankyou-screen-buttons {
		display: grid;
		grid-template-columns: 1fr 1fr;
		column-gap: 10px;
	}

	.answer-btn, .next-test-btn, .our-games-btn {
		font-size: 17px;
	}

	#welcome-screen h2,
	#category-screen h2,
	#question-screen h2,
	#thankyou-screen h2,
	#thankyou-screen h3 {
		font-size: 20px;
	}

	#adImage, #iapImage {
		width: 4rem;
		height: 4rem;
	}
}

@media screen and (max-width: 600px) and (max-height: 370px) {
	#question {
		margin: 5px 0;
	}

	#questionBar {
		margin-top: 10px;
	}

	#welcome-screen h2,
	#category-screen h2,
	#question-screen h2,
	#thankyou-screen h2,
	#thankyou-screen h3 {
		font-size: 16px;
	}

	.answer-btn, .next-test-btn, .our-games-btn{
		font-size: 16px;
	}
}

@media (max-width: 1200px) and (min-height: 1150px) {
	#welcome-screen h2,
	#category-screen h2,
	#question-screen h2,
	#thankyou-screen h2,
	#thankyou-screen h3 {
		font-size: 50px;
	}

	.answer-btn, .next-test-btn, .our-games-btn {
		font-size: 50px;
	}

	#top-layer {
		height: 4rem;
	}

	#top-layer div {
		font-size: 3rem;
		width: 4rem;
		height: 4rem;
	}

	.screen {
		margin: 2rem auto;
		padding: 2rem;
		width: calc(100vw - 4rem);
		height: calc(100vh - 4rem);
	}

	#questionBar {
		font-size: 40px;
	}
}

h1,
h2,
h3,
h4,
p,
#feedback,
div {
	text-align: center;
}

#question-screen h2, #thankyou-screen h2, #thankyou-screen h3 {    
    background-color: #fef9db !important;
    color: #181a77 !important;
}

.fifty-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #fef9db !important;
    color: #181a77 !important;
    padding: 1rem;
    border: 1px solid black;
    border-radius: 0.5rem;
    z-index: 1001;
    max-width: 90vw;
    box-shadow: 0.59rem 0.59rem 0.84rem black;
    font-size: clamp(0.63rem, 6vw, 1rem);
}
.fifty-popup .close-popup {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    color: #d12a2a;
    font-size: 1.5rem;
    font-weight: bold;
}
.fifty-popup .popup-buttons {
    display: flex;
    justify-content: center;
    gap: 1.2rem;
    margin-top: 1.5rem;
}
.fifty-popup button {
    padding: 0.6rem 1.5rem;
    border-radius: 1.2rem;
    border: none;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
}