:root {
	--bg: #0e1116;
	--panel: #161b22;
	--border: #2d333b;
	--text: #e6edf3;
	--muted: #8b949e;
	--accent: #4ade80;
	--accent-dim: #2f6f47;
	--error: #f87171;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: ui-sans-serif, system-ui, -apple-system, sans-serif; }
header {
	display: flex; align-items: center; justify-content: space-between;
	padding: 16px 24px; border-bottom: 1px solid var(--border);
}
h1 { margin: 0; font-size: 22px; }
h1 a { color: inherit; text-decoration: none; }
.plus { color: var(--accent); }
main { max-width: 880px; margin: 24px auto; padding: 0 16px; }
.card {
	background: var(--panel); border: 1px solid var(--border);
	border-radius: 8px; padding: 20px; margin-bottom: 16px;
}
.card h2 { margin-top: 0; font-size: 18px; }
form { display: flex; flex-direction: column; gap: 12px; }
label { display: flex; flex-direction: column; font-size: 14px; gap: 4px; }
input[type="email"], input[type="password"], input[type="file"], input[type="text"], select {
	background: #0d1117; color: var(--text); border: 1px solid var(--border);
	border-radius: 6px; padding: 8px 10px; font-size: 14px;
}
button {
	background: var(--accent-dim); color: var(--text); border: 1px solid var(--accent);
	padding: 8px 14px; border-radius: 6px; cursor: pointer; font-size: 14px;
}
button:hover { background: var(--accent); color: #001a08; }
button.danger { background: #5a1e1e; border-color: var(--error); }
button.danger:hover { background: var(--error); color: #1a0000; }
.muted { color: var(--muted); font-size: 14px; }
.error { color: var(--error); font-size: 14px; min-height: 1em; }
a { color: var(--accent); }
.back-link {
	display: inline-block; margin-bottom: 8px; font-size: 13px; text-decoration: none;
}
.back-link:hover { text-decoration: underline; }

.world-row, .backup-row, .join-row, .member-row {
	display: flex; justify-content: space-between; align-items: center;
	padding: 10px 0; border-top: 1px solid var(--border); gap: 12px;
}
.world-row:first-child, .backup-row:first-child, .join-row:first-child, .member-row:first-child { border-top: none; }
.world-meta, .backup-meta, .join-meta, .member-meta { font-size: 13px; color: var(--muted); }
.code-pill {
	display: inline-block; font-family: ui-monospace, monospace;
	background: #0d1117; border: 1px solid var(--accent); color: var(--accent);
	padding: 6px 12px; border-radius: 6px; font-size: 16px; letter-spacing: 1px;
}
.row-actions { display: flex; gap: 8px; }

.stats-grid {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 12px; margin-top: 12px;
}
.stat-tile {
	background: #0d1117; border: 1px solid var(--border); border-radius: 6px;
	padding: 12px;
}
.stat-tile .stat-value { font-size: 20px; font-weight: 600; }
.stat-tile .stat-label { font-size: 12px; color: var(--muted); margin-top: 2px; }

.settings-grid {
	display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px;
}
.settings-grid button { grid-column: 1 / -1; justify-self: start; }
.settings-grid p { grid-column: 1 / -1; margin: 0; }
@media (max-width: 600px) {
	.settings-grid { grid-template-columns: 1fr; }
}

#mini-map {
	background: #0d1117; border: 1px solid var(--border); border-radius: 6px;
	padding: 12px; overflow: auto; max-height: 360px;
}
#mini-map svg { display: block; image-rendering: pixelated; image-rendering: crisp-edges; }

.tag {
	display: inline-block; padding: 2px 8px; border-radius: 999px;
	font-size: 11px; background: #0d1117; border: 1px solid var(--border);
	color: var(--muted); margin-left: 6px; vertical-align: middle;
}
.tag.active { color: var(--accent); border-color: var(--accent); }
