/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    transition: background 0.3s, color 0.3s;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* 头部 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.subtitle {
    opacity: 0.9;
    font-size: 14px;
}

/* 主内容区 */
.main-content {
    display: flex;
    min-height: calc(100vh - 200px);
}

/* 侧边栏 */
.sidebar {
    width: 320px;
    min-width: 260px;
    max-width: 600px;
    background: #f8f9fa;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
    padding: 20px;
    position: relative;
    flex-shrink: 0;
}

/* 拖动调整宽度手柄 */
.resize-handle {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    cursor: ew-resize;
    background: transparent;
    z-index: 100;
    transition: background 0.2s;
}

.resize-handle:hover {
    background: rgba(102, 126, 234, 0.3);
}

.resize-handle:active {
    background: rgba(102, 126, 234, 0.5);
}

/* 拖动中的指示线 */
.resize-handle::after {
    content: '';
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 2px;
    height: 40px;
    background: rgba(102, 126, 234, 0.4);
    border-radius: 1px;
    opacity: 0;
    transition: opacity 0.2s;
}

.resize-handle:hover::after {
    opacity: 1;
}

.panel {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: visible;
}

.panel h3 {
    font-size: 16px;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* 表单元素 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

/* API密钥输入框容器 */
.api-key-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.api-key-wrapper .form-control {
    padding-right: 45px;
}

/* API密钥显示/隐藏按钮 */
.api-key-toggle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #999;
    transition: all 0.2s;
    border-radius: 0 6px 6px 0;
}

.api-key-toggle:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

.api-key-toggle:active {
    transform: scale(0.95);
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-range {
    width: 100%;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
}

.form-range::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
}

.form-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    line-height: 1.6;
    background: var(--notion-bg-gray);
    padding: 6px 8px;
    border-radius: 6px;
}

/* 输入组 */
.input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.form-control-number {
    width: 70px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s;
}

.form-control-number:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group .form-range {
    flex: 1;
}

/* 工作区 */
.workspace {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* 工具栏 */
.toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.toolbar-spacer {
    flex: 1;
}

.toolbar-group {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 2px 4px;
    border-radius: 6px;
    background: #f8f9fa;
}

/* 下拉菜单容器 */
.dropdown-container {
    position: relative;
    display: inline-block;
}

.status-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    z-index: 1000;
    overflow: hidden;
}

.batch-dropdown {
    padding: 12px;
}

.batch-section {
    margin-bottom: 8px;
}

.batch-section:last-child {
    margin-bottom: 0;
}

.batch-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 4px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #444;
}

.section-icon {
    font-size: 16px;
}

.section-text {
    letter-spacing: 0.3px;
}

.batch-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.batch-card {
    background: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 12px 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    position: relative;
}

.batch-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-emoji {
    font-size: 24px;
    margin-bottom: 6px;
}

.card-label {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.card-count {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

.card-sublabel {
    font-size: 11px;
    color: #666;
    margin-top: 2px;
}

.delete-card {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%);
}

.delete-card:hover {
    border-color: #dc3545;
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
}

.delete-card .card-count {
    color: #dc3545;
}

.retry-card {
    background: linear-gradient(135deg, #f0fff4 0%, #e5ffe5 100%);
}

.retry-card:hover {
    border-color: #28a745;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.retry-card .card-label {
    color: #28a745;
}

.retry-card .card-count {
    color: #28a745;
}

.retry-card .card-sublabel {
    color: #28a745;
    font-weight: 500;
}

.dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 12px 0;
}

.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

/* 进度信息 */
.progress-info {
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.progress-stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 12px;
}

.stats-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stat-badge {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    min-width: 85px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.stat-badge:hover {
    transform: translateY(-1px);
}

.stat-badge .stat-label {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.9;
}

.stat-badge strong {
    font-size: 18px;
    font-weight: 700;
}

.stat-total {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.stat-fail {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.stat-processing {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.progress-meta {
    display: flex;
    gap: 12px;
    align-items: center;
}

.success-rate-display {
    font-size: 15px;
    font-weight: 600;
    color: #10b981;
    padding: 4px 12px;
    background: #d1fae5;
    border-radius: 6px;
}

.time-display {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.text-success {
    color: #28a745;
}

.text-danger {
    color: #dc3545;
}

.text-info {
    color: #17a2b8;
}

.progress-bar-container {
    display: none !important;  /* 完全隐藏进度条 */
}

.progress-bar {
    display: none !important;  /* 完全隐藏进度条 */
}

.progress-text {
    color: white;
    font-size: 11px;
    font-weight: bold;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.current-task {
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #667eea;
    font-size: 12px;
}

.current-task-label {
    font-weight: bold;
    color: #667eea;
    margin-right: 8px;
}

/* 项目操作按钮 */
.project-actions {
    display: flex;
    gap: 8px;
}

.project-actions {
    display: flex;
    gap: 8px;
}

.project-action-btn {
    padding: 6px 12px;
    background: var(--notion-bg-default);
    color: var(--notion-text-default);
    border: 1px solid var(--notion-border);
    border-radius: var(--notion-radius-sm);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: var(--notion-transition);
    white-space: nowrap;
}

.project-action-btn:hover {
    background: var(--notion-bg-hover);
    box-shadow: var(--notion-shadow-sm);
}

.project-action-btn.delete {
    color: var(--notion-red);
    border-color: var(--notion-red);
}

.project-action-btn.delete:hover {
    background: var(--notion-red);
    color: #fff;
}

/* 提示词表格 */
.prompts-container {
    flex: 1;
    max-height: calc(100vh - 420px);
    overflow-y: auto;
    overflow-x: auto;  /* 防止横向溢出 */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    position: relative;
    /* 确保这是滚动容器 */
    display: block;
    padding: 0;
    margin: 0;
}

.prompts-table {
    width: 100%;
    border-collapse: separate;  /* ✅ 使用 separate，配合 border-spacing */
    border-spacing: 0;  /* ✅ 去除间距，看起来像 collapse */
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin: 0;
    padding: 0;
}

.prompts-table thead {
    /* ❌ 不要在 <thead> 上设置 sticky，兼容性问题 */
    background: #f8f9fa;
}

.prompts-table th {
    /* ✅ 正确：sticky 应该设置在 <th> 上 */
    padding: 8px 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    background: #f8f9fa !important;  /* 必须有背景色 */
    border-bottom: 2px solid #dee2e6;
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
}

.th-resizer {
    position: absolute;
    right: 0;
    top: 0;
    width: 6px;
    height: 100%;
    cursor: col-resize;
}

.prompts-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 13px;
    line-height: 1.4;
    vertical-align: middle;
}

.prompts-table tbody tr {
    transition: all 0.2s;
}

.prompts-table tbody tr:hover {
    background: var(--notion-bg-hover);
    box-shadow: var(--notion-shadow-sm);
}

.prompts-table tbody tr:last-child td {
    border-bottom: none;
}

/* 斑马条纹提高可读性 */
.prompts-table tbody tr:nth-child(odd) {
    background: var(--notion-bg-gray);
}

/* 项目分组标题行 - 强制固定定位 */
.prompts-table .project-header {
    /* ❌ 不要在 <tr> 上设置 sticky，浏览器不支持 */
    background: #f0f0f0 !important;
}

.prompts-table .project-header td {
    background: #f0f0f0 !important;
    border-bottom: 2px solid #dee2e6 !important;
    position: static !important;
    top: auto !important;
    z-index: auto !important;
    box-shadow: none !important;
    padding: 8px 12px !important;
    font-size: 13px;
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.status-waiting {
    background: var(--notion-yellow-bg);
    color: var(--notion-yellow);
}

.status-processing {
    background: var(--notion-blue-bg);
    color: var(--notion-blue);
}

.status-interrupted {
    background: var(--notion-yellow-bg);
    color: var(--notion-yellow);
    border: 1px solid var(--notion-border);
}

.status-success {
    background: var(--notion-green-bg);
    color: var(--notion-green);
}

.status-error {
    background: var(--notion-red-bg);
    color: var(--notion-red);
}

.thumbnail {
    width: 100px;
    height: 66px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s;
}

.thumbnail:hover {
    transform: scale(1.1);
}

.action-btn {
    padding: 4px 10px;
    margin: 0 3px;
    border: none;
    background: #667eea;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #5568d3;
    transform: scale(1.05);
}

.action-btn-sm {
    padding: 6px 10px;
    margin: 0;
    font-size: 16px;
    min-width: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-btn.delete {
    background: #dc3545;
}

.action-btn.delete:hover {
    background: #c82333;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    margin: 80px auto;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s;
}

.modal-large {
    max-width: 900px;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.close {
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.close:hover {
    color: #333;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* CSV预览 */
.csv-preview {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    background: #f8f9fa;
    font-size: 13px;
}

.csv-preview-item {
    padding: 8px;
    margin-bottom: 5px;
    background: white;
    border-radius: 4px;
}

/* 响应式 */
@media (max-width: 1024px) {
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }

    .resize-handle {
        display: none;
    }

    .toolbar-group {
        width: 100%;
    }

    .progress-stats-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .toolbar {
        gap: 12px;
        padding: 12px;
    }

    .toolbar-group {
        width: 100%;
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .stats-badges {
        width: 100%;
        justify-content: space-between;
    }

    .stat-badge {
        flex: 1;
        min-width: 70px;
    }

    .stat-badge strong {
        font-size: 20px;
    }

    .percentage-display {
        font-size: 24px;
    }

    .prompts-table th,
    .prompts-table td {
        padding: 10px 8px;
        font-size: 12px;
    }
}

/* 加载动画 */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 单个任务进度条 */
.task-progress-bar {
    margin-top: 8px;
    height: 18px;
    background: #e9ecef;
    border-radius: 9px;
    position: relative;
    overflow: hidden;
}

.task-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    border-radius: 9px;
}

.task-progress-text {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 11px;
    font-weight: bold;
    color: #333;
    text-shadow: 0 0 2px white;
}

.task-progress-message {
    margin-top: 4px;
    font-size: 12px;
    color: #667eea;
    font-style: italic;
}

/* 任务日志样式 */
.log-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.task-log-content {
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

.log-empty {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 14px;
}

.log-entry {
    background: #fff;
    border-left: 4px solid #667eea;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.log-entry.log-success {
    border-left-color: #28a745;
}

.log-entry.log-error {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.log-entry.log-warning {
    border-left-color: #ffc107;
    background: #fffef5;
}

.log-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
}

.log-icon-info,
.log-icon-success,
.log-icon-error,
.log-icon-warning {
    font-size: 16px;
}

.log-number {
    font-weight: bold;
    color: #667eea;
}

.log-time {
    color: #999;
    font-size: 12px;
    margin-left: auto;
}

.log-message {
    font-weight: 500;
    margin-bottom: 6px;
    color: #333;
}

.log-prompt {
    color: #666;
    font-size: 13px;
    font-style: italic;
    margin-bottom: 6px;
    padding: 6px;
    background: #f8f9fa;
    border-radius: 3px;
}

.log-details {
    font-size: 12px;
    color: #666;
    padding-top: 8px;
    border-top: 1px solid #eee;
    margin-top: 8px;
}

.log-details div {
    margin: 4px 0;
}

.log-details a {
    color: #667eea;
    text-decoration: none;
}

.log-details a:hover {
    text-decoration: underline;
}

/* 排列组合预览 */
.permutation-preview {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.permutation-preview .preview-header {
    margin-bottom: 10px;
    color: #667eea;
}

.permutation-preview .preview-list {
    max-height: 200px;
    overflow-y: auto;
}

.permutation-preview .preview-item {
    padding: 6px 10px;
    margin: 5px 0;
    background: white;
    border-radius: 4px;
    font-size: 13px;
    border: 1px solid #e0e0e0;
}

.permutation-preview .preview-more {
    padding: 8px 10px;
    margin-top: 5px;
    text-align: center;
    color: #999;
    font-style: italic;
    font-size: 12px;
}

/* 视图切换器 */
.view-switcher {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
    padding: 0 5px;
}

.view-btn {
    padding: 10px 18px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
}

.view-btn:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.view-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

/* 状态筛选器按钮组 */
.filter-buttons {
    display: flex;
    gap: 6px;
    background: var(--notion-bg-gray);
    padding: 4px;
    border-radius: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-btn {
    padding: 7px 14px;
    border: 2px solid transparent;
    background: var(--notion-bg-default);
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
    color: var(--notion-text-default);
}

.filter-btn:hover {
    background: var(--notion-bg-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transform: translateY(-1px);
}

/* 滚动条美化 */
.prompts-container::-webkit-scrollbar {
    width: 10px;
}

.prompts-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

.prompts-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
}

.prompts-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* 视图内容 */
.view-content {
    min-height: 200px;
    /* 移除干扰sticky的样式 */
    padding: 0;
    margin: 0;
}

/* 网格视图 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 20px 10px;
}

.grid-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 2px solid transparent;
}

.grid-card:hover {
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.2);
    transform: translateY(-4px);
}

.grid-card-checkbox {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    background: transparent;
    border-radius: 6px;
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.grid-card-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.grid-card-image {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.grid-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.grid-card:hover .grid-card-image img {
    transform: scale(1.05);
}

.grid-card-placeholder {
    text-align: center;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.grid-card-placeholder span {
    font-size: 15px;
    font-weight: 600;
    color: #667eea;
}

.grid-progress-bar {
    width: 85%;
    height: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.grid-progress-bar div {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.4s ease;
    border-radius: 10px;
}

.grid-card-info {
    padding: 16px 18px;
    background: white;
}

.grid-card-number {
    font-size: 11px;
    color: #667eea;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.grid-card-prompt {
    font-size: 14px;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.5;
    min-height: 42px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.grid-card-status {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
    font-weight: 600;
}

.grid-card-actions {
    padding: 0 18px 18px;
    display: flex;
    gap: 10px;
    background: white;
}

.grid-card-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.grid-card-actions .icon-btn{width:28px;height:28px;padding:0;border:none;border-radius:6px;background:transparent;color:var(--notion-text-default);font-size:16px;display:inline-flex;align-items:center;justify-content:center}
.grid-card-actions .icon-btn:hover{background:var(--notion-bg-hover);transform:translateY(-1px)}
.grid-card-actions .icon-btn:active{transform:scale(0.96)}
.grid-card-actions .icon-btn.primary{color:#667eea}
.grid-card-actions .icon-btn.danger{color:var(--notion-red)}

.grid-action-btn {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.grid-action-btn:active {
    transform: translateY(0);
}

.grid-action-btn.delete {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.grid-action-btn.delete:hover {
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

/* 响应式网格 */
@media (max-width: 1200px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .grid-card-image {
        height: 200px;
    }
}

/* 主题切换按钮 */
.theme-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 24px;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(180deg);
}

/* 暗色主题 */
body.theme-dark {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

body.theme-dark .container {
    background: #0f3460;
    color: #e0e0e0;
}

body.theme-dark .sidebar {
    background: #162447;
    border-right-color: #1f4068;
}

body.theme-dark .panel {
    background: #1f4068;
    color: #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.theme-dark .panel h3 {
    color: #e0e0e0;
    border-bottom-color: #667eea;
}

body.theme-dark .form-control {
    background: #162447;
    border-color: #1f4068;
    color: #e0e0e0;
}

body.theme-dark .form-control:focus {
    background: #1a1a2e;
    border-color: #667eea;
}

body.theme-dark .form-range {
    background: #1f4068;
}

body.theme-dark .form-hint {
    color: #a0a0a0;
}

body.theme-dark .btn {
    background: #667eea;
    color: white;
}

body.theme-dark .btn-secondary {
    background: #4a5568;
}

body.theme-dark .btn-success {
    background: #48bb78;
}

body.theme-dark .btn-danger {
    background: #f56565;
}

body.theme-dark .btn-info {
    background: #4299e1;
}

body.theme-dark .progress-info {
    background: #162447;
}

body.theme-dark .current-task {
    background: #1f4068;
    border-left-color: #667eea;
}

body.theme-dark .status-dropdown {
    background: #1f4068;
    border-color: #2a5d8a;
}

body.theme-dark .batch-section-title {
    color: #a0aec0;
}

body.theme-dark .batch-card {
    background: #162447;
    border-color: #2a5d8a;
}

body.theme-dark .batch-card:hover {
    background: #2a5d8a;
}

body.theme-dark .card-label {
    color: #e0e0e0;
}

body.theme-dark .card-count {
    color: #667eea;
}

body.theme-dark .card-sublabel {
    color: #a0aec0;
}

body.theme-dark .delete-card {
    background: linear-gradient(135deg, #3d1f1f 0%, #4d2525 100%);
}

body.theme-dark .delete-card:hover {
    background: linear-gradient(135deg, #5d2525 0%, #6d3535 100%);
    border-color: #fc8181;
}

body.theme-dark .delete-card .card-count {
    color: #fc8181;
}

body.theme-dark .retry-card {
    background: linear-gradient(135deg, #1f3d2f 0%, #254d35 100%);
}

body.theme-dark .retry-card:hover {
    background: linear-gradient(135deg, #2f5d3f 0%, #356d45 100%);
    border-color: #68d391;
}

body.theme-dark .retry-card .card-label {
    color: #68d391;
}

body.theme-dark .dropdown-divider {
    background: #2a5d8a;
}

body.theme-dark .prompts-container {
    border-color: #1f4068;
}

body.theme-dark .prompts-container::-webkit-scrollbar-track {
    background: #162447;
}

body.theme-dark .prompts-container::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #1f4068 0%, #162447 100%);
}

body.theme-dark .prompts-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.theme-dark .prompts-table thead {
    background: #162447;
}

body.theme-dark .prompts-table th {
    color: #e0e0e0;
    border-bottom-color: #1f4068;
}

body.theme-dark .prompts-table td {
    border-bottom-color: #1f4068;
    color: #e0e0e0;
}

body.theme-dark .prompts-table tbody tr:hover {
    background: #1f4068;
}

body.theme-dark .project-header {
    background: #162447 !important;
}

body.theme-dark .action-btn {
    background: #667eea;
}

body.theme-dark .action-btn.delete {
    background: #f56565;
}

body.theme-dark .modal-content {
    background: #162447;
    color: #e0e0e0;
}

body.theme-dark .modal-header {
    border-bottom-color: #1f4068;
}

body.theme-dark .modal-footer {
    border-top-color: #1f4068;
}

body.theme-dark .csv-preview {
    background: #1f4068;
    border-color: #4a5568;
}

body.theme-dark .csv-preview-item {
    background: #162447;
    border-color: #1f4068;
}

body.theme-dark .permutation-preview {
    background: #1f4068;
    border-left-color: #667eea;
}

body.theme-dark .permutation-preview .preview-item {
    background: #162447;
    border-color: #1f4068;
}

body.theme-dark .view-btn {
    background: #162447;
    border-color: #1f4068;
    color: #e0e0e0;
}

body.theme-dark .view-btn:hover {
    background: #1f4068;
    border-color: #667eea;
}

body.theme-dark .view-btn.active {
    background: #667eea;
    color: white;
}

body.theme-dark .filter-buttons {
    background: rgba(255,255,255,0.05);
}

body.theme-dark .filter-btn {
    background: rgba(255,255,255,0.08);
    color: #e0e0e0;
    border-color: transparent;
}

body.theme-dark .filter-btn:hover {
    background: rgba(255,255,255,0.12);
}

body.theme-dark .filter-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

body.theme-dark .grid-card {
    background: #1f4068;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.theme-dark .grid-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

body.theme-dark .grid-card-image {
    background: #162447;
}

body.theme-dark .grid-card-number {
    color: #667eea;
}

body.theme-dark .grid-card-prompt {
    color: #e0e0e0;
}

body.theme-dark .grid-action-btn {
    background: #667eea;
}

body.theme-dark .grid-action-btn.delete {
    background: #f56565;
}

body.theme-dark .task-log-content {
    background: #162447;
}

body.theme-dark .log-entry {
    background: #1f4068;
    border-left-color: #667eea;
}

body.theme-dark .log-entry.log-error {
    background: #2d1f1f;
    border-left-color: #f56565;
}

body.theme-dark .log-entry.log-warning {
    background: #2d2a1f;
    border-left-color: #ffc107;
}

body.theme-dark .log-message {
    color: #e0e0e0;
}

body.theme-dark .log-prompt {
    background: #162447;
    color: #a0a0a0;
}

body.theme-dark .log-details {
    border-top-color: #4a5568;
    color: #a0a0a0;
}

body.theme-dark .log-details a {
    color: #667eea;
}

body.theme-dark .task-progress-bar {
    background: #162447;
}

body.theme-dark .log-empty {
    color: #a0a0a0;
}

/* 队列管理样式 */
.queue-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.queue-content {
    max-height: 600px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.queue-section {
    margin-bottom: 25px;
}

.queue-section h4 {
    font-size: 16px;
    color: #667eea;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.queue-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.queue-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    position: relative;
}

.queue-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateX(2px);
}

.queue-item-processing {
    border-left: 4px solid #17a2b8;
    background: linear-gradient(90deg, #e6f7ff 0%, white 100%);
}

.queue-item-waiting {
    border-left: 4px solid #ffc107;
}

.queue-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.queue-item-header span:first-child {
    font-weight: bold;
    color: #667eea;
    font-size: 14px;
}

.queue-item-header span:last-child {
    font-size: 13px;
    color: #17a2b8;
    font-weight: 600;
}

.queue-item-progress {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.queue-item-content {
    font-size: 13px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 10px;
}

.queue-item-progress-bar {
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.queue-item-progress-bar div {
    height: 100%;
    background: linear-gradient(90deg, #17a2b8 0%, #667eea 100%);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.queue-item-message {
    font-size: 12px;
    color: #17a2b8;
    font-style: italic;
    margin-top: 4px;
}

.queue-item-position {
    position: absolute;
    top: 12px;
    right: 15px;
    background: #ffc107;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
}

.queue-item-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e9ecef;
}

.queue-item-btn {
    flex: 1;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.queue-item-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.queue-item-btn.priority {
    background: #667eea;
    color: white;
}

.queue-item-btn.priority:hover {
    background: #5568d3;
}

.queue-item-btn.cancel {
    background: #dc3545;
    color: white;
}

.queue-item-btn.cancel:hover {
    background: #c82333;
}

.queue-stats {
    background: white;
    border-radius: 8px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.queue-stat {
    text-align: center;
    padding: 10px;
    border-radius: 6px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.queue-stat-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.queue-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #667eea;
}

.queue-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.queue-empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.queue-empty-text {
    font-size: 16px;
    margin-bottom: 8px;
}

.queue-empty-hint {
    font-size: 13px;
    color: #bbb;
}

.queue-more {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* 暗色模式 - 队列管理 */
body.theme-dark .queue-content {
    background: #162447;
}

body.theme-dark .queue-section h4 {
    color: #667eea;
    border-bottom-color: #667eea;
}

body.theme-dark .queue-item {
    background: #1f4068;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

body.theme-dark .queue-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

body.theme-dark .queue-item-processing {
    background: linear-gradient(90deg, #1a3a4a 0%, #1f4068 100%);
    border-left-color: #4299e1;
}

body.theme-dark .queue-item-header span:first-child {
    color: #667eea;
}

body.theme-dark .queue-item-header span:last-child {
    color: #4299e1;
}

body.theme-dark .queue-item-progress {
    color: #a0a0a0;
}

body.theme-dark .queue-item-content {
    color: #e0e0e0;
}

body.theme-dark .queue-item-progress-bar {
    background: #162447;
}

body.theme-dark .queue-item-progress-bar div {
    background: linear-gradient(90deg, #4299e1 0%, #667eea 100%);
}

body.theme-dark .queue-item-message {
    color: #4299e1;
}

body.theme-dark .queue-item-position {
    background: #ffc107;
}

body.theme-dark .queue-item-actions {
    border-top-color: #162447;
}

body.theme-dark .queue-item-btn.priority {
    background: #667eea;
}

body.theme-dark .queue-item-btn.cancel {
    background: #f56565;
}

body.theme-dark .queue-stats {
    background: #1f4068;
}

body.theme-dark .queue-stat {
    background: linear-gradient(135deg, #162447 0%, #1a1a2e 100%);
}

body.theme-dark .queue-stat-label {
    color: #a0a0a0;
}

body.theme-dark .queue-stat-value {
    color: #667eea;
}

body.theme-dark .queue-empty {
    color: #a0a0a0;
}

body.theme-dark .queue-empty-hint {
    color: #666;
}

body.theme-dark .queue-more {
    background: #1f4068;
    color: #a0a0a0;
}

body.theme-dark .form-control-number {
    background: #162447;
    border-color: #1f4068;
    color: #e0e0e0;
}

body.theme-dark .form-control-number:focus {
    background: #1a1a2e;
    border-color: #667eea;
}

/* ==================== 参考图库管理样式 ==================== */

/* 超大弹窗 */
.modal-xlarge {
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
}

/* 参考图库容器 */
.ref-images-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    height: 600px;
}

/* 左侧分类面板 */
.ref-categories-panel {
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.ref-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.ref-panel-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.ref-categories-list {
    flex: 1;
    overflow-y: auto;
    padding-right: 10px;
}

/* 分类项 */
.ref-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.ref-category-item:hover {
    background: #e3f2fd;
    border-color: #667eea;
    transform: translateX(3px);
}

.ref-category-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.ref-category-name {
    flex: 1;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ref-category-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.ref-category-item.active .ref-category-count {
    background: rgba(255, 255, 255, 0.2);
}

.ref-category-actions {
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s;
}

.ref-category-item:hover .ref-category-actions {
    opacity: 1;
}

.ref-category-btn {
    background: transparent;
    border: none;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
}

.ref-category-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.ref-category-item.active .ref-category-btn {
    color: white;
}

.ref-category-item.active .ref-category-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 右侧图片面板 */
.ref-images-panel {
    display: flex;
    flex-direction: column;
}

.ref-actions {
    display: flex;
    gap: 8px;
}

/* 图片网格 */
.ref-images-grid {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 15px 0;
    align-content: start;
}

/* 图片卡片 */
.ref-image-card {
    position: relative;
    aspect-ratio: 1;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
    background: #f8f9fa;
}

.ref-image-card:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.ref-image-card.selected {
    border-color: #667eea;
    border-width: 3px;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.ref-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 图片卡片遮罩层 */
.ref-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, transparent 40%, transparent 60%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px;
}

.ref-image-card:hover .ref-image-overlay {
    opacity: 1;
}

/* 选择框 */
.ref-image-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    z-index: 10;
}

/* 图片名称 */
.ref-image-name {
    color: white;
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    word-break: break-all;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
}

/* 图片操作按钮 */
.ref-image-actions {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.ref-image-action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.ref-image-action-btn:hover {
    background: white;
    transform: scale(1.1);
}

/* 空状态 */
.ref-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.ref-empty-state .empty-icon {
    font-size: 64px;
    margin-bottom: 15px;
    display: block;
    opacity: 0.5;
}

.ref-empty-state p {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 8px;
}

.ref-empty-state small {
    font-size: 14px;
    color: #aaa;
}

/* 底部信息栏 */
.ref-footer-info {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
}

.ref-footer-info span {
    padding: 4px 12px;
    background: #f0f0f0;
    border-radius: 12px;
}

/* 暗色主题适配 */
body.theme-dark .ref-categories-panel {
    border-right-color: #2d3748;
}

body.theme-dark .ref-panel-header {
    border-bottom-color: #667eea;
}

body.theme-dark .ref-panel-header h4 {
    color: #e0e0e0;
}

body.theme-dark .ref-category-item {
    background: #1a1a2e;
    border-color: #2d3748;
    color: #e0e0e0;
}

body.theme-dark .ref-category-item:hover {
    background: #1f4068;
    border-color: #667eea;
}

body.theme-dark .ref-image-card {
    background: #1a1a2e;
    border-color: #2d3748;
}

body.theme-dark .ref-image-card:hover {
    border-color: #667eea;
}

body.theme-dark .ref-empty-state {
    color: #666;
}

body.theme-dark .ref-footer-info {
    color: #999;
}

body.theme-dark .ref-footer-info span {
    background: #1f4068;
}

/* 滚动条美化 */
.ref-categories-list::-webkit-scrollbar,
.ref-images-grid::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.ref-categories-list::-webkit-scrollbar-track,
.ref-images-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.ref-categories-list::-webkit-scrollbar-thumb,
.ref-images-grid::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.ref-categories-list::-webkit-scrollbar-thumb:hover,
.ref-images-grid::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

body.theme-dark .ref-categories-list::-webkit-scrollbar-track,
body.theme-dark .ref-images-grid::-webkit-scrollbar-track {
    background: #1a1a2e;
}

body.theme-dark .ref-categories-list::-webkit-scrollbar-thumb,
body.theme-dark .ref-images-grid::-webkit-scrollbar-thumb {
    background: #2d3748;
}

body.theme-dark .ref-categories-list::-webkit-scrollbar-thumb:hover,
body.theme-dark .ref-images-grid::-webkit-scrollbar-thumb:hover {
    background: #4a5568;
}

/* 椭圆标签样式 */
.badge-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}

.badge-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.badge-secondary {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(107, 114, 128, 0.3);
}

.badge-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.badge-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* 暗色模式下的标签样式 */
body.theme-dark .badge-success {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.4);
}

body.theme-dark .badge-secondary {
    background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
    box-shadow: 0 2px 4px rgba(75, 85, 99, 0.4);
}

body.theme-dark .badge-primary {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 2px 4px rgba(118, 75, 162, 0.4);
}

body.theme-dark .badge-info {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.4);
}

/* API 测试状态标记 */
.api-test-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    transition: all 0.3s;
}

.api-test-badge.badge-untested {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.api-test-badge.badge-testing {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid #93c5fd;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.api-test-badge.badge-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.api-test-badge.badge-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 1px solid #fca5a5;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

/* 暗色模式 - API 测试状态标记 */
body.theme-dark .api-test-badge.badge-untested {
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
    color: #9ca3af;
    border-color: #4b5563;
}

body.theme-dark .api-test-badge.badge-testing {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: #bfdbfe;
    border-color: #3b82f6;
}

body.theme-dark .api-test-badge.badge-success {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    color: #d1fae5;
    border-color: #10b981;
}

body.theme-dark .api-test-badge.badge-error {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
    color: #fee2e2;
    border-color: #ef4444;
}

/* 脉冲动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}
.toolbar .btn {
    padding: 8px 12px;
    font-size: 13px;
}

.toolbar .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

/* ========== UI优化样式 v2.1 ========== */

/* 1. 表格提示词文本截断优化 */
.prompt-text-cell {
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.5;
    color: #374151;
    font-size: 14px;
    word-break: break-all;
    position: relative;
    cursor: pointer;
}

.prompt-text-cell:hover {
    color: #667eea;
}

/* 提示词悬浮提示 */
.prompt-tooltip {
    position: absolute;
    z-index: 1000;
    background: #1f2937;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    max-width: 500px;
    word-break: break-word;
    font-size: 13px;
    line-height: 1.6;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    white-space: pre-wrap;
}

.prompt-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: #1f2937;
    transform: rotate(45deg);
}

/* 2. 图片预览优化 - 固定容器尺寸 */
.thumbnail-cell {
    width: 150px;
}

.thumbnail-container {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail-container:hover {
    border-color: var(--notion-border-hover);
    box-shadow: var(--notion-shadow-sm);
}

.thumbnail-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.thumbnail-container:hover img {
    transform: none;
}

.thumbnail-placeholder {
    width: 120px;
    height: 120px;
    color: #9ca3af;
    font-size: 12px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 图片放大查看弹窗 */
.image-preview-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.image-preview-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

.image-preview-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.image-preview-close:hover {
    color: #667eea;
    transform: scale(1.2);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* 3. 左侧边栏优化 - 增加呼吸感 */
.sidebar {
    padding: 24px 20px;
}

.sidebar > * {
    margin-bottom: 24px;
}

.sidebar .section-title {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* 4. 统一标签样式 - 低饱和度背景 */
.unified-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.unified-badge:hover {
    background: #e2e8f0;
    color: #334155;
}

.unified-badge.active {
    background: #667eea;
    color: white;
}

/* API平台标签 */
.api-platform-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.api-platform-tag:hover {
    border-color: #667eea;
    color: #667eea;
    background: #eef2ff;
}

.api-platform-tag.selected {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

/* 5. 按钮层级优化 */
/* 主操作按钮 - Primary */
.btn-primary-enhanced {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary-enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary-enhanced:active {
    transform: translateY(0);
}

/* 次级操作按钮 - Secondary */
.btn-secondary-enhanced {
    background: #f9fafb;
    color: #374151;
    border: 1px solid #e5e7eb;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary-enhanced:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* 危险操作按钮 - Danger (幽灵按钮) */
.btn-danger-ghost {
    background: transparent;
    color: #ef4444;
    border: 1px solid #ef4444;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger-ghost:hover {
    background: #ef4444;
    color: white;
}

/* 6. 进度条优化 */
.progress-bar-enhanced {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar-enhanced .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar-enhanced .progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* 7. 表单组优化 - 增加间距 */
.form-group-enhanced {
    margin-bottom: 20px;
}

.form-group-enhanced label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.form-group-enhanced .form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-group-enhanced .form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 8. 网格视图优化 */
.grid-card-enhanced {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.grid-card-enhanced:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.grid-card-image-enhanced {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #f3f4f6;
}

.grid-card-image-enhanced img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.grid-card-enhanced:hover .grid-card-image-enhanced img {
    transform: scale(1.1);
}

/* 9. 响应式优化 */
@media (max-width: 768px) {
    .prompt-text-cell {
        max-width: 260px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        word-break: normal;
        overflow-wrap: anywhere;
    }
}

    .thumbnail-container {
        aspect-ratio: 1/1;
    }
}

/* 10. 网格视图增强样式 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    padding: 24px 16px;
}

@media (max-width: 1400px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
        padding: 20px 12px;
    }
}

/* 网格卡片增强 */
.grid-card-enhanced {
    position: relative;
    background: white;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e5e7eb;
}

.grid-card-enhanced:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(102, 126, 234, 0.15);
}

/* 顶部图片/占位区域 - 固定容器尺寸 */
.grid-card-top {
    position: relative;
    width: 100%;
    height: 200px;
    background: #f3f4f6;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-card-top.has-image {
    cursor: pointer;
}

.grid-card-top img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
}

.grid-card-enhanced:hover .grid-card-top.has-image img {
    transform: scale(1.05);
}

.grid-card-top-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #e5e7eb 100%);
}

.top-icon {
    font-size: 28px;
    color: var(--notion-text-light);
}

/* 顶部状态徽章 */
.grid-top-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    backdrop-filter: blur(6px);
}

/* 网格卡片复选框 */
.grid-card-enhanced .grid-card-checkbox {
    background: transparent;
    border-radius: 8px;
    padding: 0;
    box-shadow: none;
    backdrop-filter: none;
    transition: all 0.2s ease;
}

.grid-card-enhanced .grid-card-checkbox:hover {
    background: transparent;
    box-shadow: none;
}

/* 网格图片容器 - 应用v2.1增强样式 */
.grid-card-image-enhanced {
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #f3f4f6;
    position: relative;
}

.grid-card-image-enhanced.has-image {
    cursor: pointer;
}

.grid-card-image-enhanced img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.grid-card-enhanced:hover .grid-card-image-enhanced img {
    transform: scale(1.08);
}

/* 网格卡片信息区域 */
.grid-card-enhanced .grid-card-info {
    background: white;
    border-top: 1px solid #f3f4f6;
}

.grid-card-enhanced .grid-card-number {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* 网格卡片提示词文本 */
.grid-card-enhanced .grid-card-prompt {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
}

.grid-card-enhanced .grid-card-prompt:hover {
    color: #667eea;
}

/* 网格卡片按钮组 */
.grid-card-enhanced .grid-card-actions {
    display: flex;
    flex-wrap: wrap;
}

.grid-card-enhanced .grid-card-actions button {
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.grid-card-enhanced .grid-card-actions button:active {
    transform: scale(0.95);
}

/* 状态徽章在图片上的显示 */
.grid-card-image-enhanced .unified-badge {
    backdrop-filter: blur(8px);
    animation: fadeInScale 0.3s ease;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* 进度条在网格视图中的显示 */
.grid-card-enhanced .progress-bar-enhanced {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 空状态优化 */
.grid-container > div[style*="grid-column: 1 / -1"] {
    animation: fadeIn 0.5s ease;
}

/* 网格卡片加载动画 */
.grid-card-enhanced {
    animation: cardFadeIn 0.4s ease;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grid-card-enhanced.selected {
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.grid-meta-list{list-style:none;padding:0;margin:8px 0 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 12px}
.grid-meta-list li{display:flex;gap:6px;align-items:center;font-size:12px;color:var(--notion-text-gray)}
.grid-meta-list .meta-label{color:var(--notion-text-light);min-width:52px}

/* 图片懒加载优化 */
.grid-card-image-enhanced img[loading="lazy"] {
    background: linear-gradient(
        90deg,
        #f3f4f6 0%,
        #e5e7eb 50%,
        #f3f4f6 100%
    );
    background-size: 200% 100%;
    animation: shimmerLoading 1.5s infinite;
}

@keyframes shimmerLoading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* 响应式优化 - 网格视图 */
@media (max-width: 640px) {
    .grid-card-enhanced .grid-card-info {
        padding: 12px;
    }

    .grid-card-enhanced .grid-card-prompt {
        font-size: 12px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .grid-card-enhanced .grid-card-actions button {
        font-size: 11px;
        padding: 6px 10px !important;
    }
}
.row-between{display:flex;align-items:center;justify-content:space-between}
.row-center{display:flex;align-items:center}
.project-toggle{cursor:pointer;display:flex;align-items:center}
.toggle-icon{margin-right:8px;display:inline-block;width:12px}
.project-stats{margin-left:15px;font-weight:normal;color:#666}

/* ========== Mobile-first Enhancements for style.css (updated) ========== */
@media (max-width: 768px) {
    /* 背景与容器简化 */
    body { padding: 10px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
    .container { border-radius: 8px; }

    /* 头部紧凑 */
    .header { padding: 20px; }
    .header h1 { font-size: 24px; }
    .header-content { flex-direction: column; align-items: flex-start; gap: 8px; }

    /* 主内容纵向堆叠 */
    .main-content { flex-direction: column; min-height: auto; }

    /* 侧边栏转为折叠抽屉 */
    .sidebar {
        position: fixed;
        top: 56px;
        left: -280px;
        width: 280px;
        height: calc(100vh - 56px);
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        transition: left 240ms ease;
        z-index: 1200;
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    }
    .sidebar.open { left: 0; }

    /* 拖动调整宽度手柄隐藏 */
    .resize-handle { display: none; }

    /* 主工作区域全宽 */
    .workspace { flex: 1; padding: 15px; }

    /* 栅栏列表调整 */
    .grid-list { grid-template-columns: 1fr; gap: 12px; }
    .grid-item, .grid-card-enhanced { min-height: 240px; }

    /* 按钮与表单触控友好 */
    button, .btn, input[type="text"], input[type="number"], textarea {
        min-height: 44px;
        font-size: 15px;
        padding: 10px 12px;
    }
    button { min-width: 44px; }

    /* 工具栏纵向布局 */
    .toolbar, .action-bar { flex-direction: column; gap: 10px; }
    .toolbar > * { width: 100%; }

    /* 过滤按钮横向滚动与紧凑样式 */
    .filter-buttons { gap: 4px; padding: 6px 4px; }
    .filter-btn { font-size: 14px; padding: 8px 12px; }

    /* 列表表格：在窄屏隐藏低优先级列（模型/比例/生成ID/生成时间/标签） */
    .prompts-table th:nth-child(4),
    .prompts-table td:nth-child(4),
    .prompts-table th:nth-child(5),
    .prompts-table td:nth-child(5),
    .prompts-table th:nth-child(6),
    .prompts-table td:nth-child(6),
    .prompts-table th:nth-child(7),
    .prompts-table td:nth-child(7),
    .prompts-table th:nth-child(8),
    .prompts-table td:nth-child(8) {
        display: none;
    }

    /* 状态与缩略图列保持一行显示 */
    .prompts-table td:nth-child(9),
    .prompts-table td:nth-child(10) {
        white-space: nowrap;
    }
    .prompts-table th,
    .prompts-table td { padding: 8px 6px; font-size: 12px; }
    .prompts-table .project-header td { padding: 6px 8px !important; }

    .project-actions { gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 4px 0; }
    .project-action-btn { padding: 6px 10px; font-size: 12px; white-space: nowrap; }

    .thumbnail-cell { width: 110px; }
}
/* 项目头部行排列优化 */
@media (max-width: 768px) {
    .prompts-table .project-header .row-between { flex-direction: column; align-items: stretch; gap: 6px; }
    .prompts-table .project-header .project-toggle { justify-content: space-between; width: 100%; }
    .prompts-table .project-header .project-stats { font-size: 12px; display: flex; gap: 8px; flex-wrap: wrap; margin-left: 8px; }
    .prompts-table .project-header .project-actions { justify-content: flex-start; overflow-x: auto; white-space: nowrap; }
    .prompts-table .project-header .project-action-btn { flex: 0 0 auto; }
}
    /* 模态框占满空间 */
    .modal-content { width: 96%; margin: 8% auto; }

    /* 降低最小尺寸 */
    .sidebar { min-width: 260px; }
    .container { min-height: 100vh; }

    /* 触控友好的间距 */
    button + button { margin-left: 8px; }
    .form-group { margin-bottom: 16px; }

    /* 增强滚动 */
    .sidebar, .workspace, .grid-list { -webkit-overflow-scrolling: touch; }
}
