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

body {
	font-family:
		"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
		sans-serif;
	background: #0a0a0a;
	color: #ffffff;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	padding: 24px;
}

/* Layout components */
.main-content {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
}

.container {
	width: 100%;
	max-width: 480px;
	position: relative;
}

/* Typography */
h1 {
	text-align: center;
	margin-bottom: 8px;
	font-size: 2rem;
	font-weight: 300;
	color: #ffffff;
	letter-spacing: -0.025em;
}

.subtitle {
	text-align: center;
	margin-top: 18px;
	margin-bottom: 32px;
	color: #666666;
	font-size: 0.9rem;
	font-weight: 400;
}

/* Footer */
.footer {
	background: rgba(10, 10, 10, 0.9);
	border-top: 1px solid #222222;
	padding: 12px 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	font-size: 0.8rem;
	color: #666666;
	margin-top: 32px;
}

.footer a {
	color: #666666;
	text-decoration: none;
	display: flex;
	align-items: center;
	transition: color 0.2s ease;
}

.footer a:hover {
	color: #999999;
}

.footer svg {
	width: 16px;
	height: 16px;
	margin-right: 6px;
}

/* Form elements */
.input-container {
	margin-bottom: 12px;
	position: relative;
}

textarea {
	width: 100%;
	min-height: 80px;
	max-height: 200px;
	padding: 16px;
	background: #1a1a1a;
	border: 2px solid #333333;
	border-radius: 8px;
	color: #ffffff;
	font-size: 15px;
	font-family: inherit;
	resize: none;
	transition: all 0.3s ease;
	outline: none;
	overflow-y: hidden;
	scrollbar-width: thin;
	scrollbar-color: #222 #1a1a1a;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

textarea:focus {
	border-color: #555555;
	box-shadow:
		0 4px 16px rgba(0, 0, 0, 0.2),
		0 0 0 1px rgba(255, 255, 255, 0.1);
	transform: translateY(-1px);
}

textarea::-webkit-scrollbar {
	width: 6px;
}

textarea::-webkit-scrollbar-thumb {
	background: #222;
	border-radius: 4px;
}

textarea::-webkit-scrollbar-track {
	background: #1a1a1a;
}

/* Pass display */
.pass-display {
	background: #1a1a1a;
	border: 1px solid #333333;
	border-radius: 8px;
	padding: 20px;
	font-family: "Monaco", "Menlo", "Consolas", monospace;
	font-size: 16px;
	color: #ffffff;
	min-height: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	word-break: break-all;
	position: relative;
	transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	pointer-events: none;
	user-select: none;
	cursor: default;
	overflow: hidden;
}

.pass-display:hover {
	border-color: #555555;
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.pass-display.empty {
	font-family: inherit;
}

.pass-display.transitioning {
	border-color: #444444;
}

.pass-text {
	opacity: 1;
	transition:
		opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
		transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
		font-family 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
		color 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
		letter-spacing 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	transform: skew(-8deg, 0) scale(0.98);
	font-family: inherit;
	color: #666666;
	letter-spacing: 0.02em;
}

.pass-display:not(.empty) .pass-text {
	transform: skew(0deg, 0) scale(1);
	font-family: "Monaco", "Menlo", "Consolas", monospace;
	color: #ffffff;
	letter-spacing: 0.05em;
}

.pass-text.hide {
	opacity: 0;
	transform: skew(-8deg, 0) scale(0.95);
}

.pass-text.show {
	opacity: 1;
}

.pass-text.transitioning {
	transition:
		opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1),
		transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* UI feedback elements */
.copied-toast {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
	color: #aaaaaa;
	font-size: 14px;
	opacity: 0;
	visibility: hidden;
	transition: all 0.3s ease;
	margin: 0;
	white-space: nowrap;
	animation: toastFadeIn 0.3s ease-out;
}

.copied-toast.show {
	opacity: 1;
	visibility: visible;
}

@keyframes toastFadeIn {
	from {
		opacity: 0;
		transform: translate(-50%, -50%) scale(0.9);
	}
	to {
		opacity: 1;
		transform: translate(-50%, -50%) scale(1);
	}
}

.status-container {
	position: relative;
	height: 24px;
	margin: 12px 0;
}

.loading {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	display: none;
	width: 12px;
	height: 12px;
	background: #666666;
	border-radius: 50%;
	animation: pulse 1.5s infinite ease-in-out;
}

.loading.show {
	display: block;
}

.loading.show ~ .copied-toast {
	opacity: 0 !important;
	visibility: hidden !important;
}

@keyframes pulse {
	0%,
	100% {
		opacity: 0.4;
		transform: translate(-50%, -50%) scale(1);
	}
	50% {
		opacity: 1;
		transform: translate(-50%, -50%) scale(1.2);
	}
}

.error {
	background: linear-gradient(135deg, #2a1a1a, #1a0a0a);
	border: 1px solid #aa4444;
	color: #ffcccc;
	padding: 16px 20px;
	border-radius: 8px;
	margin: 16px 0;
	font-size: 14px;
	text-align: center;
	display: none;
	position: relative;
	box-shadow: 0 4px 16px rgba(170, 68, 68, 0.1);
	animation: errorSlideIn 0.3s ease-out;
}

.error.show {
	display: block;
}

.error::before {
	content: "⚠️";
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 16px;
}

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

/* Responsive design */
@media (max-width: 640px) {
	body {
		padding: 16px;
	}

	.container {
		max-width: 100%;
	}

	h1 {
		font-size: 1.75rem;
	}

	textarea {
		min-height: 64px;
		max-height: 160px;
		padding: 12px;
		font-size: 16px;
		border-radius: 6px;
	}

	.pass-display {
		padding: 16px;
		font-size: 15px;
		border-radius: 6px;
	}

	.footer {
		padding: 8px 16px;
		font-size: 0.75rem;
		margin-top: 24px;
	}
}
