#sb-chatbot-btn {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: linear-gradient(169deg, oklch(0.66 0.24 17) 0%, oklch(0.48 0.18 17) 99%);
  box-shadow: 0 4px 20px oklch(0.66 0.24 17 / 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#sb-chatbot-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 28px oklch(0.66 0.24 17 / 0.6);
}
#sb-chatbot-btn svg { width: 26px; height: 26px; fill: #fff; }

#sb-chatbot-panel {
  position: fixed;
  bottom: 90px;
  right: 22px;
  z-index: 999;
  width: 340px;
  max-width: calc(100vw - 32px);
  height: 460px;
  max-height: calc(100vh - 140px);
  background: #0c070f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', Consolas, monospace;
}
#sb-chatbot-panel.open { display: flex; }

#sb-chatbot-header {
  padding: 14px 16px;
  background: linear-gradient(169deg, oklch(0.66 0.24 17) 0%, oklch(0.48 0.18 17) 99%);
  color: #fff;
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#sb-chatbot-close {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  opacity: 0.8;
  line-height: 1;
}
#sb-chatbot-close:hover { opacity: 1; }

#sb-chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sb-msg {
  max-width: 85%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.5;
  white-space: pre-wrap;
}
.sb-msg-bot {
  align-self: flex-start;
  background: #110a14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f2e8ee;
}
.sb-msg-user {
  align-self: flex-end;
  background: linear-gradient(169deg, oklch(0.66 0.24 17) 0%, oklch(0.48 0.18 17) 99%);
  color: #fff;
}
.sb-msg-error {
  align-self: flex-start;
  background: oklch(0.62 0.20 348 / 0.12);
  border: 1px solid oklch(0.62 0.20 348 / 0.35);
  color: oklch(0.72 0.26 17);
}
.sb-msg-loading { opacity: 0.6; font-style: italic; }

#sb-chatbot-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
#sb-chatbot-input {
  flex: 1;
  background: #110a14;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 8px 10px;
  color: #f2e8ee;
  font-size: 0.8rem;
  font-family: inherit;
}
#sb-chatbot-input:focus { outline: none; border-color: oklch(0.66 0.24 17); }
#sb-chatbot-send {
  background: linear-gradient(169deg, oklch(0.66 0.24 17) 0%, oklch(0.48 0.18 17) 99%);
  border: none;
  border-radius: 6px;
  color: #fff;
  padding: 0 14px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
}
#sb-chatbot-send:disabled { opacity: 0.5; cursor: not-allowed; }

[data-theme='light'] #sb-chatbot-panel { background: #fff; }
[data-theme='light'] .sb-msg-bot { background: #f4f4f4; color: #1a1a1a; border-color: rgba(0,0,0,0.1); }
[data-theme='light'] #sb-chatbot-input { background: #f4f4f4; color: #1a1a1a; }
