:root {
	--bg: #090d13;
	--panel: #101722;
	--panel-border: #2a3c52;
	--text: #e7f1ff;
	--muted: #9fb2c9;
	--accent: #66ffd0;
	--accent-strong: #30c6f0;
	--focus: #95ffe1;
	--line: rgba(149, 255, 225, 0.14);
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	min-height: 100vh;
	color: var(--text);
	font-family: "Manrope", "Avenir Next", "Segoe UI", sans-serif;
	background: linear-gradient(145deg, #080c12 0%, #0d1420 56%, #090d13 100%);
	display: grid;
	place-items: center;
	padding: 24px;
	position: relative;
}

body::before {
	content: "";
	position: fixed;
	inset: 0;
	background:
		linear-gradient(var(--line) 1px, transparent 1px),
		linear-gradient(90deg, rgba(149, 255, 225, 0.08) 1px, transparent 1px);
	background-size: 56px 56px;
	mask-image: radial-gradient(circle at center, black 36%, transparent 100%);
	pointer-events: none;
	opacity: 0.26;
}

main[hidden] {
	display: none;
}

.card {
	width: min(520px, 100%);
	border: 1px solid var(--panel-border);
	border-radius: 14px;
	background:
		linear-gradient(180deg, rgba(16, 23, 34, 0.96), rgba(12, 18, 28, 0.98));
	box-shadow:
		0 30px 80px rgba(0, 0, 0, 0.48),
		0 0 0 1px rgba(102, 255, 208, 0.08),
		inset 0 1px 0 rgba(255, 255, 255, 0.03);
	padding: 30px 28px;
	position: relative;
}

.card-content {
	display: grid;
	gap: 16px;
}

.card-corner {
	position: absolute;
	height: 20px;
	top: 12px;
	right: 14px;
	display: inline-flex;
	align-items: center;
	gap: 4px;

}

.card-brand {
	font-family: "JetBrains Mono", "IBM Plex Mono", "Consolas", monospace;
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	color: rgba(157, 255, 229, 0.72);
}

.logout-button {
	border: 0;
	min-width: 0;
	padding: 0;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: transparent;
	color: rgba(157, 255, 229, 0.72);
	font-family: "JetBrains Mono", "IBM Plex Mono", "Consolas", monospace;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
	line-height: 1;
	display: inline-grid;
	place-items: center;
}

.logout-button:hover {
	background: rgba(149, 255, 225, 0.14);
	color: rgba(196, 255, 240, 0.95);
}

.logout-button:active {
	background: rgba(149, 255, 225, 0.22);
}

.title {
	margin: 0;
	letter-spacing: 0.015em;
	font-size: clamp(1.45rem, 2.5vw, 1.95rem);
	font-weight: 700;
	text-align: center;
	padding-top: 8px;
}

.subtitle {
	margin: 0;
	color: var(--muted);
	font-size: 0.9rem;
	line-height: 1.5;
	text-align: center;
}

.actions {
	display: grid;
	gap: 10px;
	margin-top: 2px;
}

.generator {
	display: flex;
	align-items: stretch;
	border: 1px solid #35506d;
	border-radius: 10px;
	overflow: hidden;
	background: #0d1621;
	position: relative;
}

.generator::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent 0%, rgba(149, 255, 225, 0.5) 50%, transparent 100%);
	pointer-events: none;
}

.username-output {
	flex: 1;
	border: 0;
	background: transparent;
	color: var(--text);
	font-size: 0.97rem;
	padding: 12px 14px;
	outline: none;
	font-family: "JetBrains Mono", "IBM Plex Mono", "Consolas", monospace;
	letter-spacing: 0.02em;
}

.username-output::selection {
	background: rgba(83, 192, 255, 0.26);
}

.generator:focus-within {
	border-color: var(--focus);
	box-shadow: 0 0 0 3px rgba(138, 212, 255, 0.2);
}

button {
	appearance: none;
	border: 0;
	border-left: 1px solid rgba(95, 187, 220, 0.18);
	border-radius: 0;
	background: #111c29;
	color: #bde9ff;
	font-weight: 600;
	letter-spacing: 0.04em;
	font-size: 0.76rem;
	text-transform: uppercase;
	padding: 12px 18px;
	cursor: pointer;
	transition: background-color 0.16s ease, color 0.16s ease;
}

button:hover {
	background: #152434;
	color: #d8f3ff;
}

button:active {
	background: #0f1a26;
}

button:focus-visible {
	outline: none;
	box-shadow:
		0 0 0 2px rgba(9, 20, 30, 0.9),
		0 0 0 4px rgba(149, 255, 225, 0.32);
}

.hint {
	margin: 0;
	color: var(--muted);
	font-size: 0.82rem;
	text-align: center;
	font-family: "JetBrains Mono", "IBM Plex Mono", "Consolas", monospace;
}

.login-form {
	display: grid;
	gap: 14px;
}

.form-field {
	display: grid;
	gap: 8px;
}

.field-label {
	font-size: 0.84rem;
	letter-spacing: 0.02em;
	color: var(--muted);
}

.text-input {
	width: 100%;
	border: 1px solid #35506d;
	border-radius: 10px;
	background: #0d1621;
	color: var(--text);
	font-size: 0.95rem;
	padding: 11px 12px;
	outline: none;
	transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.text-input:focus {
	border-color: var(--focus);
	box-shadow: 0 0 0 3px rgba(138, 212, 255, 0.2);
}

.row-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.check-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 0.85rem;
	color: var(--muted);
}

.check-label input {
	accent-color: var(--accent-strong);
}

.muted-link {
	color: #b8cff1;
	font-size: 0.85rem;
	text-decoration: none;
}

.muted-link:hover {
	text-decoration: underline;
}

.form-submit {
	border-left: 0;
	border-radius: 10px;
	width: 100%;
	background: #111c29;
	font-size: 0.82rem;
	letter-spacing: 0.06em;
}

.spinner-wrap {
	min-height: 190px;
	display: grid;
	place-items: center;
}

.spinner {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: conic-gradient(from 180deg, transparent 0deg, rgba(102, 255, 208, 0.46) 140deg, rgba(48, 198, 240, 0.44) 260deg, transparent 360deg);
	mask: radial-gradient(farthest-side, transparent calc(100% - 5px), black calc(100% - 4px));
	animation: spin 1.35s linear infinite;
	opacity: 0.72;
}

@keyframes spin {
	to {
		transform: rotate(1turn);
	}
}

@media (max-width: 640px) {
	.card {
		padding: 20px;
	}
}
