@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	height: 100%;
	overflow: hidden;
}

body {
	height: 100vh;
	width: 100%;
	min-height: 100%;
	background-image: url('images/start-background.png');
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: center;
}

body.game-started {
	background-image: url('images/game-background.png');
}

header {
	width: 100%;
	padding: 20px 10px 10px 10px;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}

.first-layer {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.logo-header {
	width: 100px;
}

.header-buttons {
	display: flex;
	gap: 12px;
}

.login-button {
	height: 37px;
	width: 106px;
	border-radius: 7px;
	border: 1px solid #252024;
	background-color: #000000;
	color: #FFFFFF;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 17px;
	text-align: center;
	text-transform: uppercase;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.register-button {
	height: 37px;
	width: 138px;
	border: none;
	border-radius: 7px;
	background-color: #E5253A;
	color: #FFFFFF;
	font-family: 'Inter', sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 17px;
	text-align: center;
	text-transform: uppercase;
}

.logo {
	width: 10vh;
}

main {
	width: 100%;
	flex: 1;
}

.start-container {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
}

.timer {
	font-family: 'Montserrat', sans-serif;
	font-size: 23px;
	font-weight: 500;
	text-align: center;
	color: #FFFFFF;
}

.timer-value {
	color: #FF9500;
}

.ipl-logo {
	margin-top: 10px;
	width: 37vh;
}

.ipl-text {
	font-family: 'Montserrat', sans-serif;
	font-size: 18px;
	font-weight: 700;
	text-transform: uppercase;
	font-style: italic;
	text-align: center;
	color: #FFFFFF;
}

.top-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.start-button {
	width: 358px;
	height: 83px;
	border-radius: 18px;
	border: none;
	background: linear-gradient(to bottom, #FC8004 0%, #FD5104 100%);
	color: #FFFFFF;
	font-family: 'Bebas Neue', sans-serif;
	font-size: 48px;
	font-weight: 400;
	text-align: center;
}

.game-container {
	display: none;
	width: 100%;
	height: 100%;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	text-align: center;
}

body.game-started .game-container {
	display: flex;
}

body.game-started .start-container {
	display: none;
}

.procent-bar {
	position: relative;
	width: 355px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 30px;
	background-color: #4A3D2D;
	border: 3px solid #FC7504;
	font-family: 'Montserrat', sans-serif;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	color: #FFFFFF;
	overflow: hidden;
}

.procent-bar__track {
	position: absolute;
	inset: 0;
	border-radius: 24px;
	overflow: hidden;
}

.procent-bar__fill {
	height: 100%;
	width: 0%;
	background: #FC7504;
	border-radius: 24px;
	will-change: width;
}

.procent-bar__label {
	position: relative;
	z-index: 1;
	text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

.game-hud {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

.game-container .game-hud .logo-game-hud {
	display: none;
}

.logo-game-hud {
	width: 10vh;
	max-width: 120px;
	height: auto;
	margin-bottom: 4px;
	pointer-events: none;
	user-select: none;
}

.congrats-modal .game-hud .logo-game-hud {
	display: block;
}

.ipl-text-game {
	margin-top: 10px;
	font-family: 'Montserrat', sans-serif;
	font-size: 25px;
	font-weight: 700;
	text-transform: uppercase;
	font-style: italic;
	text-align: center;
	color: #FFFFFF;
	z-index: 10;
}

.ipl-text-game--congrats {
	font-style: normal;
	letter-spacing: 0.06em;
}

.cricket-container {
	flex: 1;
	min-height: 0;
	width: 100%;
	position: relative;
}

.ready-image {
	position: absolute;
	height: 50vh;
	bottom: 2vh;
	left: 50%;
	transform: translateX(-50%);
	pointer-events: none;
	user-select: none;
}

/* Кадр start.png: чуть меньше и ниже, чем ready.png */
.ready-image.ready-image--start {
	height: 43vh;
	bottom: 1vh;
}

.animated-image {
	position: absolute;
	height: 50vh;
	bottom: 2vh;
	left: 50%;
	transform: translateX(-55%);
	pointer-events: none;
	user-select: none;
}

.ball-image {
	position: absolute;
	height: 11vh;
	bottom: 24vh;
	left: 50%;
	transform: translateX(-30.5vh) rotate(-80deg);
	pointer-events: none;
	user-select: none;
	will-change: left, top, transform;
	z-index: 1;
}

.ball-image.is-flying {
	filter: none;
}

.ball-image.ball-hidden {
	visibility: hidden;
	opacity: 0;
}

.red-icon.aim-hidden {
	visibility: hidden;
	opacity: 0;
}

.red-icon {
	position: absolute;
	width: 9vh;
	height: 9vh;
	left: 50%;
	top: 35%;
	transform: translate(-50%, -50%);
	pointer-events: none;
	user-select: none;
	z-index: 4;
	will-change: left, top;
	transition: none;
	box-sizing: border-box;
	object-fit: contain;
	border-radius: 50%;
}

.game-button {
	width: 358px;
	height: 83px;
	border-radius: 18px;
	border: none;
	background: linear-gradient(to bottom, #FC8004 0%, #FD5104 100%);
	color: #FFFFFF;
	font-family: 'Bebas Neue', sans-serif;
	font-size: 48px;
	font-weight: 400;
	text-align: center;
}

.start-button {
	width: 358px;
	height: 83px;
	border-radius: 18px;
	border: none;
	background: linear-gradient(to bottom, #FC8004 0%, #FD5104 100%);
	color: #FFFFFF;
	font-family: 'Bebas Neue', sans-serif;
	font-size: 48px;
	font-weight: 400;
	text-align: center;
}

footer {
	width: 100%;
	padding: 10px 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.players {
	color: #FFFFFF;
	font-family: 'Montserrat', sans-serif;
	font-size: 18px;
	font-weight: 400;
	text-align: center;
}

.reviews-container {
	width: 100%;
	padding: 5px 0;
	background-color: #000000;
	overflow: hidden;
	border-top: 1px solid #FFFFFF;
	border-bottom: 1px solid #FFFFFF;
}

.reviews-track {
	display: flex;
	width: max-content;
	flex-shrink: 0;
	will-change: transform;
}

.reviews-track.reviews-track--ready {
	animation: reviews-scroll 16s linear infinite;
}

@keyframes reviews-scroll {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-993px);
	}
}

.reviews {
	width: 993px;
	height: 31px;
	max-width: none;
	flex-shrink: 0;
	display: block;
	object-fit: contain;
}

.congrats-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.congrats-modal[hidden] {
	display: none;
}

.congrats-modal__backdrop {
	position: absolute;
	inset: 0;
	z-index: 0;
	background: rgba(10, 87, 25, 0.25);
	backdrop-filter: blur(10px);
}

.confetti {
	height: 120vh;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 1;
	pointer-events: none;
}

.congrats-modal .game-hud.game-hud--modal {
	z-index: 5;
	width: min(100%, 480px);
	max-width: min(100vw, 480px);
	padding: 0 12px;
	box-sizing: border-box;
	pointer-events: none;
}

.congrats-modal__content {
	position: relative;
	z-index: 2;
	max-width: 360px;
	width: 100%;
	height: 234px;
	margin-top: 12vh;
	padding: 28px 24px;
	border-radius: 18px;
	background: linear-gradient(to bottom, rgb(10, 87, 25) 0%, #1a1510 100%);
	border: 1.67px solid rgb(19, 168, 54);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
	text-align: center;
}

.congratulations-icon {
	margin-top: -120px;
	margin-left: 20px;
}

.congrats-modal__title {
	font-family: 'Bebas Neue', sans-serif;
	font-size: 54px;
	font-weight: 400;
	color: #ffffff;
	line-height: 1;
}

.timer2 {
	margin-top: 10px;
	font-family: 'Montserrat', sans-serif;
	font-size: 14px;
	font-weight: 500;
	text-align: center;
	color: #FFFFFF;
}

.congrats-modal__get-bonus {
	width: 247px;
	height: 58px;
	margin-top: 10px;
	border: none;
	border-radius: 12.5px;
	background: linear-gradient(to bottom, #69C73E 0%, #13A836 100%);
	color: #ffffff;
	font-family: 'Bebas Neue', sans-serif;
	font-size: 33px;
	line-height: 1;
	text-align: center;
	text-transform: uppercase;
	cursor: pointer;
}

.congrats-modal__get-bonus:hover {
	filter: brightness(1.05);
}

/* @media (max-height: 900px) {
	.ready-image {
		height: 45vh;
	}

	.congrats-modal {
		justify-content: center;
		padding-top: 48px;
		box-sizing: border-box;
	}

	.congrats-modal__content {
		transform: translateY(16px);
	}
}

@media (max-height: 800px) {
	.ready-image {
		height: 43vh;
	}
} */

/* @media (min-height: 1045px) {
	.ball-image {
		top: 27.5vh;
	}
}

@media (min-height: 1220px) {
	.ball-image {
		top: 31vh;
	}
} */

@media (max-width: 440px) {
	.ready-image {
		height: 40vh;
	}
	.animated-image {
		height: 40vh;
	}
	.ball-image {
		height: 8.5vh;
		bottom: 20vh;
		transform: translateX(-24.5vh) rotate(-80deg);
	}
	.red-icon {
		width: 7vh;
		height: 7vh;
	}
	.ready-image.ready-image--start {
		height: 35vh;
		bottom: 1vh;
	}
}

@media (max-height: 680px) {
	.logo-header {
		width: 80px;
	}

		.login-button {
			height: 30px;
			width: 90px;
			font-size: 12px;
			gap: 6px;
		}

		.register-button {
			height: 30px;
			width: 110px;
			font-size: 12px;
		}

		.timer {
			transform: scale(0.8);
		}
		
		.logo {
			width: 50px;
		}

		.ipl-logo {
			width: 200px;
		}

		.ipl-text {
			font-size: 16px;
		}

		.start-button {
			width: 286px;
			height: 66px;
			font-size: 38px;
			border-radius: 12px;
		}

		.players {
			font-size: 16px;
		}

		.procent-bar {
			transform: scale(0.8);
		}

		.ipl-text-game {
			font-size: 20px;
		}
		.game-button {
			width: 286px;
			height: 66px;
			font-size: 38px;
			border-radius: 12px;
		}

		.congratulations-icon {
			width: 120px;
		}

		.congrats-modal__content {
			height: 200px;
			margin-top: 16vh;
			padding: 20px 16px;
			border-radius: 16px;
		}

		.congrats-modal__title {
			font-size: 44px;
		}

		.congrats-modal__get-bonus {
			width: 220px;
			height: 44px;
			font-size: 28px;
			border-radius: 10px;
		}
}