/* ═══════════════════════════════════════════════════════════════════════════
   小奇AI (Xiaoqi AI) — 首页专属动态伴侣组件样式表 (精简紧凑版)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 容器基础 ── */
.fd-xiaoqi-container {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  user-select: none;
  touch-action: manipulation;
  z-index: 20;
  max-width: 220px;
}

/* ── 效果 8: 智能赛博气泡对话 (Cyber Speech Bubble) ── */
.fd-xq-bubble {
  position: relative;
  margin-bottom: 8px;
  width: 100%;
  max-width: 200px;
  padding: 6px 10px;
  background: rgba(10, 15, 30, 0.92);
  border: 1px solid rgba(0, 240, 255, 0.55);
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2), inset 0 0 8px rgba(0, 240, 255, 0.08);
  backdrop-filter: blur(12px);
  color: #d8f5ff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", monospace;
  font-size: 11px;
  line-height: 1.4;
  text-align: left;
  z-index: 40;
  cursor: pointer;
  transform-origin: bottom center;
  animation: xq-bubble-pop 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.fd-xq-bubble:hover {
  transform: translateY(-2px);
  border-color: #00f0ff;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.35);
}

.fd-xq-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px 5px 0 5px;
  border-style: solid;
  border-color: rgba(0, 240, 255, 0.6) transparent transparent transparent;
}

.fd-xq-bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
  font-size: 9px;
  font-family: monospace;
  color: #00f0ff;
  border-bottom: 1px dashed rgba(0, 240, 255, 0.25);
  padding-bottom: 2px;
}

.fd-xq-bubble-text {
  position: relative;
  word-break: break-word;
  min-height: 30px;
}

.fd-xq-cursor-blink {
  display: inline-block;
  width: 4px;
  height: 10px;
  background: #00f0ff;
  vertical-align: middle;
  margin-left: 2px;
  animation: xq-cursor-flash 0.8s step-end infinite;
}

@keyframes xq-cursor-flash {
  50% { opacity: 0; }
}

@keyframes xq-bubble-pop {
  0% { transform: scale(0.8) translateY(6px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

/* ── 效果 1: 零重力呼吸悬浮与身体微晃 (Zero-G Float) ── */
.fd-xiaoqi-body-wrapper {
  position: relative;
  width: 110px;
  height: 121px;
  cursor: pointer;
  transform-origin: center bottom;
  animation: xq-float-breathe 3.2s ease-in-out infinite alternate;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fd-xiaoqi-body-wrapper:hover {
  filter: drop-shadow(0 0 12px rgba(0, 200, 255, 0.5));
}

@keyframes xq-float-breathe {
  0% {
    transform: translateY(0px) rotate(0deg) scale(1, 1);
  }
  50% {
    transform: translateY(-5px) rotate(0.8deg) scale(1.01, 0.99);
  }
  100% {
    transform: translateY(-10px) rotate(-0.8deg) scale(0.99, 1.02);
  }
}

/* 展台全息底座光环 */
.fd-xiaoqi-pedestal {
  position: relative;
  width: 120px;
  height: 24px;
  margin-top: -12px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.fd-xiaoqi-pedestal-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.4);
  background: radial-gradient(ellipse at center, rgba(0, 240, 255, 0.2) 0%, rgba(0, 140, 255, 0.05) 50%, transparent 75%);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.35), inset 0 0 10px rgba(0, 240, 255, 0.2);
  animation: xq-pedestal-pulse 4s ease-in-out infinite alternate;
}

.fd-xiaoqi-pedestal-ring-1 {
  width: 110px;
  height: 20px;
}

.fd-xiaoqi-pedestal-ring-2 {
  width: 80px;
  height: 14px;
  border-color: rgba(0, 240, 255, 0.3);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.25);
  animation: xq-pedestal-pulse-inner 3s ease-in-out infinite alternate;
}

.fd-xiaoqi-shadow {
  position: absolute;
  width: 70px;
  height: 12px;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.6) 0%, rgba(0, 20, 40, 0.35) 40%, transparent 75%);
  border-radius: 50%;
  filter: blur(3px);
  animation: xq-shadow-scale 3.2s ease-in-out infinite alternate;
}

@keyframes xq-shadow-scale {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(0.7);
    opacity: 0.35;
  }
}

@keyframes xq-pedestal-pulse {
  0% {
    transform: scale(0.96);
    opacity: 0.6;
    border-color: rgba(0, 240, 255, 0.3);
  }
  100% {
    transform: scale(1.04);
    opacity: 1;
    border-color: rgba(0, 240, 255, 0.7);
  }
}

/* 修复：去除旋转导致的垂直椭圆切割BUG，仅做同轴缩放与辉光呼吸 */
@keyframes xq-pedestal-pulse-inner {
  0% {
    transform: scale(0.9);
    opacity: 0.4;
  }
  100% {
    transform: scale(1.06);
    opacity: 0.8;
  }
}

/* ── 角色主体 SVG ── */
.fd-xiaoqi-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}

/* ── 效果 2: 灵动眨眼与星光脉动 (Starry Blink & Sparkle Pulse) ── */
.fd-xq-eyelid {
  transform-origin: center;
  transition: transform 0.1s ease-in-out;
  transform: scaleY(0);
}

.fd-xiaoqi-container.is-blinking .fd-xq-eyelid {
  transform: scaleY(1);
}

.fd-xq-star-sparkle {
  transform-origin: center;
  animation: xq-star-spin 4s linear infinite;
}

@keyframes xq-star-spin {
  0% { transform: rotate(0deg) scale(1); opacity: 0.85; }
  50% { transform: rotate(180deg) scale(1.25); opacity: 1; filter: drop-shadow(0 0 3px #ffffff); }
  100% { transform: rotate(360deg) scale(1); opacity: 0.85; }
}

/* ── 效果 3: 天线晃动与能量脉冲环 (Antenna Sway & Wave Pulse) ── */
.fd-xq-antenna-group {
  transform-origin: 100px 42px;
  animation: xq-antenna-wiggle 4s ease-in-out infinite;
}

@keyframes xq-antenna-wiggle {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(4deg); }
  50% { transform: rotate(-3deg); }
  75% { transform: rotate(2deg); }
  100% { transform: rotate(0deg); }
}

/* 天线球辉光 */
.fd-xq-antenna-orb {
  animation: xq-orb-glow 2s ease-in-out infinite alternate;
}

@keyframes xq-orb-glow {
  0% {
    filter: drop-shadow(0 0 2px #00e5ff) drop-shadow(0 0 6px rgba(0, 229, 255, 0.6));
  }
  100% {
    filter: drop-shadow(0 0 6px #00f0ff) drop-shadow(0 0 12px rgba(0, 240, 255, 0.9));
  }
}

/* 电波发射环 (Wave Pulse) */
.fd-xq-signal-wave {
  position: absolute;
  top: 7%;
  left: 46%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(0, 240, 255, 0.85);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.2);
}

.fd-xiaoqi-container.emit-pulse .fd-xq-signal-wave {
  animation: xq-signal-expand 1.8s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes xq-signal-expand {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.2);
    border-color: rgba(0, 240, 255, 0.9);
  }
  50% {
    opacity: 0.6;
    border-color: rgba(0, 200, 255, 0.6);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(3.5);
    border-color: rgba(255, 0, 128, 0);
  }
}

/* ── 效果 4: 欢快挥手打招呼 (Hand Waving) ── */
.fd-xq-hand-waving {
  transform-origin: 156px 125px;
  animation: xq-hand-wave 1.6s ease-in-out infinite alternate;
}

.fd-xiaoqi-body-wrapper:hover .fd-xq-hand-waving {
  animation: xq-hand-wave-fast 0.5s ease-in-out infinite alternate;
}

@keyframes xq-hand-wave {
  0% { transform: rotate(-8deg); }
  50% { transform: rotate(12deg); }
  100% { transform: rotate(26deg); }
}

@keyframes xq-hand-wave-fast {
  0% { transform: rotate(-12deg); }
  100% { transform: rotate(34deg); }
}

/* ── 效果 5: 视线跟随 (Eye / Pupil Tracking) ── */
.fd-xq-pupil-group {
  transition: transform 0.12s ease-out;
  will-change: transform;
}

/* ── 效果 6: 戳戳 Q 弹果冻弹跳 (Jelly Bounce) ── */
.fd-xiaoqi-body-wrapper.is-jelly-bounce {
  animation: xq-jelly-bounce 0.85s cubic-bezier(0.36, 0.07, 0.19, 0.97) both !important;
}

@keyframes xq-jelly-bounce {
  0% { transform: scale(1, 1); }
  15% { transform: scale(1.2, 0.8) translateY(4px); }
  30% { transform: scale(0.85, 1.22) translateY(-16px) rotate(3deg); }
  50% { transform: scale(1.1, 0.92) translateY(-4px) rotate(-2deg); }
  70% { transform: scale(0.96, 1.05) translateY(-1px) rotate(1deg); }
  85% { transform: scale(1.02, 0.98); }
  100% { transform: scale(1, 1) translateY(0) rotate(0deg); }
}

/* 笑眼弧线模式 (^‿^) */
.fd-xq-happy-eyes {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.fd-xiaoqi-container.is-happy .fd-xq-normal-eyes {
  opacity: 0;
}

.fd-xiaoqi-container.is-happy .fd-xq-happy-eyes {
  opacity: 1;
}

/* ── 效果 7: 捏脸腮红泛红与爱心云 (Blush Flare & Floating Hearts) ── */
.fd-xq-blush {
  transition: filter 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
  cursor: pointer;
}

.fd-xiaoqi-container.is-blushing .fd-xq-blush,
.fd-xq-blush:hover {
  filter: drop-shadow(0 0 8px #ff3b69) brightness(1.3);
  transform: scale(1.2);
  opacity: 1;
}

/* 漂浮爱心容器与动画 */
.fd-xq-floating-heart {
  position: absolute;
  pointer-events: none;
  font-size: 14px;
  color: #ff3366;
  filter: drop-shadow(0 0 5px rgba(255, 51, 102, 0.8));
  animation: xq-heart-float-up 1.3s ease-out forwards;
  z-index: 50;
}

@keyframes xq-heart-float-up {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(0.4) rotate(0deg);
  }
  50% {
    opacity: 0.9;
    transform: translate(var(--drift-x, 10px), -30px) scale(1.1) rotate(var(--rot, 15deg));
  }
  100% {
    opacity: 0;
    transform: translate(var(--drift-x-end, 20px), -60px) scale(1.3) rotate(var(--rot-end, 30deg));
  }
}

/* ── 效果 9: 胸前五角星充能共鸣与星光爆破 (Chest Star Glow & Starburst) ── */
.fd-xq-chest-star {
  transform-origin: 100px 146px;
  cursor: pointer;
  animation: xq-star-breathe 2.4s ease-in-out infinite alternate;
  transition: filter 0.2s ease, transform 0.2s ease;
}

.fd-xq-chest-star:hover {
  filter: drop-shadow(0 0 6px #ffeb3b) drop-shadow(0 0 12px #ff9800);
  transform: scale(1.18);
}

@keyframes xq-star-breathe {
  0% {
    filter: drop-shadow(0 0 2px rgba(255, 235, 59, 0.6));
    transform: scale(0.96);
  }
  100% {
    filter: drop-shadow(0 0 6px rgba(255, 235, 59, 0.95)) drop-shadow(0 0 10px rgba(255, 180, 0, 0.5));
    transform: scale(1.05);
  }
}

/* 星光爆破粒子 */
.fd-xq-starburst-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 20%, #ffe600 70%, transparent 100%);
  filter: drop-shadow(0 0 4px #ffe600);
  animation: xq-burst-particle 0.85s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
  z-index: 60;
}

@keyframes xq-burst-particle {
  0% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx, 15px), var(--dy, -15px)) scale(0.1);
  }
}

/* ── 效果 10: 互动控制面板与模式切换 ── */
.fd-xiaoqi-action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 6px;
  font-family: monospace;
}

.fd-xq-btn {
  padding: 2.5px 6px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.25);
  color: #7dd3fc;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1.2;
}

.fd-xq-btn:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: #00f0ff;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.3);
  transform: translateY(-1px);
}

.fd-xq-btn:active {
  transform: translateY(1px);
}

/* ── 随行伴侣模式 (Floating Desk Pet Mode) ── */
.fd-xiaoqi-container.is-floating-pet {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  transform: scale(0.9);
  transform-origin: bottom right;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.7));
  animation: xq-pet-dock-in 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes xq-pet-dock-in {
  0% {
    opacity: 0;
    transform: scale(0.4) translateY(30px);
  }
  100% {
    opacity: 1;
    transform: scale(0.9) translateY(0);
  }
}

.fd-xiaoqi-container.is-floating-pet .fd-xiaoqi-pedestal {
  display: none;
}


/* ═══════════════════════════════════════════════════════════════════════════
   小奇 FAB 悬浮球专属动效与毛玻璃适配 (Xiaoqi AI Floating Companion)
   ═══════════════════════════════════════════════════════════════════════════ */
.fd-xq-fab {
  cursor: pointer;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 16px rgba(56, 189, 248, 0.35));
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.25s ease;
}

.fd-xq-fab:hover {
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 24px rgba(56, 189, 248, 0.6));
}

.fd-xq-fab-character {
  animation: fd-xq-fab-float 3.4s ease-in-out infinite;
}

@keyframes fd-xq-fab-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.fd-xq-fab-shadow {
  width: 52px;
  height: 8px;
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.5) 0%, rgba(14, 165, 233, 0.18) 50%, transparent 80%);
  border-radius: 50%;
  animation: fd-xq-fab-shadow-pulse 3.4s ease-in-out infinite;
  margin-top: -3px;
}

@keyframes fd-xq-fab-shadow-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(0.68);
    opacity: 0.35;
  }
}

/* 天线能量球发光脉冲 */
.fd-xq-fab .fd-xq-antenna-orb {
  animation: fd-xq-fab-orb-pulse 2s ease-in-out infinite;
  transform-origin: 92px 14px;
}

@keyframes fd-xq-fab-orb-pulse {
  0%, 100% {
    filter: drop-shadow(0 0 4px #38bdf8);
    transform: scale(1);
  }
  50% {
    filter: drop-shadow(0 0 10px #7dd3fc) drop-shadow(0 0 18px #0284c7);
    transform: scale(1.18);
  }
}

/* 自然灵动眨眼 (每 4 秒眨一次) */
.fd-xq-fab .fd-xq-fab-eyelid {
  animation: fd-xq-fab-blink 4.2s infinite;
  transform-origin: center top;
}

@keyframes fd-xq-fab-blink {
  0%, 93%, 97%, 100% {
    transform: scaleY(0);
    opacity: 0;
  }
  95% {
    transform: scaleY(1);
    opacity: 1;
  }
}

/* 鼠标悬停时：欢快挥手 + Q 弹果冻微动 */
.fd-xq-fab:hover .fd-xq-fab-character {
  animation: fd-xq-fab-jelly 0.6s ease;
}

.fd-xq-fab:hover .fd-xq-hand-waving {
  animation: fd-xq-fab-wave 0.5s ease-in-out infinite alternate;
  transform-origin: 136px 132px;
}

@keyframes fd-xq-fab-wave {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-22deg); }
}

@keyframes fd-xq-fab-jelly {
  0% { transform: scale(1, 1); }
  30% { transform: scale(1.12, 0.88); }
  50% { transform: scale(0.92, 1.1); }
  70% { transform: scale(1.05, 0.96); }
  100% { transform: scale(1, 1); }
}

/* 悬浮球右上角发光徽章 */
.fd-xq-fab-badge {
  background: linear-gradient(135deg, #06b6d4, #ec4899);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 0 12px rgba(236, 72, 153, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   小奇迷你伴侣操作条 (Xiaoqi Mini Action Bar)
   默认隐藏，鼠标悬停 #aiFabDock 时显示
   ═══════════════════════════════════════════════════════════════════════════ */
#xqActionBar {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: translateY(4px);
}

#aiFabDock:hover #xqActionBar {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.fd-xq-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: #7dd3fc;
  background: rgba(8, 15, 30, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 9999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 10px rgba(56, 189, 248, 0.15);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.fd-xq-mini-btn:hover {
  color: #ffffff;
  background: rgba(2, 132, 199, 0.4);
  border-color: #38bdf8;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), 0 0 16px rgba(56, 189, 248, 0.4);
}

.fd-xq-mini-btn:active {
  transform: translateY(0) scale(0.95);
}

.fd-xq-mini-btn.is-chat {
  color: #f472b6;
  border-color: rgba(244, 114, 182, 0.45);
  background: rgba(30, 10, 25, 0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 10px rgba(244, 114, 182, 0.2);
}

.fd-xq-mini-btn.is-chat:hover {
  color: #ffffff;
  background: rgba(219, 39, 119, 0.4);
  border-color: #ec4899;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), 0 0 16px rgba(236, 72, 153, 0.5);
}

/* 提示气泡激活时支持点击交互 */
.fd-ai-bubble.is-on {
  pointer-events: auto !important;
  cursor: pointer;
}

/* ──────────────────────────────────────────────────────────────────────────
   小奇伴侣体验增强：快捷提问胶囊、滚动淡化防遮挡与移动端适配
   ────────────────────────────────────────────────────────────────────────── */

/* 快捷提问胶囊按钮 */
.xq-prompt-pill {
  font-size: 11px;
  line-height: 1.2;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(14, 165, 233, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.28);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.xq-prompt-pill:hover {
  background: rgba(14, 165, 233, 0.28);
  border-color: rgba(56, 189, 248, 0.6);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.35);
}

.xq-prompt-pill:active {
  transform: scale(0.95);
}

/* 页面滚动时自动半透明防遮挡与全向拖动/避让/动画支持 */
#aiFabDock {
  pointer-events: none !important;
  user-select: none;
  touch-action: none;
  transition: opacity 0.35s ease, filter 0.3s ease;
}

#aiFabBubble.is-on,
#xqActionBar,
#aiFab {
  pointer-events: auto !important;
}

#aiFabDock.is-moving {
  transition: left 2.2s cubic-bezier(0.25, 1, 0.5, 1), top 2.2s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.35s ease;
}

#aiFabDock.is-running-move {
  transition: left 1.1s cubic-bezier(0.2, 0.8, 0.4, 1), top 1.1s cubic-bezier(0.2, 0.8, 0.4, 1), opacity 0.35s ease;
}

#aiFabDock.is-dragging {
  transition: none !important;
  cursor: grabbing !important;
}

#aiFabDock.is-dragging #aiFab {
  cursor: grabbing !important;
}

#aiFabDock.is-dragging .fd-xq-fab-character {
  animation: none !important;
  transform: scale(1.08) translateY(-6px);
}

#aiFabDock.is-dragging .fd-xq-boot-left {
  animation: xqLegDangleL 0.6s ease-in-out infinite alternate;
}

#aiFabDock.is-dragging .fd-xq-boot-right {
  animation: xqLegDangleR 0.6s ease-in-out infinite alternate;
}

@keyframes xqLegDangleL {
  0% { transform: rotate(-8deg); }
  100% { transform: rotate(14deg); }
}

@keyframes xqLegDangleR {
  0% { transform: rotate(12deg); }
  100% { transform: rotate(-10deg); }
}

/* 走路姿态动画 */
#aiFabDock.is-walking .fd-xq-fab-character {
  animation: xqWalkBob 0.38s ease-in-out infinite alternate !important;
}

#aiFabDock.is-walking .fd-xq-boot-left {
  animation: xqWalkLegL 0.38s ease-in-out infinite alternate !important;
}

#aiFabDock.is-walking .fd-xq-boot-right {
  animation: xqWalkLegR 0.38s ease-in-out infinite alternate !important;
}

@keyframes xqWalkBob {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px); }
}

@keyframes xqWalkLegL {
  0% { transform: rotate(-24deg); }
  100% { transform: rotate(20deg); }
}

@keyframes xqWalkLegR {
  0% { transform: rotate(20deg); }
  100% { transform: rotate(-24deg); }
}

/* 奔跑冲刺姿态动画 */
#aiFabDock.is-running .fd-xq-fab-character {
  animation: xqRunBob 0.18s ease-in-out infinite alternate !important;
}

#aiFabDock.is-running .fd-xq-boot-left {
  animation: xqWalkLegL 0.18s ease-in-out infinite alternate !important;
}

#aiFabDock.is-running .fd-xq-boot-right {
  animation: xqWalkLegR 0.18s ease-in-out infinite alternate !important;
}

@keyframes xqRunBob {
  0% { transform: translateY(0) rotate(6deg); }
  100% { transform: translateY(-8px) rotate(10deg); }
}

/* 冲刺粒子残影 */
.fd-xq-dash-trail {
  position: absolute;
  width: 18px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #38bdf8);
  border-radius: 9999px;
  pointer-events: none;
  opacity: 0.85;
  animation: xqDashFade 0.4s ease-out forwards;
}

@keyframes xqDashFade {
  0% { opacity: 0.95; transform: scaleX(1); }
  100% { opacity: 0; transform: scaleX(2.8) translateX(-18px); }
}

/* 空间折跃传送动画 (Teleportation) */
#aiFabDock.is-teleporting-out #aiFab {
  animation: xqTeleportOut 0.42s cubic-bezier(0.55, 0, 1, 0.45) forwards !important;
  pointer-events: none !important;
}

@keyframes xqTeleportOut {
  0% {
    transform: scale(1) rotate(0deg);
    filter: brightness(1) drop-shadow(0 0 10px #38bdf8);
    opacity: 1;
  }
  50% {
    transform: scale(0.65) rotate(360deg);
    filter: brightness(2) drop-shadow(0 0 25px #00f0ff);
    opacity: 0.8;
  }
  100% {
    transform: scale(0) rotate(720deg);
    filter: brightness(3.5) drop-shadow(0 0 45px #00f0ff);
    opacity: 0;
  }
}

#aiFabDock.is-teleporting-in #aiFab {
  animation: xqTeleportIn 0.48s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
}

@keyframes xqTeleportIn {
  0% {
    transform: scale(0) rotate(-360deg);
    filter: brightness(3) drop-shadow(0 0 35px #00f0ff);
    opacity: 0;
  }
  70% {
    transform: scale(1.18) rotate(10deg);
    filter: brightness(1.5) drop-shadow(0 0 20px #38bdf8);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    filter: brightness(1);
    opacity: 1;
  }
}

/* 传送时地面光环 */
.fd-xq-portal-ring {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 76px;
  height: 22px;
  margin-left: -38px;
  border: 2px solid #00f0ff;
  border-radius: 50%;
  box-shadow: 0 0 18px #00f0ff, inset 0 0 12px #38bdf8;
  pointer-events: none;
  animation: xqPortalRing 0.55s ease-out forwards;
  z-index: 10;
}

@keyframes xqPortalRing {
  0% { transform: scale(0.2); opacity: 1; }
  100% { transform: scale(1.9); opacity: 0; }
}

#aiFabDock.fd-xq-scrolling {
  opacity: 0.32;
}

#aiFabDock.fd-xq-scrolling:hover {
  opacity: 1;
}

/* 隐藏横向滚动条 */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* 移动端紧凑微调 (< 640px) */
@media (max-width: 640px) {
  #aiFabDock {
    bottom: 1rem !important;
    right: 1rem !important;
  }
  #xqActionBar {
    transform: scale(0.9);
    transform-origin: right bottom;
  }
  #aiChatWidget {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 84vh !important;
    bottom: 0 !important;
    right: 0 !important;
    border-radius: 1.5rem 1.5rem 0 0 !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   小奇 12+ 专属动画与情绪系统样式 (Xiaoqi AI 12+ Advanced Animation Suite)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 动作表情百宝箱面板 (Mood Menu Popover) ── */
.fd-xq-mood-menu {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  width: 250px;
  background: rgba(10, 18, 36, 0.94);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.65), 0 0 20px rgba(56, 189, 248, 0.25);
  z-index: 200010;
  overflow: hidden;
  animation: xqMenuPop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes xqMenuPop {
  0% { opacity: 0; transform: scale(0.85) translateY(8px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.fd-xq-mood-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 2px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: #e0f2fe;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.fd-xq-mood-chip .lbl {
  font-size: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #94a3b8;
  line-height: 1;
}

.fd-xq-mood-chip:hover {
  background: rgba(2, 132, 199, 0.35);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.fd-xq-mood-chip:hover .lbl {
  color: #38bdf8;
}

.fd-xq-mood-chip:active {
  transform: scale(0.95);
}

/* ── 专属道具挂件层 ── */
.fd-xq-prop-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 30;
}

/* 1. 跳绳 (Jump Rope) */
.fd-xq-jump-rope {
  display: none;
  position: absolute;
  top: -15px;
  left: -15px;
  right: -15px;
  bottom: -15px;
  border-radius: 50%;
  border: 2.5px solid #00f0ff;
  box-shadow: 0 0 12px #00f0ff, inset 0 0 8px #38bdf8;
  opacity: 0.9;
  transform-origin: center center;
}

.anim-jumprope .fd-xq-jump-rope {
  display: block;
  animation: xqRopeSwing 0.55s linear infinite;
}

.anim-jumprope .fd-xq-fab-character {
  animation: xqRopeJump 0.55s ease-in-out infinite alternate !important;
}

.anim-jumprope .fd-xq-boot-left,
.anim-jumprope .fd-xq-boot-right {
  animation: xqRopeTuck 0.55s ease-in-out infinite alternate !important;
}

@keyframes xqRopeSwing {
  0% { transform: scaleY(1) rotate(0deg); border-color: #00f0ff; z-index: 35; }
  50% { transform: scaleY(0.05) rotate(180deg); border-color: #7dd3fc; z-index: 1; }
  100% { transform: scaleY(1) rotate(360deg); border-color: #00f0ff; z-index: 35; }
}

@keyframes xqRopeJump {
  0% { transform: translateY(0); }
  60% { transform: translateY(-16px); }
  100% { transform: translateY(-16px); }
}

@keyframes xqRopeTuck {
  0% { transform: translateY(0); }
  100% { transform: translateY(-4px) scale(0.9); }
}

/* 2. 生气冒烟 (Angry Steam & Pout) */
.fd-xq-angry-steam {
  display: none;
  position: absolute;
  top: 14px;
  font-size: 16px;
  opacity: 0;
}

.fd-xq-steam-l { left: -10px; }
.fd-xq-steam-r { right: -10px; transform: scaleX(-1); }

.anim-angry .fd-xq-angry-steam {
  display: block;
  animation: xqSteamPuff 0.7s ease-out infinite;
}

.anim-angry .fd-xq-steam-r {
  animation-delay: 0.35s;
}

.anim-angry .fd-xq-fab-character {
  animation: xqAngryTremble 0.15s ease-in-out infinite alternate !important;
  filter: drop-shadow(0 0 14px rgba(239, 68, 68, 0.75)) !important;
}

@keyframes xqSteamPuff {
  0% { opacity: 0; transform: translateY(0) scale(0.5); }
  40% { opacity: 0.95; transform: translateY(-12px) scale(1.1); }
  100% { opacity: 0; transform: translateY(-24px) scale(1.5); }
}

@keyframes xqAngryTremble {
  0% { transform: translate(-2px, 0) rotate(-2deg); }
  100% { transform: translate(2px, -1px) rotate(2deg); }
}

/* 3. 思考灵感灯泡 (Thinking Lightbulb) */
.fd-xq-idea-bulb {
  display: none;
  position: absolute;
  top: -24px;
  left: 50%;
  margin-left: -12px;
  font-size: 24px;
  filter: drop-shadow(0 0 10px #facc15) drop-shadow(0 0 20px #eab308);
}

.anim-thinking .fd-xq-idea-bulb {
  display: block;
  animation: xqBulbPop 0.8s ease-in-out infinite alternate;
}

.anim-thinking .fd-xq-fab-character {
  transform: rotate(6deg) !important;
  animation: xqThinkFloat 2s ease-in-out infinite alternate !important;
}

@keyframes xqBulbPop {
  0% { transform: scale(0.9) translateY(2px); opacity: 0.8; }
  100% { transform: scale(1.15) translateY(-3px); opacity: 1; filter: drop-shadow(0 0 16px #fef08a) drop-shadow(0 0 28px #eab308); }
}

@keyframes xqThinkFloat {
  0% { transform: rotate(4deg) translateY(0); }
  100% { transform: rotate(8deg) translateY(-5px); }
}

/* 4. 打瞌睡睡觉 (Sleep Zzz) */
.fd-xq-sleep-zzz {
  display: none;
  position: absolute;
  top: -14px;
  right: -8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 900;
  color: #38bdf8;
  text-shadow: 0 0 8px #0284c7;
}

.fd-xq-sleep-zzz span {
  display: inline-block;
  opacity: 0;
}

.anim-sleep .fd-xq-sleep-zzz {
  display: block;
}

.anim-sleep .fd-xq-sleep-zzz .z1 { animation: xqZFloat 1.8s ease-in-out infinite; }
.anim-sleep .fd-xq-sleep-zzz .z2 { animation: xqZFloat 1.8s ease-in-out infinite 0.4s; font-size: 13px; }
.anim-sleep .fd-xq-sleep-zzz .z3 { animation: xqZFloat 1.8s ease-in-out infinite 0.8s; font-size: 11px; }

.anim-sleep .fd-xq-fab-character {
  animation: xqSleepDroop 3.6s ease-in-out infinite alternate !important;
}

@keyframes xqZFloat {
  0% { opacity: 0; transform: translate(0, 0) scale(0.5); }
  50% { opacity: 0.9; transform: translate(10px, -14px) scale(1); }
  100% { opacity: 0; transform: translate(22px, -28px) scale(1.3); }
}

@keyframes xqSleepDroop {
  0% { transform: translateY(0) rotate(0deg); }
  60% { transform: translateY(6px) rotate(8deg); }
  85% { transform: translateY(8px) rotate(11deg); }
  100% { transform: translateY(-1px) rotate(-1deg); } /* 惊醒微晃 */
}

/* 5. 赛博跳舞摇摆 (Dancing Groove) */
.anim-dance .fd-xq-fab-character {
  animation: xqDanceGroove 0.5s ease-in-out infinite alternate !important;
}

.anim-dance .fd-xq-hand-waving {
  animation: fd-xq-fab-wave 0.25s ease-in-out infinite alternate !important;
}

.fd-xq-music-notes {
  display: none;
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 16px;
}

.anim-dance .fd-xq-music-notes,
.is-walking .fd-xq-music-notes {
  display: block;
}

.anim-dance .fd-xq-music-notes .m1 { animation: xqMusicFloat 1.2s ease-out infinite; display: inline-block; }
.anim-dance .fd-xq-music-notes .m2 { animation: xqMusicFloat 1.2s ease-out infinite 0.6s; display: inline-block; }

@keyframes xqDanceGroove {
  0% { transform: rotate(-10deg) translateY(0) scaleX(1); }
  50% { transform: rotate(0deg) translateY(-8px) scale(1.05); }
  100% { transform: rotate(10deg) translateY(0) scaleX(-1); }
}

@keyframes xqMusicFloat {
  0% { opacity: 0; transform: translate(-10px, 0) scale(0.6); }
  50% { opacity: 1; transform: translate(0, -12px) scale(1.1); }
  100% { opacity: 0; transform: translate(12px, -24px) scale(0.8); }
}

/* 6. 悬浮打坐数据冥想 (Meditation Cyber Zen) */
.fd-xq-zen-ring {
  display: none;
  position: absolute;
  bottom: -6px;
  left: 50%;
  margin-left: -38px;
  width: 76px;
  height: 20px;
  border-radius: 50%;
  border: 2px dashed #38bdf8;
  box-shadow: 0 0 16px #38bdf8, inset 0 0 10px #0284c7;
}

.anim-meditate .fd-xq-zen-ring {
  display: block;
  animation: xqZenSpin 4s linear infinite;
}

.anim-meditate .fd-xq-fab-character {
  animation: xqZenHover 2.8s ease-in-out infinite alternate !important;
  filter: drop-shadow(0 0 18px rgba(56, 189, 248, 0.75)) !important;
}

@keyframes xqZenSpin {
  0% { transform: rotate(0deg) scale(0.9); opacity: 0.6; }
  50% { transform: rotate(180deg) scale(1.1); opacity: 1; border-color: #00f0ff; }
  100% { transform: rotate(360deg) scale(0.9); opacity: 0.6; }
}

@keyframes xqZenHover {
  0% { transform: translateY(0); }
  100% { transform: translateY(-12px); }
}

/* 7. 害羞脸红 (Shy Blushing) */
.anim-shy .fd-xq-fab-character {
  animation: xqShyWiggle 0.6s ease-in-out infinite alternate !important;
}

.anim-shy .fd-xq-blush {
  opacity: 1 !important;
  fill: #ff2a6d !important;
  filter: drop-shadow(0 0 6px #ff2a6d);
}

@keyframes xqShyWiggle {
  0% { transform: rotate(-4deg) translateY(0); }
  100% { transform: rotate(4deg) translateY(-2px); }
}

/* 8. 打喷嚏触电 (Electric Sneeze) */
.anim-sneeze .fd-xq-fab-character {
  animation: xqSneezePop 0.8s ease-in-out forwards !important;
}

@keyframes xqSneezePop {
  0% { transform: scale(1) translateY(0); }
  30% { transform: scale(0.9, 1.1) translateY(3px); }
  60% { transform: scale(0.85, 1.15) translateY(5px); }
  75% { transform: scale(1.25, 0.8) translateY(-22px) rotate(-8deg); filter: brightness(2) drop-shadow(0 0 20px #00f0ff); }
  90% { transform: scale(0.95, 1.05) translateY(-6px); }
  100% { transform: scale(1) translateY(0); }
}

/* 9. 招手致意 (Friendly Wave) */
.anim-wave .fd-xq-hand-waving {
  animation: fd-xq-fab-wave 0.28s ease-in-out infinite alternate !important;
  transform-origin: 136px 132px;
}

.anim-wave .fd-xq-fab-character {
  animation: fd-xq-fab-jelly 0.6s ease !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   全拟真物理触感与手势姿态动效 (Tactile Sensing & Gesture Physics)
   ═══════════════════════════════════════════════════════════════════════════ */

/* 1. 眩晕蚊香眼动效 (Dizzy Shake) */
.fd-xq-dizzy-stars {
  display: none;
  position: absolute;
  top: -24px;
  left: 50%;
  margin-left: -12px;
  font-size: 24px;
}

.anim-dizzy .fd-xq-dizzy-stars {
  display: block;
  animation: xqDizzyStarSpin 1.2s linear infinite;
}

.anim-dizzy .fd-xq-fab-character {
  animation: xqDizzyWobble 0.8s ease-in-out infinite alternate !important;
}

@keyframes xqDizzyStarSpin {
  0% { transform: rotate(0deg) scale(0.9); }
  50% { transform: rotate(180deg) scale(1.15); filter: drop-shadow(0 0 10px #facc15); }
  100% { transform: rotate(360deg) scale(0.9); }
}

@keyframes xqDizzyWobble {
  0% { transform: rotate(-12deg) translateY(0); }
  100% { transform: rotate(12deg) translateY(3px); }
}

/* 2. 挠痒痒狂笑动效 (Tickle Hysterics) */
.fd-xq-laugh-tears {
  display: none;
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  justify-content: space-between;
  padding: 0 4px;
  font-size: 16px;
}

.anim-tickle .fd-xq-laugh-tears {
  display: flex;
  animation: xqTearsPop 0.4s ease-out infinite alternate;
}

.anim-tickle .fd-xq-fab-character {
  animation: xqTickleShake 0.18s ease-in-out infinite alternate !important;
}

@keyframes xqTickleShake {
  0% { transform: rotate(-8deg) translateY(0) scale(1.05, 0.95); }
  100% { transform: rotate(8deg) translateY(-4px) scale(0.95, 1.05); }
}

@keyframes xqTearsPop {
  0% { transform: translateY(0) scale(0.8); opacity: 0.7; }
  100% { transform: translateY(-8px) scale(1.2); opacity: 1; }
}

/* 3. 屏幕边缘吸附与探头躲猫猫 (Wall Cling & Peeking) */
#aiFabDock.is-peeking-left {
  transition: left 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#aiFabDock.is-peeking-left .fd-xq-fab-character {
  transform: rotate(14deg);
}

#aiFabDock.is-peeking-right {
  transition: left 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#aiFabDock.is-peeking-right .fd-xq-fab-character {
  transform: rotate(-14deg);
}

/* 4. 惯性飞掷滑行 (Fling Glide) */
#aiFabDock.is-flinging {
  transition: left 0.8s cubic-bezier(0.1, 0.85, 0.25, 1), top 0.8s cubic-bezier(0.1, 0.85, 0.25, 1) !important;
}

#aiFabDock.is-flinging .fd-xq-fab-character {
  animation: fd-xq-fab-wave 0.15s ease-in-out infinite alternate !important;
}
