/* BBQ 问答精选 · 前端样式 */
.bbq-app { max-width: 900px; margin: 0 auto; border: 1px solid #e5e6eb; border-radius: 16px; overflow: hidden; background: #fff; font-family: -apple-system,"PingFang SC","Microsoft YaHei",sans-serif; color: #1f2329; box-shadow: 0 2px 12px rgba(0,0,0,.06); }
.bbq-topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid #e5e6eb; background: #fff; }
.bbq-title { font-weight: 700; font-size: 15px; }
.bbq-badge { font-size: 11px; background: #fff4ef; color: #ff6b35; padding: 2px 8px; border-radius: 10px; font-weight: 400; margin-left: 6px; }
.bbq-pub-state { font-size: 13px; color: #4e5969; }
.bbq-chat { height: 560px; overflow-y: auto; padding: 24px; background: #f7f8fa; }
.bbq-chat-inner { }
.bbq-msg { display: flex; gap: 12px; margin-bottom: 18px; }
.bbq-msg .bbq-avatar { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 16px; background: linear-gradient(135deg,#ff6b35,#ff9a3d); color: #fff; }
.bbq-msg.bbq-user .bbq-avatar { background: #2b3a55; }
.bbq-msg .bbq-body { background: #fff; border: 1px solid #e5e6eb; border-radius: 4px 14px 14px 14px; padding: 12px 16px; max-width: 85%; line-height: 1.75; font-size: 14px; color: #4e5969; }
.bbq-msg.bbq-user .bbq-body { background: #ff6b35; color: #fff; border: none; border-radius: 14px 4px 14px 14px; }
.bbq-msg .bbq-body p { margin: 0 0 8px; }
.bbq-msg .bbq-body p:last-child { margin-bottom: 0; }
.bbq-msg .bbq-body b { color: #1f2329; }
.bbq-msg.bbq-user .bbq-body b { color: #fff; }

/* 回答内容（Markdown 渲染后） */
.bbq-answer { line-height: 1.8; }
.bbq-answer h1, .bbq-answer h2, .bbq-answer h3, .bbq-answer h4 { color: #1f2329; margin: 16px 0 8px; font-weight: 700; line-height: 1.4; }
.bbq-answer h1 { font-size: 20px; }
.bbq-answer h2 { font-size: 18px; border-bottom: 1px solid #eef0f2; padding-bottom: 6px; }
.bbq-answer h3 { font-size: 16px; }
.bbq-answer h4 { font-size: 15px; color: #ff6b35; }
.bbq-answer p { margin: 8px 0; }
.bbq-answer ul, .bbq-answer ol { padding-left: 24px; margin: 8px 0; }
.bbq-answer ul { list-style: disc; }
.bbq-answer ol { list-style: decimal; }
.bbq-answer li { margin: 4px 0; }
.bbq-answer strong { color: #1f2329; font-weight: 700; }
.bbq-answer blockquote { border-left: 4px solid #ff6b35; background: #fff8f4; margin: 10px 0; padding: 8px 14px; border-radius: 0 8px 8px 0; color: #4e5969; }
.bbq-answer code { background: #f2f3f5; padding: 2px 6px; border-radius: 4px; font-size: 13px; color: #d63384; word-break: break-all; }
.bbq-answer pre { background: #282c34; color: #abb2bf; padding: 14px 16px; border-radius: 10px; overflow-x: auto; margin: 12px 0; }
.bbq-answer pre code { background: none; color: inherit; padding: 0; }
.bbq-answer table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 14px; }
.bbq-answer th, .bbq-answer td { border: 1px solid #e5e6eb; padding: 8px 12px; text-align: left; }
.bbq-answer th { background: #f7f8fa; font-weight: 600; }
.bbq-answer hr { border: none; border-top: 1px solid #e5e6eb; margin: 16px 0; }
.bbq-answer a { color: #ff6b35; }

/* 打字指示 */
.bbq-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.bbq-typing span { width: 7px; height: 7px; background: #86909c; border-radius: 50%; animation: bbq-blink 1.2s infinite; }
.bbq-typing span:nth-child(2){ animation-delay:.2s } .bbq-typing span:nth-child(3){ animation-delay:.4s }
@keyframes bbq-blink { 0%,80%,100%{opacity:.25} 40%{opacity:1} }

/* 发布提示条 */
.bbq-note { display: flex; align-items: center; gap: 8px; background: #eff9f2; border: 1px solid #cfe9d7; color: #168a3a; border-radius: 10px; padding: 10px 14px; font-size: 13px; margin: 0 0 16px; }
.bbq-note.bbq-locked { background: #fff1f0; border-color: #ffd4d2; color: #d54941; }
.bbq-note.bbq-muted { background: #f2f3f5; border-color: #e5e6eb; color: #4e5969; }

/* 快捷问题 */
.bbq-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.bbq-chip { background: #fff; border: 1px solid #e5e6eb; border-radius: 16px; padding: 6px 14px; font-size: 13px; color: #4e5969; cursor: pointer; transition: .2s; }
.bbq-chip:hover { border-color: #ff6b35; color: #ff6b35; background: #fff4ef; }

/* 底部输入 */
.bbq-composer { border-top: 1px solid #e5e6eb; background: #fff; padding: 14px 20px 16px; }
.bbq-input-row { display: flex; gap: 10px; align-items: flex-end; }
.bbq-input-row textarea { flex: 1; border: 1px solid #e5e6eb; border-radius: 12px; padding: 12px 14px; font-size: 14px; resize: none; font-family: inherit; outline: none; line-height: 1.5; max-height: 120px; }
.bbq-input-row textarea:focus { border-color: #ff6b35; }
.bbq-send { background: #ff6b35; color: #fff; border: none; border-radius: 12px; padding: 12px 22px; font-size: 14px; font-weight: 600; cursor: pointer; height: 46px; }
.bbq-send:hover { background: #e85a26; }
.bbq-send:disabled { background: #ffc4a8; cursor: not-allowed; }
.bbq-pub-check { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-left: 2px; }
.bbq-pub-check label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: #4e5969; user-select: none; }
.bbq-pub-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: #ff6b35; cursor: pointer; }
.bbq-hint { font-size: 12px; color: #86909c; }

@media (max-width: 600px){ .bbq-chat { height: 340px; } }

/* ===== 移动端排版优化 ===== */
@media (max-width: 768px){
	.bbq-layout { flex-direction: column; }
	.bbq-sidebar { width: 100%; max-height: 220px; }
	.bbq-app { max-width: 100%; border-radius: 12px; }
	.bbq-chat { height: 60vh; padding: 16px 12px; }
	.bbq-msg .bbq-body { max-width: 92%; font-size: 15px; padding: 10px 12px; }
	.bbq-msg .bbq-avatar { width: 30px; height: 30px; font-size: 14px; }
	.bbq-composer { padding: 12px 12px 14px; }
	.bbq-input-row { gap: 8px; }
	.bbq-input-row textarea { font-size: 16px; padding: 10px 12px; } /* 16px 避免 iOS 缩放 */
	.bbq-send { padding: 10px 18px; height: 44px; font-size: 15px; }
	.bbq-pub-check { flex-wrap: wrap; gap: 6px; }
	.bbq-hint { width: 100%; }
	/* 全屏移动端 */
	#bbq-fullscreen-wrap .bbq-chat { height: auto; min-height: 50vh; }
}
@media (max-width: 400px){
	.bbq-msg .bbq-body { max-width: 96%; }
	.bbq-answer h1 { font-size: 18px; }
	.bbq-answer h2 { font-size: 16px; }
}

/* ===== 全屏沉浸模式 ===== */
#bbq-fullscreen-wrap { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 999999; background: #fff; overflow-y: auto; }
#bbq-fullscreen-wrap .bbq-app { max-width: 100%; min-height: 100vh; border: none; border-radius: 0; box-shadow: none; display: flex; flex-direction: column; }
#bbq-fullscreen-wrap .bbq-chat { flex: 1; height: auto; min-height: 60vh; }
#bbq-fullscreen-wrap .bbq-composer { }
/* 全屏时尽力隐藏主题的页眉/侧栏/页脚 */
#bbq-fullscreen-wrap ~ header,
#bbq-fullscreen-wrap ~ footer,
#bbq-fullscreen-wrap ~ aside,
#bbq-fullscreen-wrap ~ .site-header,
#bbq-fullscreen-wrap ~ .site-footer { display: none !important; }

/* ===== 侧栏历史问答 ===== */
.bbq-layout { display: flex; gap: 16px; }
.bbq-sidebar { width: 240px; flex-shrink: 0; background: #f7f8fa; border-radius: 12px; padding: 12px; max-height: 600px; overflow-y: auto; }
.bbq-sidebar h3 { font-size: 14px; color: #1f2329; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid #e5e6eb; }
.bbq-history-item { padding: 8px 10px; border-radius: 8px; cursor: pointer; margin-bottom: 4px; transition: .15s; }
.bbq-history-item:hover { background: #fff; }
.bbq-history-item .bbq-hq { font-size: 13px; color: #1f2329; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bbq-history-item .bbq-ht { font-size: 11px; color: #86909c; margin-top: 3px; }
.bbq-history-item .bbq-hdel { float: right; color: #d54941; font-size: 11px; display: none; }
.bbq-history-item:hover .bbq-hdel { display: inline; }
.bbq-history-empty { font-size: 13px; color: #86909c; text-align: center; padding: 20px 0; }
@media (max-width: 768px){ .bbq-layout { flex-direction: column; } .bbq-sidebar { width: 100%; max-height: 200px; } }
