/* ===== AI详情页 - 左侧面板样式 ===== */
.dp-section {
    margin-bottom: 18px;
}
.dp-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--sr-color-text);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.dp-section-title .dp-sub {
    font-size: 12px;
    font-weight: 400;
    color: var(--sr-color-text-muted);
}

/* 商品原图上传 */
.dp-upload-area {
    border: 2px dashed var(--sr-color-border);
    border-radius: 10px;
    padding: 18px 16px;
    text-align: center;
    background: #fafbfc;
    transition: all 0.2s;
}
.dp-upload-area:hover {
    border-color: var(--sr-color-primary);
    background: #f5f3ff;
}
.dp-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border: 1.5px solid var(--sr-color-primary);
    border-radius: 8px;
    background: #fff;
    color: var(--sr-color-primary);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.dp-upload-btn:hover {
    background: var(--sr-color-primary);
    color: #fff;
}
.dp-upload-btn svg {
    width: 16px;
    height: 16px;
}
.dp-upload-hint {
    font-size: 12px;
    color: var(--sr-color-text-muted);
    margin-top: 8px;
}
.dp-image-list {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.dp-image-item {
    width: 76px;
    height: 76px;
    border-radius: 8px;
    overflow: hidden;
    border: 1.5px solid var(--sr-color-border);
    position: relative;
}
.dp-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dp-image-item .dp-img-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    border: none;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
}

/* Chip 组 */
.dp-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.dp-chip {
    padding: 5px 14px;
    border: 1.5px solid var(--sr-color-border);
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    color: var(--sr-color-text);
    background: #fff;
    transition: all 0.2s;
    user-select: none;
    font-family: inherit;
}
.dp-chip:hover {
    border-color: var(--sr-color-primary);
}
.dp-chip.active {
    border-color: var(--sr-color-primary);
    background: var(--sr-color-primary);
    color: #fff;
}
.dp-chip.selected {
    border-color: var(--sr-color-primary);
    background: #f5f3ff;
    color: var(--sr-color-primary);
}

/* 文本框 */
.dp-textarea {
    width: 100%;
    min-height: 135px;
    padding: 10px 12px;
    border: 1.5px solid var(--sr-color-border);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    color: var(--sr-color-text);
    box-sizing: border-box;
    outline: none;
    background: #fafbfc;
    resize: vertical;
    transition: border-color 0.2s;
}
.dp-textarea:focus {
    border-color: var(--sr-color-primary);
    background: #fff;
}
.dp-textarea::placeholder {
    color: #b0b7c3;
}
.dp-textarea-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.dp-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border: 1.5px solid var(--sr-color-primary);
    border-radius: 16px;
    background: #fff;
    color: var(--sr-color-primary);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    white-space: nowrap;
}
.dp-ai-btn:hover {
    background: var(--sr-color-primary);
    color: #fff;
}
.dp-ai-btn svg {
    width: 14px;
    height: 14px;
}

/* 大按钮 */
.dp-primary-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: inherit;
    margin-top: 4px;
}
.dp-primary-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
.dp-primary-btn svg {
    width: 18px;
    height: 18px;
}

/* 模块策略 */
.dp-strategy-box {
    border: 1.5px solid var(--sr-color-border);
    border-radius: 10px;
    padding: 14px 16px;
    background: #fafbfc;
}
.dp-strategy-item {
    font-size: 13px;
    color: var(--sr-color-text);
    padding: 8px 0;
    border-bottom: 1px solid var(--sr-color-border);
    line-height: 1.6;
}
.dp-strategy-item:last-child {
    border-bottom: none;
}
.dp-strategy-item .dp-strategy-label {
    font-weight: 600;
    color: var(--sr-color-primary);
}

/* 模块内容卡片 */
.dp-module-card {
    background: #f3f4f6;
    border-radius: 10px;
    padding: 14px 16px;
}
#dpModuleContent {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.dp-module-card .dp-module-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--sr-color-text);
    margin-bottom: 6px;
}
.dp-module-card .dp-module-plan {
    font-size: 13px;
    color: var(--sr-color-text-secondary);
    line-height: 1.6;
}

/* 包含模块卡片 */
.dp-module-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.dp-module-card-item {
    border: 1.5px solid var(--sr-color-border);
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    user-select: none;
}
.dp-module-card-item:hover {
    border-color: var(--sr-color-primary);
}
.dp-module-card-item.selected {
    border-color: var(--sr-color-primary);
    background: #f5f3ff;
}
.dp-module-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--sr-color-text);
    margin-bottom: 4px;
}
.dp-module-card-desc {
    font-size: 12px;
    color: var(--sr-color-text-secondary);
    line-height: 1.4;
}
.dp-bottom-bar {
    margin-top: 16px;
    text-align: center;
}
.dp-bottom-bar .dp-primary-btn {
    display: inline-flex;
    width: auto;
    min-width: 200px;
    padding: 12px 28px;
}

/* AI 浮层 */
.dp-ai-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.dp-ai-overlay.show {
    display: flex;
}
.dp-ai-panel {
    background: #fff;
    border-radius: 16px;
    width: 520px;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.dp-ai-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 12px;
    border-bottom: 1px solid var(--sr-color-border);
}
.dp-ai-panel-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--sr-color-text);
    margin: 0;
}
.dp-ai-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f3f4f6;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s;
}
.dp-ai-close:hover {
    background: #e5e7eb;
    color: #333;
}
.dp-ai-panel-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
}
.dp-ai-panel-body .dp-textarea {
    min-height: 180px;
}
.dp-ai-panel-footer {
    padding: 12px 20px 18px;
    border-top: 1px solid var(--sr-color-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.dp-ai-generate-btn {
    padding: 8px 24px;
    border: none;
    border-radius: 8px;
    background: var(--sr-color-primary);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.dp-ai-generate-btn:hover {
    opacity: 0.9;
}
.dp-ai-result {
    margin-top: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--sr-color-text);
    white-space: pre-wrap;
    display: none;
}
.dp-ai-result.show {
    display: block;
}

/* 底部固定按钮条（不随内容滚动） */
.dp-step1-bottom-bar,
.dp-step2-bottom-bar {
    flex-shrink: 0;
    padding: 12px 0;
    border-top: 1px solid #f0f0f0;
    margin-top: 8px;
}
.dp-step1-bottom-bar .dp-primary-btn,
.dp-step2-bottom-bar .dp-primary-btn {
    width: 100%;
}

/* 详情图生成预览网格 */
.dp-result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    width: 100%;
}
.dp-result-card {
    background: #f0f1f3;
    border: 1.5px dashed #d1d5db;
    border-radius: 10px;
    overflow: hidden;
    min-height: 360px;
    display: flex;
    flex-direction: column;
}
.dp-result-card-header {
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dp-result-card-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    min-height: 330px;
}
.dp-result-waiting {
    font-size: 14px;
    color: #9ca3af;
}
.dp-result-progress-wrapper {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
}
.dp-result-progress-status {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    line-height: 1.5;
}
.dp-result-progress-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.dp-result-progress-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}
.dp-result-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 4px;
    transition: width 0.3s;
}
.dp-result-progress-text {
    font-size: 13px;
    font-weight: 600;
    color: #6366f1;
    white-space: nowrap;
    min-width: 40px;
    text-align: right;
}
.dp-result-card-body img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    border-radius: 4px;
}
/* 结果预览弹层 */
.dp-result-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}
.dp-result-overlay.show {
    display: flex;
}
.dp-result-overlay-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.dp-result-overlay-content img {
    display: block;
    max-width: 80vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
}
.dp-result-overlay-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}
.dp-result-overlay-toolbar button {
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    margin-top: 16px;
    margin-left: 12px;
}
.dp-overlay-close-btn {
    background: #f3f4f6;
    color: #374151;
}
.dp-overlay-close-btn:hover {
    background: #e5e7eb;
}
.dp-overlay-download-btn {
    background: var(--sr-color-primary);
    color: #fff;
}
.dp-overlay-download-btn:hover {
    opacity: 0.9;
}
/* 按扭禁用状态 */
.dp-primary-btn.disabled,
.dp-primary-btn:disabled {
    background: #d1d5db !important;
    cursor: not-allowed !important;
    opacity: 0.7;
    pointer-events: none;
}

/* 步骤切换 */
#step2Container {
    display: none;
}
#step2Container.show {
    display: block;
}
#step1Container.hidden {
    display: none;
}
.sr-img-preview{
    background:#fff;
}
    .creditstxt svg {
        margin-bottom: -2px !important;
        margin-right: 0px !important;
    }
/* 移动端响应式 */
@media (max-width: 639px) {
    .dp-result-grid {
        grid-template-columns: repeat(1, 1fr);
    }
    .inspiration-area {
        display: none;
    }
    .inspiration-hero {
        padding: 2px;
    }
}

@keyframes dpSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}