* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	font-family: 'Inter', 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

:root {
	--bg-primary: #050a1c;
	--text-primary: #f8fafc;
	--text-muted: #94a3b8;
	--accent-cyan: #22d3ee;
	--accent-indigo: #6366f1;
	--accent-purple: #a855f7;
	--card-border: rgba(148, 163, 184, 0.25);
}

body {
	background: radial-gradient(circle at 25% 20%, rgba(14, 165, 233, 0.25), transparent 40%),
		radial-gradient(circle at 80% 0%, rgba(99, 102, 241, 0.35), transparent 45%),
		var(--bg-primary);
	color: var(--text-primary);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding-inline: clamp(1.5rem, 2vw, 3rem);
	padding-top: clamp(1.5rem, 3vw, 3rem);
	padding-bottom: clamp(1rem, 2vw, 2rem);
	position: relative;
	overflow-x: hidden;
}

body::before,
body::after {
	content: '';
	position: fixed;
	width: 45vw;
	height: 45vw;
	mix-blend-mode: screen;
	filter: blur(140px);
	z-index: -1;
	pointer-events: none;
}

body::before {
	background: rgba(14, 165, 233, 0.25);
	top: -20vw;
	left: -10vw;
}

body::after {
	background: rgba(168, 85, 247, 0.2);
	bottom: -5vw;
	right: -5vw;
}

header,
main,
footer {
	width: min(960px, 100%);
}

header {
	text-align: center;
	margin-bottom: 2.5rem;
}

header h1 {
	font-size: clamp(2rem, 5vw, 3.1rem);
	margin-bottom: 0.75rem;
	letter-spacing: -0.02em;
	text-shadow: 0 10px 30px rgba(15, 23, 42, 0.8);
}

header p {
	color: var(--text-muted);
	max-width: 680px;
	margin: 0 auto;
}

main {
	display: grid;
	gap: 1.75rem;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.input-card,
.results-card {
	background: linear-gradient(165deg, rgba(15, 23, 42, 0.9), rgba(6, 11, 25, 0.95));
	border: 1px solid var(--card-border);
	border-radius: 24px;
	padding: 1.75rem;
	box-shadow: 0 35px 80px rgba(2, 6, 23, 0.65);
	position: relative;
	overflow: hidden;
}

.results-card::before {
	content: '';
	position: absolute;
	inset: 1px;
	border-radius: 22px;
	border: 1px solid rgba(99, 102, 241, 0.25);
	opacity: 0.7;
	pointer-events: none;
}

.input-card::after {
	content: '';
	position: absolute;
	width: 40%;
	height: 40%;
	background: radial-gradient(circle, rgba(14, 165, 233, 0.15), transparent 70%);
	bottom: -20%;
	right: -10%;
	filter: blur(30px);
	z-index: 0;
}

.input-card > * {
	position: relative;
	z-index: 1;
}

label {
	display: block;
	margin-bottom: 0.75rem;
	font-weight: 600;
	color: #cbd5f5;
}

textarea {
	width: 100%;
	min-height: 220px;
	border-radius: 20px;
	border: 1px solid rgba(148, 163, 184, 0.35);
	background: rgba(8, 12, 31, 0.85);
	color: #f8fafc;
	padding: 1rem;
	font-size: 1rem;
	resize: vertical;
	transition: border 0.2s ease, box-shadow 0.2s ease;
}

textarea:focus {
	outline: none;
	border-color: rgba(34, 211, 238, 0.8);
	box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.4), 0 10px 35px rgba(13, 148, 136, 0.15);
}

.input-card.loading textarea {
	border-color: #38bdf8;
	box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.3);
}

.input-card.has-error textarea {
	border-color: #f87171;
	box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.3);
}

.input-hint {
	margin-top: 0.5rem;
	font-size: 0.9rem;
	color: #93c5fd;
	min-height: 1.2rem;
}

.input-hint[data-variant='error'] {
	color: #fecaca;
}

.input-hint[data-variant='hint'] {
	color: #facc15;
}

.input-hint[data-variant='loading'] {
	color: #bae6fd;
	font-style: italic;
}

.controls {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-top: 1.25rem;
}

button {
	background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
	color: white;
	border: none;
	border-radius: 999px;
	padding: 0.85rem 1.85rem;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.25s ease, opacity 0.25s ease, box-shadow 0.25s ease;
	box-shadow: 0 18px 35px rgba(6, 182, 212, 0.25);
}

button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	box-shadow: none;
}

button:not(:disabled):hover {
	transform: translateY(-1px) scale(1.015);
	box-shadow: 0 22px 45px rgba(99, 102, 241, 0.35);
}

#status {
	font-size: 0.95rem;
	color: #93c5fd;
}

#status.error {
	color: #fda4af;
}

#status.success {
	color: #34d399;
}

#status.hint {
	color: #facc15;
}

#status.loading {
	color: #bae6fd;
}

.results-card h2 {
	font-size: 1.2rem;
	margin-bottom: 1rem;
	letter-spacing: 0.02em;
	color: #e0e7ff;
}

#summary-list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

#summary-list li {
	padding: 0.95rem 1.15rem;
	background: rgba(15, 118, 192, 0.2);
	border-radius: 16px;
	border: 1px solid rgba(59, 130, 246, 0.35);
	box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.25);
	line-height: 1.45;
	position: relative;
	padding-left: 2.3rem;
}

#summary-list li.placeholder {
	border-style: dashed;
	color: #94a3b8;
	background: transparent;
}

#summary-list li::before {
	content: '';
	position: absolute;
	width: 0.8rem;
	height: 0.8rem;
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
	border-radius: 50%;
	background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
	opacity: 0.8;
}

#summary-list li.placeholder::before {
	display: none;
}

.metadata {
	margin-top: 1.5rem;
	font-size: 0.9rem;
	color: #94a3b8;
	line-height: 1.5;
}

.metadata-grid {
	display: grid;
	grid-template-columns: minmax(120px, 180px) 1fr;
	gap: 0.35rem 1rem;
	padding: 1rem;
	border-radius: 16px;
	background: rgba(15, 23, 42, 0.6);
	border: 1px solid rgba(148, 163, 184, 0.25);
}

.meta-label {
	font-weight: 600;
	color: #cbd5f5;
}

.meta-value {
	color: #e2e8f0;
	word-break: break-word;
}

.lang-badge,
.translated-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.1rem 0.55rem;
	border-radius: 999px;
	font-size: 0.85rem;
	background: rgba(56, 189, 248, 0.15);
	border: 1px solid rgba(56, 189, 248, 0.4);
	color: #bae6fd;
	text-transform: uppercase;
}

.translated-badge.yes {
	background: rgba(52, 211, 153, 0.15);
	border-color: rgba(52, 211, 153, 0.4);
	color: #86efac;
}

.translated-badge.no {
	background: rgba(248, 113, 113, 0.12);
	border-color: rgba(248, 113, 113, 0.3);
	color: #fecaca;
}

.metadata details {
	margin-top: 1rem;
	background: rgba(15, 23, 42, 0.5);
	border-radius: 12px;
	border: 1px solid rgba(148, 163, 184, 0.2);
	padding: 0.75rem 1rem;
}

.metadata details summary {
	cursor: pointer;
	font-weight: 600;
	color: #cbd5f5;
}

.metadata details p {
	margin-top: 0.5rem;
	color: #e2e8f0;
	font-size: 0.9rem;
}

footer {
	margin-top: 1.5rem;
	text-align: center;
	font-size: 0.85rem;
	color: #94a3b8;
	letter-spacing: 0.04em;
}

@media (max-width: 720px) {
	body {
		padding: 1.25rem;
	}

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

	button {
		width: 100%;
	}

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