/* ── 创作台布局 ── */

.wb-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
}
.wb-back-btn {
  background: none;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.wb-back-btn:hover { background: var(--bg-hover); }
.wb-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
}
.wb-publish-btn {
  background: #22c55e;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}
.wb-publish-btn:hover { background: #16a34a; }

.wb-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 16px;
  padding: 16px;
  height: calc(100vh - 60px);
  overflow: hidden;
}
.wb-left, .wb-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

/* ── 区块 ── */

.wb-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.wb-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}

/* ── 按钮 ── */

.wb-sm-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  margin-left: 4px;
}
.wb-sm-btn:hover { background: var(--bg-hover); }
.wb-del-btn { color: #ef4444; }
.wb-select-btn { color: #22c55e; font-weight: 600; }

/* ── 选题列表 ── */

.wb-topic-list { max-height: 400px; overflow-y: auto; }
.wb-topic-item {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.wb-topic-item:last-child { border-bottom: none; }
.wb-topic-item:hover { background: var(--bg-hover); }
.wb-topic-rank {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  min-width: 24px;
  padding-top: 2px;
}
.wb-topic-body { flex: 1; min-width: 0; }
.wb-topic-title { font-size: 13px; font-weight: 500; line-height: 1.4; }
.wb-topic-meta { display: flex; gap: 8px; margin-top: 4px; align-items: center; }
.wb-source-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.wb-source-reddit {
  background: #ff4500;
  color: #fff;
}
.wb-tag {
  font-size: 11px;
  color: var(--text-dim);
  background: var(--bg-subtle);
  padding: 1px 6px;
  border-radius: 3px;
}
.wb-score { font-size: 12px; font-weight: 700; color: #f59e0b; }
.wb-topic-reason {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
  line-height: 1.3;
}
.wb-topic-actions { min-width: 50px; text-align: right; }

/* ── 徽章 ── */

.wb-badge {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  background: var(--bg-subtle);
}
.wb-badge.selected { background: #22c55e; color: #fff; }
.wb-badge.used { background: var(--text-dim); color: #fff; }
.wb-badge.published { background: #22c55e; color: #fff; }
.wb-badge.publishing { background: #f59e0b; color: #fff; }

/* ── 编辑器 ── */

.wb-editor-form { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.wb-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-main);
  color: var(--text);
  font-size: 13px;
  box-sizing: border-box;
}
.wb-editor-row { display: flex; gap: 8px; }
.wb-textarea {
  width: 100%;
  min-height: 300px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-main);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}

/* ── 草稿箱 ── */

.wb-draft-list { max-height: 250px; overflow-y: auto; }
.wb-draft-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.wb-draft-item:last-child { border-bottom: none; }
.wb-draft-item:hover { background: var(--bg-hover); }
.wb-draft-info { flex: 1; min-width: 0; }
.wb-draft-title { font-size: 13px; font-weight: 500; }
.wb-draft-meta { display: flex; gap: 8px; font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.wb-draft-actions { display: flex; gap: 4px; }

/* ── 图片 ── */

.wb-image-preview {
  padding: 12px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wb-main-image { max-width: 100%; max-height: 200px; border-radius: 4px; }
.wb-image-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px;
  max-height: 180px;
  overflow-y: auto;
}
.wb-image-item {
  position: relative;
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 4px;
  overflow: hidden;
}
.wb-image-item:hover { border-color: var(--accent); }
.wb-image-item img { width: 100%; height: 60px; object-fit: cover; display: block; }
.wb-image-source {
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: 9px;
  padding: 1px 4px;
  background: rgba(0,0,0,0.6);
  color: #fff;
}

/* ── 通用 ── */

.wb-loading { padding: 20px; text-align: center; color: var(--text-dim); font-size: 13px; }
.wb-empty { padding: 20px; text-align: center; color: var(--text-dim); font-size: 13px; }
