/* ========================= Global Styles ========================= */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
body {
	min-height: 100vh;
	background-color: #8a2be2;
	color: #fff;
	text-align: center;
	font-family: Arial, Helvetica, sans-serif;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	overflow-x: hidden;
}

/* ========================= Loader Styles ========================= */
.loader {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #8a2be2, #6a1b9a, #4a148c);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 10000;
	animation: loaderFadeOut 0.8s ease-in-out 2.5s forwards;
}

.loader-container {
	text-align: center;
	animation: loaderSlideIn 0.8s ease-out;
}

.loader-icon {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 12px;
	margin-bottom: 30px;
}

.loader-circle {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: linear-gradient(135deg, #4ecdc4, #45b7d1);
	animation: loaderBounce 1.4s ease-in-out infinite both;
	box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.loader-circle:nth-child(1) {
	animation-delay: -0.32s;
}

.loader-circle:nth-child(2) {
	animation-delay: -0.16s;
}

.loader-circle:nth-child(3) {
	animation-delay: 0s;
}

.loader-text {
	margin-bottom: 40px;
}

.loader-title {
	display: block;
	font-size: 2.5rem;
	font-weight: 800;
	background: linear-gradient(
		45deg,
		#ff6b6b,
		#4ecdc4,
		#45b7d1,
		#96ceb4,
		#feca57,
		#ff9ff3,
		#54a0ff,
		#5f27cd
	);
	background-size: 400% 400%;
	background-clip: text;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	animation: gradientText 3s ease-in-out infinite;
	margin-bottom: 10px;
	text-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.loader-subtitle {
	display: block;
	font-size: 1.1rem;
	color: rgba(255, 255, 255, 0.8);
	font-weight: 400;
	letter-spacing: 0.5px;
}

.loader-progress {
	width: 200px;
	height: 4px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 2px;
	overflow: hidden;
	margin: 0 auto;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.loader-bar {
	width: 0%;
	height: 100%;
	background: linear-gradient(90deg, #4ecdc4, #45b7d1);
	border-radius: 2px;
	animation: loaderProgress 2.5s ease-in-out forwards;
	box-shadow: 0 0 10px rgba(78, 205, 196, 0.6);
}

.main-content {
	transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
}

.main-content.hidden {
	opacity: 0;
	transform: translateY(30px);
}

/* ========================= Initial Animations ========================= */
.main-content-container {
	animation: contentSlideIn 1s ease-out 0.5s both;
}

.main-content-container h1 {
	animation: titleSlideIn 1.2s ease-out 0.8s both;
}

.main-content-container textarea {
	animation: textareaSlideIn 1s ease-out 1.2s both;
}

.main-content-container button {
	animation: buttonSlideIn 1s ease-out 1.6s both;
}

.main-content footer {
	animation: footerSlideIn 1s ease-out 2s both;
}

/* ========================= Animation Keyframes ========================= */
@keyframes contentSlideIn {
	0% {
		opacity: 0;
		transform: translateY(50px) scale(0.95);
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes titleSlideIn {
	0% {
		opacity: 0;
		transform: translateY(-30px) scale(0.9);
		filter: blur(5px);
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
		filter: blur(0px);
	}
}

@keyframes textareaSlideIn {
	0% {
		opacity: 0;
		transform: translateX(-50px) scale(0.95);
		filter: blur(3px);
	}
	100% {
		opacity: 1;
		transform: translateX(0) scale(1);
		filter: blur(0px);
	}
}

@keyframes buttonSlideIn {
	0% {
		opacity: 0;
		transform: translateX(50px) scale(0.8);
		filter: blur(3px);
	}
	100% {
		opacity: 1;
		transform: translateX(0) scale(1);
		filter: blur(0px);
	}
}

@keyframes footerSlideIn {
	0% {
		opacity: 0;
		transform: translateY(30px) scale(0.95);
		filter: blur(2px);
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
		filter: blur(0px);
	}
}

/* ========================= Loader Animations ========================= */
@keyframes loaderFadeOut {
	0% {
		opacity: 1;
		visibility: visible;
	}
	100% {
		opacity: 0;
		visibility: hidden;
	}
}

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

@keyframes loaderBounce {
	0%,
	80%,
	100% {
		transform: scale(0);
		opacity: 0.5;
	}
	40% {
		transform: scale(1);
		opacity: 1;
	}
}

@keyframes loaderProgress {
	0% {
		width: 0%;
	}
	20% {
		width: 25%;
	}
	40% {
		width: 50%;
	}
	60% {
		width: 75%;
	}
	80% {
		width: 90%;
	}
	100% {
		width: 100%;
	}
}

/* ========================= Main Styles ========================= */
.main-content {
	width: 100%;
	height: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}
.main-content-container {
	width: 90%;
	max-width: 800px;
	margin: auto;
}

h1 {
	margin-top: 30px;
	margin-bottom: 40px;
	background: linear-gradient(
		45deg,
		#ff6b6b,
		#4ecdc4,
		#45b7d1,
		#96ceb4,
		#feca57,
		#ff9ff3,
		#54a0ff,
		#5f27cd
	);
	background-size: 400% 400%;
	background-clip: text;
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	animation: gradientText 8s ease-in-out infinite;
	font-size: 2.2rem;
	font-weight: 800;
	letter-spacing: -1px;
	text-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
	position: relative;
}

h1::after {
	content: "";
	position: absolute;
	bottom: -10px;
	left: 50%;
	transform: translateX(-50%);
	width: 80px;
	height: 4px;
	background: linear-gradient(90deg, #4ecdc4, #45b7d1);
	border-radius: 2px;
	box-shadow: 0 0 20px rgba(78, 205, 196, 0.5);
}

textarea,
button {
	border: none;
	border-radius: 12px;
	transition: all 0.3s ease;
}

textarea {
	width: 100% !important;
	padding: 20px;
	font-size: 1.1rem;
	outline: none;
	background: rgba(255, 255, 255, 0.95);
	color: #333;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
		inset 0 1px 0 rgba(255, 255, 255, 0.8);
	border: 2px solid transparent;
	font-family: inherit;
	line-height: 1.6;
	resize: vertical;
	min-height: 200px;
}

textarea:focus {
	border-color: #4ecdc4;
	box-shadow: 0 8px 32px rgba(78, 205, 196, 0.2),
		0 0 0 3px rgba(78, 205, 196, 0.1),
		inset 0 1px 0 rgba(255, 255, 255, 0.8);
	transform: translateY(-2px);
}

textarea::placeholder {
	color: #999;
	font-style: italic;
}

button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin: 25px 0 0 auto;
	padding: 15.5px 29px;
	font-size: 1.2rem;
	font-weight: 600;
	background: linear-gradient(135deg, #3da59e, #3fa4ba);
	color: white;
	cursor: pointer;
	position: relative;
	overflow: hidden;
	z-index: 1;
	box-shadow: 0px 2px 8px rgba(78, 205, 196, 0.4),
		0 4px 12px rgba(0, 0, 0, 0.1);
	border: 2px solid transparent;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	min-width: 160px;
}

button::before {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(255, 255, 255, 0.3),
		transparent
	);
	transition: left 0.6s ease;
	z-index: -1;
}

button:hover::before {
	left: 100%;
}

button:hover {
	background: linear-gradient(135deg, #45b7d1, #4ecdc4);
	transform: translateY(-3px);
	box-shadow: 0 12px 32px rgba(78, 205, 196, 0.5),
		0 6px 16px rgba(0, 0, 0, 0.2);
}

button:focus {
	outline: 3px solid rgba(255, 255, 255, 0.8);
	outline-offset: 2px;
	background: linear-gradient(135deg, #45b7d1, #4ecdc4);
	box-shadow: 0 8px 24px rgba(78, 205, 196, 0.4),
		0 0 0 3px rgba(78, 205, 196, 0.3);
}

button:active {
	transform: translateY(-1px);
	background: linear-gradient(135deg, #3a9bc1, #3bb5a8);
	box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4),
		0 3px 10px rgba(0, 0, 0, 0.2);
}

/* ========================= Footer Styles ========================= */
footer {
	margin-top: 40px;
	padding: 20px;
	background-color: rgba(0, 0, 0, 0.2);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.1);
	width: 100%;
	padding-inline: 30px;
}

footer p {
	margin-bottom: 8px;
	font-size: 0.9rem;
	line-height: 1.4;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-wrap: wrap;
}

footer span {
	display: block;
	font-size: 0.8rem;
	opacity: 0.8;
	font-weight: 300;
}

footer a {
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.3s ease;
	position: relative;
	display: inline-block;
	margin: 0 7px;
}

footer a:hover {
	color: #b38cd8;
	text-shadow: 0 0 8px rgba(179, 140, 216, 0.5);
}

footer a::after {
	content: "";
	position: absolute;
	width: 0;
	height: 2px;
	bottom: -2px;
	left: 0;
	background: linear-gradient(90deg, #b38cd8, #9967c7);
	transition: width 0.3s ease;
}

footer a:hover::after {
	width: 100%;
}

/* ========================= Popup Styles ========================= */
.popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	max-width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(5px);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 10000;
	animation: fadeIn 0.3s ease-out;
}
.popup-container {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-radius: 20px;
	padding: 0;
	max-width: 400px;
	width: 90%;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
	animation: slideIn 0.4s ease-out;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.2);
}
.popup-header {
	background: rgba(255, 255, 255, 0.1);
	padding: 20px;
	text-align: center;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	margin-top: 16px;
	border-radius: 10px;
	width: 90%;
}
.popup-icon {
	width: 60px !important;
	height: 60px !important;
	min-height: 60px !important;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 15px;
	font-size: 40px;
	color: white;
}
.popup-icon.info {
	width: 60px;
	height: 60px;
	background: linear-gradient(135deg, #4ecdc4, #44a08d);
	box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}
.popup-title {
	color: white;
	margin: 0;
	font-size: 1.3rem;
	font-weight: 600;
}
.popup-body {
	width: 100%;
	padding: 25px;
}
.popup-message {
	color: rgba(255, 255, 255, 0.9);
	margin: 0;
	line-height: 1.6;
	font-size: 0.95rem;
}
.popup-footer {
	width: 100%;
	padding: 10px 25px 25px;
	text-align: center;
}
.popup-btn {
	background: linear-gradient(135deg, #4caf50, #45a049);
	color: white;
	padding: 13px 28px;
	border-radius: 12px;
	font-size: 1rem;
	cursor: pointer;
	transition: all 0.3s ease;
	text-align: center;
	position: relative;
	outline: none;
	margin-left: auto;
	letter-spacing: 0.5px;
}
.popup-btn:hover {
	background: linear-gradient(135deg, #66bb6a, #4caf50);
	transform: translateY(-3px);
	border-color: #1b5e20;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}
.popup-btn:focus {
	outline: 4px solid rgba(255, 255, 255, 0.9);
	outline-offset: 3px;
	background: linear-gradient(135deg, #66bb6a, #4caf50);
	box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.4),
		0 6px 20px rgba(76, 175, 80, 0.5);
	border-color: #1b5e20;
}
.popup-btn:active {
	transform: translateY(-1px);
	background: linear-gradient(135deg, #388e3c, #2e7d32);
	box-shadow: 0 4px 15px rgba(76, 175, 80, 0.6), 0 2px 6px rgba(0, 0, 0, 0.3);
	border-color: #1b5e20;
}
.popup-btn:disabled {
	background: linear-gradient(135deg, #9e9e9e, #757575);
	border-color: #616161;
	cursor: not-allowed;
	transform: none;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	opacity: 0.7;
	text-shadow: none;
}
.popup-btn:active {
	transform: translateY(0);
}

/* ========================= Keyframes ========================= */
@keyframes gradientText {
	0% {
		background-position: 0% 50%;
		filter: hue-rotate(0deg);
	}
	25% {
		background-position: 100% 50%;
		filter: hue-rotate(90deg);
	}
	50% {
		background-position: 200% 50%;
		filter: hue-rotate(180deg);
	}
	75% {
		background-position: 300% 50%;
		filter: hue-rotate(270deg);
	}
	100% {
		background-position: 400% 50%;
		filter: hue-rotate(360deg);
	}
}

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

@keyframes slideIn {
	from {
		opacity: 0;
		transform: translateY(-50px) scale(0.9);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes popupFadeIn {
	from {
		opacity: 0;
		backdrop-filter: blur(0px);
	}
	to {
		opacity: 1;
		backdrop-filter: blur(8px);
	}
}

@keyframes popupSlideIn {
	from {
		opacity: 0;
		transform: translateY(-60px) scale(0.9);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* ========================= Popup Styles ========================= */
.popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	backdrop-filter: blur(8px);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 10000;
	animation: popupFadeIn 0.4s ease-out;
}
.popup-container {
	background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
	border-radius: 24px;
	padding: 0;
	max-width: 480px;
	width: 90%;
	box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4),
		0 0 0 1px rgba(255, 255, 255, 0.1);
	animation: popupSlideIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.2);
	position: relative;
}
.popup-container::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(255, 255, 255, 0.4),
		transparent
	);
}
.popup-header {
	background: rgba(255, 255, 255, 0.08);
	padding: 32px 32px 24px;
	text-align: center;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	position: relative;
}
.popup-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 20px;
	font-size: 40px;
	color: white;
	position: relative;
}
.popup-title {
	color: white;
	margin: 0;
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.5px;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.popup-body {
	padding: 32px;
	background: rgba(255, 255, 255, 0.02);
}
.popup-message {
	color: rgba(255, 255, 255, 0.9);
	margin: 0;
	line-height: 1.7;
	font-size: 1rem;
	font-weight: 400;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.popup-footer {
	padding: 9px 27px 18px;
	text-align: center;
	background: rgba(0, 0, 0, 0.1);
}
.popup-btn {
	background: linear-gradient(135deg, #4caf50, #45a049);
	color: white;
	border: none;
	padding: 16px 40px;
	border-radius: 12px;
	font-size: 1.1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 8px 24px rgba(76, 175, 80, 0.4), 0 4px 12px rgba(0, 0, 0, 0.2);
	min-height: 52px;
	min-width: 140px;
	text-align: center;
	position: relative;
	outline: none;
	text-transform: none;
	letter-spacing: 0.3px;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
	overflow: hidden;
}
.popup-btn::before {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(255, 255, 255, 0.2),
		transparent
	);
	transition: left 0.6s ease;
}
.popup-btn:hover::before {
	left: 100%;
}
.popup-btn:hover {
	background: linear-gradient(135deg, #66bb6a, #4caf50);
	transform: translateY(-2px);
	box-shadow: 0 12px 32px rgba(76, 175, 80, 0.5),
		0 6px 16px rgba(0, 0, 0, 0.3);
}
.popup-btn:focus {
	outline: 3px solid rgba(255, 255, 255, 0.8);
	outline-offset: 2px;
	background: linear-gradient(135deg, #66bb6a, #4caf50);
	box-shadow: 0 8px 24px rgba(76, 175, 80, 0.4),
		0 0 0 3px rgba(76, 175, 80, 0.3);
}
.popup-btn:active {
	transform: translateY(0);
	background: linear-gradient(135deg, #388e3c, #2e7d32);
	box-shadow: 0 4px 16px rgba(76, 175, 80, 0.4), 0 2px 8px rgba(0, 0, 0, 0.2);
}
.popup-btn:disabled {
	background: linear-gradient(135deg, #9e9e9e, #757575);
	cursor: not-allowed;
	transform: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	opacity: 0.6;
	text-shadow: none;
}

/* ========================= Responsive Styles ========================= */

@media (min-width: 576px) {
	div h1 {
		font-size: 2rem;
	}

	.popup-container {
		max-width: 520px;
	}

	.popup-title {
		font-size: 1.6rem;
	}

	.popup-message {
		font-size: 1.05rem;
	}
}
