/* ═══ Demo 页 ═══ */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #fafafa;
  color: #1a1a2e;
  line-height: 1.6;
}

/* ── 顶部点数栏 ── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: #1a1a2e;
  padding: 12px 0;
}
.topbar-row {
  max-width: 720px; margin: 0 auto;
  padding: 0 24px;
  display: flex; align-items: baseline; justify-content: space-between;
}
.topbar-brand {
  font-size: 36px; font-weight: 900; color: #fff;
  letter-spacing: 0.12em;
}
.topbar-inner {
  display: inline-flex; align-items: baseline; gap: 8px;
}
.topbar-label {
  font-size: 14px; color: #94a3b8;
}
.topbar-credits {
  font-size: 36px; font-weight: 800; color: #ef4444;
  min-width: 56px; text-align: center;
}
.topbar-unit {
  font-size: 14px; color: #94a3b8;
}

.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* ── Hero ── */
.hero { text-align: center; margin-bottom: 52px; }
.hero h1 { font-size: 30px; font-weight: 800; line-height: 1.4; margin-bottom: 12px; }
.hero-sub { font-size: 15px; color: #666; }
.hero-sub strong { color: #1a1a2e; }

/* ── 场景演示区 ── */
.demo-block { margin-bottom: 36px; }

.demo-label {
  text-align: center;
  font-size: 13px;
  color: #999;
  margin-bottom: 20px;
  padding: 6px 16px;
  background: #f3f4f6;
  border-radius: 20px;
  display: inline-block;
  width: 100%;
}

/* ── 步骤卡片 ── */
.step {
  display: flex; gap: 18px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 10px;
}

.step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #1a1a2e;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; flex-shrink: 0;
}

.step-body { flex: 1; min-width: 0; }

.step-head {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.step-head h3 { font-size: 16px; font-weight: 600; }

.step-tag {
  font-size: 11px;
  padding: 2px 10px;
  border-radius: 10px;
  white-space: nowrap;
}
.what-framework { background: #ecfdf5; color: #065f46; }
.what-you      { background: #f3f4f6; color: #888; }

.step-action { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-action { align-items: baseline; }

.hint-text { font-size: 13px; color: #999; }

/* ── 按钮 ── */
.btn {
  padding: 8px 20px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 8px;
  font-size: 13px; cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: #f5f5f5; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary {
  background: #1a1a2e; color: #fff; border-color: #1a1a2e;
}
.btn.primary:hover { opacity: 0.85; }

.btn-sm {
  padding: 5px 14px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 6px;
  font-size: 12px; cursor: pointer;
  font-family: monospace;
}
.btn-sm:hover { background: #f5f5f5; }
.btn-sm.danger { color: #ef4444; }

.step-status { font-size: 13px; color: #10B981; font-weight: 500; }

/* ── AI 输入 ── */
.step-action textarea {
  flex: 1; min-width: 200px;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  font-size: 13px; font-family: inherit;
  resize: vertical;
  line-height: 1.6;
}
.step-action textarea:focus { outline: none; border-color: #1a1a2e; }

.ai-output {
  margin-top: 14px; width: 100%;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  overflow: hidden;
}
.ai-output-head {
  background: #f8f8f8; padding: 6px 14px;
  font-size: 11px; color: #999;
  border-bottom: 1px solid #e8e8e8;
}
.ai-output-body {
  padding: 14px;
  font-size: 13px; line-height: 1.8;
  min-height: 50px; max-height: 320px;
  overflow-y: auto; white-space: pre-wrap;
}

/* ── 点数 ── */
.credits-big {
  font-size: 48px; font-weight: 800;
  transition: color 0.3s;
}
.credits-big.changed { color: #f59e0b; }
.credits-label { font-size: 14px; color: #888; }
.cost-hint { font-size: 12px; color: #bbb; }

/* ── 工具箱抽屉 ── */
.drawer { margin-bottom: 48px; }
.drawer-item {
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  margin-bottom: 6px;
  background: #fff;
}
.drawer-item summary {
  padding: 14px 20px;
  font-size: 14px; font-weight: 500; cursor: pointer;
}
.drawer-item summary:hover { background: #f8f8f8; }
.drawer-body { padding: 0 20px 20px; }

.test-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; font-size: 13px;
}
.test-label { min-width: 55px; color: #666; }
.test-result {
  flex: 1;
  font-size: 12px; padding: 6px 10px;
  border-radius: 6px; background: #f8f8f8;
  min-height: 32px;
}
.test-result.ok { background: #ecfdf5; color: #065f46; }
.test-result.fail { background: #fef2f2; color: #991b1b; }

.pay-cards { display: flex; gap: 10px; }
.pay-card {
  flex: 1;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  padding: 18px; text-align: center;
}
.pay-price { font-size: 22px; font-weight: 700; }
.pay-sub { font-size: 12px; color: #888; margin: 4px 0 10px; }
.hint { font-size: 12px; color: #888; margin-top: 6px; }

/* ── 桥接区 ── */
.bridge {
  text-align: center;
  padding: 48px 32px;
  background: #fff;
  border: 2px solid #1a1a2e;
  border-radius: 20px;
  margin-bottom: 48px;
}

.bridge-lead {
  font-size: 18px; font-weight: 600;
  margin-bottom: 8px;
}
.bridge-ask {
  font-size: 14px; color: #666;
  margin-bottom: 20px;
}

.cta-cmd {
  display: inline-block;
  padding: 14px 28px;
  background: #fef9c3;
  border: 2px solid #f59e0b;
  border-radius: 12px;
  font-size: 17px; font-weight: 600;
  color: #92400e;
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.bridge-explain {
  font-size: 14px; color: #666;
  line-height: 1.8;
}

/* ── 场景卡片 ── */
.scenes { margin-bottom: 32px; }
.scenes h2 {
  font-size: 20px; font-weight: 700;
  text-align: center; margin-bottom: 24px;
}

.scene-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.scene-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 20px;
}
.scene-icon { font-size: 24px; margin-bottom: 8px; }
.scene-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.scene-card p { font-size: 12px; color: #888; line-height: 1.6; }

/* ── 弹框 ── */
.popup-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}
.popup {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  max-width: 360px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.popup-icon { font-size: 48px; margin-bottom: 12px; }
.popup h3 { font-size: 18px; margin-bottom: 8px; }
.popup p { font-size: 14px; color: #666; margin-bottom: 20px; }
.popup-btns { display: flex; gap: 10px; justify-content: center; }
.popup-btns .btn-primary {
  padding: 10px 32px;
  border: none;
  border-radius: 8px;
  background: #1a1a2e;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
}
.popup-btns .btn-secondary {
  padding: 10px 32px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #666;
  font-size: 14px;
  cursor: pointer;
}

/* ── 联系 ── */
.contact {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px;
  color: #999; font-size: 13px;
}
.contact-qr {
  width: 144px; height: 144px;
  border-radius: 8px;
}

/* ── 响应式 ── */
@media (max-width: 600px) {
  .topbar-row { flex-direction: column; align-items: center; gap: 6px; }
  .page { padding: 36px 16px 48px; }
  .hero h1 { font-size: 22px; }
  .step { flex-direction: column; }
  .step-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .scene-grid { grid-template-columns: 1fr; }
  .pay-cards { flex-direction: column; }
  .cta-cmd { font-size: 14px; padding: 12px 20px; }
}
