body { font-family: 'Inter', sans-serif; }
.font-heading { font-family: 'Sora', sans-serif; }

html, body { height: 100%; }
#app-screen { height: 100vh; height: 100dvh; overflow: hidden; }
#messages, #conversation-list { overscroll-behavior: contain; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #262E45; border-radius: 4px; }

/* ---------- animations ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.fade-in { animation: fadeIn 0.22s ease; }

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.97) translateY(8px); }
  to { opacity: 1; transform: none; }
}
.modal-panel { animation: modalIn 0.2s ease; }

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* ---------- message bubbles ---------- */
.msg-row { display: flex; }
.msg-row.mine { justify-content: flex-end; }
.msg-col {
  display: flex;
  flex-direction: column;
  max-width: 75%;
  min-width: 0;
}
.msg-row.mine .msg-col { align-items: flex-end; }
.msg-row.theirs .msg-col { align-items: flex-start; }
.msg-bubble {
  display: inline-block;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  position: relative;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}
.msg-row.mine .msg-bubble {
  background: #5B7FFF;
  color: white;
  border-bottom-right-radius: 4px;
}
.msg-row.theirs .msg-bubble {
  background: #1B2236;
  color: #F2F4FA;
  border-bottom-left-radius: 4px;
}
.msg-meta { font-size: 10.5px; opacity: 0.7; margin-top: 3px; }
.msg-actions {
  display: none;
  gap: 6px;
  margin-top: 4px;
}
.msg-row.mine:hover .msg-actions,
.msg-row.mine.actions-open .msg-actions { display: flex; }
.msg-actions button {
  font-size: 11px;
  color: #8A93B3;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease;
}
.msg-actions button:hover { color: #F2F4FA; }
.msg-deleted { font-style: italic; color: #5C648A; }
.msg-row.new-message { animation: bubbleIn 0.18s ease; }

/* ---------- conversation list ---------- */
.conv-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.conv-item:hover { background: #141a2b; }
.conv-item.active { background: #171D2E; border: 1px solid #262E45; }

/* ---------- profile modal sections ---------- */
.profile-section { animation: fadeIn 0.18s ease; }
.profile-menu-item { transition: background-color 0.15s ease; }

/* ---------- mobile: touch-friendly tap targets stay same, but on small
   screens the message actions row should always be visible (no hover) ---------- */
@media (hover: none) {
  .msg-actions { display: flex !important; }
}
