#ppl-chat-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee, #0891b2);
  box-shadow: 0 4px 20px rgba(34,211,238,0.4);
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#ppl-chat-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(34,211,238,0.55);
}
#ppl-chat-bubble svg { width: 26px; height: 26px; fill: #0d1420; }
#ppl-chat-bubble .ppl-close-icon { display: none; }
#ppl-chat-bubble.open .ppl-chat-icon { display: none; }
#ppl-chat-bubble.open .ppl-close-icon { display: block; }

#ppl-chat-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  background: #f43f5e;
  border-radius: 50%;
  border: 2px solid #0d1420;
  display: none;
}
#ppl-chat-badge.show { display: block; }

#ppl-chat-panel {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 360px;
  max-height: 520px;
  background: #0d1420;
  border: 1px solid rgba(34,211,238,0.2);
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  z-index: 9998;
  overflow: hidden;
  transform: translateY(12px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
}
#ppl-chat-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

#ppl-chat-header {
  background: linear-gradient(135deg, #0d1420, #0f2030);
  border-bottom: 1px solid rgba(34,211,238,0.15);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
#ppl-chat-header .ppl-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d3ee, #0891b2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#ppl-chat-header .ppl-avatar svg { width: 20px; height: 20px; fill: #0d1420; }
#ppl-chat-header .ppl-info { flex: 1; }
#ppl-chat-header .ppl-name { color: #fff; font-size: 14px; font-weight: 600; line-height: 1.2; }
#ppl-chat-header .ppl-status { color: #22d3ee; font-size: 11px; display: flex; align-items: center; gap: 4px; }
#ppl-chat-header .ppl-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; display: inline-block; }

#ppl-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(34,211,238,0.2) transparent;
}
#ppl-chat-messages::-webkit-scrollbar { width: 4px; }
#ppl-chat-messages::-webkit-scrollbar-thumb { background: rgba(34,211,238,0.2); border-radius: 2px; }

.ppl-msg {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}
.ppl-msg.bot {
  background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.15);
  color: #e2e8f0;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.ppl-msg.user {
  background: linear-gradient(135deg, #22d3ee, #0891b2);
  color: #0d1420;
  font-weight: 500;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.ppl-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 14px;
}
.ppl-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22d3ee;
  opacity: 0.4;
  animation: ppl-bounce 1.2s infinite;
}
.ppl-typing span:nth-child(2) { animation-delay: 0.2s; }
.ppl-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ppl-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

#ppl-chat-footer {
  border-top: 1px solid rgba(34,211,238,0.12);
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
  background: rgba(13,20,32,0.95);
}
#ppl-chat-input {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(34,211,238,0.2);
  border-radius: 10px;
  padding: 9px 12px;
  color: #e2e8f0;
  font-size: 13.5px;
  font-family: inherit;
  resize: none;
  outline: none;
  max-height: 96px;
  line-height: 1.4;
  transition: border-color 0.15s;
}
#ppl-chat-input:focus { border-color: rgba(34,211,238,0.5); }
#ppl-chat-input::placeholder { color: rgba(255,255,255,0.3); }
#ppl-chat-send {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #22d3ee, #0891b2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.15s;
}
#ppl-chat-send:disabled { opacity: 0.4; cursor: not-allowed; }
#ppl-chat-send svg { width: 16px; height: 16px; fill: #0d1420; }

@media (max-width: 480px) {
  #ppl-chat-panel {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 84px;
  }
  #ppl-chat-bubble { right: 16px; bottom: 16px; }
}
