/* leel.chat — dark theme from the LeeL brand colours. */

:root {
	--bg: #141d1e;
	--surface: #1d292b;
	--surface-2: #243336;
	--line: #2c3f42;
	--text: #e9e4d6;
	--muted: #a8a294;
	--gold: #bd8f4d;
	--gold-light: #f3e699;
	--danger: #d98a7a;
	--ok: #9dbb8a;
}

* {
	box-sizing: border-box;
}

body {
	background: var(--bg);
	color: var(--text);
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
	line-height: 1.5;
	margin: 0;
}

main {
	margin: 0 auto;
	max-width: 56rem;
	padding: 1.5rem 1rem 3rem;
}

h1, h2, h3 {
	color: var(--gold-light);
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 600;
	line-height: 1.25;
}

a {
	color: var(--gold-light);
}

a:hover {
	color: #fff;
}

.hint {
	color: var(--muted);
	font-size: 0.9rem;
}

.error {
	color: var(--danger);
}

.status {
	color: var(--muted);
	font-size: 0.9rem;
}

/* Header bar */

.topbar {
	align-items: center;
	border-bottom: 1px solid var(--line);
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	padding: 0.75rem 1rem;
}

.topbar .brand {
	align-items: center;
	color: var(--gold-light);
	display: flex;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.25rem;
	gap: 0.6rem;
	text-decoration: none;
}

.topbar nav {
	align-items: center;
	display: flex;
	gap: 1rem;
}

.topbar nav .identity {
	color: var(--muted);
	font-size: 0.9rem;
}

/* Gate page (public landing): a branded sign-in door, nothing else.
   No explanations by design — the page shows the mark and one button. */

body.gate {
	align-items: center;
	display: flex;
	justify-content: center;
	min-height: 100vh;
}

.gate-card {
	border: 1px solid var(--line);
	border-radius: 0.75rem;
	background: var(--surface);
	margin: 1rem;
	max-width: 26rem;
	padding: 2.5rem 2rem;
	text-align: center;
	width: 100%;
}

.gate-card h1 {
	margin: 0 0 1.75rem;
}

.gate-card h1 img {
	height: auto;
	max-width: 100%;
}

.gate-card p {
	margin: 0;
}

.gate-card .button {
	border-radius: 999px;
	padding: 0.7rem 1.8rem;
}

/* Main page */

.hero {
	text-align: left;
}

.hero img {
	height: auto;
	max-width: 100%;
}

.actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 1.5rem 0;
}

.button {
	background: var(--gold);
	border: 1px solid var(--gold);
	border-radius: 0.375rem;
	color: #141d1e;
	display: inline-block;
	font-weight: 600;
	padding: 0.6rem 1.2rem;
	text-decoration: none;
}

.button:hover {
	background: var(--gold-light);
	color: #141d1e;
}

.button.secondary {
	background: transparent;
	border-color: var(--gold);
	color: var(--gold-light);
}

.button.secondary:hover {
	background: var(--surface-2);
	color: #fff;
}

/* Chat layout */

.chat-layout {
	align-items: start;
	display: grid;
	gap: 1.5rem;
	grid-template-columns: 14rem 1fr;
}

@media (max-width: 44rem) {
	.chat-layout {
		grid-template-columns: 1fr;
	}
}

#room-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

#room-list li {
	margin: 0 0 0.25rem;
}

#room-list a {
	border-radius: 0.375rem;
	color: var(--text);
	display: block;
	padding: 0.4rem 0.6rem;
	text-decoration: none;
}

#room-list a:hover {
	background: var(--surface-2);
}

#room-list a[aria-current="true"] {
	background: var(--surface-2);
	outline: 1px solid var(--gold);
}

#room-list .count {
	color: var(--muted);
	font-size: 0.85rem;
}

#messages {
	border: 1px solid var(--line);
	border-radius: 0.5rem;
	max-height: 60vh;
	min-height: 12rem;
	overflow-y: auto;
	padding: 0.75rem;
}

.message {
	border-bottom: 1px solid var(--line);
	padding: 0.5rem 0;
}

.message:last-child {
	border-bottom: none;
}

.message .meta {
	color: var(--muted);
	font-size: 0.85rem;
}

.message .sender {
	color: var(--gold-light);
	font-weight: 600;
}

.message .text {
	margin: 0.2rem 0 0;
	white-space: pre-wrap;
	word-break: break-word;
}

form label {
	display: block;
	font-weight: 600;
	margin: 0.75rem 0 0.25rem;
}

input[type="text"], textarea {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 0.375rem;
	color: var(--text);
	font: inherit;
	padding: 0.5rem;
	width: 100%;
}

input[type="text"]:focus, textarea:focus {
	border-color: var(--gold);
	outline: 2px solid var(--gold);
	outline-offset: 1px;
}

button {
	background: var(--gold);
	border: 1px solid var(--gold);
	border-radius: 0.375rem;
	color: #141d1e;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	margin-top: 0.75rem;
	padding: 0.5rem 1rem;
}

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

button.secondary {
	background: transparent;
	color: var(--gold-light);
}

button.danger {
	background: transparent;
	border-color: var(--danger);
	color: var(--danger);
	margin-top: 0;
	padding: 0.25rem 0.6rem;
}

/* Admin */

table {
	border-collapse: collapse;
	width: 100%;
}

th, td {
	border-bottom: 1px solid var(--line);
	padding: 0.5rem 0.5rem 0.5rem 0;
	text-align: left;
	vertical-align: top;
}

th {
	color: var(--gold-light);
	font-family: Georgia, "Times New Roman", serif;
}

#secret-agents li {
	margin: 0 0 0.5rem;
}

#secret-agents .removed {
	color: var(--muted);
}

code {
	background: var(--surface-2);
	border-radius: 0.25rem;
	padding: 0.1rem 0.35rem;
}

.token-once {
	border: 1px solid var(--gold);
	border-radius: 0.5rem;
	margin: 1rem 0;
	padding: 1rem;
}

.token-once code {
	display: block;
	font-size: 1rem;
	margin: 0.5rem 0;
	overflow-wrap: anywhere;
	padding: 0.6rem;
	user-select: all;
}

.warning {
	color: var(--gold-light);
	font-weight: 600;
}
