@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@600;700&display=swap");
:root { --bg: #060807; --panel: #0f1211; --line: #1e2422; --text: #e8efec; --muted: #7d8a85; --em: #10b981; --em2: #34d399; }
* { box-sizing: border-box; }
html, body { margin: 0; background: radial-gradient(1200px 600px at 50% -10%, #0c1a14, var(--bg)); color: var(--text);
	font-family: Inter, system-ui, sans-serif; min-height: 100vh; }
.muted { color: var(--muted); font-weight: 400; }
.center { text-align: center; padding: 24px; }
.fade { animation: fade .45s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }
.logo { font-family: "Space Grotesk", sans-serif; font-size: 40px; font-weight: 700; letter-spacing: -1px; }
.logo span { color: var(--em); }
.logo.sm { font-size: 22px; }
.logo em { font-size: 11px; font-style: normal; color: var(--muted); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; vertical-align: middle; }
.join { min-height: calc(100vh - 60px); display: grid; place-items: center; padding: 20px; }
.join-card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px;
	display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px #0008; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.input { width: 100%; background: #080a09; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 12px 14px;
	font: inherit; font-size: 15px; outline: none; transition: border-color .2s, box-shadow .2s; resize: none; }
.input:focus { border-color: var(--em); box-shadow: 0 0 0 3px #10b98126; }
.btn { background: var(--em); color: #03130c; border: 0; border-radius: 10px; padding: 12px 18px; font: inherit; font-weight: 600;
	cursor: pointer; transition: background .2s, transform .1s, opacity .2s; white-space: nowrap; }
.btn:hover { background: var(--em2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: default; }
.btn:focus-visible { outline: 2px solid var(--em2); outline-offset: 2px; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); padding: 8px 14px; }
.btn.ghost:hover { color: var(--text); border-color: var(--muted); }
.alert { background: #2a0f12; border: 1px solid #5c1e24; color: #fca5a5; padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.hint { font-size: 12px; color: var(--muted); margin: 0; }
.app { max-width: 1200px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; min-height: 100vh; gap: 14px; }
.top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.room { font-size: 14px; display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #444; display: inline-block; flex: none; }
.dot.online { background: var(--em); box-shadow: 0 0 10px var(--em); }
.dot.offline { background: #ef4444; }
.dot.connecting { background: #eab308; }
.panels { display: grid; gap: 14px; flex: 1; grid-template-columns: 1fr; }
@media (min-width: 860px) { .panels { grid-template-columns: 1fr 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column;
	min-height: 420px; max-height: calc(100vh - 140px); overflow: hidden; }
.panel-head { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tag { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--em); border: 1px solid #10b98140; padding: 3px 8px; border-radius: 20px; }
.user { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.feed { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.empty { margin: auto; color: var(--muted); font-size: 14px; text-align: center; max-width: 260px; }
.bubble { max-width: 85%; background: #161b19; border: 1px solid var(--line); padding: 10px 14px; border-radius: 14px 14px 14px 4px;
	animation: fade .3s ease both; align-self: flex-start; }
.bubble.mine { align-self: flex-end; background: #0b2a1e; border-color: #10b98133; border-radius: 14px 14px 4px 14px; }
.bubble b { font-size: 12px; color: var(--em2); }
.bubble p { margin: 2px 0 4px; white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.bubble small { font-size: 11px; color: var(--muted); }
.bubble small .ok { color: var(--em2); }
.compose { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.panel > .alert { margin: 0 12px 12px; }
.foot { text-align: center; font-size: 11px; letter-spacing: 3px; color: var(--muted); padding: 14px; }
.foot b { color: var(--em); font-weight: 600; }
