/* ========================================
   AI意图识别工具 - 主容器
   主题色：靛蓝/紫罗兰 #6366f1 / #8b5cf6
   ======================================== */
.air-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 620px;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease, border-radius 0.3s ease;
}

/* 全屏模式 */
.air-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

/* ========================================
   顶部工具栏
   ======================================== */
.air-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: #fff;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(99,102,241,0.35);
    flex-shrink: 0;
}

.air-toolbar .toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.air-toolbar .toolbar-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.air-toolbar .toolbar-group + .toolbar-group {
    border-left: 1px solid rgba(255,255,255,0.22);
    padding-left: 10px;
    margin-left: 4px;
}

.air-toolbar .toolbar-group.toolbar-center {
    flex: 1;
    justify-content: center;
}

.air-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: #6366f1;
    transition: all 0.2s;
    white-space: nowrap;
}

.air-toolbar .toolbar-btn:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.air-toolbar .toolbar-btn:active {
    transform: translateY(0);
}

/* ========================================
   主内容区 - 三列布局
   ======================================== */
.air-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ========================================
   左侧：输入配置面板
   ======================================== */
.air-input-panel {
    width: 285px;
    min-width: 240px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

/* ========================================
   中间：识别结果面板
   ======================================== */
.air-output-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #1e1e2e;
    min-width: 0;
}

/* ========================================
   右侧：可视化面板
   ======================================== */
.air-visual-panel {
    width: 300px;
    min-width: 240px;
    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 #6366f1;
    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;
}

/* ========================================
   左侧输入面板内容
   ======================================== */
.air-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;
}

.form-group label .label-hint {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
}

.char-count {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
    margin-left: auto;
    transition: color 0.2s;
}

.char-count.char-count-warn  { color: #f97316; font-weight: 500; }
.char-count.char-count-limit { color: #ef4444; font-weight: 600; }

.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;
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

.form-textarea.text-area {
    min-height: 120px;
}

.form-textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99,102,241,0.12);
    background: #fff;
}

/* checkbox label */
.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px !important;
    color: #475569;
}

.checkbox-label input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #6366f1;
    cursor: pointer;
}

/* 标签选择组 */
.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: #6366f1;
    color: #6366f1;
    background: #f0f0ff;
}

.tag-btn.active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

/* 生成按钮区域 */
.form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.btn-generate {
    flex: 1;
    padding: 10px 16px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 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-generate:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99,102,241,0.4);
}

.btn-generate:active:not(:disabled) {
    transform: translateY(0);
}

.btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes btnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(99,102,241,0); }
    50%       { box-shadow: 0 0 0 7px rgba(99,102,241,0.18); }
}

.btn-generate.generating {
    animation: btnPulse 1.4s ease-in-out infinite;
    cursor: wait;
}

.shortcut-hint {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

.draft-indicator {
    font-size: 12px;
    color: #22c55e;
    white-space: nowrap;
}

/* ========================================
   历史记录面板
   ======================================== */
.air-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: #6366f1;
}

.history-collapse-icon {
    font-size: 10px;
    color: #94a3b8;
    transition: transform 0.2s ease;
}

.history-count {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
}

.history-count-badge {
    display: inline-block;
    margin-left: 5px;
    min-width: 16px;
    padding: 0 4px;
    height: 16px;
    line-height: 16px;
    background: #6366f1;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 8px;
    text-align: center;
    vertical-align: middle;
}

.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;
}

.air-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 8px;
    max-height: 200px;
    min-height: 50px;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
}

.air-history-list.collapsed {
    max-height: 0;
    min-height: 0;
    padding: 0 8px;
    overflow: hidden;
    opacity: 0;
}

.history-item {
    padding: 7px 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: #f0f0ff;
    border-color: #6366f1;
}

.history-item-title {
    color: #334155;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 185px;
}

.history-item-meta {
    color: #94a3b8;
    font-size: 11px;
    margin-top: 2px;
}

.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;
}

/* ========================================
   中间输出面板 (深色主题)
   ======================================== */
.air-output-panel .panel-header {
    background: #2d2d3f;
    border-bottom: 1px solid #3d3d50;
    border-left: 3px solid #a855f7;
    color: #c9d1d9;
}

.air-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;
}

.air-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: #a855f7;
    border-bottom-color: #a855f7;
}

/* 输出区域 */
.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: 48px;
    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: 280px;
    line-height: 1.6;
}

.output-empty-state .empty-tips {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.output-empty-state .tip-item {
    font-size: 12px;
    color: #a6adc8;
    background: rgba(255,255,255,0.07);
    padding: 4px 12px;
    border-radius: 4px;
}

/* Markdown渲染区 */
.result-markdown {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    background: #1e1e2e;
    color: #cdd6f4;
    font-size: 13.5px;
    line-height: 1.7;
}

.result-markdown h2 {
    color: #89dceb;
    font-size: 14px;
    font-weight: 700;
    margin: 18px 0 8px;
    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: 12px 0 5px;
}

.result-markdown table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 12.5px;
}

.result-markdown th {
    background: #2d2d3f;
    color: #89dceb;
    padding: 7px 10px;
    text-align: left;
    border: 1px solid #313244;
    font-weight: 600;
}

.result-markdown td {
    padding: 6px 10px;
    border: 1px solid #313244;
    color: #cdd6f4;
    vertical-align: top;
}

.result-markdown tr:nth-child(even) td {
    background: rgba(255,255,255,0.02);
}

.result-markdown ul, .result-markdown ol {
    padding-left: 20px;
    margin: 6px 0;
}

.result-markdown li {
    margin-bottom: 4px;
    color: #cdd6f4;
}

.result-markdown p {
    margin: 6px 0;
}

.result-markdown strong {
    color: #f9e2af;
    font-weight: 600;
}

/* 骨架屏 */
.skeleton-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.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; }
}

/* 意图卡片列表 */
.intent-cards {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #1e1e2e;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.intent-card {
    background: #2d2d3f;
    border-radius: 8px;
    padding: 12px 14px;
    border: 1px solid #313244;
    transition: border-color 0.2s;
}

.intent-card:hover {
    border-color: #6366f1;
}

.intent-card.primary {
    border-left: 3px solid #a855f7;
    background: linear-gradient(135deg, #2d2d3f 0%, #301e45 100%);
    box-shadow: 0 0 14px rgba(168,85,247,0.14);
}

.intent-card.primary:hover {
    border-color: #a855f7 !important;
    box-shadow: 0 0 20px rgba(168,85,247,0.24);
}

.intent-card.primary .intent-name-en {
    color: #d8b4fe;
}

.intent-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.intent-name-en {
    font-family: 'Cascadia Code', 'Consolas', monospace;
    font-size: 12px;
    color: #cba6f7;
    font-weight: 600;
}

.intent-badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 8px;
    background: rgba(168,85,247,0.2);
    color: #d8b4fe;
    border: 1px solid rgba(168,85,247,0.3);
}

.intent-badge.primary-badge {
    background: rgba(168,85,247,0.3);
    color: #f0abfc;
}

.intent-name-zh {
    font-size: 13px;
    color: #cdd6f4;
    margin-bottom: 8px;
}

.intent-conf-track {
    background: #1e1e2e;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 4px;
}

.intent-conf-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    transition: width 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.intent-conf-label {
    font-size: 11px;
    color: #6b7280;
    text-align: right;
}

/* 实体列表 */
.entity-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #1e1e2e;
}

.entity-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.entity-table th {
    background: #2d2d3f;
    color: #89dceb;
    padding: 7px 10px;
    text-align: left;
    border: 1px solid #313244;
    font-weight: 600;
}

.entity-table td {
    padding: 6px 10px;
    border: 1px solid #313244;
    color: #cdd6f4;
    vertical-align: top;
}

.entity-table tr:nth-child(even) td {
    background: rgba(255,255,255,0.02);
}

.entity-type-badge {
    display: inline-block;
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    background: rgba(99,102,241,0.2);
    color: #a5b4fc;
    border: 1px solid rgba(99,102,241,0.3);
}

/* ========================================
   工作日/周末动态背景
   ======================================== */
.air-container.weekday .air-input-panel {
    background: linear-gradient(160deg, #f5f6ff 0%, #edf0ff 100%);
}

.air-container.weekend .air-input-panel {
    background: linear-gradient(160deg, #fdf5ff 0%, #f3e8ff 100%);
}

.air-container.weekend .air-toolbar {
    background: linear-gradient(135deg, #c026d3 0%, #e879f9 100%);
    box-shadow: 0 2px 8px rgba(192,38,211,0.35);
}

.air-container.weekend .air-toolbar .toolbar-btn {
    color: #86198f;
}

.air-container.weekend .btn-generate {
    background: linear-gradient(135deg, #c026d3 0%, #e879f9 100%);
}

.air-container.weekend .btn-generate:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(192,38,211,0.45);
}

.air-container.weekend .tag-btn.active {
    background: #c026d3;
    border-color: #c026d3;
}

/* ========================================
   右侧可视化面板
   ======================================== */
.air-visual-panel .visual-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 意图分布图（条形图） */
#intentChartArea {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.visual-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
    color: #94a3b8;
    gap: 8px;
    text-align: center;
}

.visual-placeholder .ph-icon {
    font-size: 36px;
    opacity: 0.4;
}

.visual-placeholder .ph-text {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.visual-placeholder .ph-sub {
    font-size: 11px;
    color: #94a3b8;
}

/* 意图置信度条形图（右侧面板） */
.intent-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 0;
}

.intent-bar-chart-title {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    padding: 0 0 8px 0;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.intent-bar-item.top .intent-bar-pct {
    color: #6366f1;
    font-weight: 800;
}

.intent-bar-item.top .intent-bar-name {
    color: #1e293b;
    font-weight: 700;
}

.intent-bar-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.intent-bar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.intent-bar-name {
    font-size: 11.5px;
    color: #334155;
    font-weight: 500;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.intent-bar-pct {
    font-size: 11px;
    font-weight: 700;
    color: #6366f1;
}

.intent-bar-track {
    background: #f1f5f9;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.intent-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, #6366f1, #a855f7);
    transition: width 0.85s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.intent-bar-item.top .intent-bar-fill {
    background: linear-gradient(90deg, #6366f1, #ec4899);
}

.intent-bar-sub {
    font-size: 10.5px;
    color: #94a3b8;
}

/* 实体概览 */
.entity-overview {
    background: linear-gradient(135deg, #f8fafc 0%, #f0f4ff 100%);
    border-radius: 8px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-left: 3px solid #6366f1;
}

.entity-overview-title {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.entity-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.entity-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.entity-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(99,102,241,0.2);
}

.entity-chip-type {
    background: rgba(99,102,241,0.12);
    color: #6366f1;
    border-color: rgba(99,102,241,0.3);
}

.entity-chip-label {
    font-size: 9.5px;
    opacity: 0.7;
    text-transform: uppercase;
}

/* 分析提示 */
.analysis-tips {
    background: linear-gradient(135deg, #fafaff 0%, #f0f0ff 100%);
    border-radius: 8px;
    padding: 10px 12px;
    border: 1px solid #e0e0ff;
    border-left: 3px solid #6366f1;
}

.tips-title {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.tips-content {
    font-size: 12px;
    color: #64748b;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tip-row {
    display: flex;
    gap: 6px;
    align-items: flex-start;
}

.tip-row-label {
    font-weight: 600;
    color: #6366f1;
    white-space: nowrap;
    min-width: 50px;
}

.tip-row-value {
    color: #475569;
    word-break: break-all;
}

/* 情感标签 */
.sentiment-positive { color: #22c55e; font-weight: 600; }
.sentiment-negative { color: #ef4444; font-weight: 600; }
.sentiment-neutral  { color: #94a3b8; font-weight: 600; }

/* ========================================
   示例抽屉
   ======================================== */
.example-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    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, #6366f1 0%, #a855f7 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: #6366f1;
    background: #f0f0ff;
    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: 4px;
    line-height: 1.5;
}

.example-card-text {
    font-size: 12px;
    color: #6366f1;
    margin-top: 5px;
    padding: 5px 8px;
    background: rgba(99,102,241,0.06);
    border-radius: 4px;
    border-left: 2px solid #6366f1;
    line-height: 1.5;
    font-style: italic;
}

.example-card-badge {
    font-size: 10px;
    padding: 1px 6px;
    background: #6366f1;
    color: #fff;
    border-radius: 8px;
}

.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 提示
   ======================================== */
.air-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(99,102,241,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(99,102,241,0.4);
}

.air-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========================================
   滚动条样式
   ======================================== */
.air-input-panel .panel-body::-webkit-scrollbar,
.air-history-list::-webkit-scrollbar,
.result-markdown::-webkit-scrollbar,
.intent-cards::-webkit-scrollbar,
.entity-list::-webkit-scrollbar,
.air-visual-panel .visual-content::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar {
    width: 5px;
}

.air-input-panel .panel-body::-webkit-scrollbar-thumb,
.air-history-list::-webkit-scrollbar-thumb,
.result-markdown::-webkit-scrollbar-thumb,
.intent-cards::-webkit-scrollbar-thumb,
.entity-list::-webkit-scrollbar-thumb,
.air-visual-panel .visual-content::-webkit-scrollbar-thumb,
.drawer-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.result-markdown::-webkit-scrollbar-thumb,
.intent-cards::-webkit-scrollbar-thumb,
.entity-list::-webkit-scrollbar-thumb {
    background: #3d3d50;
}

/* 代码块包装（Markdown渲染中） */
.code-block-wrap {
    margin: 8px 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #313244;
    border-left: 3px solid #a855f7;
}

.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;
    display: flex;
    align-items: center;
}

.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(255,255,255,0.14);
    color: #fff;
}

.code-copy-btn.copied {
    background: rgba(34,197,94,0.15);
    border-color: rgba(34,197,94,0.3);
    color: #4ade80;
}

.result-markdown pre {
    background: #181825;
    border: none;
    padding: 12px 14px;
    overflow-x: auto;
    margin: 0;
}

.result-markdown code {
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 12.5px;
    color: #a6e3a1;
}

/* ========================================
   输入错误状态（shake 动画）
   ======================================== */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60%  { transform: translateX(-5px); }
    40%, 80%  { transform: translateX( 5px); }
}

.form-textarea.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239,68,68,0.15) !important;
    background: #fff8f8 !important;
    animation: shake 0.45s ease;
    transition: border-color 0.2s, box-shadow 0.2s;
}

/* ========================================
   空状态 / 错误状态 修饰类
   ======================================== */
.output-empty-state .empty-title.is-error {
    color: #ef4444;
}

.output-empty-state .empty-desc.is-error {
    color: #f87171;
}

/* AI识别失败重试按鈕 */
.retry-btn {
    margin-top: 10px;
    padding: 7px 20px;
    background: rgba(99,102,241,0.14);
    border: 1px solid rgba(99,102,241,0.35);
    border-radius: 6px;
    color: #a5b4fc;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.retry-btn:hover {
    background: rgba(99,102,241,0.28);
    color: #c7d2fe;
    border-color: rgba(99,102,241,0.55);
}

/* ========================================
   Skeleton Loading 文案提示
   ======================================== */
.skeleton-loading-tip {
    padding: 16px 20px 6px;
    font-size: 13px;
    color: #a6adc8;
    font-weight: 500;
    letter-spacing: 0.2px;
    animation: tipBlink 1.8s ease-in-out infinite;
}

@keyframes tipBlink {
    0%, 100% { opacity: 0.65; }
    50%       { opacity: 1; }
}

/* ========================================
   kbd 快捷键样式（空状态提示中）
   ======================================== */
.output-empty-state kbd {
    display: inline-block;
    padding: 1px 6px;
    font-size: 11px;
    font-family: 'Cascadia Code', 'Consolas', monospace;
    color: #a6adc8;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 3px;
    vertical-align: middle;
}

/* ========================================
   右侧可视化面板头部按鈕（亮色主题）
   ======================================== */
.air-visual-panel .panel-header .header-actions .action-btn {
    padding: 3px 9px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.air-visual-panel .panel-header .header-actions .action-btn:hover {
    background: #e0e7ff;
    border-color: #a5b4fc;
    color: #6366f1;
}

/* ========================================
   错落入场动画（规范 d818ae59）
   ======================================== */
@keyframes hgFadeInUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hg-anim-in {
    animation: hgFadeInUp 0.38s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

/* ========================================
   历史记录空状态提示
   ======================================== */
.history-empty-hint {
    padding: 12px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
}

/* ========================================
   代码块语言标识圆点
   ======================================== */
.code-lang-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
    flex-shrink: 0;
}

.lang-dot-css    { background: #a855f7; box-shadow: 0 0 4px rgba(168,85,247,0.5); }
.lang-dot-html   { background: #f97316; box-shadow: 0 0 4px rgba(249,115,22,0.5); }
.lang-dot-js,
.lang-dot-javascript { background: #eab308; box-shadow: 0 0 4px rgba(234,179,8,0.5); }
.lang-dot-json   { background: #22c55e; box-shadow: 0 0 4px rgba(34,197,94,0.5); }
.lang-dot-python { background: #3b82f6; box-shadow: 0 0 4px rgba(59,130,246,0.5); }
.lang-dot-sql    { background: #06b6d4; box-shadow: 0 0 4px rgba(6,182,212,0.5); }
.lang-dot-default { background: #6b7280; }

/* ========================================
   意图置信度条光晕扫光效果
   ======================================== */
.intent-conf-fill::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 60%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    animation: confShine 2.2s ease-in-out infinite;
}

@keyframes confShine {
    0%   { left: -100%; }
    60%, 100% { left: 160%; }
}

/* ========================================
   右侧面板内容分隔线
   ======================================== */
.air-visual-panel .visual-content > * + * {
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    margin-top: 0;
}

