/* ========== 容器布局 ========== */  
#creative-workshop-view,
#viral-title-view {  
    height: 100%;  
    display: flex;  
    flex-direction: column;  
    overflow: hidden;  
}  

#creative-workshop-view { --preset-select-width: 240px; }
#creative-workshop-view .workshop-container { max-width: 1040px; padding-top: 40px; overflow-y: auto; }
#creative-workshop-view .workshop-card {
    max-width: none;
    border-color: #dbe3ef;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
#creative-workshop-view .composer-main { padding: 0 24px; }
#creative-workshop-view .composer-main .topic-input {
    height: 142px;
    padding: 22px 0 18px;
    border-radius: 0;
    font-size: 18px;
    line-height: 1.65;
}
#creative-workshop-view .composer-main .topic-input::placeholder { color: #94a3b8; opacity: 1; }
#creative-workshop-view .composer-sources {
    margin: 0 24px;
    padding: 14px 0 16px;
    border-top: 1px solid #edf1f6;
}
#creative-workshop-view .composer-sources .reference-source-actions { gap: 8px; }
#creative-workshop-view .composer-sources .toolbar-btn {
    height: 34px;
    padding: 0 12px;
    border-color: #dbe3ef;
    background: #fff;
}
#creative-workshop-view .composer-sources .form-textarea,
#creative-workshop-view .composer-sources .form-select {
    margin-top: 12px;
    border-color: #dbe3ef;
    background: #f8fafc;
}
#creative-workshop-view .composer-sources .form-textarea { min-height: 64px; }
#creative-workshop-view .composer-sources .reference-source-status:empty { display: none; }
#creative-workshop-view .reference-file-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}
#creative-workshop-view .reference-file-list:empty { display: none; }
#creative-workshop-view .reference-file-item {
    min-width: 0;
    min-height: 44px;
    padding: 7px 8px 7px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #dbe3ef;
    border-radius: 6px;
    background: #f8fafc;
}
#creative-workshop-view .reference-file-details {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
#creative-workshop-view .reference-file-name {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#creative-workshop-view .reference-file-size { color: var(--text-tertiary); font-size: 12px; }
#creative-workshop-view .reference-file-remove {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #64748b;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
#creative-workshop-view .reference-file-remove:hover { background: #fee2e2; color: #dc2626; }
#creative-workshop-view .reference-file-remove:focus-visible { outline: 2px solid var(--primary-color); outline-offset: 2px; }
#creative-workshop-view .input-toolbar.composer-settings {
    gap: 16px;
    min-height: 64px;
    padding: 12px 18px;
    border-top-color: #e4eaf2;
    background: #f8fafc;
}
#creative-workshop-view .toolbar-left { min-width: 0; flex: 1 1 auto; flex-wrap: nowrap; overflow: hidden; }
#creative-workshop-view .toolbar-left .toolbar-btn { flex: 0 0 auto; white-space: nowrap; }
#creative-workshop-view #creation-preset-select { width: var(--preset-select-width); min-width: var(--preset-select-width); max-width: var(--preset-select-width); flex: 0 0 var(--preset-select-width); text-overflow: ellipsis; }
#creative-workshop-view .toolbar-right { flex: 0 0 auto; margin-left: auto; }
#creative-workshop-view .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
#creative-workshop-view .reference-sources-panel { margin: 0 24px; padding: 14px 0 16px; }
#creative-workshop-view .reference-source-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#creative-workshop-view .reference-source-status { min-height: 20px; margin-top: 6px; color: #64748b; font-size: 13px; }
#creative-workshop-view .knowledge-base-picker { margin-top: 10px; border: 1px solid #dbe3ee; background: #fff; }
#creative-workshop-view .knowledge-base-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid #e8edf3; }
#creative-workshop-view .knowledge-base-picker-head > div { display: grid; gap: 2px; min-width: 0; }
#creative-workshop-view .knowledge-base-picker-head strong { color: #1e293b; font-size: 14px; }
#creative-workshop-view .knowledge-base-picker-head span { color: #64748b; font-size: 12px; }
#creative-workshop-view .knowledge-base-refresh { border: 0; background: transparent; color: #2563eb; cursor: pointer; padding: 6px; }
#creative-workshop-view .knowledge-base-options { display: grid; max-height: 240px; overflow: auto; padding: 6px; color: #64748b; font-size: 13px; }
#creative-workshop-view .knowledge-base-option { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 48px; padding: 8px; }
#creative-workshop-view .knowledge-base-option:hover { background: #f6f8fb; }
#creative-workshop-view .knowledge-base-option.disabled { background: #fafbfc; }
#creative-workshop-view .knowledge-base-option input { width: 16px; height: 16px; margin: 0; accent-color: #2563eb; }
#creative-workshop-view .knowledge-base-option-body { display: grid; gap: 2px; min-width: 0; cursor: pointer; }
#creative-workshop-view .knowledge-base-option.disabled .knowledge-base-option-body { cursor: default; opacity: .62; }
#creative-workshop-view .knowledge-base-option-body strong { overflow: hidden; color: #1e293b; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
#creative-workshop-view .knowledge-base-option-body span { color: #64748b; font-size: 12px; }
#creative-workshop-view .knowledge-base-add-document { min-width: 72px; height: 30px; border: 1px solid #bfdbfe; border-radius: 6px; background: #fff; color: #2563eb; cursor: pointer; font-size: 12px; }
#creative-workshop-view .knowledge-base-add-document:hover { border-color: #2563eb; background: #eff6ff; }

#config-title .title-generator-shell {
    width: 100%;
    max-width: 1120px;
}

#config-title .workshop-card { max-width: none; border-radius: 8px; box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05); }
#config-title .topic-input { height: 112px; padding: 18px 20px; font-size: 16px; line-height: 1.6; }
#config-title .preference-status { min-width: 64px; color: var(--text-secondary); font-size: 12px; text-align: right; }
#config-title .preference-status.error { color: #dc2626; }
#config-title #title-preference-error { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #fecaca; border-radius: 6px; background: #fef2f2; color: #b91c1c; }
  
.workshop-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    height: calc(100vh - var(--header-height) - var(--footer-height));
    min-height: 0;
    padding: 60px 20px 0;    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start !important; 
    overflow-y: hidden; 
} 
  
/* ========== LOGO和标题区域 ========== */  
/* ========== DuoCaiSW 高科技头部样式 ========== */

/* 保持原有容器布局，确保不撑开高度 */
.workshop-header {
    text-align: center;
    margin-bottom: 32px;
    flex-shrink: 0;
    /* 使用 flex 布局确保垂直居中 */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* --- LOGO 容器：神秘的能量黑盒 --- */
.logo-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    /* 深色磨砂玻璃质感背景 */
    background: linear-gradient(145deg, #1a1f35, #252b46);
    border-radius: 24px; /* 稍微圆润一点 */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* 高级投影 */
    box-shadow: 
        0 10px 25px rgba(37, 99, 235, 0.3),
        inset 0 0 15px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: visible; /* 允许光晕溢出 */
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-container:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.5);
}

/* 容器背后的脉冲光晕 */
.logo-container::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(66, 153, 225, 0.4) 0%, transparent 70%);
    opacity: 0;
    z-index: -1;
    animation: energy-pulse 3s infinite ease-in-out;
    border-radius: 50%;
}

/* --- SVG 图标样式 --- */
.logo-icon {
    width: 48px; /*稍微加大一点图标占比*/
    height: 48px;
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.5));
}

/* 内部路径动画 */
.orbit-path {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    transform-origin: center;
}

.orbit-1 {
    stroke: #00e5ff; /* 青色 */
    animation: spin-cw 4s linear infinite;
    stroke-dasharray: 60; /* 虚线效果 */
}

.orbit-2 {
    stroke: #bd00ff; /* 紫色 */
    animation: spin-ccw 5s linear infinite;
    stroke-dasharray: 40;
    opacity: 0.8;
}

.core-x {
    fill: url(#grad-core);
    animation: breathe 2.5s infinite ease-in-out;
}

/* --- 标题文字：渐变流光 --- */
.workshop-title {
    font-size: 32px;
    font-weight: 800; /* 更粗的字体 */
    margin: 0 0 12px 0;
    letter-spacing: -0.5px;
    /* 渐变文字裁切 */
    background: linear-gradient(135deg, #2c3e50 0%, #2563eb 50%, #d946ef 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* 简单的入场动画 */
    animation: fade-up 0.8s ease-out;
}

/* --- 副标题：打字机光标效果 --- */
.workshop-subtitle {
    font-size: 16px;
    color: #64748b; /* 更加柔和的灰色 */
    margin: 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 24px; /* 锁定高度防止跳动 */
}

.subtitle-text {
    position: relative;
}

/* 闪烁的光标 */
.cursor-blink {
    display: inline-block;
    width: 2px;
    height: 16px;
    background-color: #2563eb;
    animation: blink 1s step-end infinite;
}

/* --- 动画关键帧 --- */
@keyframes spin-cw {
    100% { transform: rotate(360deg); }
}

@keyframes spin-ccw {
    100% { transform: rotate(-360deg); }
}

@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.9); opacity: 0.8; }
}

@keyframes energy-pulse {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50% { opacity: 0.6; transform: scale(1); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
  
/* ========== 主输入卡片 ========== */  
.workshop-card {  
    width: 100%;  
    max-width: 800px;  
    background: var(--card-background);  
    border: 1px solid var(--border-color);  
    border-radius: 12px;  
    padding: 0;  
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);  
    overflow: hidden;  
    margin-bottom: 16px; 
    flex-shrink: 0; 
}  
  
/* ========== 话题输入框 ========== */  
.topic-input {  
    width: 100%;  
    min-height: 0;  
    height: 90px;  
    padding: 12px 16px;
    font-size: 18px;  
    line-height: 1.2;  
    border: none;  
    border-radius: 12px 12px 0 0;  
    background: transparent;  
    color: var(--text-primary);  
    resize: none;  
    font-family: inherit;  
    transition: all 0.2s ease;  
}
  
.topic-input:focus {  
    outline: none;  
}  
  
.topic-input::placeholder {  
    color: var(--text-secondary);  
    opacity: 0.5;  
}  
  
/* ========== 底部进度条 ========== */  
#creative-workshop-view .bottom-progress {  
    position: relative;  
    margin-top: -1px;  
    width: 100%;  
    animation: slideUp 0.3s ease;  
    transition: opacity 0.5s ease;  
}  
  
#creative-workshop-view .bottom-progress.fade-out {  
    opacity: 0;  
}  
  
#creative-workshop-view .bottom-progress:not(.hidden) + .input-toolbar {  
    border-top: none;  
}  
  
@keyframes slideUp {  
    from {  
        opacity: 0;  
        transform: translateY(3px);  
    }  
    to {  
        opacity: 1;  
        transform: translateY(0);  
    }  
}  
  
#creative-workshop-view .progress-track {  
    height: 3px;  
    background: var(--border-color);  
    border-radius: 2px;  
    overflow: hidden;  
    position: relative;  
    width: 100%;  
}  
  
#creative-workshop-view .progress-bar {  
    height: 100%;  
    background: linear-gradient(90deg, var(--primary-color), #3b82f6);  
    border-radius: 2px;  
    position: relative;  
}  
  
#creative-workshop-view .progress-bar::after {  
    content: '';  
    position: absolute;  
    top: 0;  
    left: -100%;  
    width: 100%;  
    height: 100%;  
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);  
    animation: shimmer 2s infinite;  
}  
  
@keyframes shimmer {  
    0% { left: -100%; }  
    100% { left: 100%; }  
}  
  
#log-progress-btn .btn-icon.rotating {  
    animation: rotate 2s linear infinite;  
}  
  
@keyframes rotate {  
    from { transform: rotate(0deg); }  
    to { transform: rotate(360deg); }  
}  
  
/* ========== 底部工具栏 ========== */  
.input-toolbar {  
    display: flex;  
    justify-content: space-between;  
    align-items: center;  
    padding: 12px 20px;  
    border-top: 1px solid var(--border-color);  
    background: var(--surface-color);  
    transition: border-color 0.2s ease;  
}  
  
.topic-input:focus + .bottom-progress + .input-toolbar,  
.topic-input:focus ~ .input-toolbar {  
    border-top-color: var(--primary-color);  
}  
  
.toolbar-left {  
    display: flex;  
    gap: 6px;  
    align-items: center;  
}  
  
.toolbar-right {  
    display: flex;  
    gap: 8px;  
}  
  
/* ========== 工具栏按钮 ========== */  
.toolbar-btn {  
    height: 36px;  
    padding: 0 14px;  
    display: flex;  
    align-items: center;  
    gap: 6px;  
    background: transparent;  
    border: 1px solid var(--border-color);  
    border-radius: 8px;  
    color: var(--text-secondary);  
    font-size: 13px;  
    font-weight: 400;  
    cursor: pointer;  
    transition: all 0.2s ease;  
    white-space: nowrap;  
}  
  
.toolbar-btn:hover {  
    background: var(--hover-background);  
    border-color: var(--primary-color);  
}  
  
.toolbar-btn.active {  
    background: rgba(37, 99, 235, 0.1);  
    border-color: var(--primary-color);  
    color: var(--primary-color);  
}  
  
#reference-mode-btn.active {  
    color: var(--text-secondary);  
    border-color: var(--success-color);  
    background: rgba(34, 197, 94, 0.1);  
}  
  
#reference-mode-btn.active::after {  
    content: '✓';  
    color: var(--success-color);  
    font-weight: bold;  
    margin-left: 8px;  
}  
  
/* ========== 生成按钮 ========== */  
.generate-btn {  
    height: 36px;  
    padding: 0 18px;  
    display: flex;  
    align-items: center;  
    gap: 6px;  
    background: var(--primary-color);  
    border: none;  
    border-radius: 8px;  
    color: white;  
    font-size: 13px;  
    font-weight: 500;  
    cursor: pointer;  
    transition: all 0.2s ease;  
    white-space: nowrap;  
}  
  
.generate-btn:hover {  
    background: var(--primary-hover);  
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);  
    transform: translateY(-1px);  
}  
  
.generate-btn:active {  
    transform: translateY(0);  
}  
  
.generate-btn.generating {  
    background: var(--error-color);  
}  
  
.generate-btn.generating:hover {  
    background: #dc2626;  
}  
  
.btn-stop {  
    height: 36px;  
    padding: 0 18px;  
    background: var(--error-color);  
    color: #ffffff;  
    border: none;  
    border-radius: 8px;  
    font-size: 13px;  
    font-weight: 500;  
    cursor: pointer;  
    display: flex;  
    align-items: center;  
    gap: 8px;  
}  
  
.btn-stop:hover {  
    background: #dc2626;  
    transform: translateY(-1px);  
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);  
}  
  
.btn-stop:active {  
    transform: translateY(0);  
}  
  
.btn-stop .btn-icon {  
    fill: white !important;  
    stroke: none !important;  
    width: 18px;  
    height: 18px;  
}  
  
.btn-stop .btn-icon rect {  
    fill: white !important;  
    stroke: none !important;  
}  
  
/* ========== SVG图标统一样式 ========== */  
#creative-workshop-view .btn-icon,  
#creative-workshop-view .trigger-icon,  
#creative-workshop-view .panel-icon,  
#creative-workshop-view .btn-icon-small {  
    fill: none;  
    stroke: currentColor;  
    stroke-width: 2;  
    stroke-linecap: round;  
    stroke-linejoin: round;  
}  
  
.btn-icon-small {  
    width: 14px;  
    height: 14px;  
}  
  
.toolbar-btn .btn-icon,  
.generate-btn .btn-icon {  
    width: 16px;  
    height: 16px;  
}  
  
.generate-btn .btn-icon {  
    stroke: white;  
}  
  
/* ========== 配置面板基类 ========== */  
.workshop-config-panel {  
    background: var(--card-background);  
    border: 1px solid var(--border-color);  
    border-radius: 12px;  
    margin: 0 0 8px 0;  
    width: 100%;  
    max-width: 800px; 
    overflow: hidden;  
    opacity: 1;  
    transition: opacity 0.2s ease;
}  
  
.workshop-config-panel.collapsed {  
    max-height: 0;  
    opacity: 0;  
    margin-bottom: 0;  
    border: none;  
}  
  
/* ========== 统一两个面板的高度 ========== */  
#reference-mode-panel:not(.collapsed) {
    width: 100%;
    margin-bottom: 16px;
    flex-shrink: 0; 
    height: auto !important;
    min-height: 100px;
    max-height: 40vh !important; 
}

#hot-topics-panel:not(.collapsed) {
    width: 100%;
    margin-bottom: 16px;
    flex: 1 1 auto;
    height: auto !important;
    min-height: 320px;
    max-height: none !important;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#style-profile-panel:not(.collapsed) {
    width: 100%;
    margin-bottom: 16px;
    flex-shrink: 0;
    height: auto !important;
    min-height: 120px;
    max-height: 34vh !important;
}

#generation-progress:not(.collapsed) {
    width: 100%;
    flex: 1; 
    margin-top: 0;
    margin-bottom: 16px;
    height: auto !important;
    max-height: none !important;
    min-height: 200px; 
    display: flex;
    flex-direction: column;
    overflow: hidden; 
}
  
/* ========== 面板标题栏 ========== */  
#creative-workshop-view .panel-header,
#viral-title-view .panel-header,
#config-title .panel-header {  
    display: flex;  
    justify-content: space-between;  
    align-items: center;  
    padding: 8px 16px;  
    min-height: 40px;  
    border-bottom: 1px solid var(--border-color);  
    background: var(--surface-color);  
}  
  
#creative-workshop-view .panel-title,
#viral-title-view .panel-title,
#config-title .panel-title {  
    display: flex;  
    align-items: center;  
    gap: 8px;  
    margin: 0;  
    font-size: 13px;  
    font-weight: 500;  
    color: var(--text-primary);  
    line-height: 1.5;  
}  
  
.panel-icon {  
    width: 20px;  
    height: 20px;  
    stroke: var(--primary-color);  
    flex-shrink: 0;  
}  
  
/* 标题栏右侧按钮组 */  
.panel-header-actions {  
    display: flex;  
    gap: 4px;  
    align-items: center;  
}  
  
/* 图标按钮样式 */  
.icon-btn {  
    width: 28px;  
    height: 28px;  
    padding: 0;  
    display: flex;  
    align-items: center;  
    justify-content: center;  
    background: transparent;  
    border: 1px solid transparent;  
    border-radius: 6px;  
    color: var(--text-secondary);  
    cursor: pointer;  
    transition: all 0.2s ease;  
}  
  
.icon-btn:hover {  
    background: var(--hover-background);  
    border-color: var(--border-color);  
    color: var(--text-primary);  
}  
  
.icon-btn .btn-icon-small {  
    width: 16px;  
    height: 16px;  
}  
  
/* ========== 面板内容区域 - 统一布局 ========== */  
#creative-workshop-view .panel-content,
#viral-title-view .panel-content,
#config-title .panel-content {
    padding: 12px;
    height: calc(100% - 45px); 
    overflow: hidden;
}    

#hot-topics-panel .panel-content {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}
  
/* ========== 表单元素 ========== */  
#creative-workshop-view .form-group,
#viral-title-view .form-group,
#config-title .form-group {  
    margin-bottom: 16px;  
}  
  
#creative-workshop-view .form-group label,
#viral-title-view .form-group label,
#config-title .form-group label {  
    display: block;  
    margin-bottom: 6px;  
    font-size: 13px;  
    font-weight: 500;  
    color: var(--text-primary);  
    line-height: 1.2;  
}  
  
.label-hint {  
    color: var(--text-tertiary);  
    font-size: 12px;  
    font-weight: 400;  
}  
  
#creative-workshop-view .form-row,
#viral-title-view .form-row,
#config-title .form-row {  
    display: grid;  
    grid-template-columns: repeat(3, 1fr);  
    gap: 12px;  
    margin-bottom: 12px;  
}  
  
#creative-workshop-view .form-select,  
#creative-workshop-view .form-textarea,
#viral-title-view .form-select,
#viral-title-view .form-textarea,
#viral-title-view .form-control,
#config-title .form-select,
#config-title .form-textarea,
#config-title .form-control {  
    width: 100%;  
    padding: 8px 10px;  
    font-size: 13px;  
    line-height: 1.4;  
    border: 1px solid var(--border-color);  
    border-radius: 6px;  
    background: var(--input-background);  
    color: var(--text-primary);  
    transition: all 0.2s ease;  
}  
  
#creative-workshop-view .form-textarea,
#viral-title-view .form-textarea,
#config-title .form-textarea {  
    resize: vertical;  
    font-family: inherit;  
    min-height: 50px;  
}  
  
#creative-workshop-view .form-select:focus,  
#creative-workshop-view .form-textarea:focus,
#viral-title-view .form-select:focus,
#viral-title-view .form-textarea:focus,
#viral-title-view .form-control:focus,
#config-title .form-select:focus,
#config-title .form-textarea:focus,
#config-title .form-control:focus {  
    outline: none !important;  
    border-color: var(--primary-color) !important;  
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;  
}

#creative-workshop-view #result-publish-account {
    width: min(240px, 100%);
    min-width: 160px;
}

#title-options-panel:not(.collapsed),
#viral-title-results-panel:not(.collapsed) {
    width: 100%;
    margin-bottom: 16px;
    flex-shrink: 0;
    height: auto !important;
}

#viral-title-results-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 240px;
}

#viral-title-results-panel .panel-content {
    padding: 12px;
    height: calc(100% - 45px);
    overflow-y: auto;
}

#viral-title-results-grid {
    padding: 0;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

#viral-title-results-grid .card-preview {
    height: 72px;
    background: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

#viral-title-results-grid .content-card { border-radius: 6px; box-shadow: none; }
#viral-title-results-grid .content-card:hover { border-color: var(--primary-color); box-shadow: 0 3px 12px rgba(37, 99, 235, 0.08); }
#viral-title-results-grid .card-content { display: flex; flex-direction: column; gap: 12px; min-height: 176px; }
#viral-title-results-grid .card-meta { display: flex; gap: 12px; color: var(--text-secondary); font-size: 12px; }
#viral-title-results-grid .card-actions { margin-top: auto; }

@media (max-width: 640px) {
    #creative-workshop-view .workshop-container { padding: 16px 12px 0; }
    #creative-workshop-view .composer-main { padding: 0 16px; }
    #creative-workshop-view .composer-main .topic-input { height: 124px; padding: 16px 0; font-size: 16px; }
    #creative-workshop-view .composer-sources { margin: 0 16px; padding: 12px 0 14px; }
    #creative-workshop-view .composer-sources .reference-source-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #creative-workshop-view .composer-sources .toolbar-btn { width: 100%; justify-content: center; }
    #creative-workshop-view .knowledge-base-picker-head { align-items: flex-start; }
    #creative-workshop-view .knowledge-base-options { max-height: 280px; }
    #creative-workshop-view .input-toolbar { align-items: stretch; flex-direction: column; gap: 10px; padding: 10px 12px; }
    #creative-workshop-view .toolbar-left, #creative-workshop-view .toolbar-right { width: 100%; }
    #creative-workshop-view .toolbar-left { flex-wrap: wrap; overflow: visible; }
    #creative-workshop-view #creation-preset-select { width: 100%; min-width: 100%; max-width: 100%; flex-basis: 100%; }
    #creative-workshop-view .generate-btn { width: 100%; justify-content: center; }
    #creative-workshop-view #result-publish-account { width: 100%; min-width: 0; }
    #config-title { padding-left: 12px; padding-right: 12px; }
    #config-title .config-header { margin-bottom: 12px; }
    #config-title .topic-input { height: 128px; padding: 14px; font-size: 15px; }
    #config-title .input-toolbar { align-items: stretch; flex-direction: column; padding: 10px 12px; }
    #config-title .toolbar-left, #config-title .toolbar-right { width: 100%; flex-wrap: wrap; }
    #config-title .toolbar-right .generate-btn { flex: 1; }
    #config-title .form-row { grid-template-columns: 1fr; }
    #viral-title-results-grid { grid-template-columns: 1fr; }
}

#viral-title-results-grid .card-content {
    min-height: 116px;
}

#viral-title-results-grid .card-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

#viral-title-results-grid .card-actions {
    gap: 8px;
}

#viral-title-results-grid .action-btn {
    flex: 1;
}

.hot-topics-meta {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.hot-topics-platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.hot-topic-platform-btn {
    height: 36px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-color);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hot-topic-platform-btn:hover {
    border-color: var(--primary-color);
    background: var(--hover-background);
    color: var(--text-primary);
}

.hot-topic-platform-btn.active {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.hot-topics-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding-bottom: 8px;
}

.hot-topic-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--surface-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.hot-topic-item:hover {
    border-color: var(--primary-color);
    background: var(--hover-background);
    transform: translateY(-1px);
}

.hot-topic-item.active {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.08);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.08);
}

.hot-topic-rank {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--primary-color);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.hot-topic-body {
    flex: 1;
    min-width: 0;
}

.hot-topic-title {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 6px;
    word-break: break-word;
}

.hot-topic-platform {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.style-profile-summary {
    min-height: 84px;
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    padding: 14px 16px;
    background: var(--surface-color);
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
}

.generation-result-panel {
    width: 100%;
    max-width: 800px;
    margin: 0 0 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-background);
    flex-shrink: 0;
}

.result-header {
    min-height: 48px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.result-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

#result-status {
    font-size: 12px;
    color: var(--success-color);
}

.result-content {
    padding: 24px clamp(18px, 4vw, 44px);
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.result-content h1,
.result-content h2,
.result-content h3 {
    margin: 1.4em 0 0.6em;
    line-height: 1.4;
    letter-spacing: 0;
}

.result-content h1:first-child,
.result-content h2:first-child,
.result-content h3:first-child,
.result-content p:first-child {
    margin-top: 0;
}

.result-content p,
.result-content ul,
.result-content ol,
.result-content blockquote {
    margin: 0 0 1em;
}

.result-content img,
.result-content video,
.result-content table {
    max-width: 100%;
}

.result-actions {
    padding: 16px 18px;
    display: grid;
    gap: 12px;
    border-top: 1px solid var(--border-color);
    background: var(--surface-color);
}

.result-revision-row,
.result-control-group,
.result-primary-actions {
    display: flex;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
}

.result-revision-row .form-textarea {
    flex: 1;
    min-width: 0;
    resize: vertical;
}

.result-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
}

.result-control-group .form-select,
.result-control-group .form-input {
    min-width: 0;
    flex: 1;
}

.result-actions .toolbar-btn,
.result-actions .generate-btn {
    min-height: 36px;
    justify-content: center;
}

@media (max-width: 640px) {
    .generation-result-panel {
        max-width: 100%;
    }

    .result-content {
        padding: 18px 14px;
        font-size: 14px;
    }

    .result-actions {
        padding: 14px 12px;
    }

    .result-revision-row,
    .result-action-row {
        grid-template-columns: 1fr;
    }

    .result-revision-row {
        display: grid;
    }

    .result-primary-actions > * {
        flex: 1;
    }
}
  
/* ========== 日志面板特殊样式 ========== */     
#generation-progress .panel-content {
    padding: 0 2px 12px 12px;
    height: calc(100% - 45px); 
    overflow: hidden;
}  

#generation-progress .logs-output {        
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;        
    font-size: 13px;        
    line-height: 1.6;        
    color: var(--text-secondary);        
    padding-right: 0;        
    overflow-wrap: break-word;    
    min-height: 100px;  
    height: 100%;
    max-height: none;
    overflow-y: auto;
    box-sizing: border-box;  
}
  
/* 空状态提示 */  
#generation-progress .logs-output:empty::before {  
    content: '暂无日志';  
    color: var(--text-tertiary);  
    display: flex;  
    align-items: center;  
    justify-content: center;  
    height: 100%;  
    font-size: 14px;  
}  
  
#generation-progress .logs-output .log-entry {    
    padding-bottom: 0;
    white-space: pre-wrap;  
    word-wrap: break-word;   
} 
  
#generation-progress .logs-output .log-entry.info {  
    color: var(--text-primary);  
}  
  
#generation-progress .logs-output .log-entry.success {  
    color: var(--success-color);  
}  
  
#generation-progress .logs-output .log-entry.warning {  
    color: var(--warning-color);  
}  
  
#generation-progress .logs-output .log-entry.error {  
    color: var(--error-color);  
}  
 
#generation-progress .logs-output .log-message {  
    color: inherit; 
    word-break: break-word;
}

/* ========== 统一滚动条样式 ========== */    
#reference-mode-panel .panel-content::-webkit-scrollbar,    
#style-profile-panel .panel-content::-webkit-scrollbar,
#generation-progress .panel-content::-webkit-scrollbar {    
    width: 8px;    
}    
    
#reference-mode-panel .panel-content::-webkit-scrollbar-track,    
#style-profile-panel .panel-content::-webkit-scrollbar-track,
#generation-progress .panel-content::-webkit-scrollbar-track {    
    background: var(--surface-color);    
    border-radius: 4px;    
}    
    
#reference-mode-panel .panel-content::-webkit-scrollbar-thumb,    
#style-profile-panel .panel-content::-webkit-scrollbar-thumb,
#generation-progress .panel-content::-webkit-scrollbar-thumb {    
    background: var(--border-color);    
    border-radius: 4px;    
}    
    
#reference-mode-panel .panel-content::-webkit-scrollbar-thumb:hover,    
#style-profile-panel .panel-content::-webkit-scrollbar-thumb:hover,
#generation-progress .panel-content::-webkit-scrollbar-thumb:hover {    
    background: var(--text-tertiary);    
} 
  
.hidden {  
    display: none !important;  
}  

.auto-illustration-settings {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 320px);
    gap: 20px;
    align-items: end;
    margin-bottom: 20px;
}

.auto-illustration-control {
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 42px;
}

.switch-control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.switch-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.switch-control-track {
    position: relative;
    width: 40px;
    height: 22px;
    flex: 0 0 auto;
    border: 1px solid var(--border-color);
    border-radius: 11px;
    background: var(--surface-color);
}

.switch-control-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text-tertiary);
    transition: transform 160ms ease, background-color 160ms ease;
}

.switch-control input:checked + .switch-control-track {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.switch-control input:checked + .switch-control-track::after {
    transform: translateX(18px);
    background: #fff;
}

.switch-control input:focus-visible + .switch-control-track {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.switch-control input:disabled + .switch-control-track {
    opacity: .5;
    cursor: not-allowed;
}

.generation-result-illustrations {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
    margin: 0 0 24px;
}

.result-illustration {
    margin: 0;
    min-width: 0;
}

.result-illustration-cover {
    grid-column: 1 / -1;
}

.result-illustration img {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 6px;
}

.article-visual-projection {
    min-width: 0;
    overflow-wrap: anywhere;
}

.article-visual-projection figure {
    margin: 20px 0;
}

.article-visual-projection img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.auto-illustration-loading {
    grid-column: 1 / -1;
    color: var(--text-secondary);
    padding: 16px 0;
}
  
/* ========== 响应式设计 ========== */  
@media (max-width: 1024px) {  
    .workshop-container {  
        max-width: 100%;  
        padding: 80px 16px 40px;  
    }  
  
    .workshop-card {  
        max-width: 100%;  
    }  
  
    #creative-workshop-view .form-row {  
        grid-template-columns: repeat(2, 1fr);  
    }  
}  
  
@media (max-width: 768px) {  
    .workshop-container {  
        padding: 60px 16px 20px;  
    }  
  
    .workshop-header {  
        margin-bottom: 32px;  
    }  
  
    .logo-container {  
        width: 64px;  
        height: 64px;  
        margin-bottom: 16px;  
    }  
  
    .logo-icon {  
        width: 32px;  
        height: 32px;  
    }  
  
    .workshop-title {  
        font-size: 24px;  
    }  
  
    .workshop-subtitle {  
        font-size: 16px;  
    }  
  
    .topic-input {  
        height: 80px;  
        padding: 12px 16px;  
        font-size: 16px;  
    }  
  
    .input-toolbar {  
        flex-direction: column;  
        gap: 12px;  
        padding: 12px 16px;  
    }  
  
    .toolbar-left,  
    .toolbar-right {  
        width: 100%;  
        justify-content: center;  
    }  
  
    .generate-btn {  
        width: 100%;  
        justify-content: center;  
    }  
  
    #creative-workshop-view .form-row {  
        grid-template-columns: 1fr;  
    }

    .auto-illustration-settings,
    .generation-result-illustrations {
        grid-template-columns: 1fr;
    }

    .result-illustration-cover {
        grid-column: auto;
    }
}  
  
@media (max-width: 480px) {  
    #creative-workshop-view .workshop-container {
        width: auto;
        max-width: none;
        margin: 0;
        padding: 16px 8px 20px;
        align-items: stretch;
    }  

    #creative-workshop-view .workshop-card,
    #creative-workshop-view .topic-input,
    #creative-workshop-view .input-toolbar {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
  
    .topic-input {  
        height: 72px;  
        padding: 8px 12px;  
        font-size: 14px;  
    }  
  
    .workshop-config-panel {  
        border-radius: 8px;  
    }  
}  
  
/* ========== 大屏幕响应式适配 ========== */  
@media (min-width: 1400px) {  
    .workshop-container {  
        max-width: 1200px;  
    }  
  
    .workshop-card,  
    .workshop-config-panel {  
        max-width: 1000px;  
    }  
}  
  
@media (min-width: 1920px) {  
    .workshop-container {  
        max-width: 1400px;  
    }  
  
    .workshop-card,  
    .workshop-config-panel {  
        max-width: 1200px;  
    }  
}  
  
@media (min-width: 2560px) {  
    .workshop-container {  
        max-width: 1600px;  
    }  
  
    .workshop-card,  
    .workshop-config-panel {  
        max-width: 1400px;  
    }  
}  
  
/* ========== 深色主题适配 ========== */  
[data-theme="dark"] .btn-generate {  
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);  
}  
  
[data-theme="dark"] .btn-generate:hover {  
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);  
}  
  
[data-theme="dark"] .spinner {  
    border-color: rgba(255, 255, 255, 0.1);  
    border-top-color: var(--primary-color);  
}
.creative-primary-composer {
    width: min(100%, 1000px);
    margin-inline: auto;
}

.creative-primary-composer .generate-btn,
.creative-primary-composer .toolbar-btn {
    min-height: 38px;
    white-space: nowrap;
}

.creative-primary-composer .topic-input {
    min-height: 118px;
}

@media (max-width: 640px) {
    .creative-primary-composer .input-toolbar,
    .creative-primary-composer .toolbar-left,
    .creative-primary-composer .toolbar-right {
        width: 100%;
    }

    .creative-primary-composer .toolbar-right .generate-btn {
        width: 100%;
        justify-content: center;
    }
}
