/* AI Assistant Styles - v2.1 - Updated positioning */
:root{
  --asst-primary:#6a11cb;
  --asst-secondary:#2575fc;
  --asst-offset-right:8px; /* 更贴近右边缘 */
  --asst-offset-bottom-desktop:120px; /* 提升到页面中上位置，避免遮挡底部内容 */
  --asst-offset-bottom-mobile:80px;
}
.asst-fab{
  position:fixed;right:var(--asst-offset-right);bottom:calc(env(safe-area-inset-bottom) + var(--asst-offset-bottom-desktop));z-index:1060;width:180px;height:220px;border-radius:16px;
  background:transparent;box-shadow:none;display:flex;align-items:center;justify-content:center;
  cursor:pointer;transition:opacity .2s ease, transform .2s ease;
}
.asst-fab:hover{transform:translateY(-1px);opacity:.95}
.asst-fab i{display:none}
.asst-fab img.asst-icon{width:150px;height:200px;object-fit:contain;display:block;border-radius:50%}

/* 悬浮入口的关闭按钮样式 */
.asst-fab-close{
  position:absolute;top:6px;right:6px;width:22px;height:22px;border-radius:50%;
  background:rgba(255,255,255,0.9);color:#333;border:1px solid rgba(0,0,0,.08);
  display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:700;line-height:1;
  box-shadow:0 6px 18px rgba(0,0,0,.15);cursor:pointer;transition:transform .2s ease, background .2s ease;
  z-index: 2;
}
.asst-fab-close:hover{background:#fff;transform:scale(1.06)}
.asst-fab-close:focus{outline:none}
.asst-panel{position:fixed;right:var(--asst-offset-right);bottom:calc(env(safe-area-inset-bottom) + var(--asst-offset-bottom-desktop) + 40px);width:380px;max-width:90vw;height:500px;z-index:1060;
  border-radius:16px;overflow:hidden;box-shadow:0 20px 50px rgba(0,0,0,.2);background:#fff;display:none}
.asst-header{padding:14px 16px;background:linear-gradient(135deg,var(--asst-primary),var(--asst-secondary));color:#fff;display:flex;align-items:center;justify-content:space-between}
.asst-header .title{font-weight:700}
.asst-header button{background:rgba(255,255,255,0.2);border:1px solid rgba(255,255,255,0.3);color:#fff;border-radius:50%;width:28px;height:28px;display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:bold;cursor:pointer;transition:all 0.2s ease}
.asst-header button:hover{background:rgba(255,255,255,0.3);transform:scale(1.1)}
.asst-body{display:flex;flex-direction:column;height:calc(100% - 56px)}
.asst-messages{flex:1;overflow-y:auto;overflow-x:hidden;padding:16px;background:#f8fafc;scroll-behavior:smooth}
.msg{display:flex;margin-bottom:12px}
.msg .bubble{max-width:85%;padding:12px 14px;border-radius:12px;font-size:14px;line-height:1.6;word-wrap:break-word;white-space:pre-wrap}
.msg.user{justify-content:flex-end}
.msg.user .bubble{background:linear-gradient(135deg,#eef2ff,#e0e7ff);color:#111827;border-top-right-radius:4px}
.msg.bot .bubble{background:#fff;border:1px solid #e5e7eb;color:#111827;border-top-left-radius:4px}
.asst-input{border-top:1px solid #eef2f7;padding:12px;background:#fff;display:flex;gap:10px;align-items:center}
.asst-input input{flex:1;border:1px solid #e5e7eb;border-radius:12px;padding:12px 14px;font-size:14px;outline:none;transition:border-color 0.2s ease}
.asst-input input:focus{border-color:var(--asst-primary);box-shadow:0 0 0 3px rgba(106,17,203,0.1)}
.asst-send{background:linear-gradient(135deg,var(--asst-primary),var(--asst-secondary));border:none;color:#fff;border-radius:12px;padding:0 16px;height:44px;min-width:44px;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:transform 0.2s ease}
.asst-send:hover{transform:scale(1.05)}
.asst-locked{padding:16px;text-align:center;color:#6b7280}

/* 响应式设计 */
@media (max-width: 480px) {
  .asst-panel{width:calc(100vw - 24px);right:8px;left:8px;bottom:calc(env(safe-area-inset-bottom) + var(--asst-offset-bottom-mobile) + 32px);height:60vh;max-height:520px}
  .asst-fab{right:8px;bottom:calc(env(safe-area-inset-bottom) + var(--asst-offset-bottom-mobile));width:160px;height:200px}
}

/* 滚动条样式 */
.asst-messages::-webkit-scrollbar{width:6px}
.asst-messages::-webkit-scrollbar-track{background:#f1f1f1;border-radius:3px}
.asst-messages::-webkit-scrollbar-thumb{background:#c1c1c1;border-radius:3px}
.asst-messages::-webkit-scrollbar-thumb:hover{background:#a8a8a8}

