:root{
  --soft-bg:#f3f8ff;
  --primary:#2b6fff;
  --primary-soft:#e8f0ff;
  --text:#0f172a;
}

body{color:var(--text);}
.bg-soft{background:var(--soft-bg);}

.avatar-sm{width:28px;height:28px;border-radius:50%;object-fit:cover;}
.avatar{width:36px;height:36px;border-radius:50%;object-fit:cover;flex:0 0 auto;}

.chat-messages{
  height: calc(100vh - 230px);
  max-height: 620px;
  overflow-y:auto;
  padding: 14px;
  background: linear-gradient(180deg, #ffffff 0%, var(--primary-soft) 100%);
}

.msg{display:flex;gap:10px;margin-bottom:12px;align-items:flex-start;}
.msg-body{background:#fff;border:1px solid rgba(43,111,255,.15);border-radius:14px;padding:10px 12px;flex:1;box-shadow:0 2px 12px rgba(2,6,23,.04);}
.msg-meta{display:flex;justify-content:space-between;gap:10px;margin-bottom:4px;}
.username{font-weight:700;}
.time{font-size:.82rem;white-space:nowrap;}
.text{white-space:pre-wrap;word-break:break-word;}

.role-user{color:#1d4ed8;}
.role-moderator{color:#0f766e;}
.role-admin{color:#b91c1c;}

.fade-in{animation:fadeIn .18s ease-out;}
@keyframes fadeIn{from{opacity:0;transform:translateY(4px);}to{opacity:1;transform:translateY(0);}}

.ban-overlay{position:fixed;inset:0;background:rgba(255,255,255,.82);display:flex;align-items:center;justify-content:center;backdrop-filter: blur(4px);z-index:9999;}
.ban-card{background:#fff;border:1px solid rgba(43,111,255,.2);border-radius:16px;padding:22px;box-shadow:0 12px 40px rgba(2,6,23,.1);text-align:center;min-width:280px;}

.user-actions-menu{
  position:absolute;
  background:#fff;
  border:1px solid rgba(43,111,255,.2);
  border-radius:8px;
  box-shadow:0 8px 24px rgba(2,6,23,.15);
  min-width:200px;
  z-index:1000;
  overflow:hidden;
}
.user-actions-menu .dropdown-header{
  padding:8px 12px;
  font-size:.85rem;
  font-weight:600;
  color:#64748b;
  background:#f8fafc;
  border-bottom:1px solid rgba(43,111,255,.1);
}
.user-actions-menu .dropdown-item{
  display:block;
  width:100%;
  padding:8px 12px;
  border:none;
  background:transparent;
  text-align:right;
  font-size:.9rem;
  cursor:pointer;
  transition:background .15s;
}
.user-actions-menu .dropdown-item:hover{
  background:var(--primary-soft);
}
.user-actions-menu .dropdown-item.text-danger{
  color:#dc2626;
}
.user-actions-menu .dropdown-item.text-danger:hover{
  background:#fee2e2;
}

/* Emoji Picker */
.emoji-picker{
  position:fixed !important;
  background:#fff;
  border:1px solid rgba(43,111,255,.2);
  border-radius:12px;
  box-shadow:0 8px 24px rgba(2,6,23,.2);
  width:360px;
  max-width:90vw;
  z-index:9999 !important;
  pointer-events:auto;
}
.emoji-picker::after{
  content:'';
  position:absolute;
  bottom:-8px;
  left:50%;
  transform:translateX(-50%);
  width:0;
  height:0;
  border-left:8px solid transparent;
  border-right:8px solid transparent;
  border-top:8px solid #fff;
}
.emoji-picker::before{
  content:'';
  position:absolute;
  bottom:-10px;
  left:50%;
  transform:translateX(-50%);
  width:0;
  height:0;
  border-left:9px solid transparent;
  border-right:9px solid transparent;
  border-top:9px solid rgba(43,111,255,.2);
}
.emoji-picker-header{
  padding:10px 14px;
  border-bottom:1px solid rgba(43,111,255,.1);
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:var(--primary-soft);
  border-radius:11px 11px 0 0;
}
.emoji-picker-body{
  padding:12px;
  max-height:260px;
  overflow-y:auto;
  display:grid;
  grid-template-columns:repeat(8, 1fr);
  gap:4px;
}
.emoji-picker-body::-webkit-scrollbar{
  width:6px;
}
.emoji-picker-body::-webkit-scrollbar-track{
  background:#f1f1f1;
  border-radius:3px;
}
.emoji-picker-body::-webkit-scrollbar-thumb{
  background:var(--primary);
  border-radius:3px;
}
.emoji-picker-body::-webkit-scrollbar-thumb:hover{
  background:#1d4ed8;
}
.emoji-item{
  font-size:22px;
  padding:6px;
  border:none;
  background:transparent;
  cursor:pointer;
  border-radius:6px;
  transition:all .15s;
  display:flex;
  align-items:center;
  justify-content:center;
}
.emoji-item:hover{
  background:var(--primary-soft);
  transform:scale(1.2);
}
