* {
	box-sizing: border-box;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	justify-content: center;
	align-items: center;
	background: #0f172a;
	color: #e5e7eb;
}

.container {
	background: #020617;
	border-radius: 1.25rem;
	padding: 1.5rem;
	width: 100%;
	max-width: 480px;
	box-shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
	border: 1px solid rgba(148, 163, 184, 0.2);
}

h1 {
	margin: 0 0 0.75rem;
	font-size: 1.4rem;
	text-align: center;
}

p.description {
	margin: 0 0 1.25rem;
	text-align: center;
	color: #9ca3af;
}

.video-wrapper {
	position: relative;
	border-radius: 1rem;
	overflow: hidden;
	background: #020617;
	border: 1px solid rgba(148, 163, 184, 0.25);
	aspect-ratio: 3 / 4;
	margin-bottom: 1rem;
	display: none;
	/* hidden until scanner starts */
}

video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.scan-frame {
	position: absolute;
	inset: 15%;
	border-radius: 1.25rem;
	border: 2px dashed rgba(248, 250, 252, 0.7);
	box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.5) inset;
}

.status {
	font-size: 0.8rem;
	margin-top: 0.4rem;
	color: #9ca3af;
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
}

.status span {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

button {
	width: 100%;
	margin: 2rem 0;
	padding: 0.7rem 1rem;
	border-radius: 999px;
	border: none;
	cursor: pointer;
	background: linear-gradient(135deg, #4f46e5, #0ea5e9);
	color: white;
	font-weight: 600;
	font-size: 0.95rem;
	letter-spacing: 0.02em;
	transition: transform 0.08s ease, box-shadow 0.08s ease, opacity 0.15s ease;
	box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

button:hover {
	transform: translateY(-1px);
	box-shadow: 0 14px 35px rgba(59, 130, 246, 0.6);
}

button:active {
	transform: translateY(0);
	box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

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

.output {
	margin-top: 1.25rem;
	padding: 0.7rem 0.9rem;
	border-radius: 0.9rem;
	background: rgba(15, 23, 42, 0.95);
	border: 1px solid rgba(55, 65, 81, 0.9);
	font-size: 0.85rem;
	min-height: 2.5rem;
	word-break: break-word;
}

.output-label {
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: #6b7280;
	margin-bottom: 0.15rem;
}

.output-text.empty {
	color: #6b7280;
	font-style: italic;
}

.details {
	margin-top: 0.8rem;
	padding-top: 0.6rem;
	border-top: 1px dashed rgba(75, 85, 99, 0.8);
	font-size: 0.85rem;
}

.details h2 {
	font-size: 0.9rem;
	margin: 0 0 0.4rem;
	color: #e5e7eb;
}

.details table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.83rem;
}

.details td {
	padding: 0.18rem 0;
	vertical-align: top;
}

.details td.label {
	color: #9ca3af;
	width: 35%;
}

.details td.value {
	color: #e5e7eb;
}

.error {
	margin-top: 0.6rem;
	font-size: 0.8rem;
	color: #f97373;
}