/* 文生图增强样式 */

/* 模式切换按钮 */
.mode-switch {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 12px;
}

.mode-btn {
    padding: 10px 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6b7280;
}

.mode-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.mode-btn.active {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* 提示词样式 */
.prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.char-count {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

textarea {
    font-family: inherit;
}

textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.prompt-suggestions {
    margin: 12px 0;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid #6366f1;
}

.prompt-suggestions:first-of-type {
    margin-top: 20px;
}

/* 电商提示词容器 - 与输入框宽度一致 */
.ecommerce-prompts-container {
    width: 100%;
    margin-top: 16px;
}

.prompt-section {
    margin-bottom: 24px;
}

.prompt-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

/* 折叠/展开样式 - Google简约风格 */
.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 0;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
}

.collapsible-header:hover {
    background: #f1f3f4;
    border-color: #dadce0;
}

.collapse-icon {
    font-size: 14px;
    color: #5f6368;
    transition: transform 0.2s ease;
    display: inline-block;
}

.collapsible-content {
    margin-top: 12px;
    animation: slideDown 0.3s ease;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.prompt-suggestions-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

/* 紧凑排列模式 - 电商类目 */
.prompt-suggestions.compact {
    flex: 0 0 calc(25% - 9px);
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* 创意高频提示词 - 平铺展示，与导航栏宽度一致 */
.prompt-suggestions.creative-highlights {
    flex: 0 0 100% !important;
    max-width: 100%;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e0e0e0;
}

/* 创意高频的chips按钮平铺布局 */
.prompt-suggestions.creative-highlights .suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    justify-content: flex-start;
}

.prompt-suggestions.creative-highlights .chip {
    flex: 0 1 auto;
    white-space: nowrap;
    font-size: 13px;
    padding: 8px 16px;
}

/* 创意场景 - 无外框平铺展示 */
.creative-flat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    padding: 12px 0;
}

.creative-flat-chips .chip {
    flex: 0 1 auto;
    white-space: nowrap;
    font-size: 14px;
    padding: 10px 18px;
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 24px;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.2s ease;
}

.creative-flat-chips .chip:hover {
    background: #f8f9fa;
    border-color: #1a73e8;
    color: #1a73e8;
}

.prompt-suggestions.compact:hover {
    border-color: #1a73e8;
    box-shadow: 0 2px 4px rgba(26, 115, 232, 0.15);
    transform: translateY(-1px);
}

.prompt-suggestions.compact .suggestion-label {
    font-size: 15px;
    font-weight: 500;
    color: #202124;
    margin-bottom: 12px;
    line-height: 1.5;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.prompt-suggestions.compact .suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.prompt-suggestions.compact .chip {
    font-size: 14px;
    padding: 10px 18px;
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 24px;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex: 0 0 auto;
    font-weight: 400;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-shadow: none;
}

.prompt-suggestions.compact .chip:hover {
    background: #f8f9fa;
    border-color: #1a73e8;
    color: #1a73e8;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.prompt-suggestions.compact .chip:active {
    background: #e8f0fe;
    transform: scale(0.98);
}

@media (max-width: 1200px) {
    .prompt-suggestions.compact {
        flex: 0 0 calc(33.333% - 8px);
    }
}

@media (max-width: 768px) {
    .prompt-suggestions.compact {
        flex: 0 0 calc(50% - 6px);
    }
}

@media (max-width: 480px) {
    .prompt-suggestions.compact {
        flex: 0 0 100%;
    }
}

.suggestion-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 6px 12px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4b5563;
    white-space: nowrap;
}

.chip:hover {
    border-color: #6366f1;
    background: #f0f4ff;
    color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

/* 批量导入样式 */
.batch-header {
    margin-bottom: 20px;
}

.batch-header h3 {
    margin-bottom: 8px;
    color: #1f2937;
}

.batch-header p {
    color: #6b7280;
    font-size: 14px;
}

.batch-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-secondary {
    padding: 10px 16px;
    background: white;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #374151;
}

.btn-secondary:hover {
    border-color: #6366f1;
    background: #f0f4ff;
    color: #6366f1;
}

.btn-secondary.btn-danger {
    border-color: #f87171;
    color: #dc2626;
}

.btn-secondary.btn-danger:hover {
    border-color: #dc2626;
    background: #fef2f2;
    color: #b91c1c;
}

.file-preview {
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

/* 结果网格 - 增强选择功能 */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.results-controls {
    display: flex;
    gap: 8px;
}

.btn-select-all,
.btn-cancel-select,
.btn-download-all {
    padding: 8px 16px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4b5563;
}

.btn-select-all:hover,
.btn-cancel-select:hover {
    border-color: #6366f1;
    background: #f0f4ff;
    color: #6366f1;
}

.btn-download-all {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

.btn-download-all:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-download-all:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 结果项目样式 */
.result-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.result-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.result-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.result-wrapper img,
.result-wrapper video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.result-checkbox {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 4px;
    padding: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-checkbox input[type="checkbox"] {
    width: 100%;
    height: 100%;
    cursor: pointer;
    accent-color: #6366f1;
}

.result-actions {
    display: flex;
    gap: 6px;
    padding: 8px;
    background: white;
    justify-content: center;
}

.result-actions button {
    flex: 1;
    padding: 6px 12px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #374151;
}

.result-actions .btn-download {
    color: #059669;
    border-color: #059669;
}

.result-actions .btn-download:hover {
    background: #f0fdf4;
}

.result-actions .btn-preview {
    color: #2563eb;
    border-color: #2563eb;
}

.result-actions .btn-preview:hover {
    background: #eff6ff;
}

/* 批量进度条 */
.batch-progress {
    margin: 20px 0;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.progress-header span {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* 标签提示 */
.label-hint {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 400;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mode-switch {
        flex-direction: column;
    }
    
    .batch-controls {
        flex-direction: column;
    }
    
    .btn-secondary {
        width: 100%;
    }
    
    .results-controls {
        width: 100%;
        flex-direction: column;
    }
    
    .results-controls button {
        width: 100%;
    }
    
    .suggestion-chips {
        flex-direction: column;
    }
    
    .chip {
        width: 100%;
        justify-content: center;
    }
}

/* 数量输入框 - Google风格 */
.number-input-group {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 1px solid #dadce0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.number-input-group:hover {
    border-color: #bdc1c6;
}

.number-input-group:focus-within {
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.number-input-group input {
    flex: 1;
    padding: 10px 8px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    border: none;
    background: transparent;
    color: #202124;
    min-width: 50px;
    max-width: 60px;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.number-input-group input:focus {
    outline: none;
}

.number-input-group input::-webkit-outer-spin-button,
.number-input-group input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.number-input-group input[type=number] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.btn-decrease,
.btn-increase {
    padding: 0;
    width: 36px;
    height: 40px;
    background: #f8f9fa;
    border: none;
    font-size: 18px;
    font-weight: 400;
    color: #5f6368;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    flex-shrink: 0;
}

.btn-decrease:hover,
.btn-increase:hover {
    background: #e8eaed;
    color: #202124;
}

.btn-decrease:active,
.btn-increase:active {
    background: #dadce0;
    transform: scale(0.95);
}

.btn-decrease {
    border-right: 1px solid #e8eaed;
}

.btn-increase {
    border-left: 1px solid #e8eaed;
}

/* 动画 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-item {
    animation: slideIn 0.3s ease;
}

