/* 防止 select 切换选项时宽度收缩 */

/* 导出按钮样式 */
.btn-export-history {
    padding: 8px 16px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-export-history:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-export-history:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(16, 185, 129, 0.2);
}

/* 存储信息样式 */
.storage-info {
    margin: 12px 0;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 13px;
    color: #5f6368;
    border-left: 3px solid #3b82f6;
}

.storage-info strong {
    color: #202124;
    font-weight: 600;
}

/* 重试按钮样式 */
.btn-retry {
    padding: 6px 12px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-retry:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-retry:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(59, 130, 246, 0.2);
}

.btn-retry:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.task-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 余额显示样式 */
.balance-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 16px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    animation: fadeIn 0.5s ease;
}

.balance-info.low-balance {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    animation: pulse 2s ease-in-out infinite;
}

.balance-label {
    opacity: 0.9;
}

.balance-amount {
    font-size: 18px;
    font-weight: 700;
}

.balance-currency {
    opacity: 0.9;
    font-size: 13px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(245, 87, 108, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(245, 87, 108, 0.6);
    }
}

/* 历史记录筛选增强样式 - Google风格 */
.history-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.filter-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-group label {
    font-size: 13px;
    color: #5f6368;
    font-weight: 500;
}

.filter-group select {
    padding: 8px 32px 8px 12px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 14px;
    color: #202124;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235f6368' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.filter-group select:hover {
    border-color: #1a73e8;
    background-color: #f8f9fa;
}

.filter-group select:focus {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.download-btn-group {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.btn-select-all,
.btn-download-selected,
.btn-cancel-selection {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-select-all {
    background: #ffffff;
    color: #1a73e8;
    border: 1px solid #dadce0;
}

.btn-select-all:hover {
    background: #f8f9fa;
    border-color: #1a73e8;
}

.btn-download-selected {
    background: #1a73e8;
    color: #ffffff;
}

.btn-download-selected:hover {
    background: #1557b0;
    box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
}

.btn-download-selected:disabled {
    background: #dadce0;
    color: #9aa0a6;
    cursor: not-allowed;
}

.btn-cancel-selection {
    background: #ffffff;
    color: #5f6368;
    border: 1px solid #dadce0;
}

.btn-cancel-selection:hover {
    background: #f8f9fa;
}

/* 批量创作相关样式 */
.tti-multi-prompt-item {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 10px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.tti-multi-prompt-item:hover {
    border-color: #dadce0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tti-multi-prompt-header {
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.tti-multi-prompt-header h4 {
    font-size: 14px;
    font-weight: 500;
    color: #202124;
    margin: 0;
}

.tti-multi-prompt-config {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.tti-multi-prompt-item.expanded .tti-multi-prompt-config {
    max-height: 800px;
    padding: 0 16px 16px;
}

.tti-multi-prompt-actions {
    display: flex;
    gap: 8px;
}

.tti-multi-prompt-actions button {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid #dadce0;
    background: #ffffff;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tti-multi-prompt-actions button:hover {
    background: #f8f9fa;
    border-color: #1a73e8;
    color: #1a73e8;
}

.expand-icon {
    transition: transform 0.3s ease;
    font-size: 12px;
    color: #5f6368;
}

.tti-multi-prompt-item.expanded .expand-icon {
    transform: rotate(180deg);
}

/* ==================== 并发任务进度显示样式（合并到当前任务区域） ==================== */

/* 批量任务进度条 - 在当前任务区域内 */
.concurrent-batch-progress {
    background: linear-gradient(135deg, #e8f0fe 0%, #f0f7ff 100%) !important;
    border-color: #1a73e8 !important;
    animation: batchProgressPulse 2s ease-in-out infinite;
}

@keyframes batchProgressPulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(26, 115, 232, 0.15);
    }
    50% {
        box-shadow: 0 4px 16px rgba(26, 115, 232, 0.25);
    }
}

.concurrent-batch-progress .task-id {
    background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%) !important;
    color: white !important;
    border: none !important;
}

.concurrent-batch-progress .task-status.processing {
    background: #1a73e8 !important;
    color: white !important;
    animation: statusPulse 1.5s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 保留旧的样式用于兼容性，但隐藏 */
.concurrent-progress {
    display: none !important;
}

.concurrent-tasks-grid {
    display: none !important;
}

.concurrent-task-item {
    display: none !important;
}

/* ==================== 图片预览弹窗样式 ==================== */
.image-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.image-preview-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.image-preview-modal .modal-content {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border-radius: 12px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.2s ease;
}

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

.image-preview-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e8eaed;
    background: #f8f9fa;
}

.image-preview-modal .modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #202124;
}

.image-preview-modal .modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 18px;
    color: #5f6368;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.image-preview-modal .modal-close:hover {
    background: #e8eaed;
    color: #202124;
}

.image-preview-modal .modal-notice {
    padding: 12px 20px;
    background: #fef7e0;
    color: #856404;
    font-size: 14px;
    border-bottom: 1px solid #ffeeba;
}

.image-preview-modal .modal-body {
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #1a1a1a;
    min-height: 300px;
}

.image-preview-modal .modal-body img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 4px;
}

.image-preview-modal .modal-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #e8eaed;
    background: #f8f9fa;
}

.image-preview-modal .btn-modal-download {
    padding: 10px 24px;
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.image-preview-modal .btn-modal-download:hover {
    background: linear-gradient(135deg, #1557b0 0%, #0d47a1 100%);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

/* 重试任务弹窗样式 */
.retry-task-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.retry-task-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.retry-task-modal .retry-modal-content {
    position: relative;
    z-index: 1;
    background: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    animation: scaleIn 0.2s ease;
}

.retry-task-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e8eaed;
    background: #f8f9fa;
}

.retry-task-modal .modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #202124;
}

.retry-task-modal .modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 18px;
    color: #5f6368;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.retry-task-modal .modal-close:hover {
    background: #e8eaed;
    color: #202124;
}

.retry-task-modal .retry-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #ffffff;
}

.retry-task-modal .retry-notice {
    padding: 12px;
    background: #fff3cd;
    border-radius: 6px;
    margin-bottom: 16px;
    color: #856404;
    font-size: 14px;
}

.retry-task-modal .form-group {
    margin-bottom: 16px;
}

.retry-task-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
}

.retry-task-modal .form-group textarea,
.retry-task-modal .form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #374151;
    background: #ffffff;
    transition: border-color 0.2s;
}

.retry-task-modal .form-group textarea:focus,
.retry-task-modal .form-group select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.retry-task-modal .upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f9fafb;
}

.retry-task-modal .upload-area:hover {
    border-color: #6366f1;
    background: #f3f4f6;
}

.retry-task-modal .upload-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
}

.retry-task-modal .preview-area {
    color: #6b7280;
    font-size: 14px;
}

.retry-task-modal .retry-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid #e8eaed;
    background: #f8f9fa;
}

.retry-task-modal .btn-secondary,
.retry-task-modal .btn-generate {
    padding: 0 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 100px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    line-height: 1.2;
    margin: 0;
    vertical-align: middle;
    /* 确保所有按钮高度一致 */
}

.retry-task-modal .btn-secondary {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    /* 确保边框包含在高度内，不影响总高度 */
    box-sizing: border-box;
    /* 如果 border 是 1px，高度仍然是 40px（包含 border） */
}

.retry-task-modal .btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
}

.retry-task-modal .btn-secondary:active {
    background: #f3f4f6;
}

.retry-task-modal .btn-generate {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
    /* 添加透明边框，确保与 btn-secondary 高度一致 */
    border: 1px solid transparent;
    box-sizing: border-box;
}

.retry-task-modal .btn-generate:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.retry-task-modal .btn-generate:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

/* 紧凑型提示词按钮布局 */
.prompt-chips-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 8px;
}

.prompt-chips-compact .chip {
    padding: 5px 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 12px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.prompt-chips-compact .chip:hover {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25);
}

.prompt-chips-compact .chip:active {
    transform: translateY(0);
}

/* ==================== 下载进度区域样式优化 ==================== */
.download-progress-section {
    margin: 16px 0;
    padding: 16px 20px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.download-progress-section:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.download-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8eaed;
}

.download-progress-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #202124;
    display: flex;
    align-items: center;
    gap: 8px;
}

.download-status {
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
    background: #e8f0fe;
    padding: 6px 12px;
    border-radius: 20px;
    color: #1a73e8;
}

.download-progress-bar {
    width: 100%;
    height: 10px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.download-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    transition: width 0.3s ease;
    width: 0%;
    border-radius: 6px;
}

.download-progress-text {
    text-align: center;
    font-size: 13px;
    color: #5f6368;
    font-weight: 500;
    margin-top: 4px;
}

/* ==================== 多图融合样式 ==================== */

.merge-images-list {
    margin-top: 20px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.merge-images-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.merge-image-item {
    position: relative;
    background: white;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

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

.merge-image-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    background: #f3f4f6;
    margin-bottom: 8px;
}

.merge-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.merge-image-index {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.merge-image-info {
    text-align: center;
}

.merge-image-name {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.merge-image-size {
    font-size: 11px;
    color: #6b7280;
}

.btn-remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    opacity: 0;
}

.merge-image-item:hover .btn-remove-image {
    opacity: 1;
}

.btn-remove-image:hover {
    background: #ef4444;
    transform: scale(1.1);
}

/* ========================================
   使用帮助弹窗样式
   ======================================== */

.help-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 20px;
    overflow-y: auto;
}

.help-modal-overlay.show {
    display: flex;
}

.help-modal {
    background: #ffffff;
    border-radius: 16px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.help-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.help-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.help-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.help-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.help-modal-content {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

.help-welcome {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    margin-bottom: 24px;
}

.help-welcome h1 {
    font-size: 24px;
    color: #1e40af;
    margin: 0 0 12px 0;
}

.help-welcome p {
    color: #64748b;
    margin: 0;
    font-size: 15px;
}

.help-section {
    margin-bottom: 24px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #6366f1;
}

.help-section h2 {
    font-size: 18px;
    color: #1e293b;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

.help-section h3 {
    font-size: 15px;
    color: #334155;
    margin: 16px 0 8px 0;
}

.help-section h4 {
    font-size: 14px;
    color: #475569;
    margin: 12px 0 8px 0;
}

.help-section p {
    color: #64748b;
    line-height: 1.6;
    margin: 8px 0;
}

.help-section ul {
    margin: 8px 0;
    padding-left: 20px;
}

.help-section li {
    color: #64748b;
    line-height: 1.8;
    margin: 4px 0;
}

.help-section a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.help-section a:hover {
    text-decoration: underline;
}

.help-section .highlight {
    color: #6366f1;
    font-weight: 600;
    background: #eef2ff;
    padding: 2px 8px;
    border-radius: 4px;
}

/* 警告样式 */
.help-section.help-warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
}

.help-section.help-warning h3 {
    color: #b45309;
}

/* 危险/重要提示样式 */
.help-section.help-danger {
    background: #fef2f2;
    border-left-color: #ef4444;
}

.help-section.help-danger h3 {
    color: #dc2626;
}

.help-alert {
    background: #fee2e2;
    padding: 12px 16px;
    border-radius: 8px;
    margin: 12px 0;
    text-align: center;
}

.help-alert p {
    color: #991b1b;
    margin: 0;
}

.help-checklist {
    list-style: none;
    padding-left: 0;
}

.help-checklist li {
    padding: 8px 12px;
    border-radius: 6px;
    margin: 6px 0;
}

.help-checklist li.do {
    background: #dcfce7;
    color: #166534;
}

.help-checklist li.dont {
    background: #fee2e2;
    color: #991b1b;
}

.help-important {
    font-size: 15px;
    color: #dc2626 !important;
    font-weight: 500;
    padding: 12px;
    background: #fee2e2;
    border-radius: 8px;
    text-align: center;
}

/* 功能网格 */
.help-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.help-feature-item {
    background: white;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.help-feature-item h4 {
    margin: 0 0 12px 0;
    color: #1e293b;
}

.help-feature-item ul {
    margin: 0;
    padding-left: 16px;
}

.help-feature-item li {
    font-size: 13px;
}

/* 联系方式 */
.help-section.help-contact {
    text-align: center;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-left-color: #22c55e;
}

.help-contact p {
    margin: 8px 0;
}

.help-contact .highlight {
    background: #bbf7d0;
    color: #166534;
    font-size: 16px;
    padding: 4px 12px;
}

/* 响应式 */
@media (max-width: 640px) {
    .help-modal {
        margin: 10px;
        max-height: 95vh;
    }
    
    .help-modal-content {
        padding: 16px;
    }
    
    .help-welcome h1 {
        font-size: 20px;
    }
    
    .help-section {
        padding: 16px;
    }
    
    .help-feature-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== 历史记录按钮区域 ==================== */
.history-controls-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
    margin-bottom: 16px;
}

.history-controls-wrapper select,
.history-controls-wrapper button {
    height: 34px;
    box-sizing: border-box;
}

.history-controls-wrapper select {
    padding: 0 28px 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    color: #475569;
    background: #f8fafc;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235f6368' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.history-controls-wrapper select:hover {
    border-color: #6366f1;
    background-color: #f1f5f9;
}

.history-controls-wrapper select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}


.file-preview {
    overflow: hidden;
}

.file-preview .preview-table-wrap {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.file-preview .preview-table-wrap::-webkit-scrollbar {
    width: 6px;
}

.file-preview .preview-table-wrap::-webkit-scrollbar-track {
    background: transparent;
}

.file-preview .preview-table-wrap::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}
