.dt-widget-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5B7FFF 0%, #8B5CF6 55%, #C084FC 100%);
  box-shadow: 0 10px 30px -8px rgba(91,127,255,0.55), 0 0 0 1px rgba(255,255,255,0.08) inset;
  border: none;
  cursor: pointer;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .18s ease, box-shadow .18s ease;
}
.dt-widget-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 36px -8px rgba(91,127,255,0.7); }
.dt-widget-fab svg { width: 28px; height: 28px; }
.dt-widget-fab .dt-dot {
  position: absolute; top: 6px; right: 6px; width: 11px; height: 11px; border-radius: 50%;
  background: #22D3EE; border: 2px solid #05060C; animation: dtPulse 2.4s ease-in-out infinite;
}
@keyframes dtPulse { 0%,100%{ opacity:1 } 50%{ opacity:.4 } }

.dt-widget-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 500px;
  max-height: calc(100vh - 140px);
  background: #0A0E1D;
  border: 1px solid rgba(140,160,255,0.16);
  border-radius: 18px;
  box-shadow: 0 24px 60px -12px rgba(0,0,0,0.55);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  font-family: 'Manrope', -apple-system, "Segoe UI", sans-serif;
}
.dt-widget-panel.open { display: flex; animation: dtSlideUp .22s ease; }
@keyframes dtSlideUp { from { opacity:0; transform: translateY(14px); } to { opacity:1; transform: translateY(0); } }

.dt-widget-header {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(91,127,255,0.18), rgba(139,92,246,0.14));
  border-bottom: 1px solid rgba(140,160,255,0.14);
}
.dt-widget-header .dt-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #5B7FFF, #C084FC);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.dt-widget-header .dt-avatar svg { width: 18px; height: 18px; }
.dt-widget-header .dt-title { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 14.5px; color: #E9ECF7; }
.dt-widget-header .dt-subtitle { font-size: 11.5px; color: #7FE3B4; display: flex; align-items: center; gap: 5px; }
.dt-widget-header .dt-subtitle::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #22D3EE; }
.dt-widget-close {
  margin-left: auto; background: none; border: none; color: #A8B0C8; cursor: pointer;
  width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.dt-widget-close:hover { background: rgba(255,255,255,0.08); }

.dt-widget-body {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  background:
    radial-gradient(circle at 20% 0%, rgba(91,127,255,0.06), transparent 50%),
    #05060C;
}
.dt-msg { max-width: 84%; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; }
.dt-msg.bot { align-self: flex-start; background: #131830; color: #E9ECF7; border-bottom-left-radius: 4px; }
.dt-msg.user { align-self: flex-end; background: linear-gradient(135deg, #5B7FFF, #8B5CF6); color: #fff; border-bottom-right-radius: 4px; }
.dt-msg.typing { display: flex; gap: 4px; align-items: center; padding: 12px 14px; }
.dt-msg.typing span { width: 6px; height: 6px; border-radius: 50%; background: #7C86A3; animation: dtTyping 1.2s infinite ease-in-out; }
.dt-msg.typing span:nth-child(2) { animation-delay: .15s; }
.dt-msg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dtTyping { 0%,60%,100%{ transform: translateY(0); opacity:.5 } 30%{ transform: translateY(-4px); opacity:1 } }

.dt-widget-footer {
  display: flex; gap: 8px; padding: 12px; border-top: 1px solid rgba(140,160,255,0.14);
  background: #0A0E1D;
}
.dt-widget-footer input {
  flex: 1; background: #131830; border: 1px solid rgba(140,160,255,0.18); border-radius: 10px;
  padding: 10px 12px; color: #E9ECF7; font-size: 13.5px; font-family: inherit;
}
.dt-widget-footer input::placeholder { color: #7C86A3; }
.dt-widget-footer input:focus { outline: none; border-color: #5B7FFF; }
.dt-widget-footer button {
  background: linear-gradient(135deg, #5B7FFF, #8B5CF6); border: none; border-radius: 10px;
  width: 40px; flex-shrink: 0; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: opacity .15s;
}
.dt-widget-footer button:disabled { opacity: .5; cursor: default; }
.dt-widget-footer button svg { width: 17px; height: 17px; }

@media (max-width: 420px) {
  .dt-widget-panel { right: 12px; left: 12px; width: auto; bottom: 88px; }
  .dt-widget-fab { right: 16px; bottom: 16px; }
}
