/* ===== 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;
}
    .creditstxt svg {
        margin-bottom: -3px !important;
        margin-right: 0px !important;
    }
/* 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: block;
}
.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-structure-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border: 1.5px solid var(--sr-color-border);
    border-radius: 10px;
    background: #fff;
    margin-bottom: 8px;
    transition: border-color 0.2s;
}
.dp-structure-item:hover {
    border-color: var(--sr-color-primary);
}
.dp-structure-info {
    flex: 1;
    min-width: 0;
    margin-right: 12px;
}
.dp-structure-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--sr-color-text);
    margin-bottom: 3px;
}
.dp-structure-desc {
    font-size: 12px;
    color: var(--sr-color-text-secondary);
    line-height: 1.4;
}
.dp-structure-control {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.dp-structure-btn {
    width: 28px;
    height: 28px;
    border: 1.5px solid var(--sr-color-border);
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sr-color-text);
    transition: all 0.2s;
    padding: 0;
    font-family: inherit;
}
.dp-structure-btn:hover {
    border-color: var(--sr-color-primary);
    color: var(--sr-color-primary);
    background: #f5f3ff;
}
.dp-structure-input {
    width: 48px;
    height: 32px;
    text-align: center;
    border: 1.5px solid var(--sr-color-border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--sr-color-text);
    background: #fafbfc;
    outline: none;
    font-family: inherit;
    -moz-appearance: textfield;
}
.dp-structure-input::-webkit-inner-spin-button,
.dp-structure-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.dp-structure-input:focus {
    border-color: var(--sr-color-primary);
    background: #fff;
}
.dp-structure-total {
    text-align: center;
    font-size: 13px;
    color: var(--sr-color-text-secondary);
    margin-top: 10px;
    padding: 6px 0;
}
.dp-structure-total .warning {
    color: #e74c3c;
    font-weight: 600;
}

/* 爆款风格选择 */
.dp-style-hint {
    font-size: 13px;
    color: var(--sr-color-text-secondary);
    margin-bottom: 10px;
}
.dp-style-hint .count-num {
    font-weight: 600;
    color: var(--sr-color-primary);
}
.dp-style-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.dp-style-card {
    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-style-card:hover {
    border-color: var(--sr-color-primary);
}
.dp-style-card.selected {
    border-color: var(--sr-color-primary);
    background: #f5f3ff;
    box-shadow: 0 0 0 1px var(--sr-color-primary);
}
.dp-style-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--sr-color-text);
    margin-bottom: 4px;
}
.dp-style-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: 380px;
    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 {
    height: 42px;
    padding: 0 24px;
    margin-top: 16px;
    margin-left: 12px;
    box-sizing: border-box;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}
.dp-overlay-close-btn {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.95);
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    transition: all 0.2s;
    z-index: 1;
}
.dp-overlay-close-btn:hover {
    background: #fff;
    color: #ef4444;
    transform: rotate(90deg);
}
.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;
}

/* 生成完成操作按钮 */
.dp-action-bar {
    display: none;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
    padding: 16px 0;
}
.dp-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.dp-action-btn:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}
.dp-action-btn svg {
    width: 18px;
    height: 18px;
}
.dp-download-btn {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
}
.dp-title-btn {
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: #fff;
}
/* 爆款标题浮层网格 */
.dp-title-panel {
    width: 720px;
}
.dp-title-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.dp-title-card {
    border: 1.5px solid var(--sr-color-border);
    border-radius: 10px;
    padding: 14px;
    background: #f9fafb;
}
.dp-title-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--sr-color-text);
    margin-bottom: 6px;
}
.dp-title-card-desc {
    font-size: 12px;
    color: var(--sr-color-text-secondary);
    line-height: 1.5;
}
.dp-copy-title-btn {
    padding: 2px 12px;
    border: 1px solid var(--sr-color-primary);
    border-radius: 12px;
    background: #fff;
    color: var(--sr-color-primary);
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.dp-copy-title-btn:hover {
    background: var(--sr-color-primary);
    color: #fff;
}
.inspiration-note{font-size:12px;color:rgb(153, 153, 153);}
@keyframes dpSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 639px) {
  /* 移动端H5取消设计面板最大高度限制 */
  .design-panel {
    max-height: none !important;
  }
  .inspiration-area {
    display: none;
  }
  .inspiration-header {
    display: none;
  }
  .inspiration-hero {
    max-height: none;
    padding: 2px;
  }
  .dp-result-card-body {
    padding: 5px;
  }
  .dp-result-grid {
    grid-template-columns: 1fr !important;
  }
}