:root {
	--bg: #f6f8fc;
	--card: #ffffff;
	--border: #e2e6ee;
	--text: #1c2128;
	--muted: #5c6877;
	--brand: #2964ff;
	--brand-hover: #1a52e0;
	--brand-soft: #e8efff;
	--ok: #21a663;
	--err: #d04545;
	--warn: #c47a00;
	--radius: 10px;
	--shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 10px 24px rgba(20, 30, 80, 0.05);
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg: #0f1115;
		--card: #181b21;
		--border: #2a2f39;
		--text: #e6e6e6;
		--muted: #8a93a6;
		--brand: #4d83ff;
		--brand-hover: #6699ff;
		--brand-soft: #1d2740;
	}
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
	font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Helvetica, Arial, sans-serif;
	background: var(--bg);
	color: var(--text);
	line-height: 1.55;
	font-size: 15px;
	min-height: 100vh;
}

header.topbar {
	background: var(--card);
	border-bottom: 1px solid var(--border);
	padding: 14px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
header.topbar .logo {
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.5px;
	color: var(--brand);
}
header.topbar .logo span { font-weight: 400; color: var(--muted); margin-left: 8px; font-size: 13px; }

main.container {
	max-width: 760px;
	margin: 30px auto;
	padding: 0 16px;
}

.card {
	background: var(--card);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 24px;
	margin-bottom: 20px;
}

.dropzone {
	border: 2px dashed var(--border);
	border-radius: var(--radius);
	padding: 38px 20px;
	text-align: center;
	background: var(--bg);
	transition: all 0.15s;
	cursor: pointer;
}
.dropzone:hover, .dropzone.dragover {
	border-color: var(--brand);
	background: var(--brand-soft);
}
.dropzone .icon {
	font-size: 42px;
	color: var(--brand);
	display: block;
	margin-bottom: 8px;
}
.dropzone .hint {
	color: var(--muted);
	font-size: 13px;
	margin-top: 6px;
}

.file-preview {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 16px;
	background: var(--bg);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	margin-top: 14px;
}
.file-preview .name { font-weight: 500; }
.file-preview .meta { color: var(--muted); font-size: 13px; }
.file-preview button.remove {
	background: none;
	border: 1px solid var(--border);
	color: var(--muted);
	padding: 4px 12px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
}
.file-preview button.remove:hover { color: var(--err); border-color: var(--err); }

.options { margin-top: 18px; }
.option-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; }
.option-row label { color: var(--muted); font-size: 14px; }
.option-row input[type="number"], .option-row input[type="text"], .option-row input[type="password"], .option-row select {
	border: 1px solid var(--border);
	background: var(--card);
	color: var(--text);
	padding: 6px 10px;
	border-radius: 6px;
	font: inherit;
	width: 160px;
}
.option-row input[type="checkbox"] { transform: scale(1.2); accent-color: var(--brand); }

.btn {
	display: inline-block;
	background: var(--brand);
	color: #fff;
	border: 0;
	padding: 10px 22px;
	border-radius: 8px;
	font: inherit;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s;
}
.btn:hover { background: var(--brand-hover); }
.btn:disabled { background: var(--muted); cursor: not-allowed; opacity: 0.6; }
.btn.full { display: block; width: 100%; margin-top: 16px; padding: 12px; font-size: 16px; }
.btn.secondary { background: var(--brand-soft); color: var(--brand); }
.btn.danger { background: var(--err); }

.progress {
	margin-top: 16px;
	width: 100%;
	height: 8px;
	background: var(--bg);
	border-radius: 4px;
	overflow: hidden;
}
.progress > div {
	height: 100%;
	background: var(--brand);
	width: 0%;
	transition: width 0.2s;
}
.progress-text { text-align: center; color: var(--muted); font-size: 13px; margin-top: 6px; }

.share-result {
	text-align: center;
}
.share-result h3 { color: var(--ok); margin-top: 0; }
.share-url {
	display: flex;
	gap: 8px;
	margin: 14px 0;
	align-items: stretch;
}
.share-url input {
	flex: 1;
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: 8px 10px;
	font: inherit;
	background: var(--bg);
	color: var(--text);
	font-family: ui-monospace, SFMono-Regular, monospace;
	font-size: 13px;
}
.share-url button { padding: 0 14px; }
.qr-box { display: inline-block; padding: 10px; background: #fff; border-radius: 8px; margin: 6px 0 14px; }
.qr-box img { width: 200px; height: 200px; image-rendering: pixelated; }
.revoke-line { color: var(--muted); font-size: 12px; margin-top: 12px; word-break: break-all; }
.revoke-line a { color: var(--err); }

.alert {
	padding: 10px 14px;
	border-radius: 6px;
	margin: 10px 0;
	font-size: 14px;
}
.alert.err { background: #fde2e2; color: var(--err); border: 1px solid #f3c0c0; }
.alert.warn { background: #fff4e0; color: var(--warn); border: 1px solid #f3dca5; }
.alert.ok { background: #e3f5ec; color: var(--ok); border: 1px solid #b6e0c9; }

.list-section h3 { margin-top: 0; }
.list-empty { color: var(--muted); font-size: 14px; text-align: center; padding: 20px 0; }
.list-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid var(--border);
}
.list-item:last-child { border-bottom: none; }
.list-item .info { font-size: 13px; }
.list-item .info .name { font-weight: 500; color: var(--text); }
.list-item .info .meta { color: var(--muted); margin-top: 2px; }
.list-item .actions { display: flex; gap: 8px; }
.list-item .actions button {
	background: none;
	border: 1px solid var(--border);
	color: var(--muted);
	padding: 4px 12px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 13px;
}
.list-item .actions button:hover { color: var(--text); border-color: var(--text); }
.list-item .actions button.danger:hover { color: var(--err); border-color: var(--err); }

footer.foot {
	text-align: center;
	color: var(--muted);
	font-size: 12px;
	padding: 30px 0 16px;
}
footer.foot a { color: var(--muted); }

@media (max-width: 600px) {
	main.container { margin: 18px auto; }
	.card { padding: 18px; }
	.option-row { flex-direction: column; align-items: flex-start; gap: 4px; }
	.option-row input, .option-row select { width: 100%; }
	header.topbar { padding: 12px 16px; }
}
