@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(180deg, #FFF9E6 0%, #FFE0B2 100%); /* 暖色渐变背景 */
    background-attachment: fixed;
    color: #2d3748;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 1280px; /* 缩小最大宽度，留出更多空白 */
    margin: 0 auto;
    padding: 0 40px; /* 增加两侧内边距 */
}

/* 顶部标题 */
.header-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #2d3436;
    margin-bottom: 10px;
    letter-spacing: -0.025em;
}

.header-logo {
    height: 48px;
    width: auto;
    vertical-align: middle;
    margin-right: 12px;
    margin-bottom: 6px;
}

.subtitle {
    color: #718096;
    font-size: 1.1rem;
}

/* 主布局：左右分栏 */
.main-content {
    display: grid;
    grid-template-columns: 500px 1fr; /* 黄金比例调整，加宽左侧面板 */
    gap: 35px;
    margin-bottom: 40px;
    align-items: start;
}

.left-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.right-panel {
    min-width: 0;
}

/* 页面模式切换 */
.page-mode-switch {
    width: min(420px, 100%);
    margin: -8px auto 28px;
    padding: 8px;
    display: flex;
    gap: 10px;
    justify-content: center;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(10px);
    border: 1px solid #fbd38d;
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(237, 137, 54, 0.12);
}

.page-mode-btn {
    flex: 1;
    min-height: 56px;
    border: none;
    border-radius: 16px;
    background: transparent;
    color: #7b341e;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s ease;
}

.page-mode-btn:hover {
    background: rgba(255, 247, 237, 0.95);
    transform: translateY(-1px);
}

.page-mode-btn.active {
    background: linear-gradient(135deg, #FFAA00 0%, #FF8800 100%);
    color: #fff;
    box-shadow: 0 12px 24px rgba(255, 136, 0, 0.22);
}

.page-mode-btn-icon {
    font-size: 1.05rem;
    line-height: 1;
}

#originalPageView,
#batchPageView {
    width: 100%;
}

.batch-page-view {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.batch-top-grid {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.batch-shared-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.batch-shared-settings-actions {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.batch-shared-settings-tip {
    margin: 0;
    color: #9c4221;
    font-size: 0.82rem;
    line-height: 1.7;
}

.batch-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 16px 20px;
    border: 1px solid #fbd38d;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 24px rgba(237, 137, 54, 0.08);
}

.batch-toolbar-stats {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: #7b341e;
    font-size: 0.92rem;
    font-weight: 600;
}

.batch-toolbar-stats strong {
    color: #dd6b20;
    font-size: 1rem;
}

.batch-toolbar-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.batch-primary-btn,
.batch-secondary-btn {
    border: none;
    border-radius: 12px;
    padding: 12px 18px;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.25s ease;
}

.batch-primary-btn {
    background: linear-gradient(135deg, #FFAA00 0%, #FF8800 100%);
    color: #fff;
    box-shadow: 0 10px 20px rgba(255, 136, 0, 0.2);
}

.batch-primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(255, 136, 0, 0.28);
}

.batch-secondary-btn {
    background: #fff7ed;
    color: #c05621;
    border: 1px solid #f6ad55;
}

.batch-secondary-btn:hover {
    background: #ffedd5;
    transform: translateY(-1px);
}

.batch-primary-btn:disabled,
.batch-secondary-btn:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.batch-tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 22px;
    align-items: start;
}

.batch-task-card {
    background: #FFF8E1;
    border: 1px solid #fbd38d;
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(251, 146, 60, 0.08);
    padding: 20px;
}

.batch-task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
}

.batch-task-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.batch-task-title {
    margin: 0;
    color: #7c2d12;
    font-size: 1.05rem;
    font-weight: 800;
}

.batch-task-status {
    width: fit-content;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    border: 1px solid transparent;
}

.batch-task-status.status-idle {
    color: #7c2d12;
    background: #fff7ed;
    border-color: #fbd38d;
}

.batch-task-status.status-running {
    color: #9c4221;
    background: #fef3c7;
    border-color: #f6ad55;
}

.batch-task-status.status-success {
    color: #276749;
    background: #f0fff4;
    border-color: #9ae6b4;
}

.batch-task-status.status-error {
    color: #c53030;
    background: #fff5f5;
    border-color: #feb2b2;
}

.batch-task-remove-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: #fff1f2;
    color: #e53e3e;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.batch-task-remove-btn:hover {
    background: #ffe4e6;
    transform: scale(1.05);
}

.batch-task-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    min-height: 64px;
}

.batch-task-preview-item {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #fbd38d;
    background: #fffdf7;
}

.batch-task-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.batch-task-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: rgba(229, 62, 62, 0.92);
    color: #fff;
    font-size: 11px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.batch-task-preview-badge {
    position: absolute;
    left: 4px;
    top: 4px;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.92);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.batch-task-preview-empty {
    width: 100%;
    min-height: 64px;
    border: 1px dashed #fbd38d;
    border-radius: 12px;
    background: #fffaf0;
    color: #c05621;
    font-size: 0.84rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 12px;
}

.batch-task-upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

.batch-file-upload-label {
    min-height: 92px;
    background: #fffdf7;
}

.batch-url-input-wrapper textarea {
    min-height: 92px;
    height: 92px;
    resize: vertical;
}

.batch-task-prompt {
    min-height: 120px;
}

.batch-task-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.batch-task-actions {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.batch-task-actions button {
    flex: 1;
    min-width: 140px;
}

.batch-task-message {
    margin-top: 12px;
    font-size: 0.82rem;
    color: #9c4221;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

.batch-task-message.is-error {
    color: #c53030;
}

.batch-task-result-panel {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #fde68a;
}

.batch-task-result-title {
    margin: 0 0 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: #7c2d12;
    font-size: 0.92rem;
    font-weight: 800;
}

.batch-result-counter {
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff7ed;
    color: #c05621;
    border: 1px solid #fbd38d;
    font-size: 0.78rem;
}

.batch-task-results {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.batch-task-empty-state {
    min-height: 180px;
    border: 1px dashed #fbd38d;
    border-radius: 14px;
    background: linear-gradient(135deg, #fffaf0 0%, #fff7ed 100%);
    color: #c05621;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px;
    font-size: 0.88rem;
    line-height: 1.7;
}

.batch-task-card .result-group-container {
    margin-bottom: 12px !important;
    border-color: #fde68a !important;
    background: #fffdf8 !important;
}

.batch-task-card .image-grid-container {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
}

.batch-task-card .result-prompt-info {
    font-size: 0.8rem;
}

.batch-task-card .btn-result-action {
    margin-top: 0;
    font-size: 0.78rem;
    padding: 6px 10px;
}

@media (max-width: 1024px) {
    .batch-top-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-mode-switch {
        width: 100%;
    }

    .batch-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .batch-toolbar-actions {
        width: 100%;
    }

    .batch-toolbar-actions button {
        flex: 1;
    }

    .batch-tasks-grid {
        grid-template-columns: 1fr;
    }

    .batch-task-upload-grid,
    .batch-task-settings-grid,
    .batch-shared-settings-grid {
        grid-template-columns: 1fr;
    }
}

/* 卡片通用样式 */
.card {
    background: #FFF8E1;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid #e2e8f0;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

.card h3 {
    font-size: 0.95rem; /* 稍微调小标题字体 */
    font-weight: 700;
    color: #2d3748;
    padding: 16px 20px; /* 减小内边距 */
    margin: 0;
    border-bottom: 1px solid #f7fafc;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #FFF8E1;
}

.card-body {
    padding: 24px;
}

/* 图标盒子 */
.icon-box {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* 徽章 */
.badge {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: #edf2f7;
    color: #718096;
    margin-left: auto;
    font-weight: 500;
}
.badge-blue { background: #FFF3E0; color: #F57C00; }

/* 表单元素 */
.input-group { margin-bottom: 20px; }
.input-group:last-child { margin-bottom: 0; }

.input-group label {
    display: block;
    font-size: 0.85rem; /* 调小字体 */
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 6px; /* 减小间距 */
}

.input-group input,
.input-group textarea,
.input-group select,
#customImageModelInput,
#customVideoModelInput,
#imageUrls,
#customOptimizerModelInput,
#customNInput {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 13px; /* 统一小字体 */
    color: #2d3748;
    transition: all 0.2s;
    background: #FFF8E1;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus,
#customImageModelInput:focus,
#customVideoModelInput:focus,
#imageUrls:focus,
#customOptimizerModelInput:focus,
#customNInput:focus {
    background: #FFF8E1;
    border-color: #FF9F1C;
    box-shadow: 0 0 0 3px rgba(255, 159, 28, 0.2);
    outline: none;
}

/* 单独针对创意描述文本域优化 */
#prompt {
    font-size: 13px !important;
    line-height: 1.6;
}

.input-group textarea { resize: vertical; min-height: 100px; font-family: inherit; }

.highlight-group textarea {
    border-color: #e2e8f0;
    background: #FFF8E1;
    font-size: 1rem;
}
.highlight-group textarea:focus {
    border-color: #FF9F1C;
}

/* 快捷提示词标签 */
.quick-prompts {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-prompt-tag {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.quick-prompt-tag:hover {
    background: #edf2f7;
    color: #2d3748;
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

.quick-prompt-tag:active {
    transform: scale(0.95);
}

/* Tooltip 样式 */
.tooltip-trigger {
    position: relative;
}

.tooltip-trigger::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tooltip-trigger::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-3px);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
    z-index: 100;
}

.tooltip-trigger:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-12px);
}

.tooltip-trigger:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-7px);
}

/* 模型选择 */
.model-selection-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
/* 强制让多选框有足够高度 */
#imageModels {
    height: 150px !important;
    background: #FFF8E1;
}
#videoModels {
    height: 100px !important; /* 视频模型较少，减小高度 */
    background: #FFF8E1;
}

.model-column {
    display: flex;
    flex-direction: column;
}
.model-column label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

/* 参数网格 */
.param-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

/* 上传区域 */
.upload-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.file-upload { position: relative; width: 100%; }

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 80px;
    border: 2px dashed #cbd5e0;
    border-radius: 12px;
    background: #f7fafc;
    cursor: pointer;
    transition: all 0.2s;
    color: #718096;
    font-size: 0.9rem;
    text-align: center;
    padding: 10px;
}

.file-upload-label:hover {
    border-color: #FF9F1C;
    background: #FFF3E0;
    color: #E65100;
}

.upload-icon { font-size: 1.5rem; margin-bottom: 4px; display: block; }

.file-upload input[type="file"] { 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%; 
    opacity: 0; cursor: pointer; 
}

.url-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.url-input-wrapper textarea {
    min-height: 40px;
    height: 40px;
    padding: 8px 12px;
}
.btn-url-load {
    width: 100%;
    padding: 6px;
    background: #e2e8f0;
    border: none;
    border-radius: 6px;
    color: #4a5568;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}
.btn-url-load.active {
    background: #FF9F1C;
    color: white;
}

/* 图片预览 */
.image-preview-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}
.image-preview-container > div {
    position: relative;
    width: 60px;
    height: 60px;
}
.image-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}
.delete-image-btn {
    position: absolute; top: -6px; right: -6px;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #e53e3e; color: white;
    border: 2px solid white;
    font-size: 10px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}

/* 操作栏 */
.action-bar {
    position: sticky;
    bottom: 20px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.warning-note-in-btn {
    font-size: 0.75rem;
    color: #d32f2f;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: normal;
    margin-top: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #FFAA00 0%, #FF8800 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px -10px rgba(255, 136, 0, 0.5);
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -10px rgba(255, 136, 0, 0.6);
}
.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.mode-badge {
    text-align: center;
    font-size: 0.85rem;
    color: #718096;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.background-task-status {
    text-align: center;
    font-size: 0.82rem;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.92);
    color: #718096;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    line-height: 1.5;
}

.background-task-status.ready {
    background: #f0fff4;
    color: #2f855a;
    border-color: #9ae6b4;
}

.background-task-status.unavailable {
    background: #fff5f5;
    color: #c53030;
    border-color: #feb2b2;
}

.background-task-status.checking {
    background: #fffaf0;
    color: #c05621;
    border-color: #fbd38d;
}

/* 右侧结果区域 - 增加空状态 */
.result-body {
    min-height: 600px; /* 加高 */
    display: flex;
    flex-direction: column;
    position: relative;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* 自适应填充，避免留白 */
    gap: 20px;
    flex-grow: 1;
    min-height: 300px;
}

/* 空状态样式 */
.empty-state {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #cbd5e0;
    pointer-events: none; /* 让点击穿透 */
}
.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    opacity: 0.5;
}
.empty-state p { font-size: 1.1rem; font-weight: 500; }

.generated-image {
    width: 100%;
    height: 100%; /* 撑满容器 */
    object-fit: cover; /* 保持比例裁剪填充 */
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    display: block;
}
.generated-image:hover { transform: scale(1.02); }

/* 结果中的分组容器 */
.result-prompt-info {
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #4a5568;
    margin-bottom: 15px;
    border: 1px solid #edf2f7;
    word-break: break-all;
}

.btn-result-action {
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}
.btn-result-action:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

/* 日志区域优化 */
.log-section {
    margin-top: 20px;
    background: #FFF8E1;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a5568;
    background: #FFF8E1;
    border-bottom: 1px solid #e2e8f0;
}

.log-panel {
    background: #FFF8E1;
    color: #4a5568;
    padding: 16px;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    height: 450px; /* 增加高度 */
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.5;
    resize: vertical; /* 允许垂直拖拽调整高度 */
    min-height: 200px;
}
.log-line { margin: 4px 0; border-bottom: 1px dashed #f0f0f0; padding-bottom: 2px; }
.log-info { color: #E65100; }
.log-warn { color: #d69e2e; }
.log-error { color: #e53e3e; }

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s;
}
.btn-icon:hover { background: #e2e8f0; }

/* 历史记录全宽卡片 */
.history-card { margin-top: 0; }
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f7fafc;
}
.card-header h3 { border: none; padding: 0; }

.history-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 强制每行4个 */
    gap: 15px;
    padding: 20px;
}

@media (max-width: 1100px) {
    .history-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 800px) {
    .history-grid { grid-template-columns: repeat(2, 1fr); }
}

.history-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
}
.history-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}
.history-item.selected {
    border-color: #FF9F1C;
    box-shadow: 0 0 0 3px rgba(255, 159, 28, 0.3);
}

.history-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
}
.history-prompt {
    padding: 8px 10px;
    font-size: 12px; /* 更小的字体 */
    color: #4a5568;
    line-height: 1.4;
}
.history-prompt strong {
    font-size: 12px; /* 标题也变小 */
}
.history-time {
    padding: 0 10px 8px;
    font-size: 11px; /* 更小的字体 */
    color: #a0aec0;
}

.history-logs {
    padding: 0 10px 10px;
}

.history-logs summary {
    font-size: 11px;
    cursor: pointer;
    color: #718096;
    margin-bottom: 4px;
    outline: none;
    font-weight: 500;
}

.history-logs pre {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px;
    font-size: 10px; /* 更小的字体 */
    color: #4a5568;
    max-height: 120px; /* 固定高度 */
    overflow-y: auto; /* 支持滚动 */
    white-space: pre-wrap;
    word-break: break-all;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    margin: 0;
}

/* 自定义滚动条样式 */
.history-logs pre::-webkit-scrollbar {
    width: 4px;
}
.history-logs pre::-webkit-scrollbar-track {
    background: transparent;
}
.history-logs pre::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 2px;
}
.history-logs pre::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.history-item-checkbox {
    position: absolute;
    top: 8px; left: 8px;
    transform: scale(1.1);
    z-index: 10;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    gap: 15px;
    border-top: 1px solid #f0f0f0;
}
.page-btn {
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #4a5568;
    transition: all 0.2s;
}
.page-btn:hover:not(:disabled) {
    background: #f7fafc;
    border-color: #cbd5e0;
    color: #2d3748;
}
.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.page-info {
    font-size: 0.85rem;
    color: #718096;
}

.btn-outline {
    padding: 6px 16px;
    border: 1px solid #cbd5e0;
    background: white;
    color: #4a5568;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-outline:hover {
    border-color: #a0aec0;
    background: #f7fafc;
}
.btn-outline.danger { color: #e53e3e; border-color: #feb2b2; }
.btn-outline.danger:hover { background: #fff5f5; border-color: #fc8181; }

/* Loading */
.loading { display: none; padding: 40px; text-align: center; color: #718096; }
.loading.show { display: block; }
.spinner {
    border: 3px solid #edf2f7;
    border-top: 3px solid #FF9F1C;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* 公告弹窗样式 (还原备份版并优化) */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.8); /* 增加透明度 */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1); /* 柔和阴影 */
    padding: 20px 25px;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    border-radius: 16px;
    max-width: 380px; /* 恢复原有宽度 */
    font-size: 14px;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    visibility: hidden;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
}

.toast-content p { margin: 0; }
.toast-content strong { color: #434190; }
.toast-content a { color: #FF9F1C; text-decoration: none; font-weight: 600;}
.toast-content a:hover { text-decoration: underline; }

.toast-header { font-size: 1.1em; font-weight: 600; color: #333; margin-bottom: 15px; border-bottom: none; padding-bottom: 0; display: block; }
.toast-section { margin-bottom: 12px; }
.toast-section > strong { display: block; margin-bottom: 8px; font-size: 1em; color: #434190; }
.toast-section ul { list-style: none; padding: 5px 0 0 5px; margin: 0; }
.toast-section code {
    background: linear-gradient(135deg, #FFAA00, #FF8800);
    color: white;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 500;
    margin: 4px 2px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.toast-section code:hover {
    transform: scale(1.1) rotate(-2deg);
}

.toast-tips {
    background: rgba(255, 159, 28, 0.1); padding: 8px 12px; border-radius: 8px; font-size: 0.9em; margin-top: 10px; border-left: none; color: inherit;
}
.toast-tips strong { color: #FF9F1C; }

.toast button {
    background: rgba(0,0,0,0.05);
    border: none;
    cursor: pointer;
    color: #888;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    flex-shrink: 0;
    transition: background-color 0.3s, color 0.3s;
    position: static; /* 恢复静态定位 */
}

.toast button:hover {
    background-color: rgba(0,0,0,0.1);
    color: #333;
}

/* 新模型公告的特殊样式 */
.toast-section .new-model {
    background: linear-gradient(135deg, #f97794 0%, #623aa2 100%);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(249, 119, 148, 0.4);
    transform: scale(1.05);
    transform-origin: left center;
    display: inline-block;
    transition: transform 0.3s ease;
    border: none; /* 移除边框 */
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 1em;
}

.toast-section .new-model:hover {
    transform: scale(1.2) rotate(-2deg);
}

.link-card {
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #2d3748;
    font-size: 0.85rem;
    transition: all 0.2s;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.link-card:hover {
    background: #fff;
    border-color: #FF9F1C;
    color: #FF9F1C;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(255, 159, 28, 0.15);
}

.wechat-id {
    font-weight: 800;
    color: #2d3748;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    background: #f0fff4;
    border: 1px dashed #9ae6b4;
    transition: all 0.2s;
    margin-left: 5px;
}
.wechat-id:hover {
    background: #c6f6d5;
    border-color: #48bb78;
}
.wechat-id:active {
    transform: scale(0.95);
}

/* 提示信息 */
.toast-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 3000;
    display: none;
}
.toast-notification.show { display: block; animation: fadeInDown 0.3s; }
.toast-notification.success { background: #48bb78; }
.toast-notification.error { background: #f56565; }

@keyframes fadeInDown {
    from { opacity: 0; transform: translate(-50%, -20px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* 响应式 */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    .action-bar {
        position: static;
    }
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    font-size: 0.9rem;
    color: #4a5568;
    cursor: pointer;
}
.custom-checkbox input { margin: 0; }

/* ========== 视频任务UI样式 ========== */

/* 视频任务容器 */
.video-tasks-container {
    margin-bottom: 30px;
    padding: 20px;
    background: #FFF8E1;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.image-tasks-container {
    border-color: #f6ad55;
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.08);
}

.image-task-tip {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fffaf0;
    border: 1px solid #fbd38d;
    color: #9c4221;
    font-size: 0.82rem;
    line-height: 1.6;
}

.video-tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.video-tasks-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
    padding: 0;
    border: none;
}

.tasks-count {
    background: linear-gradient(135deg, #FFAA00 0%, #FF8800 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(255, 136, 0, 0.3);
}

/* 垂直滚动容器 */
.video-tasks-scroll {
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 600px;
    padding: 5px;
    margin: 0;
}

.video-tasks-scroll::-webkit-scrollbar {
    width: 8px;
}

.video-tasks-scroll::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 4px;
}

.video-tasks-scroll::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.video-tasks-scroll::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* 任务列表 - 网格布局，每行2个 */
.video-tasks-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 0;
}

/* 任务卡片 */
.video-task-card {
    width: 100%;
    background: #FFF8E1;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
}

.video-task-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.video-task-card.selected {
    border-color: #FF9F1C;
    box-shadow: 0 0 0 3px rgba(255, 159, 28, 0.2);
}

/* 任务复选框 */
.task-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.task-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #FF9F1C;
}

/* 预览区 */
.task-preview {
    width: 100%;
    height: 158px;
    background: #1a202c;
    position: relative;
    overflow: hidden;
}

.task-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 加载占位符 - 优化布局 */
.task-loading-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FFAA00 0%, #FF8800 100%);
    color: white;
    position: relative;
    gap: 20px;
    padding: 20px;
}

.task-loading-placeholder p {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    width: 100%;
    z-index: 2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3),
                 0 0 20px rgba(255, 255, 255, 0.2);
    letter-spacing: 0.5px;
    animation: textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3),
                     0 0 20px rgba(255, 255, 255, 0.2);
    }
    50% {
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3),
                     0 0 30px rgba(255, 255, 255, 0.4);
    }
}

/* 加载动画 - 优化后更显眼 */
.loading-spinner {
    width: 70px;
    height: 70px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-right-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 0.8s linear infinite, pulse 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5),
                inset 0 0 20px rgba(255, 255, 255, 0.2);
    position: relative;
}

.loading-spinner::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: spin 1.5s linear infinite reverse;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
}

/* 错误占位符 */
.task-error-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #feb2b2;
    color: #742a2a;
    padding: 20px;
    text-align: center;
}

.error-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.task-error-placeholder p {
    font-size: 0.85rem;
    margin: 0;
}

.task-image-completed-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    color: #9a3412;
    gap: 10px;
    padding: 20px;
    text-align: center;
}

.image-task-complete-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.task-image-completed-placeholder p {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
}

/* 提示词显示区域 */
.task-prompt-display {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 15px;
    overflow-y: auto;
    font-size: 0.75rem;
    line-height: 1.5;
}

.task-prompt-display .prompt-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.task-prompt-display .prompt-section {
    background: white;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.task-prompt-display .prompt-section strong {
    display: block;
    color: #4a5568;
    font-size: 0.7rem;
    margin-bottom: 4px;
}

.task-prompt-display .prompt-section p {
    margin: 0;
    color: #2d3748;
    word-break: break-word;
    white-space: pre-wrap;
}

.task-prompt-display::-webkit-scrollbar {
    width: 4px;
}

.task-prompt-display::-webkit-scrollbar-track {
    background: transparent;
}

.task-prompt-display::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 2px;
}

.task-prompt-display::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* 进度覆盖层 */
.task-progress-overlay {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* 播放按钮覆盖层 */
.task-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s;
}

.task-preview:hover .task-play-overlay {
    opacity: 1;
}

.play-button {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #FF9F1C;
    transition: transform 0.2s;
}

.play-button:hover {
    transform: scale(1.1);
}

/* 进度条 - 优化后更显眼 */
.task-progress-bar {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #e2e8f0 0%, #cbd5e0 100%);
    position: relative;
    overflow: hidden;
    border-radius: 0 0 4px 4px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #059669 50%, #10b981 100%);
    background-size: 200% 100%;
    transition: width 0.5s ease;
    position: relative;
    animation: progressGradient 2s ease infinite;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg,
        rgba(255, 255, 255, 0.4) 0%,
        transparent 100%);
    border-radius: 4px 4px 0 0;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.6) 50%,
        transparent 100%);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes progressGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 任务信息 */
.task-info {
    padding: 12px 15px;
    background: #FFF8E1;
    flex-grow: 1;
}

.task-id {
    font-size: 0.75rem;
    color: #718096;
    margin-bottom: 4px;
    font-family: 'Monaco', 'Courier New', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-status {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.task-status.status-queued {
    color: #ed8936;
}

.task-status.status-in_progress {
    color: #F57C00;
}

.task-status.status-completed {
    color: #48bb78;
}

.task-status.status-failed {
    color: #f56565;
}

.task-time {
    font-size: 0.75rem;
    color: #a0aec0;
}

/* 任务操作按钮 */
.task-actions {
    display: flex;
    gap: 8px;
    padding: 0 15px 12px;
    border-top: 1px solid #f7fafc;
    padding-top: 12px;
}

.task-actions-completed {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.task-actions-single {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.task-actions-failed {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.btn-task-action {
    flex: 1;
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    background: #FFF8E1;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-task-action:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    transform: translateY(-1px);
}

.btn-task-action:disabled,
.btn-task-action.is-loading {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
}

.btn-task-action span {
    font-size: 1rem;
}

.task-actions-completed .btn-task-action,
.task-actions-single .btn-task-action,
.task-actions-failed .btn-task-action {
    min-width: 0;
    padding: 10px 6px 9px;
    min-height: 62px;
    flex-direction: column;
    gap: 6px;
    border-radius: 10px;
    font-size: 0.72rem;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.task-actions-completed .btn-task-action:hover,
.task-actions-single .btn-task-action:hover,
.task-actions-failed .btn-task-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
}

.task-actions-completed .btn-task-action strong,
.task-actions-single .btn-task-action strong,
.task-actions-failed .btn-task-action strong {
    font-size: 0.72rem;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.task-actions-completed .btn-task-action span,
.task-actions-single .btn-task-action span,
.task-actions-failed .btn-task-action span {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.task-actions-completed .btn-show-result {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.task-actions-completed .btn-show-result span {
    background: #dbeafe;
    color: #1d4ed8;
}

.task-actions-completed .btn-show-result:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #60a5fa;
    color: #1e40af;
}

.task-actions-completed .btn-view-prompt {
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    border-color: #ddd6fe;
    color: #7c3aed;
}

.task-actions-completed .btn-view-prompt span {
    background: #ede9fe;
    color: #7c3aed;
}

.task-actions-completed .btn-view-prompt:hover {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-color: #a78bfa;
    color: #6d28d9;
}

.btn-show-result:hover {
    border-color: #fb923c;
    color: #ea580c;
}

.btn-view-prompt:hover {
    border-color: #FF9F1C;
    color: #FF9F1C;
}

.task-actions-completed .btn-remove-display {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fcd34d;
    color: #b45309;
}

.task-actions-completed .btn-remove-display span {
    background: #fde68a;
    color: #b45309;
}

.task-actions-completed .btn-remove-display:hover {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
    color: #92400e;
}

.btn-remove-display:hover {
    border-color: #f59e0b;
    color: #f59e0b;
}

.btn-task-detail {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.btn-task-detail span {
    background: #dbeafe;
    color: #1d4ed8;
}

.btn-task-detail:hover {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #60a5fa;
    color: #1e40af;
}

.btn-task-retry {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fcd34d;
    color: #b45309;
}

.btn-task-retry span {
    background: #fde68a;
    color: #b45309;
}

.btn-task-retry:hover {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
    color: #92400e;
}

.btn-task-delete {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fecaca;
    color: #dc2626;
}

.btn-task-delete span {
    background: #fecaca;
    color: #dc2626;
}

.btn-task-delete:hover {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #f87171;
    color: #b91c1c;
}

/* ========== 视频成功弹窗样式 ========== */

.video-success-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    width: 420px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid #e8e8e8;
    z-index: 2000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    padding: 16px 20px;
}

.video-success-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.video-success-toast .toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.video-success-toast .toast-icon {
    width: 24px;
    height: 24px;
    background: #52c41a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
    font-weight: bold;
}

.video-success-toast .toast-text {
    flex: 1;
    line-height: 1.5;
}

.video-success-toast .toast-title {
    font-size: 14px;
    font-weight: 500;
    color: #000;
    margin: 0;
}

.video-success-toast .toast-id {
    font-size: 13px;
    color: #666;
    margin: 2px 0 0 0;
    font-family: 'Monaco', 'Courier New', monospace;
    word-break: break-all;
}

.video-success-toast .toast-id span {
    color: #666;
    font-weight: normal;
}

.video-success-toast .toast-status {
    font-size: 13px;
    color: #666;
    margin: 2px 0 0 0;
}

.video-success-toast .toast-close {
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: #999;
    transition: all 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.video-success-toast .toast-close:hover {
    color: #333;
}

/* 响应式适配 */
@media (max-width: 768px) {
    .video-tasks-list {
        grid-template-columns: 1fr;
    }
    
    .video-success-toast {
        width: calc(100% - 40px);
        right: -100%;
    }
    
    .video-success-toast.show {
        right: 20px;
    }
}

/* ========== 提示词库样式 ========== */

.hidden {
    display: none !important;
}

.prompt-library-entry {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #fbd38d;
    background: linear-gradient(135deg, #fffaf0 0%, #fff7e6 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.75);
}

.prompt-library-entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.prompt-library-entry-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #9c4221;
}

.prompt-library-entry-tip {
    margin: 0;
    font-size: 0.82rem;
    color: #7b341e;
    line-height: 1.65;
}

.prompt-library-open-btn {
    border: none;
    border-radius: 999px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #FFAA00 0%, #FF8800 100%);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(255, 136, 0, 0.22);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.prompt-library-open-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(255, 136, 0, 0.28);
}

.prompt-library-modal {
    position: fixed;
    inset: 0;
    z-index: 3200;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(7px);
}

.prompt-library-dialog {
    width: min(1180px, 100%);
    max-height: 92vh;
    background: #fffaf0;
    border-radius: 22px;
    border: 1px solid #fbd38d;
    box-shadow: 0 25px 70px rgba(15, 23, 42, 0.24);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.prompt-library-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 18px;
    background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
    border-bottom: 1px solid #fde68a;
}

.prompt-library-header h3 {
    margin: 0 0 6px;
    font-size: 1.25rem;
    font-weight: 800;
    color: #7c2d12;
}

.prompt-library-header p {
    margin: 0;
    color: #9a3412;
    font-size: 0.9rem;
}

.prompt-library-close-btn,
.prompt-image-preview-close {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.88);
    color: #9a3412;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(154, 52, 18, 0.12);
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.prompt-library-close-btn:hover,
.prompt-image-preview-close:hover {
    background: #fff;
    transform: scale(1.05);
}

.prompt-library-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 24px 10px;
    background: #fffaf0;
}

.prompt-library-search {
    flex: 1;
    min-width: 0;
    position: relative;
}

.prompt-library-search .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 0.95rem;
}

.prompt-library-search input {
    width: 100%;
    height: 44px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    padding: 0 46px 0 42px;
    font-size: 0.92rem;
    color: #2d3748;
    transition: all 0.2s ease;
}

.prompt-search-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: #fff7ed;
    color: #c05621;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: inset 0 0 0 1px rgba(246, 173, 85, 0.35);
}

.prompt-search-clear-btn:hover {
    background: #fed7aa;
    color: #9c4221;
    transform: translateY(-50%) scale(1.05);
}

.prompt-search-clear-btn:active {
    transform: translateY(-50%) scale(0.96);
}

.prompt-library-search input:focus {
    outline: none;
    border-color: #FF9F1C;
    box-shadow: 0 0 0 3px rgba(255, 159, 28, 0.15);
}

.prompt-library-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.prompt-library-toggle-btn,
.prompt-library-category-btn,
.prompt-copy-btn,
.prompt-use-btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #4a5568;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.prompt-library-toggle-btn {
    width: 44px;
    height: 44px;
    font-size: 1rem;
}

.prompt-library-category {
    position: relative;
}

.prompt-library-category-btn {
    height: 44px;
    min-width: 112px;
    padding: 0 14px;
    font-size: 0.9rem;
}

.prompt-library-toggle-btn:hover,
.prompt-library-category-btn:hover,
.prompt-copy-btn:hover,
.prompt-use-btn:hover {
    border-color: #f6ad55;
    background: #fff7ed;
    color: #c05621;
}

.prompt-library-tabs {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 24px 18px;
    flex-wrap: wrap;
}

.prompt-filter-chip {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #4a5568;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prompt-filter-chip:hover {
    border-color: #f6ad55;
    color: #c05621;
    background: #fff7ed;
}

.prompt-filter-chip.active {
    background: linear-gradient(135deg, #FFAA00 0%, #FF8800 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 20px rgba(255, 136, 0, 0.18);
}

.prompt-library-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 24px 16px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

.prompt-library-content,
.prompt-image-preview-dialog {
    scrollbar-width: thin;
    scrollbar-color: #f6ad55 #fff7ed;
}

.prompt-library-content::-webkit-scrollbar,
.prompt-image-preview-dialog::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.prompt-library-content::-webkit-scrollbar-track,
.prompt-image-preview-dialog::-webkit-scrollbar-track {
    background: #fff7ed;
    border-radius: 999px;
}

.prompt-library-content::-webkit-scrollbar-thumb,
.prompt-image-preview-dialog::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #f6ad55 0%, #ed8936 100%);
    border-radius: 999px;
}

.prompt-library-content::-webkit-scrollbar-thumb:hover,
.prompt-image-preview-dialog::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ed8936 0%, #dd6b20 100%);
}

.prompt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.prompt-card-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
    transition: all 0.25s ease;
}

.prompt-card-item:hover {
    transform: translateY(-4px);
    border-color: #f6ad55;
    box-shadow: 0 16px 30px rgba(245, 158, 11, 0.14);
}

.prompt-card-preview {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
}

.prompt-card-preview .preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
}

.prompt-card-preview .no-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b45309;
    font-size: 0.88rem;
    font-weight: 700;
}

.prompt-card-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px 14px 12px;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.82) 0%, rgba(15, 23, 42, 0.45) 60%, transparent 100%);
    color: #fff;
}

.prompt-card-title {
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.3;
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.prompt-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.prompt-card-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    background: rgba(255,255,255,0.16);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

.prompt-card-tags .mode {
    background: rgba(255, 170, 0, 0.24);
}

.prompt-fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    color: #cbd5e0;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    transition: all 0.2s ease;
}

.prompt-fav-btn:hover {
    transform: scale(1.06);
    color: #f59e0b;
}

.prompt-fav-btn.active {
    color: #f59e0b;
    background: #fff7ed;
}

.prompt-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.prompt-text {
    color: #4a5568;
    font-size: 0.84rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 7.2em;
}

.prompt-footer {
    margin-top: auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
}

.prompt-footer .author {
    color: #a0aec0;
    font-size: 0.76rem;
    font-weight: 600;
    word-break: break-word;
}

.prompt-card-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.prompt-copy-btn,
.prompt-use-btn {
    padding: 8px 10px;
    font-size: 0.78rem;
}

.prompt-use-btn {
    background: linear-gradient(135deg, #FFAA00 0%, #FF8800 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 18px rgba(255, 136, 0, 0.14);
}

.prompt-use-btn:hover {
    background: linear-gradient(135deg, #ffb429 0%, #ff9424 100%);
    color: #fff;
    border-color: transparent;
}

.prompt-loading,
.prompt-empty {
    grid-column: 1 / -1;
    min-height: 280px;
    border: 1px dashed #f6ad55;
    border-radius: 18px;
    background: linear-gradient(135deg, #fffaf0 0%, #fff7ed 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #9c4221;
    text-align: center;
    padding: 24px;
}

.prompt-loading .spinner {
    margin: 0;
}

.prompt-library-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px 24px 20px;
    border-top: 1px solid #fde68a;
    background: #fffdf7;
}

.prompt-library-category-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    max-height: 280px;
    overflow-y: auto;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid #fbd38d;
    background: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
    z-index: 12;
}

.prompt-category-item {
    padding: 9px 10px;
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prompt-category-item:hover {
    background: #fff7ed;
    color: #c05621;
}

.prompt-image-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 3300;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.prompt-image-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
}

.prompt-image-preview-dialog {
    position: relative;
    z-index: 1;
    width: min(1000px, 100%);
    max-height: 92vh;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    border-radius: 22px;
    background: #fff;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.3);
}

.prompt-image-preview-media {
    background: #111827;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 0;
    padding: 20px;
}

.prompt-image-preview-media img {
    max-width: 100%;
    max-height: none;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    display: block;
}

.prompt-image-preview-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
}

.prompt-image-preview-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    background: linear-gradient(180deg, #fffaf0 0%, #fff 100%);
}

.prompt-image-preview-title-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prompt-image-preview-title-row h4 {
    margin: 0;
    font-size: 1.15rem;
    color: #7c2d12;
    font-weight: 800;
}

.prompt-image-preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.prompt-image-preview-info p {
    margin: 0;
    color: #4a5568;
    font-size: 0.92rem;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 900px) {
    .prompt-library-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .prompt-library-actions {
        justify-content: space-between;
    }

    .prompt-grid {
        grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    }

    .prompt-image-preview-dialog {
        grid-template-columns: 1fr;
    }

    .prompt-image-preview-media {
        min-height: 280px;
    }
}

@media (max-width: 640px) {
    .prompt-library-modal,
    .prompt-image-preview-modal {
        padding: 14px;
    }

    .prompt-library-header,
    .prompt-library-toolbar,
    .prompt-library-tabs,
    .prompt-library-content,
    .prompt-library-pagination,
    .prompt-image-preview-info {
        padding-left: 16px;
        padding-right: 16px;
    }

    .prompt-library-entry-header {
        flex-direction: column;
        align-items: stretch;
    }

    .prompt-library-open-btn {
        width: 100%;
    }

    .prompt-grid {
        grid-template-columns: 1fr;
    }

    .prompt-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .prompt-card-actions {
        width: 100%;
    }

    .prompt-copy-btn,
    .prompt-use-btn {
        flex: 1;
    }
}

/* ===== 批量页参考图样式覆盖 ===== */
.batch-empty-state-board {
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(360px, 0.95fr);
    gap: 24px;
    align-items: stretch;
    padding: 26px;
    border-radius: 22px;
    border: 2px dashed #ffb347;
    background: linear-gradient(135deg, rgba(255, 248, 225, 0.96) 0%, rgba(255, 243, 205, 0.92) 100%);
    box-shadow: 0 18px 38px rgba(255, 170, 0, 0.12);
}

.batch-empty-state-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 8px 4px;
}

.batch-empty-badge {
    width: fit-content;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: #c05621;
    border: 1px solid #f6ad55;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(246, 173, 85, 0.16);
}

.batch-empty-state-main h3 {
    margin: 0;
    color: #7c2d12;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.25;
}

.batch-empty-state-main p {
    margin: 0;
    color: #8b5e34;
    font-size: 0.96rem;
    line-height: 1.8;
    max-width: 560px;
}

.batch-empty-state-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.batch-empty-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.batch-empty-preview-card {
    min-height: 248px;
    padding: 20px 18px;
    border-radius: 18px;
    border: 2px dashed #ffb347;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 247, 237, 0.96) 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.batch-empty-preview-card::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    height: 14px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.batch-empty-preview-card strong {
    margin-top: 28px;
    color: #334155;
    font-size: 1rem;
    font-weight: 800;
}

.batch-empty-preview-card span {
    color: #94a3b8;
    font-size: 0.88rem;
    line-height: 1.7;
}

@media (max-width: 900px) {
    .batch-empty-state-board {
        grid-template-columns: 1fr;
    }

    .batch-empty-preview-grid {
        grid-template-columns: 1fr;
    }

    .batch-empty-preview-card {
        min-height: 180px;
    }
}

.batch-field-hidden {
    display: none !important;
}

.batch-page-view {
    gap: 22px;
    margin-bottom: 32px;
}

.batch-top-grid {
    grid-template-columns: minmax(320px, 0.92fr) minmax(420px, 1.4fr);
    gap: 20px;
    align-items: stretch;
}

.batch-config-card,
.batch-shared-settings-card {
    min-height: 242px;
    border: 1.5px solid #f4c430;
    background: linear-gradient(180deg, rgba(255, 249, 227, 0.96), rgba(255, 244, 200, 0.92));
    box-shadow: 0 14px 34px rgba(255, 170, 0, 0.12);
}

.batch-config-card .card-body,
.batch-shared-settings-card .card-body {
    display: flex;
    flex-direction: column;
    height: calc(100% - 70px);
}

.batch-shared-settings-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 14px;
}

.batch-shared-settings-grid .input-group {
    margin-bottom: 0;
}

.batch-shared-settings-actions {
    margin-top: 12px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.batch-shared-settings-actions .batch-secondary-btn {
    min-width: 180px;
}

.batch-shared-settings-tip {
    max-width: 520px;
    color: #8b6b2f;
    line-height: 1.65;
}

.batch-price-strip {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 22px;
    padding: 16px 22px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(245, 158, 11, 0.2);
    box-shadow: 0 10px 22px rgba(247, 181, 90, 0.08);
}

.batch-price-item {
    color: #4a5568;
    font-size: 0.96rem;
    font-weight: 700;
    white-space: nowrap;
}

.batch-price-item strong {
    color: #2d3748;
}

.batch-toolbar {
    padding: 16px 20px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 18px;
    background: #FFF8E1;
    box-shadow: 0 12px 28px rgba(247, 181, 90, 0.11);
    gap: 16px;
}

.batch-toolbar-stats {
    gap: 22px;
    color: #7d8793;
    font-size: 0.98rem;
    font-weight: 600;
}

.batch-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.batch-stat-pill strong {
    color: #ff8a00;
    font-size: 1.22rem;
    font-weight: 800;
}

.batch-stat-pill-running {
    display: none;
}

.batch-toolbar-actions {
    margin-left: auto;
    gap: 12px;
}

#addBatchTaskBtn {
    display: none !important;
}

.batch-toolbar-actions .batch-primary-btn,
.batch-toolbar-actions .batch-secondary-btn {
    min-width: 150px;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 0.98rem;
    font-weight: 800;
    box-shadow: none;
}

#stopAllBatchTasksBtn {
    background: #f3a39a;
    color: #fff;
    border: none;
}

#stopAllBatchTasksBtn:hover {
    background: #eb8f84;
}

#startAllBatchTasksBtn {
    background: linear-gradient(135deg, #ffd591 0%, #ffc56d 100%);
    color: #fff;
    box-shadow: none;
}

#startAllBatchTasksBtn:hover {
    box-shadow: none;
}

#downloadAllBatchTasksBtn {
    background: #97c8ec;
    color: #fff;
    border: none;
}

#downloadAllBatchTasksBtn:hover {
    background: #84bce6;
}

.batch-tasks-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
}

.batch-task-card,
.batch-add-task-card {
    border-radius: 18px;
    min-height: 360px;
}

.batch-task-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255, 249, 227, 0.96), rgba(255, 244, 200, 0.92));
    border: 1.5px solid #f4c430;
    box-shadow: 0 14px 34px rgba(255, 170, 0, 0.12);
}

.batch-task-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 0;
    padding: 18px 18px 14px;
    background: #FFF8E1;
    border-bottom: 1px solid rgba(244, 196, 48, 0.24);
}

.batch-task-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.batch-task-title {
    margin: 0;
    color: #23354d;
    font-size: 1.05rem;
    font-weight: 800;
}

.batch-task-header-right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.batch-task-status {
    width: auto;
    padding: 6px 14px;
    border-radius: 999px;
    border: none;
    background: #eef2f3;
    color: #8a929c;
    font-size: 0.82rem;
    font-weight: 800;
}

.batch-task-status.status-idle {
    background: #eef2f3;
    color: #7f8c8d;
}

.batch-task-status.status-running {
    background: #fff0bf;
    color: #c77600;
}

.batch-task-status.status-success {
    background: #dcfce7;
    color: #15803d;
}

.batch-task-status.status-error {
    background: #ffe4e6;
    color: #e11d48;
}

.batch-task-status.status-interrupted {
    background: #e2e8f0;
    color: #4a5568;
}

.batch-task-remove-btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 999px;
    background: #ef5b45;
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    box-shadow: none;
}

.batch-task-remove-btn:hover {
    background: #e14b34;
    transform: none;
}

.batch-task-main {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 18px 18px;
    flex: 1;
}

.batch-task-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 0;
    min-height: 0;
}

.batch-task-preview-item {
    position: relative;
    width: 58px;
    height: 58px;
    border-radius: 12px;
    background: transparent;
    overflow: visible;
}

.batch-task-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 12px;
    border: 1px solid #dbe3ee;
    background: #fff;
}

.batch-task-preview-empty {
    display: none;
}

.batch-task-preview-placeholder-icon,
.batch-task-preview-placeholder-text {
    display: none;
}

.batch-task-preview-remove {
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #ef5b45;
    color: #fff;
    font-size: 12px;
    box-shadow: 0 4px 8px rgba(239, 91, 69, 0.24);
}

.batch-task-preview-badge {
    display: none;
}

.batch-task-hidden-tools {
    display: none !important;
}

.batch-task-result-panel {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.batch-task-upload-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

.batch-file-upload-label {
    min-height: 106px;
    border: 2px dashed #cbd5e0;
    border-radius: 18px;
    background: #f7fafc;
    color: #718096;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
    padding: 18px 22px;
    transition: all 0.2s ease;
}

.batch-file-upload-label:hover {
    border-color: #FF9F1C;
    background: #FFF3E0;
    color: #E65100;
}

.batch-file-upload-label.is-disabled,
.batch-file-upload-label.is-disabled:hover {
    cursor: not-allowed;
    opacity: 0.72;
    border-color: #cbd5e0;
    background: #f7fafc;
    color: #718096;
}

.batch-task-url-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.batch-task-url-input {
    min-height: 70px !important;
    height: 70px !important;
    resize: vertical;
    padding: 12px 14px !important;
    border-radius: 16px;
    border-color: #d7dce5 !important;
    background: #fff8dc !important;
    color: #6b7280;
    box-shadow: none !important;
}

.batch-task-url-input:focus {
    border-color: #f0b35a !important;
    box-shadow: 0 0 0 3px rgba(240, 179, 90, 0.18) !important;
}

.batch-task-url-load-btn {
    width: 100%;
    min-height: 52px;
    border: none;
    border-radius: 14px;
    background: #dbe3f0;
    color: #5f6c80;
    font-size: 0.96rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.2s ease;
}

.batch-task-url-load-btn:hover:not(:disabled) {
    background: #cfd9eb;
}

.batch-task-url-load-btn:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.batch-task-result-shell {
    min-height: 360px;
    padding: 12px;
    border-radius: 14px;
    border: 1.5px solid rgba(244, 196, 48, 0.55);
    background: rgba(255, 251, 235, 0.7);
}

.batch-task-result-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.batch-task-result-title {
    margin: 0;
    color: #7d8793;
    font-size: 0.9rem;
    font-weight: 800;
}

.batch-result-counter {
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef2f7;
    color: #718096;
    border: none;
    font-size: 0.78rem;
    font-weight: 800;
}

.batch-task-results {
    min-height: 290px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.batch-task-empty-state {
    min-height: 290px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: #9aa5b1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 18px;
    font-size: 1rem;
    line-height: 1.7;
}

.batch-task-empty-state .empty-icon {
    font-size: 3rem;
    line-height: 1;
}

.batch-task-empty-state .empty-text {
    font-size: 0.98rem;
    font-weight: 700;
}

.batch-task-message {
    margin: 0;
    min-height: 20px;
    color: #8b98a7;
    font-size: 0.8rem;
    line-height: 1.6;
}

.batch-task-message.is-error {
    color: #e11d48;
}

.batch-task-prompt {
    min-height: 104px;
    margin: 0;
    padding: 14px 16px !important;
    border: 1.5px solid rgba(240, 179, 90, 0.48) !important;
    border-radius: 16px !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 249, 235, 0.98) 100%) !important;
    color: #000;
    font-size: 0.94rem !important;
    line-height: 1.7;
    resize: vertical;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92), 0 10px 24px rgba(255, 170, 0, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.batch-task-prompt::placeholder {
    color: #b08968;
}

.batch-task-prompt:hover:not(:disabled) {
    border-color: rgba(240, 179, 90, 0.82) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 248, 225, 1) 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.96), 0 14px 28px rgba(255, 170, 0, 0.12);
}

.batch-task-prompt:focus {
    outline: none;
    border-color: #f59e0b !important;
    background: linear-gradient(180deg, #fffefb 0%, #fff7e8 100%) !important;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.16), 0 16px 30px rgba(255, 170, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.98) !important;
}

.batch-task-prompt:disabled {
    cursor: not-allowed;
    color: #9c8b75;
    border-color: rgba(203, 213, 224, 0.9) !important;
    background: linear-gradient(180deg, rgba(249, 250, 251, 0.92) 0%, rgba(243, 244, 246, 0.96) 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.batch-task-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.batch-task-settings-grid .input-group {
    margin-bottom: 0;
}

.batch-task-settings-grid .input-group label {
    display: none;
}

.batch-task-actions {
    margin-top: 0;
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
}

.batch-task-actions button {
    min-width: 0;
    flex: 1;
    padding: 7px 10px;
    font-size: 0.9rem;
    line-height: 1.2;
    border-radius: 10px;
}

.batch-task-actions .batch-primary-btn,
.batch-task-actions .batch-secondary-btn {
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.batch-task-actions .batch-primary-btn {
    background: linear-gradient(180deg, #ffbf40 0%, #ff9b05 100%);
    color: #fff;
    border: none;
    text-shadow: 0 1px 0 rgba(156, 79, 0, 0.18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        inset 0 0 0 1px rgba(206, 113, 10, 0.58),
        inset 0 -1px 0 rgba(168, 83, 0, 0.24),
        0 6px 14px rgba(255, 152, 0, 0.18);
}

.batch-task-actions .batch-secondary-btn {
    border: none;
}

.batch-task-actions > button:first-child {
    background: linear-gradient(180deg, #fff9ee 0%, #ffe9c7 100%);
    color: #b86310;
    border: 1px solid rgba(226, 139, 36, 0.78);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        inset 0 -1px 0 rgba(219, 143, 41, 0.18),
        0 5px 12px rgba(245, 158, 11, 0.1);
}

.batch-task-actions > button:last-child {
    background: linear-gradient(180deg, #87ccfb 0%, #58b1f2 100%);
    color: #fff;
    text-shadow: 0 1px 0 rgba(28, 92, 140, 0.2);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 0 0 1px rgba(46, 125, 189, 0.54),
        inset 0 -1px 0 rgba(30, 101, 157, 0.22),
        0 6px 14px rgba(66, 153, 225, 0.16);
}

.batch-task-actions .batch-primary-btn:hover:not(:disabled),
.batch-task-actions .batch-secondary-btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.batch-task-actions .batch-primary-btn:hover:not(:disabled) {
    background: linear-gradient(180deg, #ffc64f 0%, #ffa415 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.42),
        inset 0 0 0 1px rgba(194, 101, 0, 0.66),
        inset 0 -1px 0 rgba(154, 74, 0, 0.28),
        0 8px 16px rgba(255, 152, 0, 0.24);
}

.batch-task-actions > button:first-child:hover:not(:disabled) {
    background: linear-gradient(180deg, #fff5e2 0%, #ffe1ae 100%);
    color: #a45100;
    border-color: rgba(214, 126, 24, 0.9);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        inset 0 -1px 0 rgba(212, 126, 24, 0.24),
        0 8px 16px rgba(245, 158, 11, 0.16);
}

.batch-task-actions > button:last-child:hover:not(:disabled) {
    background: linear-gradient(180deg, #9bd7fd 0%, #67bcf6 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.36),
        inset 0 0 0 1px rgba(34, 112, 174, 0.64),
        inset 0 -1px 0 rgba(24, 91, 147, 0.28),
        0 8px 16px rgba(66, 153, 225, 0.2);
}

.batch-task-actions .batch-primary-btn:active:not(:disabled),
.batch-task-actions .batch-secondary-btn:active:not(:disabled) {
    transform: translateY(0);
}

.batch-task-card .result-group-container {
    margin-bottom: 12px !important;
    border-color: #fde68a !important;
    background: #fffdf8 !important;
    box-shadow: none !important;
}

.batch-task-card .image-grid-container {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

.batch-task-card .generated-image {
    border-radius: 12px;
}

.batch-task-card .btn-result-action {
    margin-top: 0;
    padding: 6px 10px;
    font-size: 0.78rem;
}

.batch-add-task-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border: 2px dashed #ff9a1f;
    background: linear-gradient(180deg, rgba(255, 215, 154, 0.48), rgba(255, 222, 173, 0.34));
    cursor: pointer;
    transition: all 0.22s ease;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.batch-add-task-card:hover {
    transform: translateY(-2px);
    background: linear-gradient(180deg, rgba(255, 215, 154, 0.6), rgba(255, 222, 173, 0.42));
}

.batch-add-task-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: #ff8a00;
    text-align: center;
}

.batch-add-task-icon {
    font-size: 4.2rem;
    line-height: 1;
    font-weight: 300;
}

.batch-add-task-text {
    font-size: 1rem;
    font-weight: 800;
}

@media (max-width: 1280px) {
    .batch-top-grid {
        grid-template-columns: 1fr;
    }

    .batch-tasks-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .batch-shared-settings-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .batch-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .batch-toolbar-actions {
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
    }

    .batch-toolbar-actions .batch-primary-btn,
    .batch-toolbar-actions .batch-secondary-btn {
        flex: 1;
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .batch-price-strip {
        justify-content: flex-start;
        gap: 12px;
        padding: 14px 16px;
    }

    .batch-tasks-grid {
        grid-template-columns: 1fr;
    }

    .batch-task-preview-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .batch-task-upload-layout,
    .batch-task-settings-grid,
    .batch-shared-settings-grid {
        grid-template-columns: 1fr;
    }

    .batch-task-actions {
        flex-wrap: wrap;
    }
}

/* ===== 批量任务卡上传区对齐优化（匹配原页面图2风格） ===== */
.batch-task-upload-grid {
    align-items: stretch;
}

.batch-file-upload-label {
    min-height: 92px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
}

.batch-file-upload-label .upload-icon {
    margin-bottom: 0;
    font-size: 1.5rem;
    line-height: 1;
}

.batch-upload-text {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.1;
}

.batch-task-url-input-wrapper {
    min-height: 92px;
    height: 92px;
    gap: 4px;
}

.batch-task-url-input {
    flex: 1;
    min-height: 0 !important;
    height: auto !important;
    padding: 10px 10px !important;
    line-height: 1.4;
}

.batch-task-url-load-btn {
    flex-shrink: 0;
    min-height: 26px;
    height: 26px;
    font-size: 0.82rem;
    line-height: 1;
    border-radius: 10px;
}
