* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0f1115;
  color: #e6e6e6;
  height: 100vh;
}
.hidden { display: none !important; }
.screen { height: 100vh; }

#auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
}
.card {
  background: #1b1e26;
  padding: 32px;
  border-radius: 12px;
  width: 320px;
}
.card h1 { text-align: center; margin-top: 0; }
.tabs { display: flex; margin-bottom: 16px; }
.tab {
  flex: 1;
  padding: 8px;
  background: none;
  border: none;
  border-bottom: 2px solid #333;
  color: #999;
  cursor: pointer;
}
.tab.active { color: #fff; border-color: #4a7dff; }
#auth-form { display: flex; flex-direction: column; gap: 10px; }
input, button {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #333;
  background: #12141a;
  color: #fff;
  font-size: 14px;
}
button {
  background: #4a7dff;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
button:hover { background: #3a67e0; }
.error { color: #ff6b6b; min-height: 18px; font-size: 13px; }

#app-screen { display: flex; }
.sidebar {
  width: 240px;
  background: #14161c;
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.me { font-size: 13px; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.me button { padding: 4px 8px; font-size: 12px; }
#user-list { list-style: none; padding: 0; margin: 0; overflow-y: auto; }
#user-list li {
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 4px;
}
#user-list li:hover { background: #1f232b; }
#user-list li.active { background: #4a7dff33; }
#user-list li .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #4caf50; margin-right: 8px;
}

.main { flex: 1; display: flex; flex-direction: column; }
#chat-header { padding: 16px; border-bottom: 1px solid #222; font-weight: 600; }
#chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 60%; padding: 8px 12px; border-radius: 10px; background: #1f232b; }
.msg.mine { align-self: flex-end; background: #4a7dff; }
.msg .meta { font-size: 11px; opacity: 0.6; margin-bottom: 2px; }
#chat-form { display: flex; gap: 8px; padding: 16px; border-top: 1px solid #222; }
#chat-input { flex: 1; }

.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8);
  display: flex; align-items: center; justify-content: center;
}
.modal-card {
  background: #1b1e26; padding: 24px; border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  width: 400px;
}
#remote-video { width: 100%; border-radius: 8px; background: #000; }
#local-video { width: 120px; border-radius: 8px; background: #000; position: relative; }
.call-actions { display: flex; gap: 12px; }
#reject-call { background: #e05353; }
