:root {
	--fundo: #17163a;
	--papel: #232150;
	--texto: #ece8f7;
	--suave: #a9a3cc;
	--brilho: #f2b5c9;
	--erro: #ff8d8d;
	--certo: #7fe0a0;

	--serif: "Cormorant Garamond", Georgia, serif;
	--maquina: "Courier Prime", "Courier New", monospace;
}

* {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
	margin: 0;
}

body {
	background: var(--fundo);
	color: var(--texto);

	font-family: var(--serif);

	display: flex;
	align-items: center;
	justify-content: center;

	padding: 24px;
}

main {
	width: 100%;
	max-width: 560px;
}

h1 {
	font-size: clamp(2rem, 7vw, 3rem);
	font-weight: 500;

	margin: 0 0 8px;

	line-height: 1.1;
}

.intro {
	color: var(--suave);

	font-size: 1.2rem;

	margin: 0 0 20px;

	line-height: 1.4;
}

.mensagem {
	background: var(--papel);

	border-radius: 6px;

	padding: 24px 22px;

	margin-bottom: 24px;

	font-family: var(--maquina);

	font-size: 1.15rem;

	line-height: 1.7;

	letter-spacing: 0.04em;

	overflow-wrap: anywhere;

	min-height: 120px;
}

.mensagem.aberta {
	color: var(--brilho);
}

form {
	display: flex;
	gap: 10px;
}

label {
	position: absolute;
	left: -9999px;
}

input {
	flex: 1;
	min-width: 0;

	padding: 14px 16px;

	font: inherit;
	font-size: 1.3rem;

	color: var(--texto);

	background: transparent;

	border: 1px solid var(--suave);

	border-radius: 6px;
}

input:focus-visible,
button:focus-visible {
	outline: 2px solid var(--brilho);
	outline-offset: 2px;
}

button {
	padding: 14px 20px;

	font: inherit;

	font-size: 1.3rem;
	font-weight: 500;

	color: var(--fundo);

	background: var(--brilho);

	border: 0;

	border-radius: 6px;

	cursor: pointer;
}

.dica-btn {
	margin: 0 0 14px;

	padding: 8px 14px;

	font-size: 1.1rem;

	color: var(--brilho);

	background: transparent;

	border: 1px solid var(--brilho);
}

.dica {
	margin: 0 0 14px;

	font-size: 1.15rem;

	font-style: italic;

	color: var(--suave);
}

.dica:empty {
	display: none;
}

.aviso {
	min-height: 1.6em;

	margin: 12px 0 0;

	font-size: 1.15rem;
}

.aviso.erro {
	color: var(--erro);
}

.aviso.certo {
	color: var(--certo);
}

#btn-proxima {
	margin-top: 8px;
}

.tremer {
	animation: tremer 0.35s;
}

@keyframes tremer {
	25% {
		transform: translateX(-6px);
	}

	75% {
		transform: translateX(6px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.tremer {
		animation: none;
	}
}
