/** @format */

@font-face {
	font-family: 'Futura PT';
	src: url('./fonts/FuturaCyrillicBook.ttf?v=v0.3') format('truetype');
	font-style: normal;
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: 'Futura PT';
	src: url('./fonts/FuturaCyrillicMedium.ttf?v=v0.3') format('truetype');
	font-style: normal;
	font-weight: 450;
	font-display: swap;
}

@font-face {
	font-family: 'Futura PT';
	src: url('./fonts/FuturaCyrillicDemi.ttf?v=v0.3') format('truetype');
	font-style: normal;
	font-weight: 500;
	font-display: swap;
}

@font-face {
	font-family: 'Futura PT';
	src: url('./fonts/FuturaCyrillicBold.ttf?v=v0.3') format('truetype');
	font-style: normal;
	font-weight: 700;
	font-display: swap;
}

@font-face {
	font-family: 'CA Metro New';
	src: url('./fonts/CAMetro-New-Bold.otf?v=v0.3') format('opentype');
	font-style: normal;
	font-weight: 700;
	font-display: swap;
}

:root {
	--SHADOW-BOX: 0px 0px 0px 0px rgba(34, 60, 80, 0.2);
	--HEIGHT-LOADBAR: 27px;
	--FONT-FAMILY: 'Futura PT', Arial, Helvetica, sans-serif;
	--SCREEN-BACKGROUND-COLOR: #00499a;
	--SCREEN-BACKGROUND: url('./img/background.png?v=v0.3');
}
canvas:focus {
	outline: none;
}

html,
body {
	padding: 0;
	margin: 0;
	overflow: hidden;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
	height: 100%;
	background-color: var(--SCREEN-BACKGROUND-COLOR);
	font-family: var(--FONT-FAMILY);
	font-synthesis: none;
}

#unity-container {
	position: fixed;
	width: 100%;
	height: 100%;
	/* Во время игры фон-картинка не нужна — по бокам от игрового поля только синий фон */
	background-color: var(--SCREEN-BACKGROUND-COLOR);
}

#unity-canvas {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 100%;
	height: 100%;
	-webkit-box-shadow: var(--SHADOW-BOX);
	-moz-box-shadow: var(--SHADOW-BOX);
	box-shadow: var(--SHADOW-BOX);
}
/* Экран загрузки */
#unity-loading-bar {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	min-height: 100vh;
	min-height: 100svh;
	background-color: var(--SCREEN-BACKGROUND-COLOR);
	overflow: hidden;
}

/* Фон лоадера: портретная картинка тянется по высоте, по бокам — синий фон.
   Небольшой запас по высоте (108%) срезает зашитую в картинку рамку сверху/снизу. */
#unity-loading-bar::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image: var(--SCREEN-BACKGROUND);
	background-position: center;
	background-repeat: no-repeat;
	background-size: auto 108%;
	z-index: 0;
}

#unity-loader-footer {
	position: absolute;
	left: 50%;
	bottom: calc(clamp(28px, 6vh, 64px) + env(safe-area-inset-bottom));
	transform: translateX(-50%);
	display: flex;
	flex-direction: column;
	align-items: center;
	width: min(316px, calc(100vw - 44px));
	box-sizing: border-box;
	z-index: 3;
}

#unity-loader-text {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	margin-top: 8px;
}

#unity-loader-text p {
	width: 100%;
	margin: 0;
	font-family: 'CA Metro New', var(--FONT-FAMILY);
	font-size: 16px;
	font-weight: 700;
	line-height: 22px;
	letter-spacing: 0;
	color: #ffffff;
}

/* Контейнер полосы загрузки (дорожка) */
.loading-container {
	position: relative;
	width: 100%;
	height: 24px;
	box-sizing: border-box;
	border: 4px solid #ffffff;
	border-radius: 12px;
	background: #dcd9df;
	overflow: hidden;
	box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25);
}

/* Полоса прогресса */
.loading-bar {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	width: 0;
	max-width: 100%;
	background: linear-gradient(180deg, #51f523 3.47%, #219900 160.67%);
	box-shadow:
		inset 0 3px 1px rgba(255, 255, 255, 0.25),
		inset 0 -3px 1px rgba(0, 0, 0, 0.25);
	border-radius: 8px;
	transition: width 0.3s ease;
	z-index: 1;
}

.overlay {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	background-color: var(--SCREEN-BACKGROUND-COLOR);
	background-image: var(--SCREEN-BACKGROUND);
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	z-index: 9999;
	display: none;
	overflow: hidden;
}

.rotation-dialog {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(50vw, 435px);
	min-width: 330px;
	padding: 36px 24px 37px;
	background: #ffe7b5;
	border-radius: 49px;
	text-align: center;
	box-sizing: border-box;
	box-shadow:
		0 7px 0 #d4a84d,
		0 15px 26px rgba(0, 88, 49, 0.16);
}

.rotation-dialog::before {
	content: '';
	position: absolute;
	inset: 17px 17px 22px;
	border-radius: 43px;
	background: rgba(255, 243, 212, 0.86);
	pointer-events: none;
}

.rotation-title,
.rotation-icon {
	position: relative;
	z-index: 1;
}

.rotation-title {
	margin: 0 0 18px;
	color: #645555;
	font-family: var(--FONT-FAMILY);
	font-size: 16px;
	font-weight: 500;
	line-height: 16px;
	letter-spacing: 0;
}

.rotation-icon {
	display: block;
	width: 48px;
	height: 48px;
	margin: 0 auto;
}

p {
	color: white;
}

@media screen and (max-width: 1024px) and (orientation: landscape) {
	.overlay {
		display: block;
	}
}

@media screen and (max-width: 700px) and (orientation: landscape) {
	.rotation-dialog {
		width: min(64vw, 435px);
		min-width: 300px;
		padding: 30px 20px 31px;
		border-radius: 42px;
	}

	.rotation-dialog::before {
		inset: 15px 15px 19px;
		border-radius: 36px;
	}

	.rotation-title {
		margin-bottom: 14px;
	}

	.rotation-icon {
		width: 42px;
		height: 42px;
	}
}

input,
textarea {
	caret-color: transparent;
	-webkit-user-select: none;
}
