/* BIT ALIVE - components.css */
#loading_screen {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: var(--bg_dark);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	transition: opacity 0.5s;
}

#loading_text {
	color: var(--accent);
	font-size: 1.5rem;
	margin-bottom: 20px;
	text-transform: uppercase;
	letter-spacing: 3px;
}

.loading-bar-container {
	width: 300px;
	height: 20px;
	border: 2px solid var(--accent);
	border-radius: 10px;
	overflow: hidden;
	background: #111;
}

#loading_bar_fill {
	width: 0%;
	height: 100%;
	background: var(--accent);
	transition: width 0.1s;
}

#levelup_screen {
	background-color: rgba(0, 0, 0, 0.9);
	background-image: url(../hud/bg_up_screen.png);
	backdrop-filter: blur(5px);
	background-size: 100% 100%;
	background-repeat: no-repeat;

	#upd_coins {
		position: absolute;
		top: 20px;
		right: 20px;
		font-size: 1.2rem;
		color: #ffd700;
		z-index: 100;
		text-shadow: 0 0 10px #000;
	}

	#upd_coins img {
		margin: 5px 0 -3px 7px;
		width: 20px;
	}

	/* Titulo */
	.levelup_title {
		width: 350px;
		height: 96px;
		background-image: url(../hud/title_up_screen.png);
		background-size: contain;
		background-repeat: no-repeat;
	}

	.cards-container {
		display: flex;
		gap: 40px;
		margin-top: 40px;

		.upgrade-card {
			width: 220px;
			height: 370px;
			padding: 20px;
			display: flex;
			flex-direction: column;
			align-items: center;
			cursor: pointer;
			position: relative;
			transition: 0.3s;
			filter: saturate(0.8);
			background-image: url(../hud/bg_up_screen_box.png);
			background-size: contain;
			background-position: center;
			background-repeat: no-repeat;

			&:hover,
			&.gp-focus {
				filter: saturate(1.5) drop-shadow(0px 0px 8px #fceba2) !important;
				z-index: 10;
				transform: scale(1.05);
			}

			&:hover .icon,
			&.gp-focus .icon {
				transform: scale(1.1);
				filter: drop-shadow(0px 0px 14px #4ab3e4);
				color: #4ab3e4;
			}

			.icon {
				font-size: 5rem;
				margin: 55px 0 36px 0;
				filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
			}

			.title {
				color: #c39c23;
				font-weight: 900;
				font-size: 1.2rem;
				text-transform: uppercase;
				text-align: center;
				letter-spacing: 1px;
				z-index: 1;
				margin: 0 0 30px 0;
				filter: drop-shadow(1px 1px 2px #000)
			}

			.desc {
				width: 160px;
				color: #aaa;
				text-align: center;
				font-size: 0.9rem;
			}
		}
	}

	&.chest_wood {
		background-image: url(../hud/bg_chest_wood.png);

		.levelup_title {
			background-image: url(../hud/title_chest_wood.png);
		}

		.upgrade-card {
			background-image: url(../hud/bg_chest_wood_box.png);
		}
	}

	&.chest_iron {
		background-image: url(../hud/bg_chest_iron.png);

		.levelup_title {
			background-image: url(../hud/title_chest_iron.png);
		}

		.upgrade-card {
			background-image: url(../hud/bg_chest_iron_box.png);
		}
	}

	&.chest_gold {
		background-image: url(../hud/bg_chest_gold.png);

		.levelup_title {
			background-image: url(../hud/title_chest_gold.png);
		}

		.upgrade-card {
			background-image: url(../hud/bg_chest_gold_box.png);

			.title {
				color: #fff;
			}
		}
	}

	&.chest_crystal {
		background-image: url(../hud/bg_chest_crystal.png);

		.levelup_title {
			background-image: url(../hud/title_chest_crystal.png);
		}

		.upgrade-card {
			background-image: url(../hud/bg_chest_crystal_box.png);

			.title {
				color: #fff;
			}
		}
	}

	&.chest_omega {
		background-image: url(../hud/bg_chest_omega.png);

		.levelup_title {
			background-image: url(../hud/title_chest_omega.png);
		}

		.upgrade-card {
			background-image: url(../hud/bg_chest_omega_box.png);
		}
	}
}

.update_list {
	margin: 50px 0 -40px 0;
	background-image: url(../hud/bt);
	cursor: pointer;
	transition: transform 0.2s;
	user-select: none;
}

.update_list:hover,
.update_list.gp-focus {
	transform: scale(1.05);
	filter: drop-shadow(0px 0px 8px #ffd700) !important;
}

.update_list span {
	color: #ffd700;
}

.dmg-popup {
	position: absolute;
	font-family: "Impact", sans-serif;
	font-size: 2.5rem;
	color: #fff;
	-webkit-text-stroke: 1.5px #000;
	text-shadow: 3px 3px 0 #000;
	pointer-events: none;
	animation: popUp 0.6s cubic-bezier(0.19, 1, 0.22, 1) forwards;
	z-index: 100;
}

@keyframes popUp {
	0% {
		transform: scale(0.5) translateY(0) rotate(-10deg);
		opacity: 0;
	}

	30% {
		transform: scale(1.5) translateY(-40px) rotate(0deg);
		opacity: 1;
	}

	100% {
		transform: scale(1) translateY(-80px) rotate(10deg);
		opacity: 0;
	}
}

#white_flash {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: white;
	opacity: 0;
	pointer-events: none;
	z-index: 15;
	mix-blend-mode: overlay;
}

.info-modal-screen {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.95);
	z-index: 50;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s;

	&.active {
		opacity: 1;
		pointer-events: auto;
	}

	.modal-box {
		background: #151515;
		border: 2px solid var(--accent);
		padding: 40px;
		max-width: 600px;
		text-align: center;
		border-radius: 12px;
		overflow-y: auto;
		max-height: 80vh;

		h1 {
			font-size: 3rem;
			margin-bottom: 10px;
			color: var(--accent);
		}

		h2 {
			color: var(--accent);
			margin-bottom: 20px;
			font-size: 2rem;
		}

		p {
			color: #ccc;
			margin-bottom: 15px;
			line-height: 1.6;
			font-size: 1.1rem;
		}

		a {
			color: var(--accent);
			text-decoration: none;

			&:hover {
				text-decoration: underline;
			}
		}

		button.close-btn {
			margin-top: 20px;
			background: var(--accent);
			border: none;
			padding: 10px 30px;
			font-size: 1.2rem;
			cursor: pointer;
			border-radius: 5px;
		}

		.share-btn {
			background: #1da1f2;
			color: white;
			border: none;
			padding: 12px 30px;
			border-radius: 30px;
			cursor: pointer;
			transition: transform 0.2s;
			margin: 20px 0;

			&:hover {
				transform: scale(1.05);
			}
		}

		.copyright {
			margin-top: 30px;
			color: #555;
			font-size: 0.8rem;
		}
	}
}

#uuid,
#nick,
#start_name,
#hero_legendary_selection {
	display: none;
}

#btn_buy_biome {
	display: none;
	margin: 0px 0 26px 0;
	padding: 12px 25px 12px 45px;
	font-size: 0.8rem;
	background-image: url(../hud/bt_buy_map.png);
	background-position: center;
	background-size: 100% 100%;
	color: #ffd700;
	z-index: 10;
	border: 0;
}

.screen .info-btn-row {
	margin-bottom: 20px;
}

.screen .info-btn-row svg {
	vertical-align: middle;
	margin-right: 5px;
}

.victory-title {
	color: #00ff88 !important;
	font-size: 2.5rem !important;
	text-shadow: 0 0 20px #00ff88 !important;
}

#victory_stats {
	color: var(--accent);
	margin-top: 10px;
}

.victory-desc {
	color: #ccc;
	text-align: center;
	max-width: 300px;
	margin-top: 10px;
}

.btn-row {
	margin-top: 20px;
}

.info-modal-screen .modal-box {
	text-align: left;
}

.info-modal-screen .modal-box h1,
.info-modal-screen .modal-box h2 {
	text-align: center;
}

.info-modal-screen .modal-box h3 {
	color: var(--accent);
	margin-top: 20px;
}

.info-list {
	display: flex;
	overflow-x: auto;
	padding: 10px 0;
	margin-bottom: 15px;
	gap: 15px;
	scrollbar-width: thin;
	scrollbar-color: var(--accent) #222;
	-webkit-overflow-scrolling: touch;
}

/* Toasts (Notificações Flutuantes) */
.toast-message {
	position: fixed;
	top: 15%;
	left: 50%;
	transform: translate(-50%, -50%);
	background-image: linear-gradient(135deg, rgba(42, 8, 69, 0.95), rgba(100, 65, 165, 0.95));
	border: 2px solid #ff00ff;
	color: #fff;
	padding: 20px 40px;
	border-radius: 12px;
	font-size: 1.5rem;
	z-index: 999999;
	text-shadow: 0 0 10px #000;
	box-shadow: 0 0 30px rgba(255, 0, 255, 0.8);
	pointer-events: none;
	text-align: center;
	font-family: 'Orbitron', sans-serif;
	opacity: 1;
	transition: all 1s ease;
}

.toast-message.fade-out {
	opacity: 0;
	transform: translate(-50%, -100%);
}

/* Overlays e Modais Genéricos */
.overlay-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 100000;
	display: flex;
	justify-content: center;
	align-items: center;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.modal-close-btn {
	position: absolute;
	top: 20px;
	right: 30px;
	padding: 10px 40px 10px 40px;
	z-index: 10;
	color: #fff;
	background-color: transparent;
	background-image: url(../hud/bt_cancel.png);
	background-size: 100% 100%;
	border: 0;
	cursor: pointer;
}

/* Cards do Game Info (Grimório/Heróis/Armas) */
.info-card {
	display: flex;
	flex: 0 0 auto;
	min-width: 250px;
	background: rgba(0, 0, 0, 0.5);
	border: 1px solid #444;
	border-radius: 8px;
	padding: 10px;
	align-items: center;
	gap: 15px;
}

.info-card-img {
	width: 60px;
	height: 60px;
	background-size: 500% 100%;
	background-position: 0 0;
	background-repeat: no-repeat;
	animation: spriteInfoIdle 0.8s steps(5) infinite;
	filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
	image-rendering: pixelated;
}

@keyframes spriteInfoIdle {
	from {
		background-position: 0px 0px;
	}

	to {
		background-position: -300px 0px;
	}
}

.info-card-img.sm {
	width: 50px;
	height: 50px;
}

.info-card-text {
	font-size: 0.85rem;
	line-height: 1.4;
	color: #ccc;
}

.info-card-title {
	color: var(--accent);
	font-size: 1.1rem;
	text-transform: uppercase;
}

#leaderboard {
	display: none;
	margin-top: 30px;
	background: rgba(0, 0, 0, 0.5);
	padding: 20px;
	border-radius: 10px;
	border: 1px solid #333;
	width: 300px;
}

#leaderboard h3 {
	color: var(--accent);
	margin: 0 0 10px 0;
	text-align: center;
}

#leaderboard .score-row {
	display: flex;
	justify-content: space-between;
	margin-bottom: 5px;
	color: #aaa;
	font-size: 0.9rem;
	border-bottom: 1px solid #222;
	padding-bottom: 2px;
}

#leaderboard .score-row span:last-child {
	color: #fff;
}

#top_socials {
	position: absolute;
	top: 20px;
	width: 100%;
	display: flex;
	justify-content: center;
	z-index: 50;
	pointer-events: auto;
}

#top_socials ul {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	gap: 30px;
}

#top_socials ul li a {
	color: #666;
	font-size: 1.5rem;
	transition: 0.3s;
	display: flex;
	flex-direction: column;
	align-items: center;
}

#top_socials ul li a:hover {
	color: var(--accent);
	transform: translateY(-3px);
}

.weapon-select.upgrade-card-hero-sprite {
	background-size: 500% 100%;
	background-position: left center;
	background-repeat: no-repeat;
	/* aspect-ratio: 394 / 600; */
	height: 170px;
	width: 120px;
	margin: 0px auto -52px auto;
	pointer-events: none;
	animation: auto ease 0s 1 normal none running none;
}

.iframe-container iframe {
	width: 100%;
	height: 100%;
	border: none;
}

.overlay-modal.active {
	display: flex;
}

#leaderboard.active {
	display: block;
}

.slot {
	cursor: pointer;
}

/* Foco Visual para Navegação via Controle e Teclado */
.gp-focus {
	filter: drop-shadow(0px 0px 4px #e8940f) !important;
}

input[type="checkbox"].gp-focus {
	border-radius: 4px;
}

/* Modal de Confirmação de Compra */
.confirm-content {
	width: 90%;
	max-width: 380px;
	background-image: url(../hud/bg_confirm.png);
	background-size: 100% 100%;
	padding: 50px 30px;
	color: #ddd;
	text-align: center;
}

.confirm-title {
	font-size: 1.4rem;
	color: #ffaa00;
	margin-top: 0;
	margin-bottom: 15px;
	letter-spacing: 2px;
}

.confirm-message {
	font-size: 1.05rem;
	margin-bottom: 25px;
	line-height: 1.4;
}

.confirm-btn-row {
	display: flex;
	justify-content: center;
	gap: 20px;
}

.confirm-btn-row .menu-btn {
	padding: 8px 24px;
	font-size: 0.95rem;
	cursor: pointer;
	border-radius: 11px;
	border: 0;
	background-color: transparent;
	transition: all 0.2s ease;
}

.confirm-btn-row .yes-btn {
	background-image: url(../hud/bt_confirm.png);
	background-size: 100% 100%;
	color: #f9f9f9;
}

.confirm-btn-row .yes-btn:hover {
	color: #ffa903;
	box-shadow: 0 0 6px #ffa903;
}

.confirm-btn-row .no-btn {
	background-image: url(../hud/bt_cancel.png);
	background-size: 100% 100%;
	color: #f9f9f9;
}

.confirm-btn-row .no-btn:hover {
	color: #ffa903;
	box-shadow: 0 0 6px #ffa903;
}

.config-close-btn {
	display: block;
	margin: 0px auto;
	padding: 10px 20px;
	color: #fff;
	background-color: transparent;
	background-image: url(../hud/bt_confirm.png);
	background-size: 100% 100%;
	border: 0;
}