/* ========================================
   技术问答助手 - 主容器
   ======================================== */
.tqa-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 620px;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease, border-radius 0.3s ease;
}

.tqa-container:not(.fullscreen):hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* 全屏模式 */
.tqa-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

/* ========================================
   顶部工具栏
   ======================================== */
.tqa-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(79,70,229,0.3);
    flex-shrink: 0;
}

.tqa-toolbar .toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.tqa-toolbar .toolbar-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.tqa-toolbar .toolbar-group + .toolbar-group {
    border-left: 1px solid rgba(255,255,255,0.22);
    padding-left: 10px;
    margin-left: 4px;
}

.tqa-toolbar .toolbar-group.toolbar-center {
    flex: 1;
    justify-content: center;
}

.tqa-toolbar .toolbar-btn {
    padding: 5px 11px;
    background: rgba(255,255,255,0.92);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #4f46e5;
    transition: all 0.2s;
    white-space: nowrap;
}

.tqa-toolbar .toolbar-btn:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.tqa-toolbar .toolbar-btn:active {
    transform: translateY(0);
}

/* ========================================
   主内容区 - 三列布局
   ======================================== */
.tqa-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ========================================
   左侧：提问面板
   ======================================== */
.tqa-input-panel {
    width: 300px;
    min-width: 250px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

/* ========================================
   中间：回答输出面板（深色）
   ======================================== */
.tqa-output-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #1e1e2e;
    min-width: 0;
}

/* ========================================
   右侧：参考面板
   ======================================== */
.tqa-reference-panel {
    width: 280px;
    min-width: 220px;
    background: #fff;
    border-left: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

/* ========================================
   面板通用头部
   ======================================== */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px 10px 16px;
    background: linear-gradient(to bottom, #fafafa 0%, #f5f5f5 100%);
    border-bottom: 1px solid #e2e8f0;
    border-left: 3px solid #4f46e5;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    flex-shrink: 0;
    margin-left: -3px;
}

.panel-header .header-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* ========================================
   左侧输入面板内容
   ======================================== */
.tqa-input-panel .panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.form-group label .label-hint {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 13px;
    color: #334155;
    background: #f8fafc;
    transition: all 0.2s;
    outline: none;
    box-sizing: border-box;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 2px rgba(79,70,229,0.12);
    background: #fff;
}

.form-textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

.form-textarea.question-area {
    min-height: 120px;
}

/* 输入框下方提示 */
.section-hint {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
}

/* 字符计数 */
.char-count {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
    margin-left: auto;
}

/* 标签选择组 */
.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag-btn {
    padding: 4px 9px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 11px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tag-btn:hover {
    border-color: #4f46e5;
    color: #4f46e5;
    background: #eef2ff;
}

.tag-btn.active {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}

/* 提问按钮区域 */
.form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.btn-ask {
    flex: 1;
    padding: 10px 16px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.3px;
}

.btn-ask:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79,70,229,0.4);
}

.btn-ask:active:not(:disabled) {
    transform: translateY(0);
}

.btn-ask:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(79,70,229,0); }
    50%       { box-shadow: 0 0 0 7px rgba(79,70,229,0.18); }
}

.btn-ask.asking {
    animation: btnPulse 1.4s ease-in-out infinite;
    cursor: wait;
}

.btn-cancel {
    padding: 9px 14px;
    background: #fff;
    color: #ef4444;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-cancel:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

/* 重新生成按钮（错误状态） */
.retry-btn {
    margin-top: 12px;
    padding: 8px 22px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.3px;
}

.retry-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79,70,229,0.4);
}

.retry-btn:active {
    transform: translateY(0);
}

.shortcut-hint {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

.draft-indicator {
    font-size: 12px;
    color: #8b5cf6;
    white-space: nowrap;
}

/* ========================================
   历史记录
   ======================================== */
.tqa-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    flex-shrink: 0;
}

.history-header-left {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    user-select: none;
}

.history-header-left:hover {
    color: #4f46e5;
}

.history-collapse-icon {
    font-size: 10px;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.history-count {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
}

.clear-history-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 11px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background 0.2s;
}

.clear-history-btn:hover {
    background: #fef2f2;
}

.tqa-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 8px;
    max-height: 220px;
    min-height: 50px;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
}

.tqa-history-list.collapsed {
    max-height: 0;
    min-height: 0;
    padding: 0 8px;
    overflow: hidden;
    opacity: 0;
}

.history-item {
    padding: 8px 10px;
    border-radius: 5px;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    margin-bottom: 5px;
    background: #f8fafc;
    transition: all 0.2s;
    font-size: 12px;
    position: relative;
}

.history-item:hover {
    background: #eef2ff;
    border-color: #4f46e5;
    box-shadow: 0 2px 8px rgba(79,70,229,0.1);
    transform: translateX(1px);
}

.history-item-title {
    color: #334155;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.history-item-meta {
    color: #94a3b8;
    font-size: 11px;
    margin-top: 2px;
    display: flex;
    gap: 6px;
}

.history-item-badge {
    display: inline-block;
    padding: 1px 5px;
    background: #eef2ff;
    color: #4f46e5;
    border-radius: 6px;
    font-size: 10px;
}

.history-item-del {
    position: absolute;
    top: 5px;
    right: 6px;
    background: none;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 12px;
    padding: 0 3px;
    border-radius: 3px;
    transition: color 0.2s;
}

.history-item-del:hover {
    color: #ef4444;
}

/* ========================================
   中间输出面板
   ======================================== */
.tqa-output-panel .panel-header {
    background: #2d2d3f;
    border-bottom: 1px solid #3d3d50;
    border-left: 3px solid #a78bfa;
    color: #c9d1d9;
}

.tqa-output-panel .panel-header .header-actions .action-btn {
    padding: 4px 10px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    color: #c9d1d9;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.tqa-output-panel .panel-header .header-actions .action-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* 标签页 */
.code-tabs {
    display: flex;
    background: #2d2d3f;
    border-bottom: 1px solid #3d3d50;
    padding: 0 12px;
    gap: 2px;
    flex-shrink: 0;
}

.code-tab {
    padding: 7px 14px;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: inherit;
}

.code-tab:hover {
    color: #a1a1aa;
}

.code-tab.active {
    color: #a78bfa;
    border-bottom-color: #a78bfa;
    background: rgba(167,139,250,0.08);
    border-radius: 4px 4px 0 0;
}

/* 输出区域 */
.code-output-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#outputArea {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 空状态 */
.output-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: #a6adc8;
    padding: 40px 24px;
    text-align: center;
    gap: 12px;
}

.output-empty-state .empty-icon {
    font-size: 52px;
    opacity: 0.6;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

.output-empty-state .empty-title {
    font-size: 15px;
    font-weight: 600;
    color: #cdd6f4;
}

.output-empty-state .empty-desc {
    font-size: 13px;
    color: #a6adc8;
    max-width: 300px;
    line-height: 1.6;
}

.output-empty-state .empty-tips {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
    width: 100%;
    max-width: 320px;
}

.output-empty-state .tip-item {
    font-size: 12px;
    color: #a6adc8;
    background: rgba(255,255,255,0.07);
    padding: 5px 12px;
    border-radius: 4px;
    text-align: left;
}

/* Markdown 渲染区 */
.result-markdown {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 22px;
    background: #1e1e2e;
    color: #cdd6f4;
    font-size: 13.5px;
    line-height: 1.75;
}

.result-markdown h2 {
    color: #89dceb;
    font-size: 14px;
    font-weight: 700;
    margin: 20px 0 9px;
    padding-bottom: 5px;
    border-bottom: 1px solid #313244;
}

.result-markdown h2:first-child {
    margin-top: 0;
}

.result-markdown h3 {
    color: #f5c2e7;
    font-size: 13px;
    font-weight: 600;
    margin: 14px 0 6px;
}

.result-markdown h4 {
    color: #fab387;
    font-size: 12.5px;
    font-weight: 600;
    margin: 10px 0 5px;
}

.result-markdown p {
    margin: 6px 0;
    color: #cdd6f4;
}

.result-markdown ul,
.result-markdown ol {
    padding-left: 20px;
    margin: 6px 0;
}

.result-markdown li {
    margin-bottom: 5px;
    color: #cdd6f4;
}

.result-markdown strong {
    color: #f9e2af;
    font-weight: 600;
}

.result-markdown em {
    color: #a6e3a1;
    font-style: italic;
}

.result-markdown pre {
    background: #181825;
    border: 1px solid #313244;
    border-radius: 6px;
    padding: 0;
    overflow: visible;
    margin: 10px 0;
}

.result-markdown code {
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 12.5px;
    line-height: 1.6;
}

.result-markdown pre code {
    display: block;
    padding: 14px 16px;
    color: #a6e3a1;
    overflow-x: auto;
}

.result-markdown :not(pre) > code {
    background: #313244;
    color: #cba6f7;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
}

.result-markdown blockquote {
    border-left: 3px solid #a78bfa;
    margin: 8px 0;
    padding: 6px 14px;
    background: rgba(167,139,250,0.08);
    border-radius: 0 4px 4px 0;
    color: #a6adc8;
}

.result-markdown table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 12.5px;
}

.result-markdown th {
    background: #2d2d3f;
    color: #89dceb;
    padding: 8px 12px;
    text-align: left;
    border: 1px solid #313244;
    font-weight: 600;
}

.result-markdown td {
    padding: 7px 12px;
    border: 1px solid #313244;
    color: #cdd6f4;
}

.result-markdown tr:nth-child(even) td {
    background: rgba(255,255,255,0.02);
}

/* 代码块包装（带复制按鈕） */
.code-block-wrap {
    margin: 10px 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #313244;
    border-left: 3px solid #a78bfa;
}

/* 代码块内 pre/code 全局样式（适用于全部包含 .code-block-wrap 的区域） */
.code-block-wrap pre {
    background: #181825;
    padding: 0;
    overflow: visible;
    margin: 0;
}

.code-block-wrap pre code {
    display: block;
    padding: 14px 16px;
    color: #a6e3a1;
    overflow-x: auto;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 12.5px;
    line-height: 1.6;
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 12px;
    background: #24273a;
    border-bottom: 1px solid #313244;
}

.code-lang-label {
    font-size: 11px;
    color: #6e738d;
    font-family: 'Consolas', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.code-copy-btn {
    padding: 2px 9px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 3px;
    color: #a6adc8;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.code-copy-btn:hover {
    background: rgba(167,139,250,0.2);
    border-color: #a78bfa;
    color: #a78bfa;
}

/* 骨架屏 */
.skeleton-container {
    flex: 1;
    min-height: 0;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skeleton-line {
    background: linear-gradient(90deg, #2d2d3f 25%, #3a3a52 50%, #2d2d3f 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: shimmer 1.5s infinite, skeletonPulse 2s ease-in-out infinite;
}

.skeleton-block {
    background: linear-gradient(90deg, #2d2d3f 25%, #3a3a52 50%, #2d2d3f 75%);
    background-size: 200% 100%;
    border-radius: 6px;
    animation: shimmer 1.5s infinite, skeletonPulse 2s ease-in-out infinite;
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

@keyframes skeletonPulse {
    0%, 100% { opacity: 0.55; }
    50%       { opacity: 0.28; }
}

/* 代码/摘要独立视图 */
.code-only-view,
.summary-view {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 18px 22px;
    background: #1e1e2e;
    color: #cdd6f4;
    display: flex;
    flex-direction: column;
}

.code-only-view .no-code-tip,
.summary-view .no-data-tip {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 13px;
    text-align: center;
    padding: 40px;
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 16px;
}

.summary-section {
    border: 1px solid #313244;
    border-radius: 6px;
    overflow: hidden;
}

.summary-section-title {
    padding: 8px 14px;
    background: #24273a;
    font-size: 12px;
    font-weight: 600;
    color: #89dceb;
    border-bottom: 1px solid #313244;
}

.summary-section-body {
    padding: 10px 14px;
    font-size: 12.5px;
    line-height: 1.6;
    color: #cdd6f4;
}

.summary-section-body ul {
    margin: 0;
    padding-left: 18px;
}

.summary-section-body li {
    margin-bottom: 5px;
}

/* ========================================
   右侧参考面板
   ======================================== */
.reference-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ref-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    gap: 10px;
    text-align: center;
}

.ref-placeholder .ph-icon {
    font-size: 40px;
    opacity: 0.35;
}

.ref-placeholder .ph-text {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.6;
}

/* 延伸问题卡片 */
.followup-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.followup-title {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    padding: 4px 0 2px;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 4px;
}

.followup-item {
    padding: 8px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    color: #334155;
    line-height: 1.5;
}

.followup-item:hover {
    background: #eef2ff;
    border-color: #4f46e5;
    color: #4f46e5;
    transform: translateX(2px);
}

.followup-item::before {
    content: '💬 ';
}

/* 快捷键说明 */
.ref-shortcuts {
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
    margin-top: 4px;
}

.shortcut-title {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.shortcut-item {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

kbd {
    display: inline-block;
    padding: 2px 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    font-size: 11px;
    color: #475569;
    font-family: monospace;
    box-shadow: 0 1px 0 #cbd5e1;
}

/* 问答统计 */
.ref-stats {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
}

.ref-stats-title {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    padding: 7px 12px;
    background: linear-gradient(to bottom, #fafafa, #f5f5f5);
    border-bottom: 1px solid #e2e8f0;
    border-left: 3px solid #4f46e5;
}

.ref-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #e2e8f0;
}

.ref-stat-item {
    background: #fff;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #4f46e5;
}

.stat-label {
    font-size: 11px;
    color: #94a3b8;
}

/* ========================================
   示例问题抽屉
   ======================================== */
.example-drawer {
    position: fixed;
    top: 0;
    right: -440px;
    width: 420px;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0,0,0,0.12);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.example-drawer.open {
    right: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: #fff;
}

.drawer-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.drawer-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.drawer-close-btn:hover {
    background: rgba(255,255,255,0.35);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.example-card {
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
}

.example-card:hover {
    border-color: #4f46e5;
    background: #eef2ff;
    transform: translateX(3px);
}

.example-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.example-card-desc {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 5px;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.example-card-badge {
    font-size: 10px;
    padding: 1px 7px;
    background: #4f46e5;
    color: #fff;
    border-radius: 8px;
    flex-shrink: 0;
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    backdrop-filter: blur(2px);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.drawer-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   Toast 提示
   ======================================== */
.tqa-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(79,70,229,0.92);
    color: #fff;
    padding: 9px 22px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 14px rgba(79,70,229,0.4);
}

.tqa-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========================================
   滚动条
   ======================================== */
.tqa-input-panel .panel-body::-webkit-scrollbar,
.tqa-history-list::-webkit-scrollbar,
.result-markdown::-webkit-scrollbar,
.code-only-view::-webkit-scrollbar,
.summary-view::-webkit-scrollbar,
.reference-content::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar {
    width: 5px;
}

.tqa-input-panel .panel-body::-webkit-scrollbar-track,
.tqa-history-list::-webkit-scrollbar-track,
.result-markdown::-webkit-scrollbar-track,
.code-only-view::-webkit-scrollbar-track,
.summary-view::-webkit-scrollbar-track,
.reference-content::-webkit-scrollbar-track,
.drawer-body::-webkit-scrollbar-track {
    background: transparent;
}

.tqa-input-panel .panel-body::-webkit-scrollbar-thumb,
.tqa-history-list::-webkit-scrollbar-thumb,
.result-markdown::-webkit-scrollbar-thumb,
.code-only-view::-webkit-scrollbar-thumb,
.summary-view::-webkit-scrollbar-thumb,
.reference-content::-webkit-scrollbar-thumb,
.drawer-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.result-markdown::-webkit-scrollbar-thumb,
.code-only-view::-webkit-scrollbar-thumb,
.summary-view::-webkit-scrollbar-thumb {
    background: #3d3d50;
}
