/* Filename: styles.css
Created on: Mon Apr 7th, 2025
Created by: mahmedmo */

@font-face {
	font-family: "PokemonClassic";
	src: url("/static/assets/pokemon_classic.ttf") format("truetype");
}

* {
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
}

html {
	transform: scale(1.1);
	transform-origin: top center;
}

html,
body {
	width: 100vw;
	height: 100vh;
	margin: 0;
	padding: 0;
}

body {
	font-family: "PokemonClassic", Arial, sans-serif;
	position: relative;
	overflow-y: auto;
	overflow-x: hidden;
	background-color: #000;
}

#bgVideo {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 10%;
	width: 100vw;
	height: 100vh;
	object-fit: cover;
	z-index: -2;
	pointer-events: none;
}

body::before {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: -1;
	pointer-events: none;
}

input:disabled,
input.disabled-input {
	background-color: #111;
	color: #aaa;
}

input:disabled:hover,
input.disabled-input:hover {
	cursor: not-allowed;
}

.predict-info-container {
	position: relative;
	display: block;
	font-family: "Monsteratt", sans-serif;
	color: #e8e8e8;
	cursor: pointer;
	margin-top: 5px;
	text-align: center;
	margin-right: 10px;
	pointer-events: none;
}

.predict-info-icon {
	vertical-align: middle;
	width: 20px;
	display: inline-block;
	margin-right: 8px;
}

.predict-info-text {
	vertical-align: middle;
	font-size: 0.8rem;
	font-weight: 500;
	color: #bbb;
}

.predict-info-card {
	position: absolute;
	top: 125%;
	left: 50%;
	font-style: italic;
	transform: translateX(-50%);
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 8px;
	padding: 10px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
	white-space: normal;
	text-align: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	z-index: 10001;
	max-width: 400px;
	font-family: "Monsteratt", sans-serif;
	font-size: 0.8rem;
	color: #000;
	margin-left: 10px;
}

.predict-info-card img {
	width: 100%;
	height: auto;
	display: block;
	margin: 0 auto 5px;
}

.predict-info-trigger {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	pointer-events: auto;
}

.predict-info-trigger:hover + .predict-info-card {
	opacity: 1;
	visibility: visible;
}

.prediction-container {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 10000;
}

.prediction-btn {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background-color: #fff;
	background-image: url("/static/assets/fight.png");
	background-position: center;
	background-size: 65%;
	background-repeat: no-repeat;
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: default;
	box-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

.mini-card {
	position: absolute;
	bottom: 110%;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(255, 255, 255, 0.95);
	border: 1px solid #ccc;
	padding: 8px;
	border-radius: 8px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	white-space: nowrap;
	z-index: 10000;
	font-family: "Montserrat", sans-serif;
	font-size: 0.9rem;
	text-align: center;
}

.prediction-container:hover .mini-card {
	opacity: 1;
	visibility: visible;
}

.header-container {
	position: relative;
	text-align: center;
	margin: 40px 0 30px;
	width: 100%;
}

.header-icon {
	position: absolute;
	top: 20%;
	left: 50%;
	width: 150px;
	transform: translate(calc(-50% + 12px), calc(-50% - 15px));
	z-index: 1;
	opacity: 0.8;
}

.header-texts {
	position: relative;
	z-index: 2;
	display: inline-block;
}

.header-text {
	font-size: 3rem;
	color: white;
	margin: 0;
	margin-left: 5%;
	text-shadow: -4px -4px 0 #000, 4px -4px 0 #000, -4px 4px 0 #000,
		4px 4px 0 #000;
}

.header-subtext {
	font-size: 1.5rem;
	color: white;
	margin: 0;
	padding-top: 50px;
	margin-left: 29px;
	font-family: "Montserrat", sans-serif;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.header-instr {
	font-size: 0.9rem;
	color: white;
	margin: 0;
	margin-left: 29px;
	padding-top: 20px;
	font-family: "Montserrat", sans-serif;
	text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.result-overlay {
	position: absolute;
	top: 0;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	display: flex;
	justify-content: center;
	align-items: center;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.5s ease;
	z-index: 10;
}

.result-overlay.winner {
	background-color: rgba(255, 255, 0, 0.5);
	width: 250px;
	opacity: 1;
}

.result-overlay.loser {
	background-color: rgba(255, 0, 0, 0.5);
	width: 250px;
	opacity: 1;
}

.result-overlay .emoji {
	font-size: 5rem;
	text-align: center;
	z-index: 11;
}

.container-main {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: start; /* Center vertically if needed */
	width: 100vw;
	height: 100vh;
	padding: 20px;
	box-sizing: border-box;
	overflow: auto; /* In case content overflows, allow scrolling */
}

.pokemon-inputs {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 50px;
	margin-bottom: 30px;
}

.pokemon-inputs input {
	font-family: "Montserrat", sans-serif;
	padding: 10px;
	font-size: 0.8rem;
	border-radius: 10px;
	border: 4px solid #000;
	background-color: #333;
	color: #fff;
	width: 200px;
	outline: none;
	transition: box-shadow 0.3s, border-color 0.3s;
}

.pokemon-inputs input:focus {
	box-shadow: 0 0 8px rgba(255, 0, 0, 0.5);
}

.pokemon-inputs input:disabled,
.pokemon-inputs input.disabled-input {
	filter: brightness(0.3);
}

.input-group {
	position: relative;
	display: inline-block;
	z-index: 10000;
}

.suggestions-container {
	position: absolute;
	top: 100%;
	left: 4%;
	width: 90%;
	border: 3px solid #111;
	background-color: #333;
	border: 3px solid #111;
	background-color: #333;
	max-height: 150px;
	overflow-y: auto;
	z-index: 99999;
	font-family: "Monsteratt", sans-serif;
	border-bottom-left-radius: 15px;
	border-bottom-right-radius: 15px;

	color: #fff;

	opacity: 0;
	transition: opacity 0.5s ease-in-out;
}

.suggestions-container.visible {
	opacity: 1;
}

.suggestion-item {
	padding: 8px;
	cursor: pointer;
}

.suggestion-item:hover {
	background-color: #555;
}

.btn-disabled {
	opacity: 0.6;
	cursor: not-allowed;
	background-color: #ccc;
}

.pokemon-boxes {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	gap: 60px;
	margin-bottom: 20px;
	flex-wrap: wrap;
	z-index: 99;
	position: relative;
}

.outer-box {
	position: relative;
	width: 280px;
	height: 320px;
	background-color: #333;
	border: 10px solid #000;
	border-radius: 30px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	display: flex;
	justify-content: center;
	align-items: center;
}

.inner-box {
	width: 80%;
	height: 80%;
	background-color: #fff;
	border-radius: 15px;
	display: flex;
	justify-content: center;
	align-items: center;
	overflow: hidden;
	position: relative;
}

.inner-box img {
	max-width: 90%;
	max-height: 90%;
	z-index: 1;
}

.question-mark {
	display: inline-block;
	font-size: 4rem;
	font-weight: bold;
	color: #555;
	line-height: 1;
	padding: 0.2em;
	transition: opacity 0.3s ease-in;
}

#spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 40px;
	height: 40px;
	background-image: url("/static/assets/pokeball_spinner.png");
	background-size: contain;
	background-repeat: no-repeat;
	animation: spin 1s linear infinite;
	z-index: 1000;
	display: none;
}

@keyframes spin {
	0% {
		transform: translate(-50%, -50%) rotate(0deg);
	}
	100% {
		transform: translate(-50%, -50%) rotate(360deg);
	}
}

.submit-container {
	margin: 20px 0;
}

#predict-btn {
	text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000,
		2px 2px 0 #000;
}

.submit-btn {
	padding: 15px 30px;
	font-size: 1.1rem;
	border: none;
	border-radius: 30px;
	background-color: #e60012;
	font-family: "PokemonClassic", Arial, sans-serif;
	color: #fff;
	cursor: pointer;
	transition: background-color 0.3s, transform 0.2s;
}

.submit-btn:hover:not(.btn-disabled) {
	transform: scale(1.05);
}

#clear-container {
	display: none;
}

#clear-btn {
	padding: 10px 20px;
	font-size: 1.1rem;
	font-family: "PokemonClassic", Arial, sans-serif;
	border: none;
	border-radius: 20px;
	background-color: #555;
	color: #fff;
	cursor: pointer;
	text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000,
		2px 2px 0 #000;
	transition: background-color 0.3s;
}

#clear-btn:hover {
	background-color: #333;
}

@keyframes fadeOut {
	from {
		opacity: 1;
	}
	to {
		opacity: 0;
	}
}

.clear-fade-out {
	animation: fadeOut 0.3s forwards;
}

@keyframes popup {
	0% {
		transform: scale(0.8);
		opacity: 0;
	}
	50% {
		transform: scale(1);
		opacity: 1;
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}

@keyframes fadeOutQuick {
	from {
		opacity: 1;
	}
	to {
		opacity: 0;
	}
}

#fight-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255, 0, 0, 1);
	z-index: 99999;
	justify-content: center;
	align-items: center;
	overflow: hidden;
}

#fight-overlay.popup {
	animation: popup 0.5s ease-out forwards;
}

#fight-overlay.fade-out {
	animation: fadeOutQuick 0.3s ease-out forwards;
}

.fight-text {
	font-size: 6rem;
	font-weight: bold;
	text-transform: uppercase;
	color: #fff;
	text-shadow: -4px -4px 0 #000, 4px -4px 0 #000, -4px 4px 0 #000,
		4px 4px 0 #000;
	font-family: "PokemonClassic", Arial, sans-serif;
	padding: 10px 20px;
	box-sizing: border-box;
}

@keyframes pulse {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.1);
	}
	100% {
		transform: scale(1);
	}
}

.pulse-animation {
	animation: pulse 1s ease-in-out infinite;
}

.pokeball {
	position: absolute;
	width: 80px;
	height: 80px;
	background-image: url("/static/assets/pokeball.png");
	background-size: contain;
	background-repeat: no-repeat;
	animation: spinPokeball 1s linear infinite;
	opacity: 0.8;
}

@keyframes spinPokeball {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

@keyframes popin {
	0% {
		transform: scale(0.95);
		opacity: 0;
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}

.popin-animation {
	animation: popin 0.3s ease-out;
}

@keyframes popout {
	0% {
		transform: scale(1);
		opacity: 1;
	}
	100% {
		transform: scale(0.95);
		opacity: 0;
	}
}

.popout-animation {
	animation: popout 0.3s ease-out;
}

@keyframes fadeInputOut {
	0% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}

@keyframes fadeInputIn {
	0% {
		opacity: 0;
	}
	100% {
		opacity: 1;
	}
}

.input-fade-out {
	animation: fadeInputOut 0.3s forwards;
}

.input-fade-in {
	animation: fadeInputIn 0.3s forwards;
}

@keyframes fadeOutNoTransform {
	from {
		opacity: 1;
		transform: translate(-50%, -50%);
	}
	to {
		opacity: 0;
		transform: translate(-50%, -50%);
	}
}

.prediction-fade-out {
	animation: fadeOutNoTransform 0.3s forwards;
}

.github-link {
	position: absolute;
	top: calc(20px / 1.1);
	right: calc(20px / 1.1);
	z-index: 0;
	display: inline-block;
	transform: scale(0.909);
	transform-origin: top right;
}

.github-link::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 50px;
	height: 50px;
	background-color: white;
	border-radius: 50%;
	z-index: -1;
}

.github-link img {
	width: 40px;
	height: 40px;
	display: block;
}

.footer-trademark {
	position: relative;
	bottom: 7%;
	text-align: center;
	font-size: 1rem;
	color: #fff;
	z-index: 999999;
	font-family: "PokemonClassic", Arial, sans-serif;
	text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000,
		2px 2px 0 #000;
	pointer-events: none;
}

@media (min-width: 769px) {
	#bgVideo {
		clip-path: inset(0 0 10% 0);
		object-position: top;
	}
	.github-link {
		position: absolute;
		top: 1.5%;
		left: 89%;
		display: flex;
		justify-content: center;
		align-items: center;
		width: 50px;
		height: 50px;
	}
}

@media (min-width: 1150px) {
	.github-link {
		position: absolute;
		top: 1.5%;
		left: 91%;
		display: flex;
		justify-content: center;
		align-items: center;
		width: 50px;
		height: 50px;
	}
}

@media (max-width: 768px) {
	html {
		transform: none;
	}

	body {
		overflow-y: auto;
	}

	#bgVideo {
		height: 100%;
	}

	.container-main {
		padding-bottom: 100px;
	}

	.pokemon-inputs {
		flex-direction: column;
		gap: 20px;
	}

	.pokemon-inputs input {
		font-size: 16px;
	}

	.pokemon-boxes {
		flex-direction: column;
		gap: 30px;
		margin-top: -5%;
		margin-bottom: 0;
	}

	.outer-box {
		width: 90%;
		max-width: 400px;
		min-width: 300px;
		aspect-ratio: 0.875;
		margin: 20px auto;
		overflow: hidden;
	}

	.inner-box img {
		width: 100%;
		height: 100%;
		object-fit: contain;
	}
	.submit-container {
		position: fixed;
		bottom: 0;
		left: 0;
		width: 100%;
		z-index: 10000;
		display: flex;
		justify-content: center;
		pointer-events: auto;
		background: transparent;
		padding: 10px 0;
	}

	#clear-container {
		position: fixed;
		bottom: 2%;
		left: 10%;
		width: 100%;
		z-index: 10000;
		display: flex;
		justify-content: center;
		pointer-events: auto;
		background: transparent;
		padding: 20px 0;
		font-size: 1.2rem;
	}

	.submit-btn {
		padding: 15px 30px;
		font-size: 1.2rem;
	}

	.fight-text {
		font-size: 5rem;
	}
	.footer-trademark {
		display: none;
	}
	.input-group {
		z-index: auto;
		position: relative;
	}

	.input-group:nth-of-type(1) {
		z-index: 101;
	}

	.input-group:nth-of-type(2) {
		z-index: 100;
	}

	#suggestions1,
	#suggestions2 {
		position: absolute;
	}

	#suggestions1 {
		z-index: 102;
	}

	#suggestions2 {
		z-index: 1;
	}
}
