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

body {
	min-height: 100vh;
	background: rgb(238, 174, 202);
	background: rgb(63, 94, 251);
	background: radial-gradient(
		circle,
		rgba(63, 94, 251, 1) 0%,
		rgba(70, 249, 252, 1) 100%
	);
	display: flex;
	justify-content: center;
	align-items: center;
}

.calculator {
	height: 60vh;
	min-width: 370px;
	max-width: 370px;
}

.display {
	width: 100%;
	min-height: 20%;
	max-height: min-content;
	background-color: rgba(29, 27, 27, 0.151);
	box-shadow: rgba(0, 0, 0, 0.25) 0px 54px 55px,
		rgba(0, 0, 0, 0.12) 0px -12px 30px, rgba(0, 0, 0, 0.12) 0px 4px 6px,
		rgba(0, 0, 0, 0.17) 0px 12px 13px, rgba(0, 0, 0, 0.09) 0px -3px 5px;
	color: white;
	word-break: break-all;
	text-align: right;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 5px 10px;
	margin-bottom: 10px;
	font-weight: bold;
	border-radius: 20px;
}
.panel .color-btn {
	background-color: rgba(240, 120, 164, 0.766);
	transition: background-color 0.3s;
}
.color-btn:hover {
	background-color: rgba(0, 0, 0, 0.722);
}

.current-number {
	font-size: 35px;
}

.previous-number {
	color: rgb(182, 182, 182);
	font-size: 20px;
}

.math-sign {
	font-size: 22px;
}

.panel {
	height: 80%;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-template-rows: repeat(5, 1fr);
	gap: 2px;
}

.panel button {
	font-size: 25px;
	background-color: rgba(0, 0, 0, 0.466);
	color: white;
	cursor: pointer;
	margin: 5px 10px;
	border-radius: 20px;
	border: none;
	outline: none;
	transition: all 0.2s ease-in-out;
}

button:hover {
	background-color: rgba(0, 0, 0, 0.646);
}

.equals {
	grid-row: -1/-3;
	grid-column: -2/-1;
}

.calculator-history {
	height: 60vh;
	margin: 20px;
	width: 150px;
	background-color: rgba(20, 27, 27, 0.151);
	color: white;
	padding: 5px 10px;
	border-radius: 20px;
	font-weight: bold;
	text-align: center;
}

.history {
	list-style: none;
}

.history-title {
	padding: 5px 10px;
}

.history-btn {
	color: white;
	background: rgba(29, 27, 27, 0.603);
	border: none;
	font-size: 15px;
	padding: 8px 16px;
	border-radius: 5px;
	cursor: pointer;
	font-weight: bold;
	display: none;
	outline: none;
	margin: 5px auto;
}
.history-btn.active {
	display: block;
}

.history-item {
	margin: 8px 0px;
	letter-spacing: 1px;
	border-bottom: 1px solid rgba(29, 27, 27, 0.233);
	padding-bottom: 5px;
}
