:root {
	--background: #000000;
	--foreground: #d2d6dd;
	--muted: #94a3b8;
	--accent: #66aa88;
	--surface: rgba(16, 24, 32, 0.8);
	--border: rgba(102, 170, 136, 0.35);
}

body {
	font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	background: radial-gradient(520px circle at 45% 30%, rgba(102, 170, 190, 0.12), transparent 65%), radial-gradient(640px circle at 75% 70%, rgba(76, 140, 180, 0.1), transparent 72%), radial-gradient(880px circle at 50% 50%, rgba(56, 120, 140, 0.16), transparent 78%), var(--background);
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: var(--foreground);
	gap: 1rem;
	padding: 1.5rem;
}

/* Inline language selector */
.language-selector-topright { position: fixed; top: 1rem; right: 1rem; z-index: 1000; font-size: 0.75rem; font-weight: 600; letter-spacing: .5px; display: flex; align-items: center; gap: 0.5rem; }
.lang-inline { display: flex; gap: .4rem; background: rgba(255,255,255,0.08); padding: 4px 8px; border-radius: 999px; backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.18); box-shadow: 0 8px 30px rgba(0,0,0,0.35); }
.lang-inline.locked { opacity: .4; pointer-events: none; }
.lang-choice { cursor: pointer; padding: 4px 10px; border-radius: 999px; color: var(--muted); user-select: none; transition: background .18s, color .18s; }
.lang-choice:hover { color: var(--foreground); background: rgba(255,255,255,0.16); }
.lang-choice.active { background: var(--accent); color: #000000; box-shadow: 0 0 0 1px rgba(255,255,255,0.12); }

.logo-container { display: none; }
.logo { display: none; }

.claim-form {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	width: 100%;
	max-width: 600px;
	margin-bottom: 1rem;
	background: var(--surface);
	border: 1px solid rgba(255,255,255,0.08);
	border-radius: 18px;
	padding: 1.25rem;
	box-shadow: 0 16px 60px rgba(0, 0, 0, 0.35);
}

.claim-label {
	font-size: 1rem;
	font-weight: 500;
	color: var(--foreground)
}

.claim-textarea {
	background: rgba(255,255,255,0.04);
	border: 1px solid rgba(255,255,255,0.12);
	border-radius: 12px;
	padding: 0.9rem;
	color: var(--foreground);
	font-size: 0.95rem;
	font-family: inherit;
	resize: vertical;
	min-height: 100px;
	max-height: 300px;
	width: 100%;
	box-sizing: border-box;
	box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.claim-textarea:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 2px rgba(102,170,136,0.25), 0 14px 40px rgba(0,0,0,0.35)
}

.claim-textarea::placeholder {
	color: var(--muted)
}

.dropzone {
	width: min(500px, 90vw);
	aspect-ratio: 4/3;
	border: 1.5px dashed var(--border);
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	position: relative;
	background: rgba(255, 255, 255, 0.02);
	transition: .25s border-color, .25s background, .25s color;
	color: var(--muted);
	box-shadow: 0 16px 60px rgba(0,0,0,0.35);
}

.dropzone:hover,
.dropzone.hover {
	border-color: var(--accent);
	background: rgba(102, 170, 136, 0.08);
	color: #ffffff;
}

.dz-instructions {
	font-size: 1.05rem;
	text-align: center;
	max-width: 70%;
	line-height: 1.35;
	color: var(--muted)
}

.uploaded-files {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	width: 100%;
	max-width: 600px;
	margin-top: 1rem
}

.staged-file {
	background: rgba(255, 255, 255, .04);
	border: 1px solid rgba(255,255,255,0.08);
	border-radius: 12px;
	padding: 0.9rem;
	width: 100%;
	box-sizing: border-box;
	color: var(--foreground);
	box-shadow: 0 12px 38px rgba(0,0,0,0.32);
}

.file-info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem
}

.file-name {
	font-weight: 500;
	color: #ffffff;
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap
}

.file-type {
	font-size: 0.85rem;
	color: var(--foreground);
	background: rgba(255,255,255,0.08);
	padding: 0.25rem 0.5rem;
	border-radius: 4px;
	flex-shrink: 0
}

.remove-btn {
	background: #ef4444;
	border: none;
	color: white;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: bold;
	flex-shrink: 0;
	transition: background 0.2s
}

.remove-btn:hover {
	background: #dc2626
}

.submit-btn {
	background: linear-gradient(135deg, #88c0aa 0%, #d4c088 100%);
	color: #000000;
	border: none;
	padding: 0.75rem 2rem;
	border-radius: 999px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	margin-top: 1rem;
	box-shadow: 0 8px 24px rgba(136, 192, 170, 0.4);
	transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
}

.submit-btn:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 12px 32px rgba(136, 192, 170, 0.6);
}

.submit-btn:disabled {
	cursor: not-allowed;
	filter: grayscale(0.45);
	opacity: 0.7;
}

.prompt-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 0.25rem
}

.prompt-length {
	color: #94a3b8;
	font-size: 0.85rem
}

.submissions-link {
	margin: 0;
}

.submissions-link.toplink {
	position: fixed;
	top: 1rem;
	left: 1rem;
	z-index: 1000;
	display: flex;
	align-items: center;
}

.submissions-link a {
	color: #60a5fa;
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 500;
}

.submissions-link.toplink a + a {
	margin-left: 1rem;
}

.submissions-link a:hover {
	text-decoration: underline;
}

.sections {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	width: 100%;
	max-width: 600px;
	align-items: center
}

.section {
	background: rgba(255, 255, 255, .04);
	border: 1px solid rgba(255,255,255,0.08);
	padding: 1rem;
	border-radius: 12px;
	width: 100%;
	box-sizing: border-box
}

.section.error {
	border-color: #ef4444;
	background: rgba(239, 68, 68, .1)
}

.section.success {
	border-color: #10b981;
	background: rgba(16, 185, 129, .1)
}

.section.fraud-alert {
	border-color: #ef4444;
	background: rgba(239, 68, 68, .15)
}

.section.possible-fraud {
	border-color: #f59e0b;
	background: rgba(245, 158, 11, .15)
}

.section.valid-claim {
	border-color: #10b981;
	background: rgba(16, 185, 129, .15)
}

.text-content {
	font-size: 1.1rem;
	font-weight: 500;
	text-align: center;
	color: #e2e8f0
}

.section.error .text-content {
	color: #ef4444
}

.section.success .text-content {
	color: #10b981
}

.section.fraud-alert .text-content {
	color: #ef4444
}

.section.possible-fraud .text-content {
	color: #f59e0b
}

.section.valid-claim .text-content {
	color: #10b981
}

.data-content,
.analysis-content,
.ocr-content {
	margin-top: 0.75rem;
	text-align: left;
	white-space: pre-wrap;
	font-size: 1rem;
	font-weight: 400
}

.explanation-content {
	margin-top: 0.75rem;
	text-align: left;
	font-size: 1rem;
	font-weight: 400;
	color: #e2e8f0;
	padding: 0.75rem;
	background: rgba(255, 255, 255, 0.03);
	border-radius: 8px;
	border-left: 4px solid currentColor
}

.expandable-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	cursor: pointer;
	user-select: none;
	padding: 0.25rem 0
}

.expandable-header:hover {
	opacity: 0.8
}

.expand-icon {
	font-size: 0.9rem;
	color: #94a3b8;
	transition: transform 0.2s ease
}

.expandable-content {
	overflow: hidden;
	transition: all 0.3s ease
}

.expandable-content.collapsed {
	max-height: 0;
	opacity: 0;
	margin-top: 0
}

.expandable-content.expanded {
	max-height: 10000px;
	opacity: 1;
	margin-top: 0.75rem
}

.data-items {
	display: flex;
	flex-direction: column;
	gap: 0.5rem
}

.ocr-items {
	display: flex;
	flex-direction: column;
	gap: 1rem
}

.ocr-item {
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid #374151;
	border-radius: 8px;
	padding: 0.75rem;
}

.ocr-file-header {
	margin-bottom: 0.5rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid #374151;
	color: #cbd5e1;
}

.ocr-text {
	color: #e2e8f0;
	line-height: 1.5;
	white-space: pre-wrap;
	font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
	font-size: 0.9rem;
	background: rgba(0, 0, 0, 0.2);
	padding: 0.75rem;
	border-radius: 6px;
	border: 1px solid #475569;
	max-height: 300px;
	overflow-y: auto;
}

.data-item {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	padding: 0.5rem;
	background: rgba(255, 255, 255, 0.02);
	border-radius: 6px;
	border: 1px solid #374151
}

.data-key {
	font-weight: 600;
	color: #cbd5e1;
	font-size: 0.9rem
}

.data-value {
	color: #e2e8f0;
	font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
	font-size: 0.85rem;
	white-space: pre-wrap;
	word-break: break-all
}

.image-section {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.75rem
}

.image-title {
	font-size: 1rem;
	font-weight: 600;
	color: #cbd5e1;
	text-align: center
}

.section-image {
	max-width: 100%;
	max-height: 300px;
	border-radius: 8px;
	border: 1px solid #334155;
	object-fit: contain
}

.spinner {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 5px solid #334155;
	border-top: 5px solid #60a5fa;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

.hidden {
	display: none !important;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}
