body { background:#000; color:#00ff88; font-family:monospace; padding:24px; }
    h1 { text-align:center; letter-spacing:4px; }
    .panel { border:1px solid #00ff88; padding:18px; max-width:1000px; margin:18px auto; box-shadow:0 0 18px rgba(0,255,136,.2); }
    input, button { background:#001b10; color:#00ff88; border:1px solid #00ff88; padding:10px; margin:4px; font-family:monospace; }
    button { cursor:pointer; }
    #log { min-height:180px; white-space:pre-wrap; }
    .hidden { display:none; }
    .videos { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
    video { width:100%; background:#050505; border:1px solid #00ff88; min-height:220px; }
    .danger { border-color:#ff5577; color:#ff5577; }
    .ok { border-color:#00ff88; color:#00ff88; }
/* VisionRTC Chat v2 */
.chat-window {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(420px, calc(100vw - 36px));
  height: min(620px, calc(100vh - 36px));
  background: #020202;
  border: 1px solid #00ff88;
  box-shadow: 0 0 30px rgba(0,255,136,.28);
  z-index: 8000;
  display: flex;
  flex-direction: column;
}

.chat-window.hidden {
  display: none;
}

.chat-header {
  padding: 12px;
  border-bottom: 1px solid #00ff88;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #001b10;
}

.chat-peer {
  font-weight: bold;
  word-break: break-word;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.35;
  word-break: break-word;
}

.chat-bubble.me {
  align-self: flex-end;
  background: #003d24;
  border: 1px solid #00ff88;
}

.chat-bubble.them {
  align-self: flex-start;
  background: #111;
  border: 1px solid #44aa77;
}

.chat-meta {
  font-size: 11px;
  opacity: .7;
  margin-top: 4px;
}

.chat-input-row {
  display: flex;
  gap: 8px;
  border-top: 1px solid #00ff88;
  padding: 10px;
}

.chat-input-row input {
  flex: 1;
}

.chat-minimized {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 7999;
}
