/* AI提示词工作台专用样式 - 仅包含工作台特有样式，通用样式在 style.css */

/* ===== 工作台布局 ===== */
.workbench {
    padding: 10px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.workbench-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* ===== 模式切换 ===== */
.mode-switch {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e8e8e8;
    padding: 20px;
    gap: 12px;
    justify-content: center;
}

.mode-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    border: none;
    background: #fff;
    color: #666;
    font-size: 15px;
    font-weight: 500;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

.mode-btn.active {
    background: #1e9fff;
    color: #fff;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.xiaohongshu-notice {
    background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
    color: #fff;
    padding: 16px 24px;
    margin: 20px 30px 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}


.xiaohongshu-generate {
    background: linear-gradient(135deg, #3B82F6 0%, rgba(79, 156, 255, 0.69) 100%) !important;
}

.xiaohongshu-btn {
    background: linear-gradient(135deg, #3B82F6 0%, rgba(79, 156, 255, 0.69) 100%) !important;
}



/* ===== 工作台网格布局 ===== */
.mode-content {
    padding: 0px 10px;
}

/* ===== 链接解析卡片 ===== */
.link-parser-card {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
    overflow: hidden;
}



.link-parser-card .card-header i {
    font-size: 18px;
}

.link-parser-card .card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.link-parser-card .card-body {
    padding: 20px;
}

.link-input-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.link-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.link-input:focus {
    outline: none;
    border-color: #667eea;
}

.parse-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #3B82F6 0%, rgba(79, 156, 255, 0.69) 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    white-space: nowrap;
}

.parse-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.parse-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.parsed-images {
    min-height: 20px;
}
/* ===== 对比区域样式 ===== */
.comparison-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.comparison-section .upload-card,
.comparison-section .result-card {
    min-height: 400px;
}
.parsed-images-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
}

.parsed-image-item {
    position: relative;
    width: calc(20% - 10px);
    aspect-ratio: 1;
    max-width: 150px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
}

.parsed-image-item:hover {
    border-color: #3B82F6;
    transform: scale(1.05);
}

.parsed-image-item.selected {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.parsed-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.parsed-image-item .select-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(102, 126, 234, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.parsed-image-item:hover .select-overlay,
.parsed-image-item.selected .select-overlay {
    opacity: 1;
}

.parsed-image-item .select-overlay i {
    color: #fff;
    font-size: 24px;
}

.workbench-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

/* ===== 卡片组件 ===== */
.upload-card,
.result-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.card-header {
    background:linear-gradient(135deg, #60a5fa 0%, rgba(79, 156, 255, 0.69) 100%);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
}
.points-balance-bar{
    background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%); color: white;
    padding: 15px 20px; margin: auto; margin-bottom:10px;max-width: 1200px;display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4px 15px rgba(59,130,246,0.3);
}
.card-body {
    padding: 20px;
    display: flex;
    align-items: center;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
}

.card-bodys {
    padding: 20px;
}


/* ===== 上传区域 ===== */
.upload-area {
    border: 2px dashed #d9d9d9;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fafafa;
}

.upload-area:hover {
    border-color: #3B82F6;
    background: #f0f5ff;
}

.upload-area.dragover {
    border-color: #1E3A8A;
    background: #e6efff;
}

.upload-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, rgba(79, 156, 255, 0.69) 0%, #3B82F6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
}

.upload-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

.upload-hint {
    font-size: 13px;
    color: #999;
}

/* ===== 图片预览 ===== */
.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    justify-items: center;
}

/* 单张图片时的样式 */
.image-preview:has(.preview-item:only-child) {
    grid-template-columns: 1fr;
}

.image-preview:has(.preview-item:only-child) .preview-item {
    max-width: 300px;
    width: 100%;
    max-height: 300px;
    height: auto;
    aspect-ratio: unset;
}

.preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

/* 单张图片时的图片样式 */
.image-preview:has(.preview-item:only-child) .preview-item img {
    object-fit: contain;
    background: #f8f9fa;
}

.preview-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s;
}

.preview-remove:hover {
    background: rgba(255, 0, 0, 0.8);
}

/* ===== 结果展示区域 ===== */
.result-placeholder {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #999;
    text-align: center;
    padding: 40px 20px;
}

.result-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #ddd;
}

.result-placeholder p {
    font-size: 16px;
    margin-bottom: 8px;
}

.result-placeholder span {
    font-size: 13px;
    color: #bbb;
}

.result-card-fixed {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
}

.card-body-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.card-footer-fixed {
    flex-shrink: 0;
    padding: 15px 20px;
    border-top: 1px solid #e8e8e8;
    background: #fff;
    text-align: center;
    margin: 10px;
}

.result-content {
    background: #f8f9fa;
    border-radius: 8px;
}

.result-text {
    font-size: 14px;
    line-height: 1.8;
    color: #333;
}

/* 提示词结果样式 */
.prompt-result {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 16px;
}

.prompt-result:last-child {
    margin-bottom: 0;
}

/* 最终提示词的特别样式 */
.prompt-final {
    background: linear-gradient(135deg, #1f9eff 0%, #3b82f7 100%);
    border-radius: 12px;
    padding: 20px;
}

.prompt-final .prompt-label {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.prompt-final .prompt-text {
    color: #fff;
    font-size: 12px;
}

.prompt-editable {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin-top: 12px;
}

.prompt-editable .prompt-label {
    color: #1E3A8A;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.prompt-text-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.prompt-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s;
    box-sizing: border-box;
    height: 260px;
}

.prompt-textarea:focus {
    outline: none;
    border-color: #3B82F6;
}

.update-prompt-btn {
    align-self: flex-end;
    padding: 8px 20px;
    background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.update-prompt-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.prompt-label {
    font-size: 16px;
    font-weight: 600;
    color: #1E3A8A;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3B82F6;
}

.prompt-text {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
    text-align: justify;
}

.result-text h4 {
    color: #1E3A8A;
    font-size: 15px;
    margin: 16px 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e8e8e8;
}

.result-text h4:first-child {
    margin-top: 0;
}

.result-text p {
    margin: 8px 0;
    padding-left: 12px;
    border-left: 3px solid #3B82F6;
}

/* 完整返回内容样式 */
.full-response {
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.suggestion {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-left: 4px solid #2196f3;
    border-radius: 8px;
    padding: 15px;
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.6;
    color: #1976d2;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: linear-gradient(135deg, #1E3A8A 0%, #3B82F6 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);

}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    animation: none;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

.generate-image-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    margin-left: 12px;
}
.generate-image-btns {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: linear-gradient(135deg, #fe0000 0%, #de750a 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    margin-left: 12px;
}
.generate-image-btnss{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: linear-gradient(135deg, #fe0000 0%, #de750a 100%);
    color: #fff;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
    margin-left: 12px;
}
#generateImageBtnNormal{
animation: float 2s ease-in-out infinite;}

.generate-image-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.generated-image-section {
    margin-top: 20px;
}

/* ===== 生成按钮区域 ===== */
.generate-section {
    text-align: center;
    padding: 0px 0 20px;
}

.generate-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 48px;
    background: linear-gradient(135deg, #3B82F6 0%, #3B82F6 100%);
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.generate-btn:disabled {
    background: #bfbfbf;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
#scenePromptTextarea{
    color: white;
}
#imageTextTextarea{
    color: white;
}
/* ===== 响应式设计 - 移动端适配 ===== */
@media (max-width: 768px) {
    .generate-image-btnss{
        display: none;
    }
    .card-body-scrollable{
        padding: 5px;
    }
    #scenePromptTextarea{
        color: black !important;
        border: 1px solid #a8a8a8;
    }
    #imageTextTextarea{
        color: black !important;
        border: 1px solid #a8a8a8;
    }
    .prompt-final{
        background: white;
        color: #000000;
        border-bottom-color: rgb(100 100 100 / 30%);
    }
    .workbench {
        padding: 10px 5px;
    }
    .prompt-result{
        color: black;
    }
    .prompt-final .prompt-label{
        color: black;
    }
    .comparison-section{
        display: flex;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        margin-bottom: 30px;
        justify-content: center;
        flex-direction: column;
    }
    .mode-switch {
        padding: 15px;
        gap: 10px;
        flex-direction: column;
    }
    
    .mode-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 14px;
    }
    .comparison-section .upload-card, .comparison-section .result-card{
        min-height:auto;
    }
    
    .mode-content {
        padding: 0px;
    }
    
    .workbench-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .upload-card,
    .result-card {
        border-radius: 8px;
    }
    
    .card-header {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .upload-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .upload-text {
        font-size: 14px;
    }
    
    .image-preview {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .result-placeholder {
        min-height: 200px;
        padding: 20px;
    }
    
    .result-placeholder i {
        font-size: 36px;
    }
    
    .result-content {

    }
    
    .result-text {
        font-size: 13px;
    }
    
    .result-text h4 {
        font-size: 14px;
    }
    
    .copy-btn {
        width: 50%;
        justify-content: center;
        padding: 10px 1px;
        font-size: 15px;
    }
    
    .generate-section {
        padding: 0px 0 10px;
    }
    
    .generate-btn {
        width: 70%;
        justify-content: center;
        padding: 14px 30px;
        font-size: 15px;
    }
    
    .xiaohongshu-notice {
        margin: 15px 15px 0;
        padding: 12px 15px;
        font-size: 13px;
    }
}

/* ===== 平板设备适配 ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    .workbench-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    #imageGenerateSection{
        display: none;
    }
    .mode-switch {
        flex-direction: row;
    }
    
    .mode-btn {
        flex: 1;
    }
}

/* ===== 图片比例选择器 ===== */
.aspect-ratio-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.aspect-ratio-btn {
    padding: 8px 16px;
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s;
}

.aspect-ratio-btn:hover {
    border-color: #3B82F6;
    background: #f0f5ff;
}

.aspect-ratio-btn.active {
    background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
    border-color: #3B82F6;
    color: #fff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}



#generatedImageCard .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

#generatedImagePlaceholder {
    text-align: center;
    color: #999;
}

#generatedImagePlaceholder i {
    font-size: 48px;
    margin-bottom: 16px;
    color: #ddd;
}

#generatedImagePlaceholder p {
    font-size: 16px;
    margin-bottom: 8px;
}

/* ===== 模态框关闭按钮样式 ===== */
.image-preview-modal .modal-close:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    transform: scale(1.1);
}

.image-preview-modal .modal-close:active {
    transform: scale(0.95);
}
