@import url("https://fonts.googleapis.com/css2?family=Chivo&display=swap");

* {
	font-family: Chivo, Roboto, Georgia, "Times New Roman", Times, serif;
	font-size: xx-large;
}

body {
	margin: 0;
	padding: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	gap: 30px;
	background-color: #1f2937;
	cursor: none;
}

.header {
	padding-top: 16px;
	color: #f9faf8;
	display: flex;
	justify-content: center;
	align-items: center;
}

h1,
h2 {
	margin: 0;
}

.footer {
	flex: 1;
	max-height: 30px;
	display: flex;
	justify-content: center;
	align-items: center;
	color: #f9faf8;
	font-size: 18px;
	padding-bottom: 15px;
}

.container {
	flex: 0 1;
	display: flex;
	min-width: 300px;
	width: 500px;
	max-width: 550px;
	min-height: 300px;
	height: 370px;
	flex-direction: column;
	gap: 10px;
	justify-content: center;
	align-items: center;
	padding: 40px 30px;
	border: 1px #f9faf8 solid;
	border-radius: 20px;
}

.custom-cursor {
	position: absolute;
	width: 10px;
	height: 10px;
	border: 1px solid #f9faf8;
	border-radius: 50%;
	pointer-events: none;
	cursor: pointer;
}

/* Text field */

.text-field {
	display: flex;
	gap: 10px;
	align-items: center;
	border-radius: 15px;
	border: #f9faf8 solid 1px;
	padding-right: 10px;
	width: 100%;
}

.input.text {
	flex-grow: 1;
	flex-shrink: 0;
	box-sizing: border-box;
	background-color: transparent;
	color: #f9faf8;
	padding: 10px 20px;
	outline: none;
	border: none;
	width: 80%;
	max-width: 100%;
	height: 1.8em;
	max-height: 8em;
	resize: none;
	overflow-x: hidden;
	overflow-y: hidden;
	word-wrap: break-all;
}

.animate-slide-in {
	animation: slide-in-left cubic-bezier(0.075, 0.82, 0.165, 1) 0.5s;
}

@keyframes slide-in-left {
	from {
		transform: scale(0.5) translateX(200px);
		opacity: 0.5;
	}
	to {
		transform: scale(1) translateX(0px);
		opacity: 1;
	}
}

.text-field button {
	color: #f9faf8;
	background-color: transparent;
	border: none;
	border-radius: 20px;
	font-size: 1em;
	height: 1.3em;
	transition: font-size 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	cursor: none;
	font-size: larger;
}

.answer {
	color: gray;
	font-size: 0.7em;
	align-self: flex-start;
	margin-right: auto;
	margin-top: 0;
	margin-bottom: 20px;
	padding: 0;
}

/* button container */

.button-container {
	flex-grow: 0;
	flex-shrink: 1;
	display: flex;
	align-items: center;
	gap: 20px;
	width: 100%;
	max-height: 80%;
	user-select: none;
}

.container button {
	color: #f9faf8;
	background-color: transparent;
	border: none;
	border-radius: 20px;
	font-size: 1em;
	height: 1.3em;
	transition: font-size 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
	cursor: none;
	font-size: larger;
}

.container button:hover {
	animation: hover-animation cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.4s;
	animation-fill-mode: both;
}

@keyframes hover-animation {
	from {
		text-shadow: 0 0 0em rgb(0 0 0 / 0.3);
	}
	to {
		text-shadow: 0 0 1em rgb(249 250 248 / 0.6);
	}
}

.container button:active {
	animation: click-animation 0.1s;
	animation-fill-mode: forwards;
}

@keyframes click-animation {
	from {
		scale: 1.15;
	}
	to {
		scale: 0.8;
	}
}

/* numbers container */

.number-container {
	align-self: stretch;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	max-width: 50%;
}

.number-container button {
	flex-basis: 30%;
}

.vertical-line {
	width: 1px;
	background: linear-gradient(
		to top,
		rgba(249, 250, 248, 0),
		rgba(249, 250, 248, 1),
		rgba(249, 250, 248, 0)
	);
	align-self: stretch;
}

/* side container */

.side-container {
	align-self: stretch;
	max-height: 300px;
	flex: initial;
	width: 50%;
	display: flex;
	flex-flow: column;
	gap: 10px;
}

.side-container .delete-container {
	display: flex;
}

.side-container .delete-container > * {
	flex: 1 1;
}

.side-container #clear-button {
	flex-shrink: 1;
	transition: flex-grow 0.5s ease;
	color: rgb(253, 138, 138);
}

.side-container .equals-container {
	display: flex;
}

.side-container .equals-container > * {
	flex: 1 1;
}

.side-container #equals-button {
	color: rgb(192, 253, 131);
	font-size: larger;
}

/* operator container */

.operator-container {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	padding: 10px;
	gap: 10px;
	height: 200px;
}

.operator-container button {
	flex-basis: 29%;
	min-width: 30px;
	max-width: 100%;
	height: 60px;
	color: aquamarine;
	font-size: larger;
}

/* Dailog  */
dialog {
	overflow: hidden;
	border: none;
	width: 100vw;
	margin: auto 0;
	background-color: rgb(0, 0, 0, 0.5);
	border: none;
	outline: none;
	font-family: "Times New Roman", Times, serif;
	animation: fade-in 4s linear both 1s,
		background-fade-in 1s ease-in-out both 4s;
}

@keyframes fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes background-fade-in {
	from {
		background-color: rgb(0, 0, 0, 0);
	}
	to {
		background-color: rgb(0, 0, 0, 0.5);
	}
}

dialog .form {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	gap: 20px;
}

dialog::backdrop {
	background-color: rgb(0 0 0 / 0.3);
}

dialog button {
	background-color: transparent;
	visibility: hidden;
	border: none;
	outline: none;
	color: #f37004;
	font-family: serif;
	cursor: pointer;
	animation: delay-fade ease-in-out 1s forwards;
	animation-delay: 4s;
}

@keyframes delay-fade {
	from {
		opacity: 0;
		visibility: visible;
	}
	to {
		opacity: 1;
		visibility: visible;
	}
}

.death-message {
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.1),
		rgba(0, 0, 0, 1),
		rgba(0, 0, 0, 0.1)
	);
	font-family: "Times New Roman", Times, serif;
	color: #4f0001;
	font-size: 3em;
	font-weight: 400;
	margin: 0;
	padding: 0;
	width: 100vw;
	overflow: hidden;
	animation: scale-in 4s ease-in-out both;
}

@keyframes scale-in {
	from {
		font-size: 2em;
	}
	to {
		font-size: 3em;
	}
}
