/* Enhanced chat styles */
.chat{
  display:flex;flex-direction:column;gap:12px;
  opacity:0;
  animation:chatFadeIn 0.8s cubic-bezier(.25,.46,.45,.94) 0.2s forwards;
}

@keyframes chatFadeIn{
  0%{opacity:0;transform:translateY(15px)}
  100%{opacity:1;transform:translateY(0)}
}

.msg{
  max-width:80%;padding:12px 16px;border-radius:16px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.15);
  backdrop-filter:blur(10px);
  position:relative;
  transition:all 0.3s cubic-bezier(.25,.46,.45,.94);
}

.msg:hover{
  background:rgba(255,255,255,.12);
  transform:translateX(4px) scale(1.02);
  box-shadow:0 8px 25px rgba(244,114,182,.2);
}

.msg.me{
  align-self:flex-start;
  background:linear-gradient(135deg, rgba(244,114,182,.3), rgba(239,68,68,.25));
  border:1px solid rgba(244,114,182,.3);
  color:#fff;
}

.msg.me:hover{
  background:linear-gradient(135deg, rgba(244,114,182,.4), rgba(239,68,68,.35));
  transform:translateX(-4px) scale(1.02);
  box-shadow:0 8px 25px rgba(244,114,182,.3);
}

.msg small{
  display:block;color:var(--muted);margin-top:8px;
  font-size:0.85rem;opacity:0.8;
  transition:opacity 0.3s ease;
}

.msg:hover small{opacity:1}

.chat-wrap{
  height:55vh;overflow:auto;
  background:linear-gradient(to bottom, rgba(244,114,182,.02), rgba(239,68,68,.01));
  border-radius:var(--radius);
  border:1px solid rgba(255,255,255,.05);
  /* Enhanced minimalistic scrollbar */
  scrollbar-width:thin;
  scrollbar-color:rgba(244,114,182,.5) rgba(255,255,255,.05);
}

.chat-wrap::-webkit-scrollbar{width:8px}
.chat-wrap::-webkit-scrollbar-track{
  background:rgba(255,255,255,.05);
  border-radius:4px;
}
.chat-wrap::-webkit-scrollbar-thumb{
  background:linear-gradient(135deg,rgba(244,114,182,.6),rgba(239,68,68,.4));
  border-radius:4px;
  border:1px solid rgba(255,255,255,.1);
  transition:background .3s ease;
}
.chat-wrap::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(135deg,rgba(244,114,182,.8),rgba(239,68,68,.6));
}

/* Enhanced pre-animation state for messages */
.msg.msg-preload{
  opacity:0;
  transform:translateY(25px) scale(.9) rotateX(8deg);
  transition:all .6s cubic-bezier(.25,.46,.45,.94);
}

.msg.msg-animate{
  opacity:1;
  transform:translateY(0) scale(1) rotateX(0deg);
}
