/* =====================================================
   Xynapse · 现场讨论 UI 样式
   ===================================================== */

/* -------- Hero -------- */
.live-hero {
  padding: 80px 0 50px;
  text-align: center;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(0,240,255,0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 100%, rgba(168,85,247,0.15) 0%, transparent 60%),
    var(--bg-1);
}

.live-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 18px;
  color: var(--text);
}

.live-hero .tagline {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.7;
}

/* -------- 视图切换 -------- */
.view-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.view-tab {
  background: transparent;
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 10px 20px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -1px;
}

.view-tab:hover {
  color: var(--cyan);
  border-color: var(--border-hi);
}

.view-tab.active {
  background: var(--bg-card-hi);
  color: var(--cyan);
  border-color: var(--border-hi);
  border-bottom: 1px solid var(--bg-card-hi);
}

.view-panel {
  display: none;
}

.view-panel.active {
  display: block;
}

/* -------- 步骤 -------- */
.setup-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px 28px;
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--cyan);
  line-height: 1;
  min-width: 50px;
  opacity: 0.5;
}

.step-body {
  flex: 1;
}

.step-body h3 {
  color: var(--cyan);
  margin-bottom: 8px;
  font-size: 1.25rem;
}

.step-hint {
  color: var(--text-mute);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

#topic-input {
  width: 100%;
  min-height: 80px;
  padding: 12px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  resize: vertical;
}

#topic-input:focus {
  outline: none;
  border-color: var(--cyan);
}

#hint-input {
  padding: 10px 16px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font-body);
}

#hint-input:focus {
  outline: none;
  border-color: var(--cyan);
}

.btn-primary {
  margin-top: 16px;
  padding: 10px 24px;
  background: var(--cyan);
  color: var(--bg-0);
  border: none;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-primary:hover {
  background: #fff;
  box-shadow: var(--glow-cyan);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-ghost {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border-hi);
  border-radius: 4px;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 8px;
}

.btn-ghost:hover {
  background: rgba(0, 240, 255, 0.1);
}

.btn-ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* -------- 裁判分析结果 -------- */
.topic-analysis {
  background: var(--bg-2);
  border-left: 3px solid var(--purple);
  padding: 12px 18px;
  margin-bottom: 20px;
  border-radius: 0 6px 6px 0;
}

.topic-analysis h4 {
  color: var(--purple);
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.topic-analysis p {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 4px 0;
}

.topic-analysis ul {
  margin: 8px 0 0 20px;
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* -------- Agent 配置 -------- */
.agents-config {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.agent-config-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px;
  position: relative;
  transition: border-color 0.2s;
}

.agent-config-card[data-color="cyan"]   { border-left: 4px solid var(--cyan);   }
.agent-config-card[data-color="pink"]   { border-left: 4px solid var(--pink);   }
.agent-config-card[data-color="purple"] { border-left: 4px solid var(--purple); }
.agent-config-card[data-color="green"]  { border-left: 4px solid var(--green);  }
.agent-config-card[data-color="orange"] { border-left: 4px solid #fb923c;       }
.agent-config-card[data-color="amber"]  { border-left: 4px solid var(--pink);   }

.agent-config-card .agent-color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
}

.agent-config-card input,
.agent-config-card textarea {
  width: 100%;
  margin-top: 8px;
  padding: 8px 12px;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.agent-config-card textarea {
  min-height: 100px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.5;
  resize: vertical;
}

.agent-config-card input:focus,
.agent-config-card textarea:focus {
  outline: none;
  border-color: var(--cyan);
}

.agent-config-card label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-mute);
  letter-spacing: 0.1em;
}

.rounds-config {
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.rounds-config label {
  color: var(--text);
  font-family: var(--font-mono);
}

.rounds-config select {
  padding: 8px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--font-mono);
}

.judge-rationale {
  background: var(--bg-2);
  border-left: 3px solid var(--cyan);
  padding: 12px 18px;
  border-radius: 0 6px 6px 0;
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 16px;
}

.judge-rationale h4 {
  color: var(--cyan);
  margin-bottom: 6px;
  font-size: 0.95rem;
}

/* -------- Loading -------- */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 16, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(4px);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  margin-top: 18px;
  color: var(--cyan);
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
}

.loading-mini {
  color: var(--text-mute);
  font-style: italic;
  padding: 20px;
  text-align: center;
}

/* -------- 讨论视图 -------- */
.discussion-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 24px;
  margin-bottom: 16px;
}

.discussion-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.discussion-status {
  padding: 3px 10px;
  border-radius: 4px;
  background: var(--bg-2);
  color: var(--cyan);
  border: 1px solid var(--cyan);
}

.discussion-status.done {
  color: var(--green);
  border-color: var(--green);
}

.discussion-status.error {
  color: var(--pink);
  border-color: var(--pink);
}

.discussion-round {
  color: var(--text-mute);
}

.discussion-topic {
  font-size: 1.2rem;
  color: var(--text);
  margin: 0;
  max-width: 720px;
}

.discussion-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  min-height: 600px;
}

.participants {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  height: fit-content;
}

.participants h4 {
  color: var(--cyan);
  font-size: 0.85rem;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.participants ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.participants li {
  padding: 8px 10px;
  margin-bottom: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.participants li.active {
  background: var(--bg-2);
  box-shadow: 0 0 12px currentColor;
}

.participants .agent-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.participants .participant-stance {
  font-size: 0.75rem;
  color: var(--text-mute);
  display: block;
}

/* -------- 聊天区 -------- */
.chat-area {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  min-height: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.welcome-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-mute);
  font-family: var(--font-mono);
  gap: 12px;
}

.welcome-icon {
  font-size: 3rem;
}

/* 轮次分隔 */
.round-divider {
  text-align: center;
  margin: 24px 0 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--purple);
  letter-spacing: 0.15em;
}

.round-divider::before,
.round-divider::after {
  content: '──';
  margin: 0 12px;
  color: var(--border-hi);
}

/* 气泡 */
.message-bubble {
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.bubble-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.bubble-agent-name {
  font-weight: 600;
}

.bubble-stance {
  color: var(--text-mute);
  font-size: 0.78rem;
}

.bubble-content {
  background: var(--bg-2);
  border-left: 3px solid;
  padding: 12px 16px;
  border-radius: 0 6px 6px 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.75;
  font-size: 0.95rem;
  color: var(--text);
}

.message-bubble[data-color="cyan"]   .bubble-content { border-left-color: var(--cyan);   }
.message-bubble[data-color="pink"]   .bubble-content { border-left-color: var(--pink);   }
.message-bubble[data-color="purple"] .bubble-content { border-left-color: var(--purple); }
.message-bubble[data-color="green"]  .bubble-content { border-left-color: var(--green);  }
.message-bubble[data-color="orange"] .bubble-content { border-left-color: #fb923c;       }
.message-bubble[data-color="amber"]  .bubble-content { border-left-color: var(--pink);   }

.message-bubble[data-color="cyan"]   .bubble-agent-name { color: var(--cyan);   }
.message-bubble[data-color="pink"]   .bubble-agent-name { color: var(--pink);   }
.message-bubble[data-color="purple"] .bubble-agent-name { color: var(--purple); }
.message-bubble[data-color="green"]  .bubble-agent-name { color: var(--green);  }
.message-bubble[data-color="orange"] .bubble-agent-name { color: #fb923c;        }
.message-bubble[data-color="amber"]  .bubble-agent-name { color: var(--pink);   }

/* 打字中光标 */
.typing-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  background: var(--cyan);
  vertical-align: middle;
  animation: blink 0.7s infinite;
  margin-left: 2px;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* 进度条 */
.progress-bar {
  width: 100%;
  height: 3px;
  background: var(--bg-2);
  border-radius: 2px;
  margin-top: 16px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--cyan);
  width: 0%;
  transition: width 0.3s;
  box-shadow: var(--glow-cyan);
}

/* 综合总结 */
.summary-area {
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-radius: 8px;
  padding: 24px 28px;
  margin-top: 20px;
}

.summary-area h3 {
  color: var(--purple);
  margin-bottom: 14px;
}

#summary-content {
  color: var(--text);
  line-height: 1.8;
  white-space: pre-wrap;
}

/* 历史列表 */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.history-item:hover {
  border-color: var(--cyan);
}

.history-item .history-topic {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 4px;
}

.history-item .history-meta {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-mute);
}

.history-item .history-status {
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid currentColor;
}

.history-item .history-status.done {
  color: var(--green);
}

.history-item .history-status.running {
  color: var(--cyan);
}

.history-item .history-status.pending {
  color: var(--text-mute);
}

.history-item .history-status.error {
  color: var(--pink);
}

.history-actions {
  display: flex;
  gap: 6px;
}

.history-actions a {
  padding: 4px 10px;
  border: 1px solid var(--border-hi);
  border-radius: 4px;
  color: var(--cyan);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.history-actions a:hover {
  background: var(--cyan);
  color: var(--bg-0);
}

/* 响应式 */
@media (max-width: 900px) {
  .discussion-body { grid-template-columns: 1fr; }
  .participants { height: auto; }
  .chat-area { max-height: none; min-height: 400px; }
  .agents-config { grid-template-columns: 1fr; }
}

/* ============================================================
   v2 新增样式
   ============================================================ */

/* 全局错误条 */
.global-error {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: rgba(255, 100, 130, 0.15);
  border: 1px solid var(--pink);
  border-radius: 6px;
  color: var(--pink);
  margin-bottom: 20px;
  font-size: 0.95rem;
}
.global-error-icon { font-size: 1.1rem; }
.global-error-text { flex: 1; }
.global-error-close {
  background: transparent; border: none; color: var(--pink);
  font-size: 1.4rem; cursor: pointer; padding: 0 6px;
}

/* 裁判 fallback 警告 */
.fallback-warning {
  background: rgba(255, 180, 80, 0.12);
  border-left: 3px solid #fb923c;
  padding: 14px 18px;
  margin-bottom: 20px;
  border-radius: 0 6px 6px 0;
  color: #fb923c;
  font-size: 0.95rem;
}
.fallback-warning strong { display: block; margin-bottom: 6px; }
.fallback-reason { color: var(--text-dim); margin: 4px 0 0; font-size: 0.85rem; }

/* 危险按钮（停止） */
.btn-danger {
  padding: 8px 16px;
  background: rgba(255, 100, 130, 0.15);
  border: 1px solid var(--pink);
  border-radius: 4px;
  color: var(--pink);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
  margin-right: 8px;
}
.btn-danger:hover { background: var(--pink); color: var(--bg-0); }

/* 流错误条 */
.stream-error {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  background: rgba(255, 100, 130, 0.15);
  border: 1px solid var(--pink);
  border-radius: 6px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.stream-error-icon { color: var(--pink); font-size: 1.2rem; }
.stream-error-text { flex: 1; color: var(--text); }
.stream-error-text strong { color: var(--pink); }

/* 顺序模式标签 */
.discussion-mode {
  padding: 3px 10px;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.15);
  color: var(--purple);
  border: 1px solid var(--purple);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

/* 参与者项 - 显示指纹 + 温度 */
.participants-hint {
  color: var(--text-mute);
  font-size: 0.78rem;
  margin-bottom: 12px;
  line-height: 1.5;
}
.participants .participant-name { font-weight: 500; }
.participants .participant-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-mute);
  margin-top: 2px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.participants .fingerprint-tag {
  font-weight: 700;
  letter-spacing: 0.05em;
}
.participants li.active .fingerprint-tag {
  text-shadow: 0 0 6px currentColor;
}
.participants li.speaking {
  background: var(--bg-2);
  animation: pulse 1.2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 currentColor; }
  50% { box-shadow: 0 0 12px 2px currentColor; }
}

/* 顺序发言指示器 */
.thinking-indicator {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin: 8px 0;
  background: var(--bg-2);
  border-left: 3px solid var(--cyan);
  border-radius: 0 6px 6px 0;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-style: italic;
}
.thinking-dots::after {
  content: '...';
  display: inline-block;
  width: 1em;
  text-align: left;
  animation: dots 1.2s steps(4) infinite;
  overflow: hidden;
  vertical-align: bottom;
}
@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}

/* 气泡透明度指标 */
.bubble-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-mute);
}
.bubble-metrics .metric {
  padding: 2px 6px;
  background: var(--bg-1);
  border-radius: 3px;
  border: 1px solid var(--border);
}
.bubble-metrics .metric.fingerprint {
  font-weight: 700;
  letter-spacing: 0.05em;
}
.bubble-metrics .metric.latency { color: var(--text-dim); }
.bubble-metrics .metric.ttft { color: var(--cyan); }
.bubble-metrics .metric.tokens { color: var(--purple); }
.bubble-metrics .metric.model {
  border-color: var(--border-hi);
  color: var(--text-dim);
}

/* Agent 错误气泡 */
.message-bubble[data-error="true"] .bubble-content {
  border-left-color: var(--pink);
  background: rgba(255, 100, 130, 0.08);
}
.bubble-error-tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--pink);
  color: var(--bg-0);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  border-radius: 3px;
  margin-bottom: 8px;
}

/* 复制按钮 */
.bubble-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border);
  color: var(--text-mute);
  padding: 4px 8px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}
.message-bubble:hover .bubble-copy { opacity: 1; }
.bubble-copy:hover { color: var(--cyan); border-color: var(--cyan); }

/* 轮间提示输入 */
.inter-round-hint {
  background: var(--bg-card);
  border: 1px solid var(--border-hi);
  border-left: 3px solid var(--purple);
  border-radius: 6px;
  padding: 14px 18px;
  margin-top: 16px;
}
.inter-round-hint-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.92rem;
  color: var(--text);
}
.inter-round-hint-icon { font-size: 1.1rem; }
.inter-round-hint-header > span:nth-child(2) { flex: 1; }
.inter-round-hint-input {
  width: 100%;
  min-height: 60px;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  resize: vertical;
}
.inter-round-hint-input:focus { outline: none; border-color: var(--purple); }

/* 历史工具栏 */
.history-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.history-toolbar input,
.history-toolbar select {
  padding: 8px 12px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.history-toolbar input { flex: 1; min-width: 200px; }
.history-toolbar input:focus,
.history-toolbar select:focus { outline: none; border-color: var(--cyan); }

/* 历史动作按钮组 */
.history-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.history-actions a,
.history-actions button {
  padding: 4px 10px;
  border: 1px solid var(--border-hi);
  border-radius: 4px;
  color: var(--cyan);
  background: transparent;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  cursor: pointer;
}
.history-actions a:hover,
.history-actions button:hover { background: var(--cyan); color: var(--bg-0); }
.history-actions button.rerun { color: var(--purple); border-color: var(--purple); }
.history-actions button.rerun:hover { background: var(--purple); color: var(--bg-0); }
.history-actions button.share { color: var(--green); border-color: var(--green); }
.history-actions button.share:hover { background: var(--green); color: var(--bg-0); }

/* 阶段标题轮次进度条 */
.round-progress {
  display: flex;
  gap: 4px;
  margin-left: 12px;
}
.round-progress-dot {
  width: 24px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}
.round-progress-dot.active { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.round-progress-dot.done { background: var(--green); }

/* 轮次 chip（在头部 sticky 显示，done / active / pending 三态明显） */
.round-chips {
  display: flex;
  gap: 6px;
  margin: 10px 0 6px;
  flex-wrap: wrap;
}
.round-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-mute);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.round-chip.active {
  background: rgba(6, 182, 212, 0.18);
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
  animation: round-chip-pulse 1.6s ease-in-out infinite;
}
.round-chip.done {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
  border-color: var(--green);
}
.round-chip.done::before {
  content: '✓ ';
  margin-right: 2px;
}
@keyframes round-chip-pulse {
  0%, 100% { box-shadow: 0 0 4px rgba(6, 182, 212, 0.4); }
  50%      { box-shadow: 0 0 12px rgba(6, 182, 212, 0.8); }
}

/* 加载占位（讨论中） */
.chat-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.chat-loading-dots {
  display: inline-flex;
  gap: 3px;
}
.chat-loading-dots span {
  width: 6px;
  height: 6px;
  background: var(--cyan);
  border-radius: 50%;
  animation: loadingDot 1.2s infinite;
}
.chat-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.chat-loading-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes loadingDot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* toast 提示 */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  padding: 12px 20px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  z-index: 200;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
  animation: toastIn 0.3s ease-out;
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 20px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
/* ============================================================
   v3 新增样式：比分板 + 澄清区 + 获胜横幅
   ============================================================ */

/* 比分板 */
#scoreboard-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 16px;
}
#scoreboard {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scoreboard-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 5px;
}
.scoreboard-row.is-leader {
  border-color: var(--gold, #facc15);
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.1) 0%, transparent 100%);
}
.scoreboard-color {
  width: 10px; height: 10px; border-radius: 50%;
  flex-shrink: 0;
}
.scoreboard-name {
  flex: 1; font-size: 0.92rem; color: var(--text);
  font-weight: 600; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.scoreboard-score {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--cyan);
  font-weight: 700;
}
.scoreboard-stance {
  font-size: 0.74rem; color: var(--text-mute);
  width: 100%;
  margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.scoreboard-hint {
  font-size: 0.78rem; color: var(--text-mute);
  margin-top: 10px;
  font-family: var(--font-mono);
}

/* 澄清区（NEED_INFO） */
.clarification-area {
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.15) 0%, rgba(168, 85, 247, 0.1) 100%);
  border: 2px solid #fb923c;
  border-radius: 8px;
  padding: 18px 22px;
  margin: 20px 0;
  animation: clarifPulse 2s ease-in-out infinite;
}
@keyframes clarifPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251, 146, 60, 0.4); }
  50%      { box-shadow: 0 0 0 8px rgba(251, 146, 60, 0); }
}
.clarification-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
}
.clarification-icon {
  font-size: 1.6rem;
}
.clarification-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: #fb923c;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}
.clarification-from {
  font-size: 1rem;
  color: var(--text);
  font-weight: 600;
}
.clarification-question {
  background: rgba(0, 0, 0, 0.3);
  border-left: 3px solid #fb923c;
  padding: 12px 14px;
  margin: 12px 0 16px;
  color: var(--text);
  line-height: 1.6;
  font-size: 0.95rem;
  border-radius: 0 4px 4px 0;
}
.clarification-input {
  width: 100%;
  min-height: 80px;
  background: var(--bg-0);
  border: 1px solid var(--border-hi);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
}
.clarification-input:focus {
  outline: none;
  border-color: #fb923c;
}
.clarification-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

/* 胜者横幅 */
#winner-banner {
  margin-top: 20px;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.2) 0%, rgba(255, 100, 130, 0.1) 100%);
  border: 2px solid #facc15;
  border-radius: 8px;
  padding: 20px 24px;
  text-align: center;
}
.winner-trophy {
  font-size: 2.2rem;
  margin-bottom: 6px;
}
.winner-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: #facc15;
  margin-bottom: 6px;
}
.winner-stance {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.winner-reason {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
  font-style: italic;
}
.winner-detail {
  margin-top: 16px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-mute);
}
.winner-detail-row {
  padding: 4px 0;
}

/* 历史讨论状态标签补充（need_info） */
.history-item .history-status.need_info {
  color: #fb923c;
}
