/* ========== AI-LogoDesign - AI Logo设计 ========== */
/* 底座布局复用 ai-LogoProposa.css（logo-page-layout / design-panel / namecard-intro-area 等） */

/* 隐藏工具类 */
.ld-none {
    display: none !important;
}

/* ===== 右侧区域：顶部对齐并允许滚动（方案+结果内容较多） ===== */
.logo-design-page .namecard-intro-area {
    justify-content: flex-start !important;
    overflow-y: auto;
}

/* 默认介绍态：整体垂直居中（与AI-LogoProposal一致） */
.logo-design-page .namecard-intro-area.ld-centered {
    justify-content: center !important;
}

/* ===== 默认介绍区（主图+4张副图，同AI-LogoProposal） ===== */
.ld-intro-default {
    display: flex;
    gap: 2.5%;
    width: 100%;
    max-width: 960px;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.logo-design-page .intro-header {
    margin-top: 8px;
    margin-bottom: 28px;
    flex-shrink: 0;
}

.logo-design-page .intro-steps {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    max-width: 100vw;
    gap: 32px;
    width: 100%;
    margin: 0 auto;
}

/* ===== 左侧面板：标签与色卡 ===== */
.ld-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ld-tag {
    padding: 7px 14px;
    border-radius: 999px;
    background: #f5f6fa;
    color: var(--color-text-secondary);
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    transition: all var(--transition-base);
    -webkit-tap-highlight-color: transparent;
}

.ld-tag:hover {
    color: var(--color-primary);
    background: #f0f0ff;
}

.ld-tag.active {
    background: var(--color-primary);
    color: #ffffff;
    font-weight: 600;
}

/* ===== 设计风格：上图下文网格（同/Design/AI-logo-design） ===== */
.ld-style-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.ld-style-item {
    cursor: pointer;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid transparent;
    transition: all var(--transition-base);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.ld-style-item:hover {
    border-color: #c7c8ff;
}

.ld-style-item.active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.ld-style-item-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    overflow: hidden;
    background: #f5f6fa;
    color: var(--color-text-muted);
}

.ld-style-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ld-style-item-name {
    text-align: center;
    font-size: 12px;
    padding: 6px 4px;
    color: var(--color-text-secondary);
    background: #fafafa;
}

.ld-style-item.active .ld-style-item-name {
    color: var(--color-primary);
    font-weight: 600;
    background: #f5f3ff;
}

.ld-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ld-color-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #f5f6fa;
    color: var(--color-text-secondary);
    font-size: 13px;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    transition: all var(--transition-base);
    -webkit-tap-highlight-color: transparent;
}

.ld-color-item:hover {
    color: var(--color-primary);
    background: #f0f0ff;
}

.ld-color-item.active {
    background: #ffffff;
    border-color: var(--color-primary);
    color: var(--color-primary);
    font-weight: 600;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.ld-color-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.ld-color-dot-random {
    background: conic-gradient(#e74c3c, #f1c40f, #2ecc71, #3498db, #9b59b6, #e74c3c);
}

/* 自定义色点：虚线圆点+加号 */
.ld-color-dot-custom {
    background: #ffffff;
    border: 1px dashed var(--color-primary);
    position: relative;
}

.ld-color-dot-custom::after {
    content: '+';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    line-height: 1;
    color: var(--color-primary);
}

/* 自定义颜色名称短文本输入框 */
.ld-color-input {
    height: 34px;
    width: 130px;
    padding: 0 12px;
    border: 1px solid var(--color-primary);
    border-radius: 999px;
    font-size: 13px;
    color: var(--color-text);
    outline: none;
    background: #ffffff;
    font-family: inherit;
    transition: all var(--transition-base);
    box-sizing: border-box;
}

.ld-color-input:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.ld-color-input::placeholder {
    color: var(--color-text-muted);
}

/* ===== 左侧面板底部按钮 ===== */
.ld-btn-proposals {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    margin-top: 20px;
    background: #ffffff;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    font-family: inherit;
    flex-shrink: 0;
}

.ld-btn-proposals:hover {
    background: #f0f0ff;
}

.ld-btn-proposals:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== 细节调整（方案区块下方、生成LOGO上方） ===== */
.ld-adjust-wrap {
    margin-top: 22px;
}

.ld-adjust-wrap .form-label {
    margin-bottom: 8px;
}

.ld-adjust-wrap .fix-textarea {
    min-height: 80px;
}

.ld-btn-create {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ld-btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: ld-spin 0.8s linear infinite;
    display: inline-block;
}

@keyframes ld-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== 右侧区块通用 ===== */
.ld-right-section {
    width: 100%;
}

.ld-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.ld-section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
}

.ld-selected-count {
    font-size: 13px;
    color: var(--color-text-muted);
}

/* 空状态与Loading占位 */
.ld-empty-tip,
.ld-loading-box {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: #fafafa;
    padding: 56px 20px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.8;
}

.ld-loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.ld-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: ld-spin 0.9s linear infinite;
    margin-bottom: 16px;
}

.ld-loading-text {
    font-size: 14px;
    color: #6b7280;
}

/* ===== 创意方案卡片（一行3套，多选） ===== */
.ld-proposal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.ld-proposal-card {
    position: relative;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    background: #ffffff;
    transition: all var(--transition-base);
    -webkit-tap-highlight-color: transparent;
}

.ld-proposal-card:hover {
    border-color: #c7c9f7;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.1);
}

.ld-proposal-card.active {
    border-color: var(--color-primary);
    background: #f8f8ff;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.16);
}

.ld-proposal-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #ffffff;
    display: none;
    align-items: center;
    justify-content: center;
}

.ld-proposal-card.active .ld-proposal-check {
    display: flex;
}

.ld-proposal-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
    padding-right: 26px;
}

.ld-proposal-row {
    display: flex;
    font-size: 12px;
    line-height: 2.2;
    margin-bottom: 12px;
}

.ld-proposal-label {
    color: var(--color-text-muted);
    flex-shrink: 0;
    width: 58px;
}

.ld-proposal-value {
    color: var(--color-text-secondary);
    word-break: break-all;
}

/* ===== LOGO生成结果（一行3套预览框） ===== */
.ld-result-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.ld-result-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.ld-result-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #f0f1f4;
}

.ld-result-card-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ld-result-card-status {
    font-size: 12px;
    color: var(--color-text-muted);
    flex-shrink: 0;
    margin-left: 8px;
}

.ld-result-card-body {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fafafa;
    position: relative;
    overflow: hidden;
}

.ld-result-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    display: block;
}

/* 预览框状态：排队等待 */
.ld-box-pending {
    color: #9ca3af;
    font-size: 13px;
    text-align: center;
    padding: 0 16px;
}

/* 预览框状态：生成中 */
.ld-box-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px;
    width: 100%;
}

.ld-box-loading .ld-loading-spinner {
    width: 32px;
    height: 32px;
    margin-bottom: 12px;
}

.ld-box-loading-text {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 10px;
}

.ld-box-progress-bar {
    width: 80%;
    height: 5px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.ld-box-progress-fill {
    height: 100%;
    width: 1%;
    border-radius: 999px;
    background: var(--color-primary);
    transition: width 0.5s ease;
}

/* 预览框状态：失败 */
.ld-box-error {
    color: #ef4444;
    font-size: 13px;
    text-align: center;
    padding: 0 16px;
    line-height: 1.7;
}

/* 预览框操作按钮 */
.ld-result-card-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid #f0f1f4;
}

.ld-mini-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    border: none;
    font-family: inherit;
}

.ld-mini-btn-primary {
    background: var(--color-primary);
    color: #ffffff;
}

.ld-mini-btn-primary:hover {
    background: var(--color-primary-hover);
}

.ld-mini-btn-outline {
    background: #ffffff;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.ld-mini-btn-outline:hover {
    background: #f0f0ff;
}

/* ===== 大图预览 ===== */
.ld-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.ld-lightbox-overlay img {
    max-width: 92vw;
    max-height: 92vh;
    border-radius: 8px;
}

.ld-lightbox-close {
    position: absolute;
    top: 18px;
    right: 26px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

/* ===== 响应式适配 ===== */
@media (max-width: 1200px) {
    .ld-proposal-grid,
    .ld-result-grid {
        gap: 10px;
    }
}

@media (max-width: 639px) {
    .logo-design-page .intro-steps {
        gap: 24px;
    }

    .ld-proposal-grid,
    .ld-result-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .ld-btn-proposals {
        margin-bottom: calc(56px + env(safe-area-inset-bottom));
    }
}
