#aie-chat-toggle {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99999;
}

#aie-chat-toggle canvas {
  border-radius: 50%;
  background: transparent;
  display: block;
  transition: transform .25s ease;
}

#aie-chat-toggle:hover canvas {
  transform: scale(1.08);
}

#aie-chat-tooltip {
  position: fixed;
  left: 50%;
  bottom: 104px;
  transform: translateX(-50%) translateY(-4px);
  background: rgba(10,12,22,.92);
  border: 1px solid rgba(74,125,255,.22);
  border-radius: 12px;
  padding: 10px 16px;
  pointer-events: none;
  white-space: nowrap;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 99999;
  text-align: center;
}
#aie-chat-tooltip.aie-tip-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#aie-chat-tooltip strong {
  display: block;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #f0f0f5;
  margin-bottom: 3px;
}
#aie-chat-tooltip span {
  display: block;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: rgba(160,170,200,.65);
  letter-spacing: .06em;
}

#aie-chat-window {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 104px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: rgba(10,12,20,.97);
  border: 1px solid rgba(74,125,255,.18);
  border-radius: 20px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 99998;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 24px 80px rgba(0,0,0,.7), 0 0 60px rgba(74,125,255,.08);
}

#aie-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(240,240,245,.7);
  flex-shrink: 0;
  background: rgba(14,16,28,.6);
}

#aie-chat-header::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4a7dff;
  box-shadow: 0 0 8px rgba(74,125,255,.8);
  animation: aieStatusPulse 2.4s ease-in-out infinite;
  margin-right: 10px;
  flex-shrink: 0;
}

@keyframes aieStatusPulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .35; }
}

#aie-chat-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15);
  background: transparent;
  color: rgba(240,240,245,.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  transition: border-color .2s, color .2s;
}
#aie-chat-close:hover {
  border-color: rgba(255,255,255,.35);
  color: #f0f0f5;
}

#aie-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

#aie-chat-messages::-webkit-scrollbar { width: 3px; }
#aie-chat-messages::-webkit-scrollbar-track { background: transparent; }
#aie-chat-messages::-webkit-scrollbar-thumb { background: rgba(74,125,255,.25); border-radius: 3px; }

#aie-chat-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(14,16,28,.6);
  flex-shrink: 0;
}

#aie-chat-input {
  flex: 1;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 10px 14px;
  color: #f0f0f5;
  font-family: 'Montserrat', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 300;
  outline: none;
  transition: border-color .2s;
}
#aie-chat-input::placeholder { color: rgba(160,160,180,.4); }
#aie-chat-input:focus { border-color: rgba(74,125,255,.45); }

#aie-chat-send {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(74,125,255,.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s, transform .15s;
  color: #fff;
}
#aie-chat-send:hover  { background: rgba(74,125,255,1); }
#aie-chat-send:active { transform: scale(.94); }
