/* ========================================
   AI生成CSS代码工具 - 主容器
   ======================================== */
.acg-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;
}

/* 全屏模式 */
.acg-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

/* ========================================
   顶部工具栏
   ======================================== */
.acg-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: #fff;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(17,153,142,0.3);
    flex-shrink: 0;
}

.acg-toolbar .toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.acg-toolbar .toolbar-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* 分组之间的半透明竖线分隔符 */
.acg-toolbar .toolbar-group + .toolbar-group {
    border-left: 1px solid rgba(255,255,255,0.22);
    padding-left: 10px;
    margin-left: 4px;
}

/* 中间组居中显示 */
.acg-toolbar .toolbar-group.toolbar-center {
    flex: 1;
    justify-content: center;
}

.acg-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: #11998e;
    transition: all 0.2s;
    white-space: nowrap;
}

.acg-toolbar .toolbar-btn:hover {
    background: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.acg-toolbar .toolbar-btn:active {
    transform: translateY(0);
}

/* ========================================
   主内容区 - 三列布局
   ======================================== */
.acg-main {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ========================================
   左侧：输入面板
   ======================================== */
.acg-input-panel {
    width: 290px;
    min-width: 240px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

/* ========================================
   中间：代码输出面板
   ======================================== */
.acg-output-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #1e1e2e;
    min-width: 0;
}

/* ========================================
   右侧：实时预览面板
   ======================================== */
.acg-preview-panel {
    width: 320px;
    min-width: 260px;
    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 #11998e;
    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;
}

/* ========================================
   左侧输入面板内容
   ======================================== */
.acg-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;
}

.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: #11998e;
    box-shadow: 0 0 0 2px rgba(17,153,142,0.12);
    background: #fff;
}

.form-textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

.form-textarea.desc-area {
    min-height: 110px;
}

/* 标签选择组 */
.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: #11998e;
    color: #11998e;
    background: #f0fdf9;
}

.tag-btn.active {
    background: #11998e;
    border-color: #11998e;
    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, #11998e 0%, #38ef7d 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(17,153,142,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(17,153,142,0); }
    50%       { box-shadow: 0 0 0 7px rgba(17,153,142,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;
}

/* ========================================
   历史记录面板（可折叠）
   ======================================== */
.acg-history-section {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-top: 1px solid #e2e8f0;
}

.acg-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    flex-shrink: 0;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.acg-history-header:hover {
    background: #f1f5f9;
}

.acg-history-header-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.acg-history-toggle-icon {
    font-size: 10px;
    color: #94a3b8;
    transition: transform 0.25s ease;
    display: inline-block;
}

/* 展开状态：图标旋转90度 */
.acg-history-section:not(.collapsed) .acg-history-toggle-icon {
    transform: rotate(90deg);
}

/* 折叠状态：隐藏列表 */
.acg-history-section.collapsed .acg-history-list {
    max-height: 0;
    padding: 0 8px;
    overflow: hidden;
    opacity: 0;
}

/* 展开状态：显示列表 */
.acg-history-section:not(.collapsed) .acg-history-list {
    max-height: 240px;
    padding: 6px 8px;
    opacity: 1;
}

.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;
}

.acg-history-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px 8px;
    max-height: 240px;
    min-height: 0;
    transition: max-height 0.3s ease, padding 0.3s ease, opacity 0.25s ease;
}

.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: #f0fdf9;
    border-color: #11998e;
}

.history-item-title {
    color: #334155;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
}

.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;
}

/* ========================================
   中间代码输出面板
   ======================================== */
/* 中间代码输出面板的 panel-header 不需要左边线（深色主题） */
.acg-output-panel .panel-header {
    background: #2d2d3f;
    border-bottom: 1px solid #3d3d50;
    border-left: 3px solid #38ef7d;
    color: #c9d1d9;
}

.acg-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;
}

.acg-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: #38ef7d;
    border-bottom-color: #38ef7d;
}

/* 代码编辑区 */
.code-output-area {
    flex: 1;
    position: relative;
    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: text;
}

.code-output-textarea:read-only {
    cursor: pointer;
}

/* 输出内容区（flex 链的最终接收层）*/
#outputArea {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 空状态（深色背景 #1e1e2e 下，使用与 result-markdown 相同色系确保可读性）*/
.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 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;
}

/* 骨架屏 */
.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; }
}

/* ========================================
   工作日/周末动态背景色
   ======================================== */
.acg-container.weekday .acg-input-panel {
    background: linear-gradient(160deg, #f5f9ff 0%, #edf4ff 100%);
}

.acg-container.weekend .acg-input-panel {
    background: linear-gradient(160deg, #fffbf5 0%, #fff3e8 100%);
}

.acg-container.weekend .acg-toolbar {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
    box-shadow: 0 2px 8px rgba(247,151,30,0.35);
}

.acg-container.weekend .acg-toolbar .toolbar-btn {
    color: #a35c00;
}

.acg-container.weekend .btn-generate {
    background: linear-gradient(135deg, #f7971e 0%, #ffd200 100%);
}

.acg-container.weekend .btn-generate:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(247,151,30,0.45);
}

/* ========================================
   右侧预览面板
   ======================================== */
.acg-preview-panel .preview-content {
    flex: 1;
    overflow: hidden;
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* previewContentArea flex充满 */
#previewContentArea {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

/* 预览背景切换 */
.preview-bg-switcher {
    display: flex;
    gap: 4px;
}

.bg-btn {
    width: 22px;
    height: 22px;
    border-radius: 3px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    background: #fff;
    color: #64748b;
}

.bg-btn:hover {
    border-color: #11998e;
}

.bg-btn.active {
    background: #11998e;
    color: #fff;
    border-color: #11998e;
}

/* 预览渲染帧 */
#previewIframe {
    width: 100%;
    flex: 1;
    border: none;
    border-radius: 0;
    background: #fff;
    display: block;
    min-height: 0;
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: #94a3b8;
    gap: 10px;
    text-align: center;
    padding: 24px;
}

.preview-placeholder .ph-icon {
    font-size: 40px;
    opacity: 0.4;
}

.preview-placeholder .ph-text {
    font-size: 13px;
    color: #94a3b8;
}

/* 预览工具栏 */
.preview-device-bar {
    display: flex;
    gap: 4px;
    align-items: center;
}

.device-btn {
    padding: 3px 8px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
}

.device-btn:hover {
    border-color: #11998e;
    color: #11998e;
}

.device-btn.active {
    background: #11998e;
    color: #fff;
    border-color: #11998e;
}

/* ========================================
   示例预设面板（抽屉）
   ======================================== */
.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, #11998e 0%, #38ef7d 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: #11998e;
    background: #f0fdf9;
    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-badge {
    font-size: 10px;
    padding: 1px 6px;
    background: #11998e;
    color: #fff;
    border-radius: 8px;
}

/* 遮罩：改用 opacity/visibility 实现淡入淡出动画 */
.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 提示
   ======================================== */
.acg-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: rgba(17,153,142,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(17,153,142,0.4);
}

.acg-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ========================================
   滚动条样式
   ======================================== */
.acg-input-panel .panel-body::-webkit-scrollbar,
.acg-history-list::-webkit-scrollbar,
.result-markdown::-webkit-scrollbar,
.code-output-textarea::-webkit-scrollbar,
.acg-preview-panel .preview-content::-webkit-scrollbar,
.drawer-body::-webkit-scrollbar {
    width: 5px;
}

/* ========================================
   代码块包装（Markdown渲染）
   ======================================== */
.code-block-wrap {
    margin: 8px 0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #313244;
    border-left: 3px solid #38ef7d;
}

.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;
    font-family: inherit;
}

.code-copy-btn:hover {
    background: rgba(255,255,255,0.15);
    color: #cdd6f4;
}

.code-copy-btn.copied {
    background: rgba(166,227,161,0.15);
    border-color: rgba(166,227,161,0.3);
    color: #a6e3a1;
}

.code-block-wrap pre {
    margin: 0;
    border: none;
    border-radius: 0;
}

/* ========================================
   空状态 kbd 标签样式
   ======================================== */
.output-empty-state kbd {
    display: inline-block;
    padding: 1px 6px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    font-size: 11px;
    font-family: 'Consolas', monospace;
    color: #a6adc8;
    line-height: 1.5;
}

/* ========================================
   描述输入框字数统计
   ======================================== */
.char-count {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 400;
    margin-left: auto;
    transition: color 0.2s;
}

/* ========================================
   空输入错误状态（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;
    animation: shake 0.45s ease;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.acg-input-panel .panel-body::-webkit-scrollbar-track,
.acg-history-list::-webkit-scrollbar-track,
.result-markdown::-webkit-scrollbar-track,
.code-output-textarea::-webkit-scrollbar-track,
.acg-preview-panel .preview-content::-webkit-scrollbar-track,
.drawer-body::-webkit-scrollbar-track {
    background: transparent;
}

.acg-input-panel .panel-body::-webkit-scrollbar-thumb,
.acg-history-list::-webkit-scrollbar-thumb,
.result-markdown::-webkit-scrollbar-thumb,
.code-output-textarea::-webkit-scrollbar-thumb,
.acg-preview-panel .preview-content::-webkit-scrollbar-thumb,
.drawer-body::-webkit-scrollbar-thumb {
    background: var(--aem-primary, #11998e);
    border-radius: 3px;
    opacity: 0.6;
}

.acg-input-panel .panel-body::-webkit-scrollbar-thumb:hover,
.acg-history-list::-webkit-scrollbar-thumb:hover,
.result-markdown::-webkit-scrollbar-thumb:hover,
.code-output-textarea::-webkit-scrollbar-thumb:hover,
.acg-preview-panel .preview-content::-webkit-scrollbar-thumb:hover,
.drawer-body::-webkit-scrollbar-thumb:hover {
    background: var(--aem-primary-hover, #0e7a72);
}

/* ========================================
   响应式适配
   ======================================== */
@media (max-width: 1100px) {
    .acg-preview-panel {
        display: none;
    }
}

@media (max-width: 768px) {
    .acg-input-panel {
        width: 220px;
    }
}
