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

/* General Styles */
body {
	background-color: #333;
	color: #fff;
	font-family: "Poppins", sans-serif;
	display: flex;
	flex-direction: column;
	align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* General Classes */
.rotate-180 {
	transform: rotate(180deg);
}

/* ============================= Page Loader ============================= */
.page-loader {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #333 0%, #1a1a1a 100%);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 9999;
	transition: opacity 0.5s ease, visibility 0.5s ease;
}
.page-loader.hide {
	opacity: 0;
	visibility: hidden;
}
.loader-content {
	text-align: center;
	color: #fff;
}
.loader-spinner {
	width: 60px;
	height: 60px;
	border: 4px solid #474747;
	border-top: 4px solid #ff8c00e4;
	border-radius: 50%;
	margin: 0 auto 20px;
	animation: spin 1s linear infinite;
}
.loader-text {
	font-size: 1.2rem;
	font-weight: 500;
	color: #bcbcbc;
	letter-spacing: 1px;
}



/* ============================= Calculator ============================= */
.calculator {
	width: 100%;
	height: 100vh;
	padding: 20px;
	display: flex;
	justify-content: center;
	align-items: center;
}
.calculator-container {
	width: 100%;
	max-width: 400px;
	border-radius: 8px;
	overflow: hidden;
	border: 3px solid #474747;
	padding: 10px;
	background-color: #3d3d3d;
}
.calculator-screen {
	width: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: flex-end;
	gap: 13px;
	padding: 12px;
	background-color: #171717;
	border-radius: 8px;
	margin-bottom: 15px;
	min-height: 100px;
}
.previousOperand,
.currentOperand {
	word-break: break-all;
}
.previousOperand {
	font-size: 1.2rem;
	color: #bcbcbc;
}
.currentOperand {
	font-size: 2rem;
	color: #fff;
}
.calculator-body {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-template-rows: repeat(5, 1fr);
	gap: 12px;
	padding: 10px;
	background-color: #171717;
	border-radius: 8px;
}
.currentOperand {
	grid-column: span 4;
	text-align: right;
	font-size: 2rem;
	padding: 10px;
}
.previousOperand {
	grid-column: span 4;
	text-align: right;
	font-size: 1.2rem;
	padding: 10px;
}
.calculator-body button {
	border: none;
	border-radius: 8px;
	background-color: #3c3c3c;
	color: #fff;
	padding: 18px 10px;
	font-size: 1.2rem;
	cursor: pointer;
	transition: background-color 0.2s ease-in-out;
}
.calculator-body button:hover {
	background-color: #4b4b4b;
}
.calculator-body button.span-2 {
	grid-column: span 2;
}
.calculator-body button.clear-all {
	background-color: #ff4d4d;
}
.calculator-body button:hover {
	background-color: #ff6b6b;
}
.calculator-body button.delete {
	background-color: #d4d4d2;
	color: #000;
}
.calculator-body button:hover {
	background-color: #e6e6e6;
}
.calculator-body button.operator {
	background-color: #ff8c00e4;
	color: #fff;
}
.calculator-body button:hover {
	background-color: #ff9f1a;
}
.calculator-body button.equal {
	background-color: #017a01;
	color: #fff;
}
.calculator-body button:hover {
	background-color: #019901;
}


/* ============================= Custom Alert Styles ============================= */
.custom-alert {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.7);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
}
.custom-alert.show {
	opacity: 1;
	visibility: visible;
}
.alert-content {
	background-color: #3d3d3d;
	border: 3px solid #474747;
	border-radius: 12px;
	padding: 30px;
	max-width: 400px;
	width: 90%;
	text-align: center;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
	transform: scale(0.8);
	transition: transform 0.3s ease;
}
.custom-alert.show .alert-content {
	transform: scale(1);
}
.alert-message {
	color: #fff;
	font-size: 1.3rem;
	margin-bottom: 25px;
	font-weight: 500;
	line-height: 1.4;
}
.alert-ok {
	background-color: #ff8c00e4;
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 12px 30px;
	font-size: 1.1rem;
	cursor: pointer;
	transition: background-color 0.2s ease;
	font-weight: 500;
}
.alert-ok:hover {
	background-color: #ff9f1a;
}


/* ============================= Footer ============================= */
.footer {
	width: 100%;
	background: linear-gradient(135deg, #171717 0%, #1a1a1a 100%);
	border-top: 2px solid #474747;
	padding: 15px 0;
	z-index: 100;
}
.footer-content {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 15px;
}
.copyright {
	color: #bcbcbc;
	font-size: 0.9rem;
	font-weight: 400;
}
.copyright a {
	color: #ff8c00e4;
	text-decoration: none;
	transition: color 0.2s ease;
	font-weight: 500;
}
.copyright a:hover {
	color: #ff9f1a;
}
.social-links {
	display: flex;
	gap: 15px;
	align-items: center;
}
.social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 35px;
	height: 35px;
	background-color: #3c3c3c;
	color: #bcbcbc;
	border-radius: 50%;
	text-decoration: none;
	transition: all 0.2s ease;
	border: 1px solid #474747;
}
.social-link:hover {
	background-color: #ff8c00e4;
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(255, 140, 0, 0.3);
}
.social-link i {
	font-size: 1rem;
}


/* ======================= KeyFrames ======================= */
@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}


/* ======================= Media Queries ====================== */
/* Mobile screen */
@media screen and (max-width: 480px) {
	.footer-content {
		flex-direction: column;
		text-align: center;
		padding: 0 15px;
	}
	.copyright {
		font-size: 0.8rem;
	}
	.social-links {
		gap: 12px;
	}
	.social-link {
		width: 32px;
		height: 32px;
	}
	.social-link i {
		font-size: 0.9rem;
	}
    .alert-content {
		padding: 25px 20px;
		margin: 20px;
	}
	.alert-message {
		font-size: 1.1rem;
		margin-bottom: 20px;
	}
	.alert-ok {
		padding: 10px 25px;
		font-size: 1rem;
	}
}

/* Tablet screen */
@media screen and (min-width: 768px) {
    .calculator-body button {
		font-size: 1.4rem;
	}
    .footer {
        padding-inline: 25px;
    }
}