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

:root {
	--ink: #172525;
	--muted: #637272;
	--paper: #f5f6f0;
	--panel: rgba(255, 255, 255, 0.82);
	--line: #dce4df;
	--accent: #e8694f;
	--accent-dark: #c9513a;
	--mint: #d9eee7;
	--shadow: 0 24px 70px rgba(34, 58, 54, 0.13);
}

* {
	box-sizing: border-box;
}

body {
	min-height: 100vh;
	margin: 0;
	display: grid;
	place-items: center;
	padding: 32px 18px;
	color: var(--ink);
	font-family: 'DM Sans', sans-serif;
	background:
		radial-gradient(circle at 12% 12%, rgba(217, 238, 231, 0.95) 0 12%, transparent 30%),
		radial-gradient(circle at 92% 86%, rgba(232, 105, 79, 0.14) 0 10%, transparent 29%),
		var(--paper);
}

.container {
	position: relative;
	width: min(100%, 620px);
	padding: clamp(28px, 6vw, 58px);
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.8);
	border-radius: 24px;
	background: var(--panel);
	box-shadow: var(--shadow);
	backdrop-filter: blur(16px);
}

.container::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 7px;
	background: var(--accent);
}

h1 {
	margin: 0;
	font-family: 'Space Grotesk', sans-serif;
	font-size: clamp(2.2rem, 7vw, 3.7rem);
	line-height: 0.98;
	letter-spacing: -0.04em;
}

.subtitle {
	max-width: 380px;
	margin: 18px 0 34px;
	color: var(--muted);
	font-size: 1rem;
	line-height: 1.6;
}

.input-box {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 10px;
	margin-bottom: 22px;
}

input {
	width: 100%;
	min-height: 52px;
	padding: 0 16px;
	border: 1px solid var(--line);
	border-radius: 12px;
	outline: none;
	color: var(--ink);
	background: #fff;
	font: inherit;
	font-size: 1rem;
	transition: border-color 180ms ease, box-shadow 180ms ease;
}

input::placeholder {
	color: #9aa8a3;
}

input:focus {
	border-color: var(--accent);
	box-shadow: 0 0 0 4px rgba(232, 105, 79, 0.14);
}

button {
	min-height: 52px;
	padding: 0 20px;
	border: 0;
	border-radius: 12px;
	color: #fff;
	background: var(--accent);
	cursor: pointer;
	font: 600 0.93rem 'DM Sans', sans-serif;
	transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

button:hover {
	background: var(--accent-dark);
	box-shadow: 0 8px 18px rgba(201, 81, 58, 0.22);
	transform: translateY(-2px);
}

button:active {
	transform: translateY(0);
}

#result {
	display: grid;
	gap: 8px;
	min-height: 20px;
}

#result > p {
	margin: 4px 0 12px;
	color: var(--accent-dark);
	font-weight: 600;
}

.table-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 48px;
	padding: 0 16px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: var(--mint);
	animation: reveal 360ms ease both;
}

.table-row:nth-child(2n) {
	background: #fff;
	border-color: var(--line);
}

.table-row span {
	color: var(--muted);
}

.table-row strong {
	color: var(--ink);
	font-family: 'Space Grotesk', sans-serif;
	font-size: 1.05rem;
}

#clearBtn {
	display: block;
	min-height: auto;
	margin: 26px 0 0 auto;
	padding: 8px 0;
	color: var(--muted);
	background: transparent;
	font-size: 0.9rem;
}

#clearBtn:hover {
	color: var(--accent-dark);
	background: transparent;
	box-shadow: none;
	transform: none;
}

@keyframes reveal {
	from {
		opacity: 0;
		transform: translateY(5px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 520px) {
	body {
		padding: 16px;
	}

	.container {
		border-radius: 18px;
	}

	.input-box {
		grid-template-columns: 1fr;
	}

	.input-box button {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
