#lxz-widget * { margin: 0; box-sizing: border-box; font-family: "PingFang SC", "Microsoft YaHei", sans-serif; }
#lxz-widget { position: fixed; right: 28px; bottom: 28px; z-index: 99999;
  --lxz-acc: #e0453a; --lxz-acc2: #ff6b54; --lxz-txt: #1a1d26; --lxz-sub: #8a90a2;
  --lxz-line: #eef0f5; --lxz-soft: #f6f7fa; }

/* ---- 悬浮球 ---- */
#lxz-ball { position: relative; width: 68px; height: 68px; border-radius: 50%; cursor: pointer;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1); }
#lxz-ball:hover { transform: scale(1.07); }
#lxz-ball::before { content: ""; position: absolute; inset: -3px; border-radius: 50%;
  background: conic-gradient(from 0deg, #ff6b54, #ffb37a, #8ab4ff, #c9a0ff, #ff6b54);
  animation: lxz-spin 5s linear infinite; }
#lxz-ball::after { content: ""; position: absolute; inset: -5px; border-radius: 50%;
  box-shadow: 0 6px 22px rgba(224,69,58,.32); }
#lxz-ball .ring-bg { position: absolute; inset: 1px; border-radius: 50%; background: #fff; }
#lxz-ball img { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px);
  border-radius: 50%; object-fit: cover; object-position: top; }
@keyframes lxz-spin { to { transform: rotate(360deg); } }
#lxz-ball .lxz-tip { position: absolute; right: 82px; bottom: 16px; background: #fff; color: #333;
  font-size: 13px; padding: 10px 16px; border-radius: 12px; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(30,35,60,.14); }
#lxz-ball .lxz-tip::after { content: ""; position: absolute; right: -6px; top: 50%; margin-top: -6px;
  border: 6px solid transparent; border-left-color: #fff; }

/* ---- 面板 ---- */
#lxz-panel { display: none; width: 428px; max-width: calc(100vw - 48px); height: 660px; max-height: calc(100vh - 100px);
  border-radius: 16px; flex-direction: column; overflow: hidden; position: relative;
  background: #fff; border: 1px solid var(--lxz-line);
  box-shadow: 0 24px 72px rgba(30,35,60,.18), 0 4px 18px rgba(30,35,60,.08);
  animation: lxz-rise .3s cubic-bezier(.2,.9,.3,1.15); }
#lxz-panel.open { display: flex; }
@keyframes lxz-rise { from { opacity: 0; transform: translateY(22px) scale(.97); } to { opacity: 1; transform: none; } }

/* 头部：呼吸感极光 */
.lxz-head { position: relative; display: flex; align-items: center; gap: 16px; padding: 28px 28px 24px;
  flex-shrink: 0; overflow: hidden; border-bottom: 1px solid var(--lxz-line); }
.lxz-head::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(100% 180% at 0% 0%, rgba(255,107,84,.12), transparent 62%),
              radial-gradient(90% 160% at 100% 0%, rgba(138,180,255,.14), transparent 58%); }
.lxz-head > * { position: relative; }
.lxz-head img.ava { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: top;
  border: 2px solid #fff; box-shadow: 0 3px 14px rgba(224,69,58,.22); }
.lxz-head .t { font-size: 16px; font-weight: 700; color: var(--lxz-txt); display: flex; align-items: center; gap: 8px; }
.lxz-head .t .ai-badge { font-size: 10px; font-weight: 700; letter-spacing: .5px; padding: 3px 7px;
  border-radius: 6px; background: linear-gradient(135deg, #ff6b54, #e0453a); color: #fff; }
.lxz-head .s { font-size: 12px; color: var(--lxz-sub); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.lxz-head .s .on { width: 6px; height: 6px; border-radius: 50%; background: #43d68a; box-shadow: 0 0 5px rgba(67,214,138,.8); }
.lxz-close { margin-left: auto; cursor: pointer; font-size: 21px; color: #b8bdc9; padding: 0 4px; line-height: 1; }
.lxz-close:hover { color: #555c6e; }

/* 聊天区 */
.lxz-body { flex: 1; overflow-y: auto; padding: 34px 24px 18px;
  scrollbar-width: thin; scrollbar-color: #e2e5ec transparent;
  background: linear-gradient(180deg, #fbfbfd, #fff 26%); }
.lxz-body::-webkit-scrollbar { width: 6px; }
.lxz-body::-webkit-scrollbar-thumb { background: #e6e9f0; border-radius: 4px; }

.lxz-row { display: flex; margin-bottom: 28px; animation: lxz-msg-in .3s ease both; }
@keyframes lxz-msg-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.lxz-row.user { justify-content: flex-end; }
/* AI 消息：无气泡，文字直接平铺 */
.lxz-row .lxz-bubble { max-width: 100%; padding: 0; border-radius: 0;
  background: transparent; font-size: 14px; color: #111; line-height: 1.8; }
/* 用户消息：白底气泡 */
.lxz-row.user .lxz-bubble { max-width: 80%; padding: 7px 14px; border-radius: 12px 6px 12px 12px;
  background: #fff; border: 1px solid #e6e8ee; }
.lxz-bubble b { color: #111; font-weight: 600; }

/* 打字中 */
.lxz-typing { display: inline-flex; gap: 5px; padding: 5px 2px; }
.lxz-typing i { width: 8px; height: 8px; border-radius: 50%; background: #c9a9a5; animation: lxz-dot 1.2s infinite; }
.lxz-typing i:nth-child(2) { animation-delay: .18s; }
.lxz-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes lxz-dot { 0%,60%,100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }
/* Agent 思考过程文案 */
.lxz-think { font-size: 12.5px; color: #9aa0ad; margin-right: 6px; }

/* 进度播报 */
.lxz-progress { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--lxz-sub); }
.lxz-progress .pd { width: 9px; height: 9px; border-radius: 50%; background: var(--lxz-acc2);
  animation: lxz-pd 1s ease-in-out infinite; }
@keyframes lxz-pd { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .5; } }
.lxz-progress.done .pd { background: #43d68a; animation: none; }

/* 快捷回复 */
.lxz-replies { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 40px 6px; animation: lxz-msg-in .3s ease both; }
.lxz-reply { font-size: 13px; color: #333; background: #fff; border: 1px solid #e6e8ee;
  padding: 9px 18px; border-radius: 8px; cursor: pointer; transition: all .15s; }
.lxz-reply:hover { border-color: #d0d3dc; background: #f7f7f9; }
.lxz-reply.ghost { color: #666; background: #fff; border-color: #eceef3; }
.lxz-reply.ghost:hover { color: #333; border-color: #d8dbe3; }

/* 结果区：卡片平铺，无气泡壳 */
.lxz-cards { max-width: 100%; width: 100%; }
.lxz-analysis { background: #f8f8fa; border: 1px solid #eceef3; border-radius: 10px;
  padding: 13px 15px; font-size: 12.5px; color: #444; margin-bottom: 16px; line-height: 1.9; }
.lxz-analysis b { color: #333; }
.lxz-analysis.warn { background: #fbf9f4; border-color: #efe8d8; }
.lxz-analysis.warn b { color: #8a6d3b; }

/* 展会结果：1.2.3 编号列表（无卡片盒子） */
.lxz-item { display: flex; gap: 14px; padding: 18px 4px; border-bottom: 1px solid #f0f1f4;
  cursor: pointer; transition: background .15s; animation: lxz-card-in .35s cubic-bezier(.2,.9,.3,1.1) both; }
.lxz-item:last-child { border-bottom: none; }
.lxz-item:hover { background: #fafafb; }
@keyframes lxz-card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.lxz-num { width: 28px; flex-shrink: 0; font-size: 15px; font-weight: 700; color: #111;
  text-align: center; line-height: 1.5; margin-top: 1px; }
.lxz-item-main { flex: 1; min-width: 0; }
.lxz-item-name { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; font-weight: 600;
  color: #111; line-height: 1.5; }
.lxz-item-name::after { content: "↗"; font-size: 12px; color: #c0c5d1; margin-top: 2px; }
.lxz-fit { flex-shrink: 0; font-size: 11.5px; font-weight: 500; color: #333;
  background: #f7f7f9; border: 1px solid #e6e8ee; padding: 2px 8px; border-radius: 5px; margin-top: 1px; }
.lxz-date { font-size: 13px; font-weight: 600; color: #111; margin-top: 8px; }
.lxz-meta { font-size: 12px; color: #777; margin-top: 4px; line-height: 1.85; }
.lxz-reason { font-size: 12.5px; color: #333; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid #f0f1f4; line-height: 1.85; }
.lxz-reason::before { content: "推荐理由 · "; color: #111; font-weight: 600; }

/* 底部 CTA */
.lxz-cta { display: block; text-align: center; margin-top: 14px; padding: 13px; border-radius: 10px;
  background: #e0453a; color: #fff; font-size: 14px; font-weight: 600;
  text-decoration: none; transition: background .15s; }
.lxz-cta:hover { background: #c9372e; }

/* 输入栏：小圆角、黑字 */
.lxz-inputbar { display: flex; align-items: center; gap: 10px; padding: 12px 18px;
  border-top: 1px solid var(--lxz-line); background: #fff; flex-shrink: 0; }
.lxz-inputbar input { flex: 1; height: 46px; border: 1px solid #e6e8ee; border-radius: 10px;
  padding: 0 16px; font-size: 14px; outline: none; color: #111; background: #f8f8fa;
  transition: border-color .15s, background .15s; }
.lxz-inputbar input::placeholder { color: #a0a4b0; }
.lxz-inputbar input:focus { border-color: #d0d3dc; background: #fff; }
.lxz-inputbar input:disabled { opacity: .6; }
.lxz-send { flex-shrink: 0; width: 42px; height: 42px; border: none; border-radius: 10px; cursor: pointer;
  background: #e0453a; color: #fff; display: flex; align-items: center; justify-content: center;
  transition: background .15s, transform .15s; }
.lxz-send:hover { background: #c9372e; transform: scale(1.04); }
.lxz-send:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.lxz-send svg { width: 18px; height: 18px; display: block; flex-shrink: 0; }
.lxz-foot { padding: 12px 18px; font-size: 11px; color: #b4b9c6; text-align: center; flex-shrink: 0; background: #fff; }

@media (max-width: 480px) {
  #lxz-widget { right: 12px; bottom: 12px; }
  #lxz-ball .lxz-tip { display: none; }
  #lxz-panel { width: calc(100vw - 24px); height: 78vh; }
}
