/* ========== Reset & Base ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f5f5f5;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
}

/* ========== Scrollbar ========== */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #d0d0d0;
  border-radius: 2px;
}

/* ========== Easing Functions (非线性缓动) ========== */
/*
 * cubic-bezier 曲线说明:
 * spring     - 弹性回弹，像弹簧一样过冲再归位
 * smooth     - 丝滑进出，快启慢停
 * decel      - 减速进入，从快到慢
 * accel      - 加速离开，从慢到快
 * bounce-out - 弹跳效果
 */
:root {
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-decel: cubic-bezier(0, 0, 0.2, 1);
  --ease-accel: cubic-bezier(0.4, 0, 1, 1);
  --ease-bounce: cubic-bezier(0.34, 1.8, 0.64, 0.8);
}

/* ========== Ripple ========== */
.ripple-container {
  position: relative;
  overflow: hidden;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  transform: scale(0);
  animation: ripple-anim 0.7s var(--ease-decel);
  pointer-events: none;
}

@keyframes ripple-anim {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ========== Fade Animations (非线性) ========== */

/* 消息淡入 - 带弹性上滑 */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  60% {
    opacity: 1;
    transform: translateY(-2px) scale(1.01);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 弹性缩放淡入 - 弹窗等 */
@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(0.85);
  }
  60% {
    opacity: 1;
    transform: scale(1.03);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 淡出 */
@keyframes fadeOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.96); }
}

/* 从底部弹上来 - 设置面板 */
@keyframes slideUp {
  0% {
    opacity: 0;
    transform: translateY(100%);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 设置面板滑下收回 */
@keyframes slideDown {
  0% {
    opacity: 1;
    transform: translateY(0);
  }
  40% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translateY(100%);
  }
}

/* 气泡专属 - 从侧面弹性滑入 */
@keyframes bubbleInLeft {
  0% {
    opacity: 0;
    transform: translateX(-20px) scale(0.9);
  }
  70% {
    opacity: 1;
    transform: translateX(3px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes bubbleInRight {
  0% {
    opacity: 0;
    transform: translateX(20px) scale(0.9);
  }
  70% {
    opacity: 1;
    transform: translateX(-3px) scale(1.02);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* 系统消息淡入 */
@keyframes systemFadeIn {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 图片预览遮罩 - 只做透明度，不动transform */
@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 图片预览 - 弹性缩放进入 */
@keyframes imgPreviewIn {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  70% {
    opacity: 1;
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* 在线指示点脉冲 - 非线性呼吸 */
@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(0.8);
  }
}

.fade-in {
  animation: fadeIn 0.45s var(--ease-spring) forwards;
}

.fade-in-scale {
  animation: fadeInScale 0.4s var(--ease-spring) forwards;
}

.slide-up {
  animation: slideUp 0.45s var(--ease-decel) forwards;
}

.slide-down {
  animation: slideDown 0.35s var(--ease-accel) forwards;
}

/* ========== Modal ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.35s var(--ease-decel);
}

.modal-content {
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px;
  width: 90%;
  max-width: 360px;
  animation: fadeInScale 0.45s var(--ease-spring);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.modal-header .material-symbols-rounded {
  font-size: 28px;
  color: #1a1a1a;
}

.modal-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
}

.modal-desc {
  color: #888;
  font-size: 13px;
  margin-bottom: 20px;
}

.input-group {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f5f5f5;
  border-radius: 14px;
  padding: 0 14px;
  margin-bottom: 18px;
  border: 2px solid transparent;
  transition: border-color 0.35s var(--ease-smooth), background 0.35s var(--ease-smooth);
}

.input-group:focus-within {
  border-color: #1a1a1a;
  background: #fff;
}

.input-icon {
  color: #bbb;
  font-size: 20px;
  transition: color 0.35s var(--ease-smooth);
}

.input-group:focus-within .input-icon {
  color: #1a1a1a;
}

.input-group input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 14px 0;
  font-size: 15px;
  outline: none;
  color: #1a1a1a;
}

.input-group input::placeholder {
  color: #bbb;
}

.btn-primary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s var(--ease-smooth), transform 0.15s var(--ease-spring);
}

.btn-primary:active {
  transform: scale(0.95);
  background: #333;
}

.btn-danger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: #fff;
  color: #e53935;
  border: 1.5px solid #e53935;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.25s var(--ease-smooth);
  margin-top: 12px;
}

.btn-danger:active {
  background: #fff5f5;
}

/* ========== App Layout ========== */
#app {
  height: 100%;
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  position: relative;
}

#chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ========== Header ========== */
#header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  font-size: 24px;
  color: #1a1a1a;
}

.app-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.online-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f5f5f5;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  color: #666;
}

.online-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4caf50;
  animation: pulse-dot 2s var(--ease-smooth) infinite;
}

/* ========== Icon Button ========== */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #666;
  transition: background 0.2s var(--ease-smooth), color 0.2s var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.icon-btn:active {
  background: #f0f0f0;
  color: #1a1a1a;
}

.icon-btn .material-symbols-rounded {
  font-size: 22px;
}

/* ========== Tabs ========== */
#group-tabs {
  display: flex;
  padding: 0 16px;
  gap: 4px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 0;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: #999;
  cursor: pointer;
  position: relative;
  transition: color 0.2s var(--ease-smooth);
  border-radius: 10px 10px 0 0;
}

.tab.active {
  color: #1a1a1a;
  font-weight: 600;
}

.tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 24px;
  height: 3px;
  background: #1a1a1a;
  border-radius: 3px;
  transition: transform 0.35s var(--ease-spring);
}

.tab.active::after {
  transform: translateX(-50%) scaleX(1);
}

.tab .material-symbols-rounded {
  font-size: 18px;
}

/* ========== Message Area ========== */
#message-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 16px;
  background: #fafafa;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

#messages {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ========== Message Bubbles ========== */
.msg {
  display: flex;
  gap: 8px;
  max-width: 85%;
}

/* 别人的消息 - 从左侧弹性滑入 */
.msg:not(.self) {
  animation: bubbleInLeft 0.4s var(--ease-spring) both;
}

/* 自己的消息 - 从右侧弹性滑入 */
.msg.self {
  align-self: flex-end;
  flex-direction: row-reverse;
  animation: bubbleInRight 0.4s var(--ease-spring) both;
}

.msg-avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  flex-shrink: 0;
  margin-top: 2px;
}

.msg.self .msg-avatar {
  background: #1a1a1a;
  color: #fff;
}

.msg-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.msg.self .msg-body {
  align-items: flex-end;
}

.msg-name {
  font-size: 11px;
  color: #aaa;
  padding: 0 4px;
}

.msg-bubble {
  background: #fff;
  padding: 10px 14px;
  border-radius: 16px;
  border-top-left-radius: 4px;
  font-size: 14px;
  line-height: 1.5;
  color: #1a1a1a;
  word-break: break-word;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  position: relative;
}

.msg.self .msg-bubble {
  background: #1a1a1a;
  color: #fff;
  border-top-left-radius: 16px;
  border-top-right-radius: 4px;
}

.msg-time {
  font-size: 10px;
  color: #ccc;
  padding: 0 4px;
}

.msg.self .msg-time {
  color: #bbb;
}

/* Image message */
.msg-bubble.msg-image {
  padding: 4px;
  background: transparent;
  box-shadow: none;
}

.msg.self .msg-bubble.msg-image {
  background: transparent;
}

.msg-bubble.msg-image img {
  display: block;
  max-width: 200px;
  max-height: 200px;
  border-radius: 12px;
  cursor: pointer;
  object-fit: cover;
  transition: opacity 0.25s var(--ease-smooth), transform 0.2s var(--ease-spring);
}

.msg-bubble.msg-image img:active {
  opacity: 0.85;
  transform: scale(0.97);
}

.msg-bubble.msg-image .img-expired {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 160px;
  height: 100px;
  background: #f5f5f5;
  border-radius: 12px;
  color: #bbb;
  font-size: 12px;
  gap: 4px;
}

/* Mention */
.mention-tag {
  color: #1976d2;
  font-weight: 500;
  cursor: pointer;
}

.msg.self .mention-tag {
  color: #90caf9;
}

/* System message */
.msg-system {
  text-align: center;
  font-size: 11px;
  color: #bbb;
  padding: 6px 0;
  animation: systemFadeIn 0.35s var(--ease-decel) both;
}

/* ========== Typing Indicator ========== */
#typing-indicator {
  display: flex;
  gap: 4px;
  padding: 8px 16px;
  align-items: center;
}

#typing-indicator .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ccc;
  animation: typing-bounce 1.4s infinite;
}

#typing-indicator .dot:nth-child(2) {
  animation-delay: 0.2s;
}

#typing-indicator .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-6px); }
}

/* ========== Mention Panel ========== */
#mention-panel {
  position: absolute;
  bottom: 60px;
  left: 16px;
  right: 16px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
  animation: fadeInScale 0.3s var(--ease-spring);
}

.mention-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 12px;
  color: #999;
  border-bottom: 1px solid #f0f0f0;
}

.mention-header .material-symbols-rounded {
  font-size: 16px;
}

.mention-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s var(--ease-smooth);
  border-radius: 10px;
  margin: 2px 4px;
}

.mention-item:active {
  background: #f5f5f5;
}

.mention-item-avatar {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #666;
}

.mention-item-name {
  font-size: 14px;
  color: #1a1a1a;
}

/* ========== Image Preview ========== */
#image-preview-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

#image-preview-img {
  max-width: 92%;
  max-height: 90vh;
  border-radius: 12px;
  object-fit: contain;
  animation: imgPreviewIn 0.4s var(--ease-spring) forwards;
  cursor: default;
}

/* ========== Input Area ========== */
#input-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.input-wrapper {
  flex: 1;
  background: #f5f5f5;
  border-radius: 20px;
  padding: 0 14px;
  border: 2px solid transparent;
  transition: border-color 0.3s var(--ease-smooth), background 0.3s var(--ease-smooth);
}

.input-wrapper:focus-within {
  border-color: #1a1a1a;
  background: #fff;
}

#message-input {
  width: 100%;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-size: 14px;
  line-height: 1.4;
  resize: none;
  outline: none;
  color: #1a1a1a;
  max-height: 100px;
  overflow-y: auto;
}

#message-input::placeholder {
  color: #bbb;
}

.send-btn {
  background: #1a1a1a;
  color: #fff !important;
  border-radius: 14px !important;
  transition: background 0.2s var(--ease-smooth), transform 0.2s var(--ease-spring);
}

.send-btn:active {
  transform: scale(0.88);
  background: #333;
}

.send-btn .material-symbols-rounded {
  font-size: 20px;
}

/* ========== Settings Panel ========== */
#settings-panel {
  position: absolute;
  inset: 0;
  background: #fff;
  z-index: 500;
  display: flex;
  flex-direction: column;
}

.settings-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.settings-header h2 {
  font-size: 17px;
  font-weight: 600;
}

.settings-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid #f5f5f5;
}

.settings-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #1a1a1a;
}

.settings-item-left .material-symbols-rounded {
  font-size: 20px;
  color: #888;
}

.settings-value {
  font-size: 13px;
  color: #aaa;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#settings-nickname {
  border: none;
  outline: none;
  text-align: right;
  font-size: 14px;
  color: #1a1a1a;
  background: #f5f5f5;
  padding: 6px 10px;
  border-radius: 8px;
  max-width: 140px;
  transition: background 0.2s var(--ease-smooth);
}

#settings-nickname:focus {
  background: #eee;
}

/* ========== Utility ========== */
.hidden {
  display: none !important;
}

/* ========== Mobile Responsive ========== */
@media (max-width: 600px) {
  #app {
    max-width: 100%;
  }

  .modal-content {
    width: 92%;
    padding: 28px 22px;
  }

  .msg {
    max-width: 80%;
  }

  .msg-bubble.msg-image img {
    max-width: 160px;
    max-height: 160px;
  }
}

@media (max-width: 380px) {
  #header {
    padding: 10px 12px;
  }

  .app-title {
    font-size: 16px;
  }

  .msg {
    max-width: 85%;
  }

  .msg-avatar {
    width: 30px;
    height: 30px;
    font-size: 11px;
    border-radius: 10px;
  }

  .msg-bubble {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* Safe area for notch devices */
@supports (padding-top: env(safe-area-inset-top)) {
  #header {
    padding-top: max(12px, env(safe-area-inset-top));
  }
}

/* ========== Notify Bar (顶部通知条) ========== */
#notify-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #1a1a1a;
  color: #fff;
  font-size: 13px;
  flex-shrink: 0;
  animation: slideDownNotify 0.4s var(--ease-spring);
}

@keyframes slideDownNotify {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#notify-bar .material-symbols-rounded {
  font-size: 18px;
  color: #90caf9;
}

#notify-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notify-action-btn {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.notify-action-btn:active {
  background: rgba(255,255,255,0.3);
}

.notify-close-btn {
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
}

.notify-close-btn .material-symbols-rounded {
  font-size: 16px;
  color: #888;
}

/* ========== DM Badge ========== */
.dm-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: #e53935;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ========== DM List Panel ========== */
#dm-list-panel, #mention-list-panel {
  position: absolute;
  inset: 0;
  background: #fff;
  z-index: 500;
  display: flex;
  flex-direction: column;
}

.dm-list-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.dm-list-header h2 {
  font-size: 17px;
  font-weight: 600;
}

#dm-list-body, #mention-list-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
}

.dm-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s var(--ease-smooth);
}

.dm-item:active {
  background: #f5f5f5;
}

.dm-item-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 600;
  color: #666;
  flex-shrink: 0;
}

.dm-item-info {
  flex: 1;
  min-width: 0;
}

.dm-item-name {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
}

.dm-item-preview {
  font-size: 12px;
  color: #aaa;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.dm-item-time {
  font-size: 10px;
  color: #ccc;
  flex-shrink: 0;
}

.dm-item-unread {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e53935;
  flex-shrink: 0;
}

/* ========== Mention Result Item ========== */
.mention-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s var(--ease-smooth);
  background: #fafafa;
  margin-bottom: 6px;
}

.mention-result-item:active {
  background: #f0f0f0;
}

.mention-result-avatar {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #666;
  flex-shrink: 0;
}

.mention-result-content {
  flex: 1;
  min-width: 0;
}

.mention-result-name {
  font-size: 12px;
  color: #1976d2;
  font-weight: 500;
}

.mention-result-msg {
  font-size: 13px;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}

.mention-result-time {
  font-size: 10px;
  color: #ccc;
  flex-shrink: 0;
}

/* ========== Private Chat View ========== */
.msg.private {
  position: relative;
}

.msg.private .msg-bubble {
  border-left: 3px solid #1976d2;
}

.msg.self.private .msg-bubble {
  border-left: none;
  border-right: 3px solid #1976d2;
}

.private-label {
  font-size: 10px;
  color: #1976d2;
  padding: 0 4px;
  margin-bottom: -1px;
}

.msg.self .private-label {
  color: #90caf9;
}

/* ========== Mention Highlight in messages ========== */
.msg.mention-highlight .msg-bubble {
  box-shadow: 0 0 0 2px #1976d2, 0 1px 2px rgba(0,0,0,0.04);
  animation: mentionPulse 1.5s var(--ease-smooth);
}

@keyframes mentionPulse {
  0% { box-shadow: 0 0 0 2px #1976d2; }
  50% { box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.3); }
  100% { box-shadow: 0 0 0 2px #1976d2, 0 1px 2px rgba(0,0,0,0.04); }
}
