/* ===== CSS Variables ===== */
:root {
  --primary: #764ba2;
  --primary-light: #9b6fc3;
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --danger: #e74c3c;
  --warning: #f39c12;
  --success: #2ecc71;
  --bg-main: #b2c7d9;
  --bg-chat: #b2c7d9;
  --bg-card: #fff;
  --bg-input: #f0f0f0;
  --text-primary: #333;
  --text-secondary: #888;
  --text-light: #aaa;
  --border-color: #eee;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 15px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.2);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --font-family: -apple-system, 'Malgun Gothic', '맑은 고딕', sans-serif;
  --msg-mine: linear-gradient(135deg, #667eea, #764ba2);
  --msg-other: #fff;
  --sidebar-width: 340px;
}

/* ===== BASE: Reset, Layout, Scrollbar, Mobile ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body { font-family: var(--font-family); background: var(--bg-main); }

/* App Layout */
.app { display: none; height: 100vh; height: 100dvh; overflow: hidden; }
.app.active { display: flex; }

/* Connection status bar */
.conn-status { display: none; padding: 6px 16px; text-align: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.conn-status.disconnected { display: block; background: var(--danger); color: #fff; }
.conn-status.reconnecting { display: block; background: var(--warning); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

/* Mobile */
@media (max-width: 768px) {
  .sidebar { width: 100%; position: absolute; z-index: 10; }
  .sidebar.hidden { display: none; }
  .members-panel { display: none; }
  .back-btn { display: block !important; }
}
.back-btn { display: none; background: none; border: none; font-size: 22px; cursor: pointer; margin-right: 10px; }
