/* Import Minecraft font */
@font-face {
	font-family: 'Minecraft';
	src: url('https://cdn.jsdelivr.net/gh/South-Paw/typeface-minecraft@master/font/minecraft.woff2') format('woff2');
}

/* Reset and Base Styles */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	background: none;
	min-height: 100vh;
	margin: 0;
	padding: 0;
	font-family: Arial, sans-serif;
	position: relative;
	background-color: #000;
	color: #ffffff;
}

/* Matrix Background */
#matrixBackground {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
}

/* Container Layout */
.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
	text-align: center;
}

/* Header Styles */
header {
	text-align: center;
	margin-bottom: 40px;
	position: relative;
}

.title-container {
	position: relative;
	display: inline-block;
	margin: 0 auto;
	padding-right: 70px;
}

#title {
	font-family: 'Minecraft', 'Press Start 2P', cursive;
	color: #ffffff;
	background: rgba(30, 60, 114, 0.9);
	backdrop-filter: blur(5px);
	padding: 20px;
	border-radius: 10px;
	text-align: center;
	margin-bottom: 20px;
	text-shadow: 2px 2px 0 #1e3c72,
				4px 4px 0 #2a5298;
	letter-spacing: 2px;
	font-size: 2.5rem;
	margin: 0 auto;
}

#creator {
	font-size: 1.2rem;
	margin: 15px 0;
	text-align: right;
}

#creator a {
	color: #4a90e2;
	text-decoration: none;
	transition: color 0.3s ease;
}

#creator a:hover {
	color: #357abd;
	text-decoration: underline;
}

/* Input/Output Sections */
.input-section {
	margin: 30px 0;
	text-align: left;
}

#file_input_div {
	margin-bottom: 20px;
}

#input_div {
	text-align: left;
}

.file-label {
	display: block;
	margin-bottom: 10px;
	font-family: 'Minecraft', 'Press Start 2P', cursive;
	font-size: 1rem;
	color: #4a90e2;
}

#input, #output {
	width: 100%;
	height: 300px;
	background-color: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(5px);
	border: 2px solid #1e3c72;
	color: #333;
	border-radius: 8px;
	padding: 15px;
	font-size: 1rem;
	transition: border-color 0.3s ease;
	resize: vertical;
	min-height: 250px;
	max-height: 700px;
}

#input:focus, #output:focus {
	outline: none;
	border-color: #4a90e2;
	box-shadow: 0 0 10px rgba(74, 144, 226, 0.3);
}

/* Button Styles */
#convert_div {
	display: flex;
	justify-content: center;
	gap: 20px;
	margin: 30px 0;
}

#convert, #copy {
	padding: 15px 30px;
	font-family: 'Minecraft', 'Press Start 2P', cursive;
	font-size: 1.2rem;
	border: none;
	background: linear-gradient(to bottom, #4a90e2, #357abd);
	color: white;
	border-radius: 10px;
	cursor: pointer;
	box-shadow: 
		0 6px 0 #2a5298,
		0 12px 15px rgba(0, 0, 0, .35);
	transition: transform 0.1s ease, box-shadow 0.1s ease;
}

#convert:hover, #copy:hover {
	transform: translateY(-2px);
	box-shadow: 
		0 8px 0 #2a5298,
		0 14px 20px rgba(0, 0, 0, .4);
}

#convert:active, #copy:active {
	transform: translateY(4px);
	box-shadow: 
		0 2px 0 #2a5298,
		0 6px 10px rgba(0, 0, 0, .45);
}

#copy_text {
	font-family: 'Minecraft', 'Press Start 2P', cursive;
	font-size: 1rem;
	color: #4a90e2;
	margin: 15px 0;
	text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
	.container {
		padding: 15px;
	}

	#title {
		font-size: 1.8rem;
		padding: 15px;
	}

	#convert, #copy {
		padding: 12px 24px;
		font-size: 1rem;
	}

	#creator {
		font-size: 1rem;
	}

	#copy_text {
		font-size: 0.9rem;
	}
}

@media (max-width: 480px) {
	#title {
		font-size: 1.5rem;
	}

	#convert_div {
		flex-direction: column;
		align-items: center;
	}

	#convert, #copy {
		width: 100%;
		max-width: 200px;
	}
}

/* Update the title container and help icon styles */
.help-icon {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	width: 40px;
	height: 40px;
	background-color: rgba(30, 60, 114, 0.9);
	color: white;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	font-family: 'Minecraft', 'Press Start 2P', cursive;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.3s ease;
	border: 2px solid rgba(255, 255, 255, 0.2);
	box-shadow: 
		inset 0 0 0 2px rgba(0, 0, 0, 0.2),
		0 4px 0 rgba(0, 0, 0, 0.3);
	z-index: 10;
}

.help-icon:hover {
	background-color: rgba(74, 144, 226, 0.9);
	transform: translateY(-48%);
}

.help-icon:active {
	transform: translateY(-46%);
	box-shadow: 
		inset 0 0 0 2px rgba(0, 0, 0, 0.2),
		0 2px 0 rgba(0, 0, 0, 0.3);
}

/* Update mobile styles for title container */
@media (max-width: 768px) {
	.title-container {
		padding-right: 50px;
	}

	#title {
		font-size: 1.8rem;
		padding: 15px;
	}

	.help-icon {
		right: 5px;
		width: 35px;
		height: 35px;
		font-size: 20px;
	}
}

@media (max-width: 480px) {
	.title-container {
		padding-right: 40px;
	}

	#title {
		font-size: 1.5rem;
		padding: 15px;
	}

	.help-icon {
		right: 0;
		width: 30px;
		height: 30px;
		font-size: 18px;
	}
}

/* Modal Styles */
.modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.7);
	z-index: 1000;
	backdrop-filter: blur(5px);
}

.modal-content {
	position: relative;
	background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
	margin: 5% auto;
	padding: 0;
	width: 80%;
	max-width: 700px;
	border-radius: 10px;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
	border: 2px solid rgba(255, 255, 255, 0.1);
	color: white;
	font-family: 'Minecraft', 'Press Start 2P', cursive;
}

.modal-header {
	padding: 20px;
	border-bottom: 2px solid rgba(255, 255, 255, 0.1);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.modal-header h2 {
	margin: 0;
	font-size: 1.5rem;
	color: #fff;
	text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.close-button {
	background: none;
	border: none;
	color: white;
	font-size: 28px;
	cursor: pointer;
	padding: 0 10px;
	background-color: rgba(255, 255, 255, 0.1);
	border-radius: 5px;
	transition: all 0.3s ease;
}

.close-button:hover {
	background-color: rgba(255, 255, 255, 0.2);
	transform: scale(1.1);
}

.modal-body {
	padding: 20px;
	max-height: 70vh;
	overflow-y: auto;
}

.instruction-section {
	margin-bottom: 25px;
	background-color: rgba(255, 255, 255, 0.1);
	padding: 15px;
	border-radius: 8px;
}

.instruction-section h3 {
	margin-top: 0;
	color: #4a90e2;
	font-size: 1.2rem;
	margin-bottom: 15px;
}

.instruction-section p, .instruction-section li {
	font-family: Arial, sans-serif;
	line-height: 1.6;
	margin-bottom: 10px;
}

.warning {
	background-color: rgba(255, 87, 34, 0.2);
	border-left: 4px solid #ff5722;
	padding: 10px;
	margin: 10px 0;
	border-radius: 0 5px 5px 0;
}

/* Add smooth animation for modal */
.modal.show {
	display: block;
	animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Add this to your existing modal styles */
.modal-footer {
	text-align: right;
	padding: 15px 0 0 0;
	margin-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	font-family: 'Minecraft', 'Press Start 2P', cursive;
	font-size: 0.8rem;
	color: rgba(255, 255, 255, 0.7);
}

.description {
	font-family: 'Minecraft', 'Press Start 2P', cursive;
	color: #4a90e2;
	text-align: center;
	margin: 20px auto;
	padding: 10px;
	max-width: 800px;
	font-size: 1rem;
	line-height: 1.5;
	background: rgba(30, 60, 114, 0.2);
	border-radius: 8px;
	backdrop-filter: blur(5px);
	text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
	animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
	from {
		box-shadow: 0 0 5px rgba(74, 144, 226, 0.2),
					0 0 10px rgba(74, 144, 226, 0.2);
	}
	to {
		box-shadow: 0 0 10px rgba(74, 144, 226, 0.4),
					0 0 20px rgba(74, 144, 226, 0.3);
	}
}

/* Add responsive styles for the description */
@media (max-width: 768px) {
	.description {
		font-size: 0.9rem;
		margin: 15px auto;
		padding: 8px;
	}
}

@media (max-width: 480px) {
	.description {
		font-size: 0.8rem;
		margin: 10px auto;
		padding: 6px;
	}
}

/* Add this to override container's center alignment for specific sections */
.container form {
	text-align: left;
}

/* Update the initial toast styles */
.initial-toast {
	visibility: hidden;
	min-width: 250px;
	background-color: rgba(30, 60, 114, 0.9);
	color: #fff;
	text-align: center;
	border-radius: 8px;
	padding: 16px;
	position: fixed;
	z-index: 1000;
	left: 50%;
	bottom: 30px;
	transform: translateX(-50%);
	font-family: 'Minecraft', 'Press Start 2P', cursive;
	font-size: 0.9rem;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
	border: 2px solid rgba(255, 255, 255, 0.1);
}

.initial-toast.show {
	visibility: visible;
	animation: toastIn 0.5s, toastOut 0.5s 3.5s;
}

@keyframes toastIn {
	from {
		bottom: 0;
		opacity: 0;
	}
	to {
		bottom: 30px;
		opacity: 1;
	}
}

@keyframes toastOut {
	from {
		bottom: 30px;
		opacity: 1;
	}
	to {
		bottom: 0;
		opacity: 0;
	}
}