:root {
  --primary: #2563eb;
  --danger: #dc2626;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1a1a2e;
  --muted: #6b7280;
  --border: #e5e7eb;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Noto Sans Bengali", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 10px 16px;
  background: var(--primary);
  color: white;
  font-size: 14px;
}
button.ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
button.danger { background: var(--danger); }

input[type="text"], input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 10px;
}

.center {
  max-width: 420px;
  margin: 40px auto;
  padding: 0 16px;
}

.card {
  background: var(--card);
  border-radius: 14px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.muted { color: var(--muted); }
.small { font-size: 13px; }
.notice { background: #eef2ff; padding: 10px 12px; border-radius: 8px; font-size: 14px; }

.layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 260px;
  background: var(--card);
  border-inline-end: 1px solid var(--border);
  padding: 20px;
}
.sidebar h2 { margin-top: 0; }
.group-list { list-style: none; padding: 0; margin: 16px 0; }
.group-list li {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 4px;
}
.group-list li:hover { background: var(--bg); }

.main-panel { flex: 1; padding: 24px; }
.group-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 16px; }
.group-header h2 { margin-inline-end: auto; }
#push-status-body ul { text-align: start; padding-inline-start: 20px; }
#push-status-body li { margin-bottom: 6px; }

.map { height: 340px; border-radius: 12px; overflow: hidden; margin-bottom: 20px; }

.invite-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  text-align: center;
}
.invite-panel.hidden { display: none; }
.invite-panel canvas { max-width: 100%; height: auto; }

.member-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
}
.member-info { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.online { background: #22c55e; }
.dot.offline { background: #d1d5db; }
.member-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.member-actions button { font-size: 12px; padding: 6px 10px; }

.chat-thread { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.chat-thread.hidden, .modal.hidden { display: none; }
.messages {
  min-height: 60px; max-height: 200px; overflow-y: auto; margin-bottom: 8px;
  display: flex; flex-direction: column; gap: 6px;
  border: 1px solid var(--border); border-radius: 10px; padding: 10px;
  background: var(--card);
}
.messages-empty-hint { color: var(--muted); font-size: 13px; text-align: center; padding: 8px 0; }
.chat-heading { font-size: 14px; margin: 0 0 6px; color: var(--muted); }
.msg { padding: 6px 10px; border-radius: 10px; max-width: 80%; font-size: 14px; }
.msg.mine { background: var(--primary); color: white; align-self: flex-end; }
.msg.theirs { background: var(--bg); align-self: flex-start; }
.composer { display: flex; gap: 6px; }
.composer input { margin-bottom: 0; }

.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-body {
  background: white; padding: 24px; border-radius: 14px; text-align: center;
  max-height: 90vh; overflow-y: auto; max-width: 92vw;
}
.modal-body canvas { max-width: 100%; height: auto; }

.switch { display: flex; align-items: center; gap: 8px; margin: 16px 0; font-size: 14px; }

.call-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: white;
  padding: 12px 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  z-index: 1000;
  font-size: 14px;
}
.call-bar #hangup-btn { background: var(--danger); padding: 6px 14px; border-radius: 999px; }

.incoming-call-banner {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: white;
  padding: 16px 22px;
  border-radius: 14px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  z-index: 1100;
  max-width: 92vw;
  animation: incoming-call-pulse 1s infinite;
}
.incoming-call-body { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.incoming-call-text { font-size: 15px; text-align: center; }
.incoming-call-actions { display: flex; gap: 10px; }
.incoming-call-actions button { padding: 8px 18px; border-radius: 999px; font-size: 14px; }
.incoming-call-actions .accept-btn { background: #22c55e; }
.incoming-call-actions .reject-btn { background: transparent; color: white; border: 1px solid rgba(255,255,255,0.5); }
@keyframes incoming-call-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(0,0,0,0.35); }
  50% { box-shadow: 0 4px 28px rgba(37,99,235,0.65); }
}

.iab-warning {
  background: #fef3c7;
  color: #78350f;
  border-bottom: 1px solid #fbbf24;
  padding: 12px 16px;
  font-size: 13px;
  text-align: center;
}
.iab-warning p { margin: 4px 0; }
.iab-actions { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.iab-actions button { font-size: 12px; padding: 6px 12px; }
.iab-actions #iab-copy { background: #b45309; }

.member-chat { margin-top: 16px; text-align: start; }

.lang-switcher {
  display: inline-block;
  font-size: 12px;
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
  margin-bottom: 12px;
  cursor: pointer;
}

.site-footer {
  max-width: 420px;
  margin: 24px auto 32px;
  padding: 16px 16px 0;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--primary); text-decoration: underline; }
.site-footer span { padding: 0 4px; }
.layout ~ .site-footer,
.layout + .site-footer { max-width: none; padding: 16px; }

.blog-list-item {
  text-align: start;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.blog-list-item:last-child { border-bottom: none; }
.blog-list-item h3 { margin: 0 0 4px; }
.blog-list-item h3 a { color: var(--text); text-decoration: none; }
.blog-list-item h3 a:hover { color: var(--primary); }

.blog-post { text-align: start; }
.blog-post-content { margin-top: 12px; line-height: 1.6; }
.blog-post-content img { max-width: 100%; height: auto; border-radius: 8px; }
.blog-post-content pre { background: var(--bg); padding: 12px; border-radius: 8px; overflow-x: auto; }
.blog-post-content blockquote { border-inline-start: 3px solid var(--border); margin: 0; padding-inline-start: 12px; color: var(--muted); }

/* ব্লগ এডিটরের রিচ-টেক্সট টুলবার (Blogger-এর মতো) */
.rte-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: var(--bg);
}
.rte-toolbar select {
  font-size: 13px;
  padding: 5px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
}
.rte-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  font-size: 13px;
  line-height: 1;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.rte-btn:hover { background: var(--bg); }
.rte-color {
  width: 30px;
  height: 30px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  cursor: pointer;
}
.rte-emoji-panel {
  position: absolute;
  z-index: 10;
  margin-top: 4px;
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.rte-emoji-item {
  font-size: 18px;
  padding: 4px;
  background: transparent;
  border: none;
  border-radius: 4px;
}
.rte-emoji-item:hover { background: var(--bg); }

.rte-editor {
  min-height: 260px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.6;
  overflow-y: auto;
}
.rte-editor:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.rte-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

@media (max-width: 640px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
}
