:root {
	--bg: #1a1a1a;
	--fg: #e0e0e0;
	--fg-dim: #a0a0a0;
	--accent: #4a9eff;
	--border: #333;
	--input-bg: #2a2a2a;
	--button-bg: #3a3a3a;
	--button-hover: #4a4a4a;
}

@media (prefers-color-scheme: light) {
	:root {
		--bg: #ffffff;
		--fg: #1a1a1a;
		--fg-dim: #666666;
		--accent: #0066cc;
		--border: #d0d0d0;
		--input-bg: #f5f5f5;
		--button-bg: #e8e8e8;
		--button-hover: #d8d8d8;
	}
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.6;
	color: var(--fg);
	background-color: var(--bg);
	padding: 2rem 1rem;
	max-width: 680px;
	margin: 0 auto;
}

h1 {
	font-size: 1.8rem;
	font-weight: 600;
	margin-bottom: 1.5rem;
	margin-top: 2.5rem;
	color: var(--fg);
}

h2 {
	font-size: 1.3rem;
	font-weight: 500;
	margin-top: 2rem;
	margin-bottom: 1rem;
	color: var(--fg);
}

p {
	margin-bottom: 1rem;
	color: var(--fg-dim);
}

a {
	color: var(--accent);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

form {
	margin: 1.5rem 0;
}

label {
	display: block;
	margin-bottom: 0.5rem;
	color: var(--fg);
	font-weight: 500;
}

input[type="email"],
input[type="text"],
textarea {
	width: 100%;
	padding: 0.75rem;
	background: var(--input-bg);
	border: 1px solid var(--border);
	border-radius: 4px;
	color: var(--fg);
	font-size: 1rem;
	font-family: inherit;
	margin-bottom: 1rem;
}

input[type="email"]:focus,
input[type="text"]:focus,
textarea:focus {
	outline: none;
	border-color: var(--accent);
}

textarea {
	resize: vertical;
	min-height: 100px;
	font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
	font-size: 0.9rem;
}

button {
	padding: 0.75rem 1.5rem;
	background: var(--button-bg);
	border: 1px solid var(--border);
	border-radius: 4px;
	color: var(--fg);
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.2s;
}

button:hover {
	background: var(--button-hover);
}

button:active {
	transform: translateY(1px);
}

.code {
	font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
	background: var(--input-bg);
	padding: 0.2rem 0.4rem;
	border-radius: 3px;
	font-size: 0.9rem;
	word-break: break-all;
}

.section {
	margin: 2rem 0;
	padding: 1.5rem;
	border: 1px solid var(--border);
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.02);
}

.section h2 {
	margin-top: 0;
}

.success {
	color: #6ade6a;
}

@media (prefers-color-scheme: light) {
	.success {
		color: #00a000;
	}
}

.error {
	color: #ff6b6b;
}

.dimmed {
	color: var(--fg-dim);
	font-size: 0.9rem;
}

.footer {
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--border);
	text-align: center;
	color: var(--fg-dim);
	font-size: 0.85rem;
}

code {
	font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
}

.h-captcha {
	margin-bottom: 1rem;
	display: flex;
}

.lookup-section {
	background: rgba(255, 255, 255, 0.04);
}

.section form {
	margin: 0;
}

.lookup-section input[type="email"] {
	font-size: 1.05rem;
	padding: 0.9rem;
}

.key-result {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	align-items: stretch;
	margin-top: 0.75rem;
	padding: 1rem;
	background: var(--input-bg);
	border: 1px solid var(--border);
	border-radius: 4px;
}

.pubkey-display {
	flex: 1;
	font-family: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace;
	font-size: 0.9rem;
	color: var(--fg);
	word-break: break-all;
	line-height: 1.5;
}

.copy-button {
	flex-shrink: 0;
	padding: 0.5rem 1rem;
	font-size: 0.9rem;
	white-space: nowrap;
	background: var(--button-bg);
	border: 1px solid var(--border);
	border-radius: 4px;
	color: var(--fg);
	cursor: pointer;
	transition: background 0.2s;
}

.copy-button:hover {
	background: var(--button-hover);
}

.copy-button:active {
	transform: translateY(1px);
}

.copy-button {
	align-self: flex-start;
}

#lookup-result p {
	color: var(--fg);
}
