/* Seance Relay Chat: original styles. System monospace fonts only, no external assets. */
:root {
  --bg: #070a07;
  --panel: #0c120c;
  --line: #1f3a1f;
  --text: #b8f5b0;
  --dim: #5f8f5a;
  --accent: #ff8c1a;   /* pumpkin */
  --ghost: #d9e4ff;    /* ectoplasm */
  --danger: #ff4d6d;
  --mono: ui-monospace, "SFMono-Regular", "DejaVu Sans Mono", "Liberation Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: radial-gradient(ellipse at center, #0d160d 0%, var(--bg) 70%);
  color: var(--text);
  font: 14px/1.45 var(--mono);
}
.crt { position: relative; height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
/* scanlines + soft vignette */
.crt::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0 2px, rgba(0,0,0,.18) 2px 3px);
  mix-blend-mode: multiply;
}
.crt::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  box-shadow: inset 0 0 120px rgba(0,0,0,.85);
}
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 8px 14px;
  border-bottom: 1px solid var(--line); background: var(--panel);
}
.topbar h1 { font-size: 16px; margin: 0; letter-spacing: .12em; text-transform: uppercase; color: var(--accent);
  text-shadow: 0 0 6px rgba(255,140,26,.6); animation: flicker 6s infinite; }
.logo { font-size: 20px; color: var(--ghost); }
.tag { color: var(--dim); font-size: 12px; }
.status { margin-left: auto; font-size: 12px; color: var(--dim); }
.status.on { color: var(--text); }
.status.on::before { content: "\25CF  "; color: #49ff6b; }
.status.off::before { content: "\25CF  "; color: var(--danger); }

.layout { flex: 1; display: grid; grid-template-columns: 200px 1fr 180px; min-height: 0; }
.layout[hidden] { display: none; }
.buffers, .nicks { background: var(--panel); padding: 10px; overflow-y: auto; }
.buffers { border-right: 1px solid var(--line); }
.nicks { border-left: 1px solid var(--line); }
h2 { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: .2em; margin: 0 0 8px; font-weight: normal; }
ul { list-style: none; margin: 0; padding: 0; }
.buffers li { padding: 3px 6px; cursor: pointer; border-radius: 3px; display: flex; justify-content: space-between; }
.buffers li:hover { background: #132013; }
.buffers li.active { background: #1a2e1a; color: var(--accent); }
.buffers li .unread { color: var(--accent); font-size: 11px; }
.nicks li { padding: 1px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nicks li.bot { color: var(--ghost); text-shadow: 0 0 6px rgba(217,228,255,.7); }
.nicks li.bot::after { content: " \1F47B"; }

.chat { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.topic { padding: 6px 12px; border-bottom: 1px dashed var(--line); color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log { flex: 1; margin: 0; padding: 8px 12px; overflow-y: auto; list-style: none; }
.log li { white-space: pre-wrap; word-break: break-word; padding: 1px 0; }
.log .ts { color: var(--dim); margin-right: 8px; }
.log .nick { font-weight: bold; }
.log .sys { color: var(--dim); font-style: italic; }
.log .err { color: var(--danger); }
.log .notice { color: #ffd166; }
.log .action { font-style: italic; }
.log .history { opacity: .55; }
.log .from-bot .text { color: var(--ghost); text-shadow: 0 0 5px rgba(217,228,255,.45); }
.log .mention { background: rgba(255,140,26,.08); border-left: 2px solid var(--accent); padding-left: 6px; }
.input-row { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding: 8px 12px; background: var(--panel); }
.prompt { color: var(--accent); }
input, button { font: inherit; color: inherit; }
input {
  flex: 1; background: transparent; border: 0; outline: 0; color: var(--text); caret-color: var(--accent);
}
button {
  background: #142414; border: 1px solid var(--line); border-radius: 3px; padding: 3px 10px; cursor: pointer; color: var(--text);
}
button:hover { border-color: var(--accent); color: var(--accent); }
.join-form { display: flex; gap: 4px; margin-top: 12px; }
.join-form input { border-bottom: 1px solid var(--line); min-width: 0; }
.hint { color: var(--dim); font-size: 12px; margin-top: 16px; }
.hint code { color: var(--text); }

.login { margin: auto; max-width: 560px; padding: 24px; text-align: center; }
.login[hidden] { display: none; }
.banner { color: var(--accent); text-shadow: 0 0 8px rgba(255,140,26,.55); font-size: 13px; text-align: left; display: inline-block; animation: flicker 5s infinite; }
.login form { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 18px; }
.login label { color: var(--dim); }
.login input { flex: 0 1 220px; border-bottom: 1px solid var(--accent); padding: 4px; }

@keyframes flicker {
  0%, 92%, 100% { opacity: 1; }
  93% { opacity: .55; } 94% { opacity: 1; } 96% { opacity: .75; } 97% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .buffers, .nicks { display: none; }
}
