/* ============================================================
   内容工厂 — 场景化内容生产流水线
   ============================================================ */

/* --- 场景选择页 --- */
.cf-scene-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.cf-scene-card {
  position: relative;
  border-radius: 12px;
  padding: 24px 20px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  overflow: hidden;
  color: #fff;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.cf-scene-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.cf-scene-card:active {
  transform: translateY(0);
}
.cf-scene-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 500;
}
.cf-scene-card p {
  margin: 0;
  font-size: 12px;
  opacity: 0.85;
}
.cf-scene-card .cf-scene-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.cf-scene-more {
  background: #f5f6fa;
  border: 2px dashed #d0d0d0;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 120px;
}

/* --- 流水线全屏页 --- */
.cf-fullscreen body.content-factory-mode .main-sidebar {
  display: none;
}
.cf-fullscreen body.content-factory-mode .main-content {
  margin-left: 0;
  width: 100%;
}

.cf-pipeline {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
}

/* --- 顶部：返回 + 场景名 --- */
.cf-pipeline-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.cf-back-btn {
  background: none;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  color: #555;
  transition: background 0.15s;
}
.cf-back-btn:hover {
  background: #f0f0f0;
}
.cf-scene-title {
  font-size: 18px;
  font-weight: 500;
  margin: 0;
}

/* --- 步骤条 --- */
.cf-step-bar {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  padding: 0 4px;
}
.cf-step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex: 1;
  position: relative;
  z-index: 1;
}
.cf-step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  border: 2px solid #d0d0d0;
  background: white;
  color: #999;
  transition: all 0.2s;
}
.cf-step-node.completed .cf-step-circle {
  background: #52c41a;
  border-color: #52c41a;
  color: white;
}
.cf-step-node.active .cf-step-circle {
  background: #F18D24;
  border-color: #F18D24;
  color: white;
  box-shadow: 0 0 0 4px rgba(241,141,36,0.2);
}
.cf-step-node.future .cf-step-circle {
  background: #f5f5f5;
  border-color: #d9d9d9;
  color: #bbb;
}
.cf-step-label {
  font-size: 11px;
  color: #888;
  text-align: center;
}
.cf-step-node.active .cf-step-label {
  color: #F18D24;
  font-weight: 500;
}
.cf-step-node.completed .cf-step-label {
  color: #52c41a;
}
.cf-step-line {
  flex: 0 0 24px;
  height: 2px;
  background: #e0e0e0;
  margin: 0 4px;
  margin-bottom: 22px;
}
.cf-step-line.completed {
  background: #52c41a;
}

/* --- 步骤面板 --- */
.cf-panel {
  background: white;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}
.cf-panel h3 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 500;
}
.cf-panel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}
.cf-btn {
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid #d0d0d0;
  background: white;
  color: #333;
  transition: all 0.15s;
}
.cf-btn:hover {
  background: #f5f5f5;
}
.cf-btn-primary {
  background: #F18D24;
  border-color: #F18D24;
  color: white;
}
.cf-btn-primary:hover {
  background: #d47a1e;
  border-color: #d47a1e;
}
.cf-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- 各步骤内组件 --- */
.cf-textarea {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #d0d0d0;
  border-radius: 8px;
  resize: vertical;
  font-family: inherit;
  outline: none;
}
.cf-textarea:focus {
  border-color: #F18D24;
  box-shadow: 0 0 0 2px rgba(241,141,36,0.12);
}
.cf-muted {
  color: #999;
  font-size: 12px;
}
.cf-result-box {
  margin-top: 16px;
}
.cf-result-box video {
  width: 100%;
  max-width: 480px;
  border-radius: 8px;
}
.cf-result-box img {
  max-width: 100%;
  border-radius: 8px;
}

/* --- 加载/空/错误状态 --- */
.cf-status {
  padding: 20px;
  text-align: center;
  color: #888;
  font-size: 13px;
}
.cf-status.warn {
  color: #d46b08;
  background: #fff7e6;
  border-radius: 8px;
}
.cf-status.error {
  color: #e74c3c;
  background: #fff2f0;
  border-radius: 8px;
}

/* --- 草稿提示弹窗 --- */
.cf-draft-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.cf-draft-toast button {
  padding: 4px 12px;
  border-radius: 6px;
  border: none;
  font-size: 12px;
  cursor: pointer;
}
.cf-draft-toast .cf-draft-yes {
  background: #F18D24;
  color: white;
}
.cf-draft-toast .cf-draft-no {
  background: #666;
  color: white;
}

/* --- 高级设置（复用批次B的 pro-* class） --- */
/* pro-advanced-panel / pro-advanced-toggle 等已在 style.css 中定义 */
