/* 电商制作页面样式 */

/* 主容器 */
.ecommerce-studio-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* 页面头部 */
.ecommerce-studio-header {
    text-align: center;
    margin-bottom: 32px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(43, 109, 229, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 16px;
    border: 1px solid rgba(43, 109, 229, 0.2);
}

.ecommerce-studio-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.ecommerce-studio-title i {
    color: var(--primary-color, #2b6de5);
}

.ecommerce-studio-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* 步骤标签 */
.est-steps-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    background: var(--bg-secondary, #1a1a1a);
    border-radius: 12px;
    padding: 8px;
    border: 1px solid var(--border-color, #2a2a2a);
}

.est-step-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    border: 1px solid transparent;
}

.est-step-tab:hover {
    background: rgba(255, 255, 255, 0.05);
}

.est-step-tab.active {
    background: linear-gradient(135deg, var(--primary-color, #2b6de5), rgba(118, 75, 162, 0.8));
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(43, 109, 229, 0.3);
}

.est-step-number {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.est-step-tab.active .est-step-number {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.est-step-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.est-step-tab.active .est-step-title {
    color: #fff;
    font-weight: 600;
}

@media (max-width: 768px) {
    .est-steps-tabs {
        flex-direction: column;
    }

    .est-step-tab {
        padding: 12px 16px;
    }
}

/* 步骤1布局 */
.est-step1-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 0;
}

/* 顶部对齐，底部也对齐 */
.est-step1-layout.est-align-top {
    align-items: stretch;
}

.est-step1-layout.est-align-top .est-left-panel,
.est-step1-layout.est-align-top .est-right-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 提示词区域自动填充 */
.est-left-panel .est-prompt-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.est-left-panel .est-prompt-section .est-prompt-textarea {
    flex: 1;
    resize: none;
}

/* 全高度区域 */
.est-full-height {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.est-full-area {
    flex: 1;
    min-height: 400px;
    padding: 12px;
}

/* 细节图网格 - 布满整个区域，更大的图片 */
.est-detail-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    height: 100%;
    align-content: start;
    padding: 8px;
}

/* 当只有一张图时，让它更大 */
.est-detail-images-grid:has(> :only-child) {
    grid-template-columns: 1fr;
}

.est-detail-images-grid:has(> :only-child) .est-detail-image-item {
    max-width: 100%;
    aspect-ratio: auto;
    max-height: 500px;
}

.est-detail-image-item {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.est-detail-image-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.est-detail-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.est-detail-image-delete {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255, 0, 0, 0.85);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.est-detail-image-item:hover .est-detail-image-delete {
    opacity: 1;
}

/* 分隔间隔（无线条） */
.est-section-divider {
    height: 0;
    margin: 48px 0;
    border: none;
    background: transparent;
}

/* 简单标题样式（左对齐） */
.est-simple-header {
    text-align: left;
    padding: 0 0 20px 0;
    background: transparent;
    border: none;
    margin-bottom: 0;
}

.est-simple-header .ecommerce-studio-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: block;
}

.est-simple-header .ecommerce-studio-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* 类目选择提示（左对齐） */
.est-category-hint {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 16px;
}

.est-category-line {
    width: 100%;
    height: 0;
    background: transparent;
    margin-bottom: 12px;
    border: none;
}

.est-category-text {
    font-size: 13px;
    color: var(--text-secondary);
    opacity: 0.7;
    margin: 0;
    padding-left: 4px;
}

/* 禁用状态的按钮 */
.ecommerce-studio-btn:disabled,
.ecommerce-studio-btn:disabled:hover {
    background: #444;
    color: #888;
    cursor: not-allowed;
    opacity: 0.6;
}

/* 下方模块新布局 - 更大的间距 */
.est-bottom-module {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 0;
}

.est-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: end;
}

.est-bottom-row-large {
    min-height: 400px;
}

.est-bottom-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.est-bottom-section .ecommerce-studio-form-select {
    width: 100%;
}

.est-bottom-left,
.est-bottom-right {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.est-bottom-right {
    overflow: hidden;
}

.est-bottom-right .est-prompt-display-box {
    flex-shrink: 0;
}

.est-bottom-right .est-prompt-hint {
    flex-shrink: 0;
}

.est-bottom-right .est-prompts-list-inner {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.est-bottom-right .est-prompt-display-box {
    flex-shrink: 0;
}

.est-prompts-list-inner {
    overflow: hidden;
}

.est-prompts-list {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    max-height: none;
    scrollbar-width: 8px;
    scrollbar-color: rgba(255, 255, 255, 0.15) rgba(0, 0, 0, 0.2);
}

/* 自定义滚动条样式 - Webkit浏览器 */
.est-prompts-list::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.est-prompts-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.est-prompts-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.est-prompts-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.est-prompts-list::-webkit-scrollbar-corner {
    background: transparent;
}

.est-prompts-list-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.est-bottom-right .est-prompt-textarea {
    flex: 1;
    resize: none;
}

/* 提示词头部样式 */
.est-prompt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.est-prompt-header .ecommerce-studio-section-title {
    margin: 0;
}

/* 模板显示区域 */
.est-template-display {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 16px;
    max-height: 250px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #ccc;
    flex: 1;
}

.est-placeholder-text {
    color: #666;
    text-align: center;
    padding: 40px 20px;
}

.est-placeholder-text i {
    margin-bottom: 12px;
    display: block;
    font-size: 24px;
}

@media (max-width: 1024px) {
    .est-step1-layout {
        grid-template-columns: 1fr;
    }

}

/* 生成细节图区域 */
.est-generate-detail-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color, #2a2a2a);
}

/* 细节图展示区域 */
.est-detail-images-area {
    background: linear-gradient(145deg, var(--bg-tertiary, #252525), var(--bg-secondary, #1a1a1a));
    border-radius: 12px;
    padding: 16px;
    min-height: 300px;
    max-height: 600px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* 细节图区域全高度 */
.est-detail-images-area.est-full-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 400px;
    max-height: none;
}

/* 上传细节图区域 */
.est-upload-detail-section {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}

/* 细节图网格 */
.est-detail-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.est-detail-image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-secondary, #1a1a1a);
}

.est-detail-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.est-detail-image-item:hover img {
    transform: scale(1.05);
}

.est-detail-image-delete {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.9);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: all 0.2s ease;
}

.est-detail-image-item:hover .est-detail-image-delete {
    opacity: 1;
}

.est-detail-image-delete:hover {
    background: rgba(220, 53, 69, 1);
    transform: scale(1.1);
}

/* 新布局：左右分栏 */
.est-new-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 1024px) {
    .est-new-layout {
        grid-template-columns: 1fr;
    }
}

/* 左侧面板 */
.est-left-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 右侧面板 */
.est-right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 区块样式 */
.ecommerce-studio-section {
    background: var(--bg-secondary, #1a1a1a);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-color, #2a2a2a);
}

.ecommerce-studio-section-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ecommerce-studio-section-title i {
    color: var(--primary-color, #2b6de5);
}

/* 表单样式 */
.ecommerce-studio-product-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ecommerce-studio-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.ecommerce-studio-form-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ecommerce-studio-form-item.full-width {
    grid-column: span 2;
}

.ecommerce-studio-form-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.ecommerce-studio-form-input,
.ecommerce-studio-form-textarea,
.ecommerce-studio-form-select {
    padding: 10px 14px;
    background: var(--bg-tertiary, #252525);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: inherit;
    width: 100%;
}

.ecommerce-studio-form-input:focus,
.ecommerce-studio-form-textarea:focus,
.ecommerce-studio-form-select:focus {
    outline: none;
    border-color: var(--primary-color, #2b6de5);
    box-shadow: 0 0 0 3px rgba(43, 109, 229, 0.15);
}

.ecommerce-studio-form-textarea {
    resize: vertical;
    min-height: 70px;
    line-height: 1.6;
}

.ecommerce-studio-form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* 多图上传区域 */
.est-multi-upload-area {
    border: 2px dashed var(--border-color, #2a2a2a);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s ease;
}

.est-multi-upload-area:hover {
    border-color: var(--primary-color, #2b6de5);
    background: rgba(43, 109, 229, 0.05);
}

.est-upload-trigger {
    text-align: center;
    cursor: pointer;
}

.est-upload-trigger i {
    font-size: 32px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: block;
}

.est-upload-trigger span {
    display: block;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 6px;
}

.est-upload-trigger small {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
}

/* 已上传图片网格 */
.est-uploaded-images {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.est-uploaded-image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color, #2a2a2a);
}

.est-uploaded-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.est-uploaded-image-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(220, 53, 69, 0.9);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.est-uploaded-image-item:hover .est-uploaded-image-delete {
    opacity: 1;
}

/* 提示词架构区域 */
.est-prompt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.est-prompt-badge {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-tertiary, #252525);
    padding: 4px 12px;
    border-radius: 20px;
}

.est-prompt-template-area {
    background: linear-gradient(145deg, var(--bg-tertiary, #252525), var(--bg-secondary, #1a1a1a));
    border-radius: 16px;
    padding: 24px;
    min-height: 250px;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.est-prompt-placeholder {
    text-align: center;
    color: var(--text-secondary);
    padding: 60px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
}

.est-prompt-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    opacity: 0.5;
}

.est-prompt-placeholder p {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 8px;
}

.est-prompt-placeholder small {
    font-size: 12px;
    opacity: 0.5;
}

.est-prompt-content {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-primary);
}

.est-prompt-content .prompt-section {
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.est-prompt-content .prompt-section:last-child {
    margin-bottom: 0;
}

.est-prompt-content .prompt-section-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--primary-color, #2b6de5);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.est-prompt-content .prompt-section-title i {
    font-size: 16px;
}

.est-prompt-content .prompt-section-content {
    color: var(--text-secondary);
    font-size: 13px;
}

/* 模板编辑器 */
.est-template-editor {
    width: 100%;
    min-height: 350px;
    max-height: 450px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.9;
    resize: vertical;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    white-space: pre-wrap;
    word-wrap: break-word;
    transition: all 0.3s ease;
}

.est-template-editor:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.35);
}

.est-template-editor:focus {
    outline: none;
    border-color: var(--primary-color, #2b6de5);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 3px rgba(43, 109, 229, 0.15), 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* 滚动条样式 */
.est-prompt-template-area::-webkit-scrollbar,
.est-template-editor::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.est-prompt-template-area::-webkit-scrollbar-track,
.est-template-editor::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.est-prompt-template-area::-webkit-scrollbar-thumb,
.est-template-editor::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.est-prompt-template-area::-webkit-scrollbar-thumb:hover,
.est-template-editor::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* 规格变量区域 */
.est-variables-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .est-variables-grid {
        grid-template-columns: 1fr;
    }
}

.est-variable-item {
    background: var(--bg-tertiary, #252525);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 10px;
    padding: 12px;
}

.est-variable-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.est-variable-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-secondary, #1a1a1a);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
}

.est-variable-input:focus {
    outline: none;
    border-color: var(--primary-color, #2b6de5);
}

.est-variable-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.est-variables-actions {
    text-align: right;
}

/* 保存按钮区域 */
.est-save-actions {
    text-align: right;
    padding-top: 16px;
    border-top: 1px solid var(--border-color, #2a2a2a);
}

/* 提示词编辑区域 */
.est-prompt-edit-section {
    margin-bottom: 24px;
}

.est-prompt-textarea {
    width: 100%;
    min-height: 200px;
    padding: 16px;
    background: var(--bg-secondary, #1a1a1a);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
}

.est-prompt-textarea:focus {
    outline: none;
    border-color: var(--primary-color, #2b6de5);
    box-shadow: 0 0 0 3px rgba(43, 109, 229, 0.1);
}

.est-prompt-hint {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* 可编辑的提示词textarea样式 */
.est-prompt-textarea-editable {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 10px;
    color: #ccc;
    font-size: 12px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
    transition: all 0.2s ease;
}

.est-prompt-textarea-editable:focus {
    outline: none;
    border-color: var(--primary-color, #2b6de5);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 2px rgba(43, 109, 229, 0.2);
}

.est-prompt-textarea-editable:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

/* 提示词显示框样式 */
.est-prompt-display-box {
    min-height: 60px;
    max-height: 200px;
    overflow-y: auto;
    padding: 12px;
    background: var(--bg-tertiary, #252525);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 8px;
    color: var(--text-primary, #e0e0e0);
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    display: block;
    text-align: left;
}

/* 提示词显示框空状态 */
.est-prompt-display-box:empty,
.est-prompt-display-box > span:first-child:last-child {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 100%;
    min-height: 60px;
}

/* 底部生成区域 */
.est-generate-section {
    text-align: center;
    padding: 32px;
    background: var(--bg-secondary, #1a1a1a);
    border-radius: 16px;
    border: 1px solid var(--border-color, #2a2a2a);
}

.est-generate-main-btn {
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.est-generate-main-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.est-generate-main-btn:active {
    transform: translateY(0);
}

.est-generate-main-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.est-generate-hint {
    margin-top: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* 操作按钮 */
.ecommerce-studio-btn {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
}

.ecommerce-studio-btn.secondary {
    background: var(--bg-tertiary, #252525);
    color: var(--text-primary);
    border: 1px solid var(--border-color, #2a2a2a);
}

.ecommerce-studio-btn.secondary:hover {
    background: var(--border-color, #2a2a2a);
}

.ecommerce-studio-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.ecommerce-studio-btn.primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.ecommerce-studio-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 生成结果区域 */
.ecommerce-studio-results {
    margin-top: 32px;
    padding: 24px;
    background: var(--bg-secondary, #1a1a1a);
    border-radius: 16px;
    border: 1px solid var(--border-color, #2a2a2a);
}

.ecommerce-studio-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.est-result-item {
    background: var(--bg-tertiary, #252525);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color, #2a2a2a);
}

.est-result-header {
    padding: 14px 16px;
    background: rgba(43, 109, 229, 0.1);
    border-bottom: 1px solid var(--border-color, #2a2a2a);
}

.est-result-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.est-result-title i {
    color: var(--primary-color, #2b6de5);
}

.est-result-image {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    background: var(--bg-secondary, #1a1a1a);
}

.est-result-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4/3;
    background: var(--bg-secondary, #1a1a1a);
    color: var(--text-secondary);
    font-size: 14px;
    gap: 10px;
}

.est-result-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.est-result-actions {
    padding: 12px 16px;
    display: flex;
    gap: 10px;
}

.est-result-btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.est-result-btn.view {
    background: var(--bg-tertiary, #252525);
    color: var(--text-primary);
    border: 1px solid var(--border-color, #2a2a2a);
}

.est-result-btn.view:hover {
    background: var(--border-color, #2a2a2a);
}

.est-result-btn.download {
    background: var(--primary-color, #2b6de5);
    color: #fff;
    transition: all 0.2s ease;
}

.est-result-btn.download:hover {
    opacity: 0.9;
}

.est-result-btn.download:active,
.est-result-btn.download.clicked {
    background: #1a4fc2;
    transform: scale(0.96);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 图片放大查看模态框 */
.est-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.est-image-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.est-image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
}

.est-image-modal-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.est-image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
}

.est-image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.est-image-modal-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.est-image-modal-actions .est-result-btn {
    padding: 10px 24px;
    font-size: 14px;
    min-width: 120px;
}

/* 深色主题下拉框样式 */
.est-dark-select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-tertiary, #252525);
    border: 1px solid var(--border-color, #2a2a2a);
    border-radius: 6px;
    color: var(--text-primary, #e0e0e0);
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.est-dark-select:focus {
    outline: none;
    border-color: var(--primary-color, #2b6de5);
}

.est-dark-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 下拉框选项样式 */
.est-dark-select option {
    background: var(--bg-secondary, #1a1a1a);
    color: var(--text-primary, #e0e0e0);
    padding: 8px 12px;
}

.est-dark-select option:hover,
.est-dark-select option:focus,
.est-dark-select option:checked {
    background: var(--primary-color, #2b6de5);
    color: #fff;
}

/* 提示词编辑弹窗 */
.est-prompt-edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.est-prompt-edit-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.est-prompt-edit-content {
    position: relative;
    background: var(--bg-secondary, #1a1a1a);
    border-radius: 16px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.est-prompt-edit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.est-prompt-edit-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.est-prompt-edit-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.est-prompt-edit-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.est-prompt-edit-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

.est-prompt-edit-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* 加载状态 */
.est-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.est-loading-content {
    background: var(--bg-secondary, #1a1a1a);
    padding: 32px 48px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border-color, #2a2a2a);
}

.est-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border-color, #2a2a2a);
    border-top-color: var(--primary-color, #2b6de5);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.est-loading-text {
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.est-loading-subtext {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Toast提示 */
.est-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
}

.est-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.est-toast.success {
    background: #28a745;
    color: #fff;
}

.est-toast.error {
    background: #dc3545;
    color: #fff;
}

.est-toast.warning {
    background: #ffc107;
    color: #000;
}

.est-toast.info {
    background: var(--primary-color, #2b6de5);
    color: #fff;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .ecommerce-studio-container {
        padding: 16px;
    }

    .ecommerce-studio-title {
        font-size: 22px;
    }

    .ecommerce-studio-section {
        padding: 16px;
    }

    .est-generate-main-btn {
        width: 100%;
        justify-content: center;
    }
}

/* 步骤分隔线样式 */
.est-section-divider {
    margin: 40px 0 24px 0;
    padding: 16px 0;
    border-top: 2px solid var(--border-color, #2a2a2a);
    border-bottom: 1px solid var(--border-color, #2a2a2a);
    background: linear-gradient(90deg, rgba(43, 109, 229, 0.05), transparent, rgba(43, 109, 229, 0.05));
}

.est-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0 8px;
}

.est-section-title i {
    color: var(--primary-color, #2b6de5);
    font-size: 20px;
}

.est-section-divider:first-of-type {
    margin-top: 0;
    border-top: none;
}

/* 上传容器 - 包含上传框和图片 */
.est-upload-container {
    background: linear-gradient(145deg, var(--bg-tertiary, #252525), var(--bg-secondary, #1a1a1a));
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

/* 拖拽时的样式 */
.est-upload-container.drag-over {
    border: 2px dashed var(--primary-color, #2b6de5);
    background: rgba(43, 109, 229, 0.1);
}

.est-upload-container.drag-over::after {
    content: '释放以上传图片';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(43, 109, 229, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    pointer-events: none;
    z-index: 100;
}

/* 内联图片网格 - 更大的图片 */
.est-inline-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    padding: 16px;
    max-height: 250px;
    overflow-y: auto;
}

.est-inline-image-item {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.2s ease;
}

.est-inline-image-item:hover {
    transform: scale(1.05);
}

.est-inline-image-delete {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.est-inline-image-item:hover .est-inline-image-delete {
    opacity: 1;
}

.est-add-more-images {
    aspect-ratio: 1;
    transition: all 0.2s ease;
    min-height: 100px;
}

.est-add-more-images:hover {
    border-color: var(--primary-color, #2b6de5);
    background: rgba(43, 109, 229, 0.1);
}

.est-add-more-images:hover i,
.est-add-more-images:hover small {
    color: var(--primary-color, #2b6de5);
}

/* ==================== 提示词确认弹窗 - 页面居中 ==================== */
.est-prompt-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.est-prompt-confirm-modal[style*="block"],
.est-prompt-confirm-modal[style*="flex"] {
    display: flex !important;
}

.est-prompt-confirm-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.est-prompt-confirm-content {
    position: relative;
    background: var(--bg-secondary, #1a1a1a);
    border-radius: 16px;
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    margin: auto;
}

.est-prompt-confirm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.est-prompt-confirm-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.est-prompt-confirm-header h3 i {
    color: var(--primary-color, #2b6de5);
}

.est-prompt-confirm-header p {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.est-prompt-confirm-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.est-prompt-confirm-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.est-prompt-confirm-body {
    padding: 20px 24px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.est-prompt-confirm-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.est-prompt-confirm-item {
    background: var(--bg-tertiary, #252525);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.est-prompt-confirm-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(43, 109, 229, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.est-prompt-confirm-item-number {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.est-prompt-confirm-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}

.est-prompt-confirm-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color, #2b6de5);
}

.est-prompt-confirm-textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
}

.est-prompt-confirm-textarea:focus {
    outline: none;
    background: rgba(43, 109, 229, 0.05);
}

.est-prompt-confirm-textarea::placeholder {
    color: var(--text-secondary);
}

.est-prompt-confirm-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* ==================== 清空数据确认弹窗 - 页面居中 ==================== */
.est-clear-data-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10002;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.est-clear-data-modal[style*="block"],
.est-clear-data-modal[style*="flex"] {
    display: flex !important;
}

.est-clear-data-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.est-clear-data-content {
    position: relative;
    background: var(--bg-secondary, #1a1a1a);
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    padding: 32px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    margin: auto;
}

.est-clear-data-icon {
    width: 64px;
    height: 64px;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.est-clear-data-icon i {
    font-size: 28px;
    color: #dc3545;
}

.est-clear-data-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.est-clear-data-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.est-clear-data-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.est-clear-data-actions .ecommerce-studio-btn {
    padding: 10px 24px;
}

/* ==================== 项目列表样式 ==================== */
#estProjectListBar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 20px;
}

#estCreateProjectBtn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: linear-gradient(135deg, rgba(88, 120, 255, 0.9), rgba(118, 75, 162, 0.9));
    border: none;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(88, 120, 255, 0.3);
}

#estCreateProjectBtn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 120, 255, 0.4);
}

#estCreateProjectBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

#estProjectList {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

.est-project-chip {
    cursor: pointer;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    background: rgba(255, 255, 255, 0.05);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.est-project-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.est-project-chip.active {
    color: #fff;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(88, 120, 255, 0.25), rgba(88, 120, 255, 0.1));
    border-color: rgba(88, 120, 255, 0.5);
    box-shadow: 0 4px 15px rgba(88, 120, 255, 0.2);
}

.est-project-chip i {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.est-project-chip.active i {
    color: #5878ff;
}

/* 项目删除按钮样式 */
.est-project-delete-btn {
    margin-left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 68, 68, 0.8);
    color: white;
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
}

.est-project-delete-btn:hover {
    opacity: 1;
    background: rgba(255, 68, 68, 1);
    transform: scale(1.1);
}

.est-project-chip:hover .est-project-delete-btn {
    opacity: 1;
}
