/* Minimal, clean UI – no framework */
:root{
  --bg: #0b1020;
  --panel: rgba(255,255,255,0.06);
  --panel2: rgba(255,255,255,0.08);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.65);
  --border: rgba(255,255,255,0.14);
  --ok: #22c55e;
  --bad: #ef4444;
  --accent: #60a5fa;
}

*{ box-sizing: border-box; }
html,body{ height: 100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 20% 10%, rgba(96,165,250,0.20), transparent 60%),
    radial-gradient(900px 500px at 80% 20%, rgba(34,197,94,0.14), transparent 60%),
    var(--bg);
  color: var(--text);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 20px;
}

.app{ width:min(980px, 100%); }

.top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  backdrop-filter: blur(8px);
}

.brand{ display:flex; align-items:center; gap:10px; }
.dot{
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(96,165,250,0.9);
}
h1{ margin:0; font-size: 18px; letter-spacing: .2px; }

.status{ display:flex; align-items:center; gap:10px; font-size: 13px; color: var(--muted); }
.conn-dot{
  width: 10px; height: 10px; border-radius: 999px;
  background: var(--bad);
  box-shadow: 0 0 14px rgba(239,68,68,0.8);
}
.conn-dot.ok{
  background: var(--ok);
  box-shadow: 0 0 14px rgba(34,197,94,0.75);
}

.panel{
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  padding: 14px;
}

.meta{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items:end;
  justify-content:space-between;
  margin-bottom: 10px;
}

.field{
  display:flex;
  flex-direction:column;
  gap: 6px;
  min-width: 220px;
  flex: 1;
}
.field span{ font-size: 12px; color: var(--muted); }

input, select, button{
  font: inherit;
  color: var(--text);
}

input, select{
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}
input:focus, select:focus{
  border-color: rgba(96,165,250,0.55);
  box-shadow: 0 0 0 3px rgba(96,165,250,0.18);
}

button{
  border: 1px solid rgba(96,165,250,0.35);
  background: rgba(96,165,250,0.16);
  padding: 10px 14px;
  border-radius: 12px;
  cursor:pointer;
}
button:hover{ background: rgba(96,165,250,0.22); }

button.ghost{
  border-color: var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--muted);
}

.messages{
  height: min(58vh, 520px);
  overflow:auto;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.18);
  border-radius: 14px;
  padding: 12px;
}

.msg{
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.msg:last-child{ border-bottom: none; }
.msg-head{
  display:flex; align-items:baseline; gap:10px;
  color: var(--muted);
  font-size: 12px;
}
.msg-name{ color: var(--text); font-weight: 600; }
.msg-room{ padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.14); }
.msg-text{ margin-top: 4px; font-size: 14px; white-space: pre-wrap; word-break: break-word; }

.composer{
  display:flex;
  gap: 10px;
  margin-top: 10px;
}
.composer input{ flex:1; }
.composer button{ min-width: 120px; }

.help{
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}
.help code{
  background: rgba(255,255,255,0.08);
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
}

.footer{
  margin-top: 12px;
  text-align:center;
  color: var(--muted);
  font-size: 12px;
  opacity: 0.9;
}
