/* Workbench 公共样式 - 暖白色 · 暗金色 · 浅色模式 */

:root {
  --bg: #F5F2ED;
  --bg-card: #FFFFFF;
  --bg-footer: #EAE5DD;
  --nav-bg: rgba(245, 242, 237, 0.92);
  --text: #2A2A2E;
  --text-muted: rgba(42, 42, 46, 0.58);
  --text-secondary: rgba(42, 42, 46, 0.5);
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.12);
  --input-bg: rgba(0, 0, 0, 0.02);
  --gold: #c9a96e;
  --gold-light: rgba(201, 169, 110, 0.12);
  --gold-soft: rgba(201, 169, 110, 0.08);
  --teal: #6B8E7B;
  --teal-light: rgba(107, 142, 123, 0.1);
  --purple-gray: #8A7A9E;
  --aqua: #38BDF8;
}

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC", "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.12); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, 0.2); }

/* ═══════════ Workbench 工作流管道 ═══════════ */
/* 顶部醒目步骤条——Capture→Think→Create 闭环 */
.wb-pipeline {
  display: flex; align-items: center; justify-content: center; gap: 0;
  padding: 2rem 1rem 1.5rem; margin-bottom: 0.5rem;
}
.wb-pl-step {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  text-decoration: none; position: relative; min-width: 120px; cursor: pointer;
}
.wb-pl-icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--input-bg); border: 2px solid var(--border);
  color: var(--text-muted); transition: all 0.3s;
}
.wb-pl-step.active .wb-pl-icon, .wb-pl-step:hover .wb-pl-icon {
  background: var(--gold-soft); border-color: var(--gold); color: var(--gold);
  box-shadow: 0 0 20px rgba(201,169,110,0.15);
}
.wb-pl-step.active .wb-pl-icon { box-shadow: 0 0 24px rgba(201,169,110,0.25); }
.wb-pl-label { font-size: 0.9375rem; font-weight: 700; color: var(--text-muted); transition: color 0.3s; }
.wb-pl-step.active .wb-pl-label, .wb-pl-step:hover .wb-pl-label { color: var(--text); }
.wb-pl-step.active .wb-pl-label { color: var(--gold); }
.wb-pl-desc { font-size: 0.6875rem; color: var(--text-muted); text-align: center; }
.wb-pl-step.active .wb-pl-desc { color: var(--gold); opacity: 0.8; }
/* 步骤间连接线 */
.wb-pl-connector {
  width: 48px; height: 2px; background: var(--border); margin: 0 0.25rem;
  align-self: flex-start; margin-top: 28px; border-radius: 1px;
}
.wb-pl-connector.done { background: var(--gold); }
/* 移动端 */
@media (max-width: 640px) {
  .wb-pipeline { gap: 0; padding: 1.25rem 0.25rem 1rem; }
  .wb-pl-step { min-width: auto; flex: 1; gap: 0.375rem; }
  .wb-pl-icon { width: 40px; height: 40px; }
  .wb-pl-label { font-size: 0.75rem; }
  .wb-pl-desc { display: none; }
  .wb-pl-connector { width: 24px; margin-top: 20px; }
}

/* ═══════════ 左侧资源边栏（轻量，非流程导航）═══════════ */
.wb-layout { display: flex; min-height: calc(100vh - 48px); }
.wb-sidebar {
  position: fixed; top: 48px; left: 0; bottom: 0;
  width: 148px; background: var(--bg-card); border-right: 1px solid var(--border);
  padding: 1rem 0.75rem; display: flex; flex-direction: column; gap: 0.125rem;
  z-index: 40; overflow-y: auto;
}
.wb-sidebar-label {
  font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); padding: 0.5rem 0.5rem 0.25rem;
}
.wb-sidebar-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.5rem; border-radius: 0.375rem;
  text-decoration: none; color: var(--text-secondary); font-size: 0.75rem;
  transition: all 0.15s; font-weight: 500;
}
.wb-sidebar-item:hover { background: var(--input-bg); color: var(--text); }
.wb-sidebar-item .icon { flex-shrink: 0; }
.wb-sidebar-divider { border-top: 1px solid var(--border); margin: 0.5rem 0.25rem; }
.wb-main { margin-left: 148px; padding-top: 56px; flex: 1; display: flex; flex-direction: column; }
@media (max-width: 768px) {
  .wb-sidebar { display: none; }
  .wb-main { margin-left: 0; padding-top: 52px; }
}

/* Workbench 工作流步骤条（保留兼容） */
.workflow-steps {
  display: flex; align-items: center; justify-content: center; gap: 0; padding: 0.75rem 0;
}
.workflow-step {
  display: flex; align-items: center; gap: 0.375rem; text-decoration: none;
  font-size: 0.75rem; color: var(--text-muted); font-weight: 500; transition: color 0.2s;
  padding: 0.25rem 0.75rem; border-radius: 99px;
}
.workflow-step:hover { color: var(--text); }
.workflow-step.active { color: var(--gold); background: var(--gold-soft); }
.workflow-step .step-dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.4; flex-shrink: 0;
}
.workflow-step.active .step-dot { opacity: 1; }
.workflow-arrow { color: var(--border-strong); font-size: 0.625rem; margin: 0 0.125rem; }

/* 导航 */
.workbench-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color 0.2s;
  text-decoration: none;
}
.nav-link:hover { color: var(--gold); }
.nav-link.active {
  color: var(--gold);
  font-weight: 500;
}

/* 图标 */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  line-height: 1;
  vertical-align: middle;
}
.icon svg {
  display: block;
}

/* 首屏英雄区 */
.hero-section {
  min-height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  position: relative;
}

.hero-title {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text);
}
.hero-title .gold { color: var(--gold); }

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--text-muted);
  text-align: center;
  max-width: 520px;
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

/* 大输入框 */
.big-input-box {
  width: 100%;
  max-width: 800px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 1.25rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}
.big-input-box:focus-within {
  border-color: var(--gold);
  box-shadow: 0 12px 40px rgba(201, 169, 110, 0.12);
  transform: translateY(-2px);
}

.big-input {
  width: 100%;
  min-height: 140px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.125rem;
  line-height: 1.7;
  outline: none;
  resize: none;
  font-family: inherit;
}
.big-input::placeholder { color: var(--text-muted); }

.big-input-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* 按钮 */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  background: var(--gold);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(201, 169, 110, 0.25);
}
.btn-gold:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.btn-gold:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* 输入框 */
.tag-input {
  width: 100%;
  padding: 0.625rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}
.tag-input:focus { border-color: var(--gold); }

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: var(--gold-light);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 500;
}
.tag-teal {
  background: var(--teal-light);
  color: var(--teal);
}

/* 卡片 */
.block-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.25rem;
  margin-bottom: 0.875rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.block-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
.block-card.selected {
  border-color: var(--gold);
  background: var(--gold-soft);
}

/* 输出类型卡片 */
.type-card {
  padding: 0.875rem 0.5rem;
  border-radius: 0.875rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.type-card:hover { border-color: var(--gold); }
.type-card.active {
  border-color: var(--gold);
  background: var(--gold-soft);
}
.type-card .icon { margin-bottom: 0.25rem; }
.type-card .emoji { font-size: 1.5rem; margin-bottom: 0.25rem; }
.type-card .label { font-size: 0.8125rem; font-weight: 600; color: var(--text); }

/* 两级选择器：Create 方法论 Tab + 格式 chips */
.framework-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.framework-tab:hover { border-color: var(--gold); }
.framework-tab.active {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold);
}

.format-chip {
  padding: 0.4rem 0.875rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.format-chip:hover { border-color: var(--gold); }
.format-chip.active {
  border-color: var(--gold);
  background: var(--gold-soft);
  color: var(--gold);
}

/* 统计卡片 */
.stat-card {
  text-align: center;
  padding: 1rem;
  border-radius: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
}
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Tab */
.tab-btn {
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}
.tab-btn.active {
  color: var(--text);
  background: var(--bg-card);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* 草稿卡片 */
.draft-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}
.draft-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}
.draft-card .title { font-size: 0.875rem; font-weight: 600; margin-bottom: 0.25rem; color: var(--text); }
.draft-card .meta { font-size: 0.7rem; color: var(--text-muted); }

/* 结果区 */
.output-area {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  min-height: 300px;
  line-height: 1.8;
  color: var(--text);
}
.output-area h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; color: var(--gold); }
.output-area h2 { font-size: 1.25rem; font-weight: 600; margin: 1.25rem 0 0.75rem; color: var(--text); }
.output-area h3 { font-size: 1.1rem; font-weight: 600; margin: 1rem 0 0.5rem; color: var(--text); }
.output-area p { margin-bottom: 0.75rem; }
.output-area blockquote {
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--text-muted);
}
.output-area ul, .output-area ol { margin-left: 1.25rem; margin-bottom: 0.75rem; }

/* 消息气泡（Think） */
.message {
  max-width: 90%;
  padding: 1rem 1.125rem;
  border-radius: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9875rem;
  line-height: 1.7;
  white-space: pre-wrap;
}
.message-user {
  align-self: flex-end;
  background: var(--gold-soft);
  border: 1px solid rgba(201, 169, 110, 0.25);
  color: var(--text);
  border-bottom-right-radius: 0.25rem;
}
.message-ai {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  border-bottom-left-radius: 0.25rem;
}
.message-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  font-weight: 500;
}

/* 场景徽章 */
.scene-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--teal-light);
  color: var(--teal);
}

/* 通用 */
.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

/* 场景资源推荐：轻量辅助，不抢主流程 */
.scene-resource-strip {
  width: 100%; max-width: 56rem; margin: 1rem auto 0; padding: .8rem 1rem;
  border: 1px solid var(--border); border-radius: .9rem; background: var(--bg-card);
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
}
.scene-resource-label { font-size: .72rem; color: var(--text-muted); white-space: nowrap; }
.scene-resource-links { display: flex; gap: .45rem; flex-wrap: wrap; }
.scene-resource-link { font-size: .72rem; color: var(--text); text-decoration: none; padding: .35rem .6rem; border-radius: 999px; background: var(--input-bg); transition: all .2s; }
.scene-resource-link:hover { color: var(--gold); background: var(--gold-soft); }
.scene-resource-link em { font-style: normal; color: var(--text-muted); margin-left: .2rem; }

.fade-in { animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .big-input { min-height: 120px; font-size: 1rem; }
  .big-input-box { border-radius: 1.25rem; padding: 1rem; }
  .hero-title { font-size: 2rem; }
  .type-card .emoji { font-size: 1.25rem; }
  .type-card .label { font-size: 0.75rem; }
}
