/* ============================================================
   work.css — 工作流详情 & 运行页
   复用 landing.css 的品牌变量与组件（.btn-primary / .brand / .site-nav 等）
   ============================================================ */

.work-main {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 92px 24px 60px;
  min-height: calc(100vh - 72px);
}

/* ============ 面包屑 & 头部 ============ */
.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 18px;
}
.crumbs a {
  color: var(--muted);
  transition: color 0.2s ease;
}
.crumbs a:hover { color: var(--accent); }
.crumb-sep { opacity: 0.5; }
.crumb-current { color: var(--text-soft); }

.work-head { margin-bottom: 32px; }

.work-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.work-title-main { flex: 1; min-width: 300px; }
.work-title-main h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.15;
}
.work-sub {
  margin: 0 0 14px;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.6;
  max-width: 640px;
}
.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.work-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(255, 189, 56, 0.14);
  color: #ffdd82;
  border: 1px solid rgba(255, 189, 56, 0.2);
}
.work-tag.hot   { background: linear-gradient(120deg, #ff713b, #ff5f9e); color: #fff; border-color: transparent; }
.work-tag.new   { background: linear-gradient(120deg, #55d58a, #4ea1ff); color: #051622; border-color: transparent; }
.work-tag.vip   { background: linear-gradient(120deg, #7c5cff, #b98cff); color: #fff; border-color: transparent; }
.work-tag.free  { background: rgba(255,255,255,0.9); color: #201409; border-color: transparent; }
.work-tag.io    { background: rgba(255,255,255,0.04); color: var(--text-soft); border-color: var(--line); }

.work-title-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

/* ============ 主体两栏 ============ */
.work-body {
  display: grid;
  grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
  gap: 28px;
  align-items: flex-start;
}
.work-body > * { min-width: 0; }

/* ============ 左：表单面板 ============ */
.work-form-panel {
  background: linear-gradient(160deg, rgba(255,189,56,0.04), rgba(124,92,255,0.04));
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 26px 22px;
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.panel-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.panel-eyebrow {
  font: 800 10.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.22em;
  color: var(--accent);
}
.panel-head h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.panel-sub {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.tool-access-reminder {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 8px 12px;
  padding: 12px 14px;
  border: 1px solid rgba(255,189,56,.22);
  border-radius: 12px;
  background: rgba(255,189,56,.07);
  font-size: 11.5px;
  color: var(--text-soft);
}
.tool-access-reminder > b { grid-column: 1 / -1; color: var(--accent); font-size: 12px; }
.tool-access-reminder span { display: inline-flex; align-items: center; gap: 6px; }
.tool-access-reminder i {
  width: 18px; height: 18px; display: grid; place-items: center;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  font: normal 800 10px/1 ui-monospace, monospace;
}
.tool-access-reminder a { justify-self: end; color: var(--accent); font-weight: 700; }
@media (max-width: 640px) {
  .tool-access-reminder { grid-template-columns: 1fr; }
  .tool-access-reminder > b { grid-column: auto; }
  .tool-access-reminder a { justify-self: start; }
}

.form-fields {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.field-label strong {
  color: var(--text);
  font-weight: 700;
}
.field-label small {
  color: var(--muted);
  font-size: 11.5px;
}
.field-required {
  color: #ff8a4c;
  margin-left: 2px;
}

/* --- 文件上传 --- */
.file-drop {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1.5px dashed var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.file-drop:hover { border-color: rgba(255,189,56,0.4); background: rgba(255,189,56,0.04); }
.file-drop.has-file { border-style: solid; border-color: rgba(85, 213, 138, 0.35); background: rgba(85, 213, 138, 0.06); }
.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-drop-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: rgba(255,189,56,0.12);
  display: grid;
  place-items: center;
  color: var(--accent);
  flex-shrink: 0;
}
.file-drop-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.file-drop-meta b {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}
.file-drop-meta small {
  color: var(--muted);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-preview {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  display: none;
  border: 1px solid var(--line);
}
.file-drop.has-file .file-preview[src] { display: block; }

.multi-file-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 10px;
}
.multi-file-previews[hidden] { display: none; }
.multi-file-item {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.025);
}
.multi-file-item img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  background: var(--panel-2);
}
.multi-file-item figcaption {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.multi-file-item button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 24px;
  height: 24px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: #fff;
  background: rgba(10,12,18,0.82);
  cursor: pointer;
}
.multi-file-item button:hover { color: #ffd1c8; border-color: rgba(255,109,109,0.65); }

/* --- 文本 / 选择 / 数字输入 --- */
.form-fields textarea,
.form-fields input[type="text"],
.form-fields input[type="number"],
.form-fields select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s ease, background 0.2s ease;
  box-sizing: border-box;
}
.form-fields textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.55;
}
.form-fields textarea:focus,
.form-fields input:focus,
.form-fields select:focus {
  outline: none;
  border-color: rgba(255,189,56,0.5);
  background: rgba(255,189,56,0.05);
}
.form-fields select {
  appearance: none;
  color-scheme: dark;
  background-color: #10141e;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(-45deg, transparent 50%, var(--muted) 50%);
  background-position: calc(100% - 20px) 17px, calc(100% - 14px) 17px;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}
.form-fields select option {
  color: #f0f2f6;
  background: #10141e;
}
.form-fields select option:checked {
  color: #1a1305;
  background: #ffbd38;
}

/* --- 骨架屏 --- */
.field-skeleton {
  height: 76px;
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 100%);
  background-size: 200% 100%;
  animation: skele 1.4s ease-in-out infinite;
}
.field-skeleton.short { height: 46px; }
@keyframes skele {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- 运行按钮区 --- */
.run-bar {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.run-meta {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.run-metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12.5px;
}
.run-metric b { color: var(--text-soft); font-weight: 700; }

.btn-run {
  min-width: 160px;
  justify-content: center;
  transition: background .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease;
}
.run-btn-label { font-weight: 700; }
.btn-run:disabled {
  cursor: not-allowed;
  background: #30343c;
  border-color: #3c414b;
  color: #8f96a3;
  box-shadow: none;
  opacity: 0.72;
  transform: none;
}
.btn-run.is-submitting:disabled {
  background: #343943;
  border-color: #484f5c;
  color: #d9dde5;
  opacity: 1;
}
.run-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: run-spin .75s linear infinite;
}
.btn-run.is-submitting .run-spinner { display: inline-block; }
.btn-run.is-submitting .run-arrow { display: none; }
@keyframes run-spin {
  to { transform: rotate(360deg); }
}

.run-hint {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(85, 165, 255, 0.06);
  border: 1px solid rgba(85, 165, 255, 0.18);
  color: #a7c4ea;
  font-size: 12px;
  line-height: 1.55;
}

/* ============ 右：案例展示 / 说明 / 参数 / FAQ ============ */
.work-showcase {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 520px;
}

.showcase-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  flex-wrap: wrap;
}
.showcase-tab {
  padding: 8px 14px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
  position: relative;
}
.showcase-tab:hover { color: var(--text-soft); background: rgba(255,255,255,0.03); }
.showcase-tab.active {
  color: var(--accent);
  background: rgba(255,189,56,0.08);
}
.showcase-tab.active::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -13px;
  height: 2px;
  background: linear-gradient(90deg, #ffdd82, var(--accent));
  border-radius: 2px;
}

.showcase-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.showcase-panel[hidden] { display: none; }
.showcase-title {
  margin: 0;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* --- 案例主舞台 --- */
.case-stage {
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #241708, #1a0f04);
  position: relative;
  display: grid;
  place-items: center;
  min-height: 320px;
}
.case-stage video,
.case-stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.case-comparison {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: 0.85fr 0.85fr 1.3fr;
  gap: 3px;
  background: rgba(255,255,255,0.08);
}
.case-asset {
  position: relative;
  min-width: 0;
  height: 100%;
  margin: 0;
  overflow: hidden;
}
.case-asset.input img {
  filter: saturate(0.9) brightness(0.82);
}
.case-asset.output {
  box-shadow: inset 0 0 0 2px rgba(255,189,56,0.72);
}
.case-asset figcaption {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 7px;
  background: rgba(5,7,12,0.76);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}
.case-stage-placeholder {
  color: var(--muted);
  font-size: 13px;
}
.case-stage-poster {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.55);
}
.case-stage-poster::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,189,56,0.35), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(124,92,255,0.35), transparent 55%);
  opacity: 0.7;
}
.case-stage-poster .case-poster-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.case-stage-poster .case-poster-inner .poster-mark {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: grid;
  place-items: center;
  color: #fff;
  backdrop-filter: blur(8px);
}
.case-stage-poster .case-poster-inner b {
  color: #fff;
  font-size: 15px;
}
.case-stage-poster .case-poster-inner small {
  color: rgba(255,255,255,0.7);
  font-size: 12px;
}

/* 案例上方信息条 */
.case-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  gap: 12px;
  flex-wrap: wrap;
}
.case-info-title {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.case-io-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.case-io-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-soft);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}
.case-io-chip.out {
  color: #ffdd82;
  background: rgba(255, 189, 56, 0.08);
  border-color: rgba(255, 189, 56, 0.22);
}
.case-io-arrow { color: var(--muted); opacity: 0.7; }

/* --- 案例缩略图列表 --- */
.case-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}
.case-thumb {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid transparent;
  cursor: pointer;
  background: linear-gradient(135deg, #241708, #1a0f04);
  position: relative;
  display: grid;
  place-items: center;
  padding: 0;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.case-thumb:hover { transform: translateY(-2px); }
.case-thumb.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(255,189,56,0.15);
}
.case-thumb .thumb-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,189,56,0.4), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(124,92,255,0.4), transparent 55%);
  opacity: 0.55;
}
.case-thumb .thumb-icon {
  position: relative;
  color: #fff;
  z-index: 1;
}
.case-thumb .thumb-label {
  position: absolute;
  left: 6px;
  bottom: 6px;
  right: 6px;
  z-index: 1;
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- 使用说明 --- */
.howto-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.howto-steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
}
.howto-num {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(120deg, #ffdd82, var(--accent));
  color: #1a1305;
  display: grid;
  place-items: center;
  font: 800 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  flex-shrink: 0;
}
.howto-steps li b {
  display: block;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 4px;
}
.howto-steps li p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

/* --- 参数详情 --- */
.params-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.param-row {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: baseline;
}
.param-row .param-name {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}
.param-row .param-type {
  color: var(--accent);
  font: 800 10.5px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.14em;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,189,56,0.1);
  border: 1px solid rgba(255,189,56,0.22);
}
.param-row .param-desc {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

/* --- FAQ（复用 landing 的 .faq-item） --- */
.showcase-panel .faq-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============ Toast（复用 landing.css 逻辑，但我们没有，重写一份） ============ */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translate(-50%, 30px);
  padding: 12px 20px;
  background: rgba(20, 20, 20, 0.96);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 60;
  max-width: 92vw;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast.error {
  border-color: rgba(255, 120, 100, 0.4);
  background: rgba(48, 20, 20, 0.96);
  color: #ffd1c8;
}

/* ============ 响应式 ============ */
@media (max-width: 1080px) {
  .work-body {
    grid-template-columns: 1fr;
  }
  .work-form-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .work-main {
    padding-top: 84px;
    padding-bottom: 32px;
  }
  .work-title-row { gap: 12px; }
  .work-title-actions { width: 100%; }
  .work-form-panel { padding: 22px 18px 18px; }
  .work-showcase { padding: 18px 16px 22px; min-height: auto; }
  .case-stage { min-height: 220px; }
  .case-comparison { grid-template-columns: 0.8fr 0.8fr 1.2fr; }
  .case-asset figcaption {
    left: 5px;
    bottom: 5px;
    padding: 4px 6px;
    font-size: 9px;
  }
  .showcase-tabs { gap: 2px; }
  .showcase-tab { padding: 8px 10px; font-size: 12.5px; }
  .run-bar { flex-direction: column; align-items: stretch; }
  .btn-run { width: 100%; }
}
