*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: system-ui, sans-serif;
}

body {
	background: linear-gradient(135deg, #0f172a, #1e293b);
	color: #e2e8f0;
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 100vh;
}

.app {
	width: 100%;
	padding: 1.5rem;
	display: flex;
	justify-content: center;

	.card {
		width: 100%;
		max-width: 1000px;
		padding: 2rem;
		border-radius: 16px;
		border: 1px solid rgba(255, 255, 255, 0.1);
		box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);

		/* Glassmorphism */
		background: rgba(255, 255, 255, 0.05);
		backdrop-filter: blur(14px);
		-webkit-backdrop-filter: blur(12px);
	}
}

header {
	text-align: center;
	margin-bottom: 1.5rem;

	.title {
		font-size: 2.3rem;
		font-weight: 700;
		background: linear-gradient(135deg, #60a5fa, #3b82f6);
		-webkit-background-clip: text;
		-webkit-text-fill-color: transparent;
	}

	.subtitle {
		font-size: 0.9rem;
		color: #94a3b8;
		margin-top: 0.4rem;
	}
}

.input-zone {
	position: relative;
	width: 100%;
	height: 240px;
	margin-bottom: 1rem;
	border: 2px dashed rgba(148, 163, 184, 0.5);
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.03);
	transition: 0.2s ease;
	overflow: hidden;
	cursor: text;

	&:hover {
		background: rgba(255, 255, 255, 0.06);
	}

	&.dragover {
		border-color: #3b82f6;
		background: rgba(59, 130, 246, 0.1);
	}

	&.has-content .input-overlay {
		opacity: 0;
	}

	&.show-badge .filetype-badge {
		opacity: 1;
		transform: translateY(0);
	}

	.filetype-badge {
		position: absolute;
		top: 10px;
		right: 24px;
		padding: 0.2rem 0.6rem;
		border-radius: 999px;
		font-size: 0.7rem;
		font-weight: 600;
		letter-spacing: 0.05em;
		background: rgba(255, 255, 255, 0.08);
		color: #e2e8f0;
		opacity: 0;
		transform: translateY(-4px);
		transition: 0.2s ease;
		pointer-events: none;
	}

	textarea {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		padding: 1rem;
		border: none;
		outline: none;
		resize: none;
		background: transparent;
		color: #e2e8f0;
		font-family: monospace;
		font-size: 0.85rem;
		z-index: 2;
	}

	.input-overlay {
		position: absolute;
		inset: 0;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		text-align: center;
		color: #94a3b8;
		pointer-events: none;
		transition: 0.2s ease;

		.input-title {
			font-size: 1rem;
			margin-bottom: 0.3rem;
		}

		.input-subtitle {
			font-size: 0.8rem;
		}
	}
}

.output-zone {
	margin-top: 2rem;

	textarea {
		width: 100%;
		height: 300px;
		padding: 1rem;
		border-radius: 12px;
		background: rgba(2, 6, 23, 0.85);
		border: 1px solid rgba(148, 163, 184, 0.2);
		color: #e2e8f0;
		font-family: monospace;
		font-size: 0.85rem;
		resize: none;
		outline: none;
	}
}

.actions {
	display: flex;
	justify-content: center;
	gap: 0.8rem;
	margin-top: 1rem;

	button {
		padding: 0.6rem 1.6rem;
		border-radius: 999px;
		border: none;
		background: linear-gradient(135deg, #3b82f6, #2563eb);
		color: white;
		font-weight: 500;
		cursor: pointer;
		transition: 0.2s ease;

		&:hover {
			transform: translateY(-1px);
			box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
		}

		&:active {
			transform: scale(0.96);
		}

		&:disabled {
			opacity: 0.5;
			cursor: not-allowed;
		}
	}

	#btn-clear {
		background: rgba(255, 255, 255, 0.08);

		&:hover {
			background: rgba(255, 255, 255, 0.15);
		}
	}
}
