.ebot-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

/* ── Bubble ── */
.ebot-bubble {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00C6FF 0%, #00FF94 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(0, 198, 255, 0.3), 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
  animation: ebot-pulse 3s ease-in-out infinite, ebot-float 4s ease-in-out infinite;
  will-change: transform;
}
.ebot-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 32px rgba(0, 198, 255, 0.45), 0 8px 28px rgba(0, 0, 0, 0.4);
}
.ebot-bubble svg {
  width: 26px;
  height: 26px;
  fill: #05070A;
  transition: transform 0.25s;
  animation: ebot-salute 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.9s 1;
}
.ebot-bubble.ebot-open svg {
  transform: rotate(90deg);
}
@keyframes ebot-pulse {
  0%, 100% { box-shadow: 0 4px 24px rgba(0, 198, 255, 0.3); }
  50% { box-shadow: 0 4px 32px rgba(0, 198, 255, 0.5); }
}
@keyframes ebot-panel-pop {
  0% { opacity: 0; transform: translateY(16px) scale(0.92); }
  60% { opacity: 1; transform: translateY(-3px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes ebot-float {
  0% { transform: translateY(0); }
  25% { transform: translateY(-12px); }
  50% { transform: translateY(-14px); }
  75% { transform: translateY(-6px); }
  100% { transform: translateY(0); }
}
@keyframes ebot-salute {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-18deg) scale(1.1); }
  40% { transform: rotate(16deg); }
  60% { transform: rotate(-10deg); }
  80% { transform: rotate(8deg); }
}

/* ── Panel ── */
.ebot-panel {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 400px;
  max-height: 600px;
  background: #0A0D13;
  border: 1px solid #1A1F2B;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.97);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}
.ebot-panel.ebot-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  animation: ebot-panel-pop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Header ── */
.ebot-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(0,198,255,0.08) 0%, rgba(0,255,148,0.08) 100%);
  border-bottom: 1px solid #1A1F2B;
}
.ebot-header-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00FF94;
  box-shadow: 0 0 8px rgba(0, 255, 148, 0.5);
}
.ebot-header-info {
  flex: 1;
}
.ebot-header-title {
  font-weight: 600;
  font-size: 14px;
  color: #E5E9F0;
}
.ebot-header-sub {
  font-size: 11px;
  color: #64748B;
}
.ebot-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #64748B;
  font-size: 18px;
  padding: 4px;
  line-height: 1;
  transition: color 0.15s;
}
.ebot-close:hover { color: #E5E9F0; }

/* ── Messages ── */
.ebot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  max-height: 420px;
}
.ebot-messages::-webkit-scrollbar { width: 4px; }
.ebot-messages::-webkit-scrollbar-track { background: transparent; }
.ebot-messages::-webkit-scrollbar-thumb { background: #1A1F2B; border-radius: 2px; }

.ebot-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
  word-wrap: break-word;
}
.ebot-msg-user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(0,255,148,0.12) 0%, rgba(0,198,255,0.12) 100%);
  border: 1px solid rgba(0,255,148,0.2);
  color: #E5E9F0;
  border-bottom-right-radius: 4px;
}
.ebot-msg-bot {
  align-self: flex-start;
  background: #11151E;
  border: 1px solid #1A1F2B;
  color: #E5E9F0;
  border-bottom-left-radius: 4px;
}
.ebot-msg-bot code {
  background: #05070A;
  padding: 1px 5px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #00C6FF;
}

/* ── Typing indicator ── */
.ebot-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  align-self: flex-start;
}
.ebot-typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748B;
  animation: ebot-bounce 1.2s infinite;
}
.ebot-typing-dot:nth-child(2) { animation-delay: 0.15s; }
.ebot-typing-dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes ebot-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ── Input ── */
.ebot-input-area {
  padding: 12px 16px;
  border-top: 1px solid #1A1F2B;
  display: flex;
  gap: 8px;
  background: #0A0D13;
}
.ebot-input {
  flex: 1;
  background: #11151E;
  border: 1px solid #1A1F2B;
  border-radius: 10px;
  padding: 10px 14px;
  color: #E5E9F0;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
  min-height: 40px;
  max-height: 80px;
}
.ebot-input::placeholder { color: #64748B; }
.ebot-input:focus { border-color: #00C6FF; }

.ebot-send {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #00C6FF 0%, #00FF94 100%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.ebot-send:hover { opacity: 0.9; transform: scale(1.04); }
.ebot-send:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.ebot-send svg {
  width: 18px;
  height: 18px;
  fill: #05070A;
}

/* ── Welcome ── */
.ebot-welcome {
  text-align: center;
  padding: 32px 20px;
  color: #64748B;
}
.ebot-welcome-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.ebot-welcome h3 {
  color: #E5E9F0;
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px 0;
}
.ebot-welcome p {
  font-size: 12px;
  margin: 0;
  color: #64748B;
}

/* ── Quick actions ── */
.ebot-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
}
.ebot-quick-btn {
  background: #11151E;
  border: 1px solid #1A1F2B;
  border-radius: 8px;
  padding: 6px 12px;
  color: #94A3B8;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
}
.ebot-quick-btn:hover {
  border-color: #00C6FF;
  color: #00C6FF;
  background: rgba(0, 198, 255, 0.06);
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .ebot-root { bottom: 16px; right: 16px; }
  .ebot-panel {
    width: calc(100vw - 32px);
    max-height: calc(100vh - 100px);
    bottom: 68px;
    right: 0;
    border-radius: 14px;
  }
  .ebot-messages { min-height: 250px; max-height: calc(100vh - 200px); }
}

/* ── Draggable ── */
.ebot-bubble {
  touch-action: none;
}
button.ebot-bubble { cursor: grab; }
button.ebot-bubble:active { cursor: grabbing; }
.ebot-header {
  touch-action: none;
  cursor: grab;
}
.ebot-header:active { cursor: grabbing; }
.ebot-root.ebot-dragging,
.ebot-root.ebot-dragging * {
  transition: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}
.ebot-root.ebot-dragging .ebot-bubble {
  animation-play-state: paused;
}

/* ── Floating / drag hint ── */
.ebot-drag-hint {
  position: absolute;
  right: 0;
  bottom: calc(100% + 14px);
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(0, 198, 255, 0.14), rgba(0, 255, 148, 0.14));
  border: 1px solid rgba(0, 198, 255, 0.4);
  color: #E5E9F0;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  cursor: default;
  pointer-events: auto;
  animation: ebot-hint-in 0.3s ease;
}
.ebot-drag-hint::after {
  content: '';
  position: absolute;
  right: 18px;
  bottom: -5px;
  width: 9px;
  height: 9px;
  background: inherit;
  border-right: 1px solid rgba(0, 198, 255, 0.4);
  border-bottom: 1px solid rgba(0, 198, 255, 0.4);
  transform: rotate(45deg);
}
.ebot-drag-hint-x {
  color: #64748B;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  font-weight: 700;
}
.ebot-drag-hint-x:hover { color: #E5E9F0; }
.ebot-drag-hint-hide {
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.3s;
}
@keyframes ebot-hint-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
