

#stego-chat-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: transform 0.2s, box-shadow 0.2s;
}
#stego-chat-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(59, 130, 246, 0.6);
}
#stego-chat-btn svg {
  width: 28px;
  height: 28px;
  fill: #fff;
}
#stego-chat-btn .chat-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: #10b981;
  border-radius: 50%;
  border: 2px solid #0b0d12;
}

#stego-chat-window {
  position: fixed;
  bottom: 100px;
  right: 28px;
  width: 370px;
  max-height: 540px;
  background: #11141b;
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(59, 130, 246, 0.1);
  z-index: 9998;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
#stego-chat-window.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

#stego-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(139,92,246,0.1));
  border-bottom: 1px solid rgba(59, 130, 246, 0.18);
  flex-shrink: 0;
}
#stego-chat-header .chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#stego-chat-header .chat-avatar svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}
#stego-chat-header .chat-title {
  flex: 1;
}
#stego-chat-header .chat-title strong {
  display: block;
  color: #e5e7eb;
  font-size: 14px;
  font-weight: 600;
}
#stego-chat-header .chat-title span {
  color: #10b981;
  font-size: 11px;
}
#stego-chat-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #b8bbc4;
  padding: 4px;
  border-radius: 6px;
  line-height: 0;
  transition: color 0.15s, background 0.15s;
}
#stego-chat-close:hover {
  color: #e5e7eb;
  background: rgba(255,255,255,0.07);
}
#stego-chat-close svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

#stego-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(59,130,246,0.3) transparent;
}
#stego-chat-messages::-webkit-scrollbar { width: 4px; }
#stego-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(59,130,246,0.35);
  border-radius: 4px;
}

.chat-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
}
.chat-msg.bot {
  background: #141824;
  color: #e5e7eb;
  border: 1px solid rgba(59,130,246,0.18);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-msg.user {
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-msg.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239,68,68,0.3);
  color: #fca5a5;
  align-self: flex-start;
}

.chat-msg.bot .chat-h1,
.chat-msg.bot .chat-h2,
.chat-msg.bot .chat-h3 {
  display: block;
  color: #93c5fd;
  margin: 6px 0 2px;
  font-weight: 700;
}
.chat-msg.bot .chat-h1 { font-size: 14px; }
.chat-msg.bot .chat-h2 { font-size: 13.5px; }
.chat-msg.bot .chat-h3 { font-size: 13px; color: #a5b4fc; }

.chat-msg.bot code {
  background: rgba(59,130,246,0.12);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 12px;
  color: #93c5fd;
}
.chat-msg.bot pre {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 8px;
  padding: 10px 12px;
  overflow-x: auto;
  margin-top: 6px;
}
.chat-msg.bot pre code {
  background: none;
  padding: 0;
  color: #a5f3fc;
  font-size: 12px;
}

.chat-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  align-self: flex-start;
}
.chat-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3b82f6;
  animation: chatBounce 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40% { transform: translateY(-6px); opacity: 1; }
}

#stego-chat-input-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(59,130,246,0.15);
  background: #11141b;
  flex-shrink: 0;
}
#stego-chat-input {
  flex: 1;
  background: #141824;
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 12px;
  color: #e5e7eb;
  padding: 9px 13px;
  font-size: 13.5px;
  resize: none;
  outline: none;
  max-height: 100px;
  line-height: 1.5;
  transition: border-color 0.15s;
  font-family: inherit;
}
#stego-chat-input::placeholder { color: #4b5563; }
#stego-chat-input:focus {
  border-color: rgba(59,130,246,0.55);
}
#stego-chat-send {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.15s, transform 0.15s;
}
#stego-chat-send:hover { opacity: 0.88; transform: scale(1.05); }
#stego-chat-send:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
#stego-chat-send svg {
  width: 18px;
  height: 18px;
  fill: #fff;
}

#stego-chat-hint {
  text-align: center;
  font-size: 10.5px;
  color: #4b5563;
  padding: 0 12px 8px;
  flex-shrink: 0;
}

@media (max-width: 440px) {
  #stego-chat-window {
    width: calc(100vw - 20px);
    right: 10px;
    bottom: 90px;
  }
  #stego-chat-btn { right: 16px; bottom: 20px; }
}
