.go-app-body { margin: 0; }
/* 全屏聊天：背景渐变铺满整个视口，底部淡薰衣草而非纯白，与上半部分融合 */
.go-app-body::before {
  height: 100vh;
  background:
    radial-gradient(46% 440px at 12% -80px, rgba(169, 198, 255, .62), rgba(169, 198, 255, 0) 70%),
    radial-gradient(46% 440px at 88% -100px, rgba(221, 211, 251, .62), rgba(221, 211, 251, 0) 70%),
    radial-gradient(62% 400px at 50% -50px, rgba(194, 214, 255, .46), rgba(194, 214, 255, 0) 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0) 45%, #f7f5ff 100%);
}
/* 左右两栏 shell */
.go-shell { display: flex; height: 100vh; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
/* 左栏 */
.go-side { width: 264px; flex: none; background: rgba(255, 255, 255, .86); border-right: 1px solid #eef0f3; display: flex; flex-direction: column; overflow-y: auto; padding: 18px 14px; }
.go-side-brand { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; color: #0f172a; margin-bottom: 20px; text-decoration: none; }
.go-side-brand:hover { color: #6d28d9; }
.go-side-logo { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #8b5cf6, #6366f1); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; box-shadow: 0 4px 12px rgba(99, 102, 241, .28); }
.go-side-sec { margin-bottom: 22px; }
.go-side-title { font-size: 12px; font-weight: 700; color: #94a3b8; letter-spacing: .05em; margin-bottom: 10px; }
.go-side-list { display: flex; flex-direction: column; gap: 3px; }
.go-side-item { display: block; width: 100%; text-align: left; background: transparent; border: none; padding: 8px 10px; border-radius: 10px; font-size: 13px; color: #334155; cursor: pointer; line-height: 1.5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .15s, color .15s; font-family: inherit; }
.go-side-item:hover { background: rgba(139, 92, 246, .08); color: #6d28d9; }
.go-side-item.active { background: rgba(139, 92, 246, .12); color: #6d28d9; font-weight: 600; }
.go-side-empty { display: block; font-size: 13px; color: #94a3b8; padding: 6px 10px; text-decoration: none; }
.go-side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid #eef0f3; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.go-side-link { font-size: 12.5px; color: #6366f1; text-decoration: none; }
.go-side-link:hover { color: #4338ca; }
/* 右栏 */
.go-main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; }
/* 消息流 */
.go-chat { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding: 26px 8% 18px; scroll-behavior: smooth; }
.go-chat::-webkit-scrollbar { width: 3px; }
.go-chat::-webkit-scrollbar-thumb { background: #f1f4f9; border-radius: 8px; }
.go-chat::-webkit-scrollbar-thumb:hover { background: #dbe2ee; }
.go-chat::-webkit-scrollbar-track { background: transparent; }
/* 空状态 */
.go-empty { text-align: center; margin: auto; padding: 26px 10px; max-width: 520px; }
.go-empty-ico { width: 54px; height: 54px; margin: 0 auto 14px; border-radius: 16px; background: linear-gradient(135deg, #8b5cf6, #6366f1); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 26px; font-weight: 800; box-shadow: 0 10px 26px rgba(99, 102, 241, .3); }
.go-empty h2 { font-size: 20px; color: #0f172a; margin: 0 0 8px; }
.go-empty p { font-size: 14px; color: #64748b; margin: 0; line-height: 1.7; }
/* 底部输入条 */
.go-inputbar { flex: none; background: #fff; border: 1px solid #e2e8f0; border-radius: 20px; box-shadow: 0 10px 40px rgba(15, 23, 42, .08); padding: 14px 14px 12px 18px; margin: 0 auto 22px; width: min(720px, calc(100% - 48px)); }
.go-input { width: 100%; border: none; outline: none; font-size: 15px; line-height: 1.6; color: #0f172a; resize: none; min-height: 52px; max-height: 180px; background: transparent; font-family: inherit; }
.go-input::placeholder { color: #94a3b8; }
.go-inputbar-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.go-cost { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; color: #64748b; }
.go-cost b { color: #0f172a; }
.go-balance { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #64748b; background: #f8fafc; border: 1px solid #e2e8f0; padding: 4px 10px; border-radius: 999px; }
.go-balance svg { color: #8b5cf6; }
.go-balance b { color: #0f172a; font-weight: 700; }
.go-start-btn { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(135deg, #8b5cf6, #6366f1); color: #fff; border: none; border-radius: 12px; padding: 10px 20px; font-size: 14.5px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 14px rgba(99, 102, 241, .35); }
.go-start-btn:hover { opacity: .92; }
.go-start-btn:disabled { opacity: .65; cursor: not-allowed; }
/* 消息（纯文本流，无气泡背景/边框） */
.go-msg { display: flex; gap: 12px; }
.go-msg-user { flex-direction: row-reverse; }
.go-avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex: none; }
.go-msg-user .go-avatar { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.go-msg-ai .go-avatar { background: linear-gradient(135deg, #f59e0b, #f97316); }
.go-bubble { max-width: 86%; padding: 6px 4px; border-radius: 0; font-size: 15px; line-height: 1.8; color: #334155; }
.go-msg-user .go-bubble { color: #0f172a; }
.go-msg-user .go-bubble b, .go-msg-user .go-bubble h1, .go-msg-user .go-bubble h2, .go-msg-user .go-bubble h3 { color: #0f172a; }
.go-msg-ai .go-bubble { background: none; border: none; box-shadow: none; }
.go-content h1, .go-content h2, .go-content h3 { color: #0f172a; margin: 0 0 8px; font-weight: 700; }
.go-content h2 { font-size: 17px; }
.go-content h3 { font-size: 15px; }
.go-content b { color: #0f172a; }
/* 思考中 */
.go-thinking { display: inline-flex; align-items: center; gap: 2px; color: #000; font-weight: 400; }
.go-dots { display: inline-flex; }
.go-dots i { font-style: normal; animation: go-blink 1.2s infinite; opacity: .25; }
.go-dots i:nth-child(2) { animation-delay: .2s; }
.go-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes go-blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
/* Toast */
.go-toast { position: fixed; left: 50%; bottom: 36px; transform: translateX(-50%); background: #0f172a; color: #fff; padding: 10px 20px; border-radius: 999px; font-size: 14px; opacity: 0; visibility: hidden; transition: all .25s; z-index: 1000; }
.go-toast.show { opacity: 1; visibility: visible; }

@media (max-width: 860px) {
  .go-shell { height: auto; min-height: 100vh; }
  .go-side { display: none; }
  .go-main { height: 100vh; }
  .go-chat { padding: 20px 16px 14px; }
  .go-bubble { max-width: 92%; }
  .go-inputbar { width: calc(100% - 28px); border-radius: 16px; padding: 12px 12px 10px 14px; margin-bottom: 14px; }
}

/* ===== 会员中心版（member/geo_optimize.php）：聊天区定高滚动、输入条全宽、右栏卡片 ===== */
/* 内容区背景：与前台全屏版一致的薰衣草渐变 */
.m2-shell:has(.go-chat) .m2-main {
  background:
    radial-gradient(46% 440px at 12% -80px, rgba(169, 198, 255, .62), rgba(169, 198, 255, 0) 70%),
    radial-gradient(46% 440px at 88% -100px, rgba(221, 211, 251, .62), rgba(221, 211, 251, 0) 70%),
    radial-gradient(62% 400px at 50% -50px, rgba(194, 214, 255, .46), rgba(194, 214, 255, 0) 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0) 45%, #f7f5ff 100%);
}
.m2-shell .go-chat { height: clamp(420px, 58vh, 680px); flex: none; padding: 18px 6px 70px; position: sticky; top: 16px; }
.m2-shell .go-empty { padding: 44px 10px; }
/* 输入框固定在距离浏览器底部 20px，相对聊天内容区水平居中（rail 84 + 二级栏 190） */
.m2-shell:has(.go-chat) .go-inputbar {
  position: fixed;
  bottom: 20px;
  left: calc((100vw + 234px) / 2);
  transform: translateX(-50%);
  width: min(560px, calc(100% - 60px));
  margin: 0;
  z-index: 60;
}
/* 二级栏折叠时内容区左边界为 rail 84px */
.m2-shell.m2-sub-collapsed:has(.go-chat) .go-inputbar { left: calc((100vw + 44px) / 2); }
.m2-shell .go-side-card { background: rgba(255, 255, 255, .95); }
.m2-shell .go-side-card .m2-card-title { display: flex; align-items: center; justify-content: space-between; }
.m2-shell .go-side-list { margin-top: 6px; }
.m2-shell .go-side-item { padding: 9px 10px; }
.m2-shell .go-toast { bottom: 24px; }
/* 会员版：适配大小屏幕 */
@media (max-width: 1100px) {
  .m2-shell:has(.go-chat) .go-inputbar { left: 50%; width: calc(100% - 32px); bottom: 12px; }
  .m2-shell .go-chat { height: 56vh; }
  .m2-shell:has(.go-chat) .m2-main { padding-bottom: 96px; }
}
@media (max-width: 560px) {
  .m2-shell .go-chat { height: 50vh; }
  .m2-shell .go-input { min-height: 44px; }
}
