/* --------- VARIÁVEIS DE TEMA --------- */
:root {
	--bg: #eef1ff;
	--text: #1a1a1a;
	--card: rgba(255, 255, 255, 0.7);
	--border: rgba(0, 0, 0, 0.08);
	--primary: #836cff;
	--primary-dark: #6c54ff;
}

body.dark {
	--bg: #0d0f17;
	--text: #e6e6e6;
	--card: rgba(255, 255, 255, 0.06);
	--border: rgba(255, 255, 255, 0.12);
	--primary: #aa92ff;
	--primary-dark: #c7baff;
}

/* --------- BASE --------- */
body {
	margin: 0;
	font-family: system-ui, sans-serif;
	background: var(--bg);
	color: var(--text);
	transition: background 0.3s ease, color 0.3s ease;
}

header {
	display: flex;
	justify-content: space-between;
	padding: 20px;
	max-width: 900px;
	margin: auto;
}

#themeToggle {
	font-size: 22px;
	background: none;
	border: none;
	cursor: pointer;
}

footer {
	text-align: center;
	padding: 15px;
	font-size: 14px;
	color: var(--text);
}

.stats {
	text-align: center;
	margin-top: 10px;
	font-size: 14px;
	color: var(--text);
}

/* --------- CONTAINER --------- */
.container {
	max-width: 900px;
	margin: auto;
	padding: 20px;
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: 14px;
	backdrop-filter: blur(12px);
}

.input-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 6px;
}

.auto-mode {
	font-size: 15px;
	display: flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
}

.auto-mode input {
	transform: scale(1.2);
	cursor: pointer;
}

.output-header {
	margin-bottom: 6px;
}

/* --------- TEXTOS --------- */
textarea {
	width: calc(100% - 27px);
	min-height: 140px;
	padding: 12px;
	border-radius: 10px;
	border: 1px solid var(--border);
	background: rgba(0, 0, 0, 0.03);
	color: var(--text);
	font-size: 16px;
	resize: vertical;
}

textarea:focus {
	outline: 2px solid var(--primary);
}

/* --------- BOTÕES --------- */
button {
	cursor: pointer;
	border-radius: 8px;
	border: none;
	font-size: 16px;
	transition: 0.2s;
}

.transform-btn-wrapper {
	display: flex;
	justify-content: flex-end;
	margin-top: 10px;
}

.primary {
	background: var(--primary);
	color: #fff;
	padding: 12px 22px;
	margin-bottom: 15px;
}

.primary:hover {
	background: var(--primary-dark);
}

.action-buttons {
	text-align: center;
	margin: 20px 0 25px;
}

.action-buttons button {
	background: #fff;
	padding: 10px 16px;
	border: 1px solid var(--border);
	margin-right: 8px;
}

.action-buttons button:hover {
	background: var(--primary);
	color: #fff;
}

/* --------- RESPONSIVIDADE --------- */
@media (max-width: 768px) {
	textarea {
		min-height: 110px;
	}

	header {
		flex-direction: column;
		text-align: center;
	}

	#themeToggle {
		margin-top: 10px;
	}

	.action-buttons {
		display: flex;
		flex-wrap: wrap;
	}

	.action-buttons button {
		flex: 1 1 48%;
		margin-bottom: 8px;
	}
}

@media (max-width: 480px) {
	textarea {
		font-size: 14px;
	}

	.container {
		padding: 16px;
	}
}