/* ========================================
   AI数据样本生成工具 - 主容器
   ======================================== */
.asg-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 620px;
    background: #f8fafc;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease, border-radius 0.3s ease;
}

/* 全屏模式 */
.asg-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

/* ========================================
   顶部工具栏
   ======================================== */
.asg-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: #fff;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(124,58,237,0.3);
    flex-shrink: 0;
}

.asg-toolbar .toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.asg-toolbar .toolbar-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
    text-shadow: 0 0 20px rgba(255,255,255,0.4);
}

/* 分组之间的竖线分隔 */
.asg-toolbar .toolbar-group + .toolbar-group {
    border-left: 1px solid rgba(255,255,255,0.22);
    padding-left: 10px;
    margin-left: 4px;
}

/* 中间组居中 */
.asg-toolbar .toolbar-group.toolbar-center {
    flex: 1;
    justify-content: center;
}

.asg-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: #7c3aed;
    transition: all 0.2s;
    white-space: nowrap;
}

.asg-toolbar .toolbar-btn:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.asg-toolbar .toolbar-btn:active {
    transform: translateY(0);
}

/* ========================================
   主内容区 - 两列布局
   ======================================== */
.asg-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ========================================
   左侧：配置输入面板
   ======================================== */
.asg-input-panel {
    width: 300px;
    min-width: 250px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

/* ========================================
   右侧：输出面板
   ======================================== */
.asg-output-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #1e1e2e;
    min-width: 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 #7c3aed;
    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;
    flex-wrap: wrap;
}

/* 输出面板头部（深色主题） */
.asg-output-panel .panel-header {
    background: #2d2d3f;
    border-bottom: 1px solid #3d3d50;
    border-left: 3px solid #a855f7;
    color: #c9d1d9;
}

.asg-output-panel .panel-header .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;
    white-space: nowrap;
}

.asg-output-panel .panel-header .action-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* ========================================
   左侧面板 body
   ======================================== */
.asg-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: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    letter-spacing: 0.1px;
}

.form-group label .label-hint {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
}

.form-input, .form-textarea, .form-select {
    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, .form-select:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124,58,237,0.12);
    background: #fff;
}

.form-textarea {
    resize: vertical;
    min-height: 72px;
    line-height: 1.5;
}

/* ========================================
   数据类型网格按钮
   ======================================== */
.type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 5px;
}

.type-btn {
    padding: 7px 4px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 11px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-align: center;
    font-family: inherit;
    line-height: 1.4;
}

.type-btn:hover {
    border-color: #7c3aed;
    color: #7c3aed;
    background: #f5f3ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(124,58,237,0.15);
}

.type-btn.active {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    border-color: #7c3aed;
    color: #fff;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(124,58,237,0.3);
}

/* ========================================
   数据条数
   ======================================== */
.count-display {
    font-size: 13px;
    font-weight: 700;
    color: #7c3aed;
    background: #f5f3ff;
    padding: 1px 7px;
    border-radius: 10px;
    border: 1px solid #ede9fe;
}

.count-slider {
    width: 100%;
    height: 4px;
    accent-color: #7c3aed;
    cursor: pointer;
    margin: 2px 0;
}

.quick-count-group {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: wrap;
}

.quick-btn {
    padding: 4px 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 11px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.quick-btn:hover {
    border-color: #7c3aed;
    color: #7c3aed;
    background: #f5f3ff;
}

.quick-btn.active {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    border-color: #7c3aed;
    color: #fff;
    box-shadow: 0 2px 6px rgba(124,58,237,0.25);
}

.count-number-input {
    width: 52px;
    padding: 4px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 12px;
    color: #334155;
    background: #f8fafc;
    outline: none;
    text-align: center;
    font-family: inherit;
    transition: all 0.2s;
}

.count-number-input:focus {
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124,58,237,0.1);
    background: #fff;
}

/* ========================================
   格式标签按钮
   ======================================== */
.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag-btn {
    padding: 4px 10px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 11px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
}

.tag-btn:hover {
    border-color: #7c3aed;
    color: #7c3aed;
    background: #f5f3ff;
}

.tag-btn.active {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    border-color: #7c3aed;
    color: #fff;
    box-shadow: 0 2px 6px rgba(124,58,237,0.25);
}

/* ========================================
   生成按钮
   ======================================== */
.form-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px dashed #e9eef4;
    margin-top: 2px;
}

.btn-generate {
    flex: 1;
    padding: 10px 16px;
    background: linear-gradient(135deg, #7c3aed 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;
    font-family: inherit;
}

.btn-generate:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124,58,237,0.45), 0 2px 6px rgba(124,58,237,0.2);
    background: linear-gradient(135deg, #6d28d9 0%, #9333ea 100%);
}

.btn-generate:active:not(:disabled) {
    transform: translateY(0);
}

.btn-generate:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@keyframes btnPulsePurple {
    0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,0); }
    50%       { box-shadow: 0 0 0 7px rgba(124,58,237,0.18); }
}

.btn-generate.generating {
    animation: btnPulsePurple 1.4s ease-in-out infinite;
    cursor: wait;
}

.shortcut-hint {
    font-size: 11px;
    color: #94a3b8;
    white-space: nowrap;
}

.draft-indicator {
    font-size: 12px;
    color: #7c3aed;
    white-space: nowrap;
}

/* ========================================
   历史记录面板
   ======================================== */
.asg-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: #7c3aed;
}

.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;
}

.asg-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 8px;
    max-height: 250px;
    min-height: 48px;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.3s ease;
}

.asg-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: #f5f3ff;
    border-color: #7c3aed;
    box-shadow: -3px 0 0 #7c3aed, 0 2px 8px rgba(124,58,237,0.08);
}

.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: 10px;
    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;
}

/* ========================================
   输出标签切换
   ======================================== */
.output-tabs {
    display: flex;
    background: #2d2d3f;
    border-bottom: 1px solid #3d3d50;
    padding: 0 12px;
    gap: 2px;
    flex-shrink: 0;
}

.output-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;
}

.output-tab:hover {
    color: #a1a1aa;
}

.output-tab.active {
    color: #a78bfa;
    border-bottom-color: #a78bfa;
    background: rgba(167,139,250,0.08);
}

/* ========================================
   输出内容区
   ======================================== */
.output-content-area {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#outputArea {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 代码文本区（只读，点击全选） */
.code-output-textarea {
    flex: 1;
    padding: 16px;
    background: #1e1e2e;
    color: #cdd6f4;
    border: none;
    outline: none;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 13px;
    line-height: 1.65;
    resize: none;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
    tab-size: 2;
    cursor: pointer;
}

/* ========================================
   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: #c4b5fd;
    font-size: 14px;
    font-weight: 700;
    margin: 18px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #3a3a58;
}

.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 pre {
    background: #181825;
    border: 1px solid #313244;
    border-radius: 6px;
    padding: 12px 14px;
    overflow-x: auto;
    margin: 8px 0;
}

.result-markdown code {
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
    font-size: 12.5px;
    line-height: 1.6;
    color: #cba6f7;
}

.result-markdown pre code {
    color: #a6e3a1;
}

.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;
}

.result-markdown table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 12.5px;
}

.result-markdown th {
    background: #2d2d3f;
    color: #c4b5fd;
    padding: 6px 10px;
    border: 1px solid #3d3d50;
    text-align: left;
    font-weight: 600;
}

.result-markdown td {
    padding: 5px 10px;
    border: 1px solid #313244;
    color: #cdd6f4;
    vertical-align: top;
}

.result-markdown tr:nth-child(even) td {
    background: rgba(255,255,255,0.02);
}

/* ========================================
   代码块包装（Markdown）
   ======================================== */
.code-block-wrap {
    margin: 8px 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #313244;
    border-left: 3px solid #a78bfa;
}

.code-block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 12px;
    background: linear-gradient(90deg, #1e2035 0%, #252738 100%);
    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;
    font-family: inherit;
}

.code-copy-btn:hover {
    background: rgba(255,255,255,0.14);
    color: #cdd6f4;
}

.code-copy-btn.copied {
    color: #a6e3a1;
}

/* ========================================
   空状态
   ======================================== */
.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.65;
    animation: floatAnim 3.5s ease-in-out infinite;
    filter: drop-shadow(0 0 18px rgba(167,139,250,0.4));
}

@keyframes floatAnim {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

.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.06);
    padding: 5px 12px;
    border-radius: 4px;
    text-align: left;
    border-left: 2px solid rgba(167,139,250,0.3);
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.output-empty-state .tip-item:hover {
    background: rgba(255,255,255,0.1);
    border-left-color: rgba(167,139,250,0.7);
    color: #c9d1d9;
}

.output-empty-state .tip-item kbd {
    background: rgba(255,255,255,0.12);
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 11px;
    font-family: 'Consolas', monospace;
}

/* ========================================
   骨架屏
   ======================================== */
.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: shimmerPurple 1.5s infinite, skeletonFade 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: shimmerPurple 1.5s infinite, skeletonFade 2s ease-in-out infinite;
}

@keyframes shimmerPurple {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}

@keyframes skeletonFade {
    0%, 100% { opacity: 0.55; }
    50%       { opacity: 0.28; }
}

/* ========================================
   示例抽屉
   ======================================== */
.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, #7c3aed 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: #fafafa;
}

.example-card:hover {
    border-color: #7c3aed;
    background: #f5f3ff;
    transform: translateX(3px);
}

.example-card-title {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.example-card-desc {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
    line-height: 1.5;
}

.example-card-badge {
    font-size: 10px;
    padding: 1px 6px;
    background: #7c3aed;
    color: #fff;
    border-radius: 8px;
}

.example-card-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.example-card-tag {
    font-size: 10px;
    padding: 1px 7px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
}

/* 遮罩层 */
.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 提示
   ======================================== */
.asg-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(124,58,237,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(124,58,237,0.4);
}

.asg-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========================================
   输入 error 状态
   ======================================== */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    15%       { transform: translateX(-6px); }
    30%       { transform: translateX(6px); }
    45%       { transform: translateX(-5px); }
    60%       { transform: translateX(5px); }
    75%       { transform: translateX(-3px); }
    90%       { transform: translateX(3px); }
}

.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 2px rgba(239,68,68,0.12) !important;
}

.input-error.shake {
    animation: shake 0.5s ease;
}

/* ========================================
   滚动条
   ======================================== */
.asg-input-panel .panel-body::-webkit-scrollbar,
.asg-history-list::-webkit-scrollbar,
.result-markdown::-webkit-scrollbar,
.code-output-textarea::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar {
    width: 5px;
}

.asg-input-panel .panel-body::-webkit-scrollbar-track,
.asg-history-list::-webkit-scrollbar-track,
.result-markdown::-webkit-scrollbar-track,
.code-output-textarea::-webkit-scrollbar-track,
.drawer-body::-webkit-scrollbar-track {
    background: transparent;
}

.asg-input-panel .panel-body::-webkit-scrollbar-thumb,
.asg-history-list::-webkit-scrollbar-thumb,
.result-markdown::-webkit-scrollbar-thumb,
.code-output-textarea::-webkit-scrollbar-thumb,
.drawer-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* 深色区域滚动条独立样式 */
.result-markdown::-webkit-scrollbar-thumb,
.code-output-textarea::-webkit-scrollbar-thumb {
    background: #4a4a65;
    border-radius: 3px;
}

.result-markdown::-webkit-scrollbar-thumb:hover,
.code-output-textarea::-webkit-scrollbar-thumb:hover {
    background: #5e5e80;
}


.btn-cancel {
    padding: 10px 14px;
    background: rgba(239,68,68,0.1);
    color: #ef4444;
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: inherit;
    flex-shrink: 0;
}

.btn-cancel:hover {
    background: rgba(239,68,68,0.18);
    border-color: #ef4444;
    transform: translateY(-1px);
}

.btn-cancel:active {
    transform: translateY(0);
}

/* ========================================
   条数较多警告
   ======================================== */
.count-warning {
    font-size: 11px;
    color: #d97706;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 4px;
    padding: 4px 8px;
    line-height: 1.4;
}

/* ========================================
   生成元信息状态栏
   ======================================== */
.output-meta-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: #252538;
    border-bottom: 1px solid #3d3d50;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.meta-badge {
    font-size: 11px;
    padding: 2px 9px;
    border-radius: 10px;
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.meta-type {
    background: rgba(167,139,250,0.2);
    color: #c4b5fd;
    border: 1px solid rgba(167,139,250,0.3);
}

.meta-count {
    background: rgba(52,211,153,0.15);
    color: #6ee7b7;
    border: 1px solid rgba(52,211,153,0.25);
}

.meta-format {
    background: rgba(251,191,36,0.15);
    color: #fcd34d;
    border: 1px solid rgba(251,191,36,0.25);
}

.meta-locale {
    background: rgba(148,163,184,0.12);
    color: #94a3b8;
    border: 1px solid rgba(148,163,184,0.2);
}

.meta-sep {
    color: #4b5563;
    font-size: 11px;
    font-weight: 600;
}

/* ========================================
   重试按钮（错误状态）
   ======================================== */
.retry-btn {
    margin-top: 4px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.retry-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124,58,237,0.4);
}

.retry-btn:active {
    transform: translateY(0);
}
