@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
	color-scheme: dark;
	--bg: #0b0f1a;
	--card: #121827;
	--card-strong: #0f1b31;
	--text: #eef2ff;
	--muted: #9aa3b2;
	--primary: #6d8cff;
	--primary-strong: #4d6bff;
	--accent: #26d0ce;
	--border: rgba(255, 255, 255, 0.08);
	--shadow: 0 25px 60px rgba(8, 12, 20, 0.7);
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	font-family: 'Inter', sans-serif;
}

body {
	min-height: 100vh;
	background: radial-gradient(circle at top, #1f2a44 0%, #0b0f1a 60%);
	color: var(--text);
}

.page {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 32px 16px;
}

.card {
	width: min(680px, 94vw);
	background: linear-gradient(160deg, rgba(18, 24, 39, 0.9), rgba(9, 13, 24, 0.9));
	border: 1px solid var(--border);
	border-radius: 28px;
	padding: 32px;
	box-shadow: var(--shadow);
	backdrop-filter: blur(18px);
	display: grid;
	gap: 24px;
	position: relative;
	overflow: hidden;
}

.card::after {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 20% 20%, rgba(109, 140, 255, 0.18), transparent 45%);
	pointer-events: none;
}

.card__header {
	display: flex;
	justify-content: space-between;
	gap: 24px;
	align-items: center;
	position: relative;
	z-index: 1;
}

.glow {
	width: 110px;
	height: 110px;
	background: radial-gradient(circle, rgba(38, 208, 206, 0.6), transparent 70%);
	filter: blur(8px);
	border-radius: 50%;
}

.eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.2em;
	font-size: 0.68rem;
	color: var(--accent);
	margin-bottom: 6px;
	font-weight: 600;
}

.title {
	font-size: clamp(1.6rem, 3vw, 2.4rem);
	font-weight: 700;
}

.subtitle {
	color: var(--muted);
	margin-top: 8px;
	font-size: 0.95rem;
	line-height: 1.5;
}

.output {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 12px;
	background: var(--card-strong);
	padding: 16px;
	border-radius: 18px;
	border: 1px solid var(--border);
	position: relative;
	z-index: 1;
}

.output__field {
	background: transparent;
	border: none;
	color: var(--text);
	font-size: 1.1rem;
	letter-spacing: 0.06em;
	outline: none;
}

.btn {
	background: linear-gradient(135deg, var(--primary), var(--primary-strong));
	color: white;
	border: none;
	border-radius: 14px;
	padding: 12px 18px;
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
	box-shadow: 0 12px 30px rgba(77, 107, 255, 0.25);
}

.btn:hover {
	transform: translateY(-2px);
	filter: brightness(1.05);
}

.btn:active {
	transform: translateY(1px);
	box-shadow: none;
}

.btn--ghost {
	background: rgba(255, 255, 255, 0.08);
	box-shadow: none;
}

.btn--success {
	background: linear-gradient(135deg, #26d0ce, #6d8cff);
}

.btn__icon {
	font-size: 1.05rem;
}

.controls {
	display: grid;
	gap: 18px;
	position: relative;
	z-index: 1;
}

.control {
	display: grid;
	gap: 12px;
}

.control__label {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-weight: 500;
}

.chip {
	background: rgba(109, 140, 255, 0.15);
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.85rem;
	color: var(--primary);
}

input[type='range'] {
	-webkit-appearance: none;
	width: 100%;
	height: 6px;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--primary), var(--accent));
	outline: none;
	cursor: pointer;
	transition: filter 0.2s ease;
}

input[type='range']::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: white;
	box-shadow: 0 0 0 4px rgba(109, 140, 255, 0.25);
}

.options {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.toggle {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--border);
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.toggle:hover {
	background: rgba(255, 255, 255, 0.06);
	transform: translateY(-2px);
}

.toggle input {
	display: none;
}

.toggle__ui {
	width: 44px;
	height: 24px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.15);
	position: relative;
	transition: background 0.2s ease;
}

.toggle__ui::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 4px;
	width: 18px;
	height: 18px;
	background: white;
	border-radius: 50%;
	transition: transform 0.2s ease;
}

.toggle input:checked + .toggle__ui {
	background: rgba(109, 140, 255, 0.9);
}

.toggle input:checked + .toggle__ui::after {
	transform: translateX(18px);
}

.actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	flex-wrap: wrap;
	position: relative;
	z-index: 1;
}

.strength {
	min-width: 220px;
	display: grid;
	gap: 6px;
}

.strength__label {
	font-size: 0.85rem;
	color: var(--muted);
}

.strength__value {
	font-weight: 600;
}

.strength__bar {
	height: 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	overflow: hidden;
}

.strength__bar span {
	display: block;
	height: 100%;
	width: 55%;
	background: linear-gradient(90deg, #fbbf24, #f97316);
	transition: width 0.3s ease, background 0.3s ease;
}

.strength__bar span[data-level='weak'] {
	background: linear-gradient(90deg, #f87171, #fb7185);
}

.strength__bar span[data-level='medium'] {
	background: linear-gradient(90deg, #fbbf24, #f97316);
}

.strength__bar span[data-level='strong'] {
	background: linear-gradient(90deg, #22c55e, #14b8a6);
}

@media (max-width: 600px) {
	.card {
		padding: 24px;
	}

	.output {
		grid-template-columns: 1fr;
	}

	.actions {
		flex-direction: column;
		align-items: stretch;
	}
}
