/* ===== 数字坊AI销售助手小程序 - 全局样式 ===== */
/* 美学方向：Obsidian Ledger — 深色精炼的移动端AI销售体验 */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700;900&family=Noto+Sans+SC:wght@300;400;500;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* 背景层 */
  --bg-base: #0D1117;
  --bg-elevated: #161B22;
  --bg-card: #1C2128;
  --bg-card-hover: #222831;
  --bg-input: #0D1117;

  /* 主色 */
  --gold: #E8B86D;
  --gold-dim: #C4956B;
  --gold-glow: rgba(232, 184, 109, 0.12);
  --gold-border: rgba(232, 184, 109, 0.2);

  /* 功能色 */
  --green: #7DD3A0;
  --blue: #5BA8D4;
  --rose: #E56B6B;
  --amber: #F0A04B;

  /* 文字 */
  --text-primary: #E6EDF3;
  --text-secondary: #8B949E;
  --text-muted: #6B7280;

  /* 边框 */
  --border: rgba(255, 255, 255, 0.06);
  --border-active: rgba(232, 184, 109, 0.35);

  /* 渐变 */
  --gradient-gold: linear-gradient(135deg, #E8B86D 0%, #C4956B 100%);
  --gradient-bg: radial-gradient(ellipse at top, #1C2128 0%, #0D1117 60%);
  --gradient-card: linear-gradient(145deg, #1C2128 0%, #161B22 100%);

  /* 阴影 */
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.4);
  --shadow-float: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 0 20px rgba(232, 184, 109, 0.15);

  /* 圆角 */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-full: 999px;

  /* 动效 */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur: 0.3s;

  /* 布局 */
  --tabbar-h: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Noto Sans SC', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 噪点纹理叠加 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.5;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; }

/* ===== 小程序容器 ===== */
.miniapp {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--gradient-bg);
  position: relative;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom));
  overflow: hidden;
}

/* ===== 顶部状态栏模拟 ===== */
.status-bar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(20px);
}

.status-bar .time { font-family: 'JetBrains Mono', monospace; }
.status-bar .icons { display: flex; gap: 6px; align-items: center; }
.status-bar .icons span { font-size: 11px; }

/* ===== 页面容器 ===== */
.page {
  display: none;
  animation: pageIn 0.4s var(--ease);
  padding: 0 16px;
}
.page.active { display: block; }

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

/* ===== 底部 Tab Bar ===== */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  padding-top: 8px;
  z-index: 200;
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  color: var(--text-muted);
  transition: color var(--dur) var(--ease);
  position: relative;
}

.tab-item.active { color: var(--gold); }

.tab-item .tab-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dur) var(--ease-spring);
}

.tab-item.active .tab-icon { transform: scale(1.1) translateY(-1px); }
.tab-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  width: 24px;
  height: 2px;
  background: var(--gold);
  border-radius: 0 0 2px 2px;
  box-shadow: 0 0 8px var(--gold-glow);
}

.tab-item .tab-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* ===== 通用组件 ===== */

/* 品牌头部 */
.brand-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 0 8px;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1C2128 0%, #0D1117 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid var(--gold-border);
  box-shadow: var(--shadow-gold);
  flex-shrink: 0;
  position: relative;
}

.brand-logo::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 10px;
  padding: 1px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--blue) 50%, var(--green) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.brand-name {
  font-family: 'Noto Serif SC', serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.brand-sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* 渐变文字 */
.text-gradient {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 卡片 */
.card {
  background: var(--gradient-card);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  padding: 16px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.card:active {
  border-color: var(--border-active);
  transform: scale(0.98);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-gold);
  color: #0D1117;
  box-shadow: 0 2px 12px rgba(232, 184, 109, 0.25);
}

.btn-primary:active {
  transform: scale(0.96);
  box-shadow: 0 1px 6px rgba(232, 184, 109, 0.2);
}

.btn-ghost {
  background: rgba(232, 184, 109, 0.08);
  color: var(--gold);
  border: 1px solid var(--gold-border);
}

.btn-ghost:active {
  background: rgba(232, 184, 109, 0.15);
}

/* 标签 */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.tag-gold { background: var(--gold-glow); color: var(--gold); }
.tag-green { background: rgba(125, 211, 160, 0.12); color: var(--green); }
.tag-blue { background: rgba(91, 168, 212, 0.12); color: var(--blue); }
.tag-rose { background: rgba(229, 107, 107, 0.12); color: var(--rose); }

/* ===== 首页样式 ===== */

/* Hero 区 */
.hero-section {
  padding: 20px 0 24px;
  position: relative;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-full);
  background: rgba(125, 211, 160, 0.1);
  border: 1px solid rgba(125, 211, 160, 0.2);
  font-size: 11px;
  color: var(--green);
  margin-bottom: 14px;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.hero-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 18px;
}

.hero-actions {
  display: flex;
  gap: 10px;
}

/* 快捷入口 */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}

.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 4px;
  background: var(--bg-card);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  transition: all var(--dur) var(--ease);
}

.quick-item:active {
  border-color: var(--border-active);
  transform: scale(0.95);
}

.quick-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.quick-label {
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* 生命周期状态卡 */
.lifecycle-card {
  margin-bottom: 16px;
  overflow: hidden;
}

.lifecycle-card .card-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.lifecycle-card .card-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.lifecycle-track {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 12px;
}

.lifecycle-node {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
}

.lifecycle-node .node-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  border: 1.5px solid;
  transition: all var(--dur) var(--ease-spring);
}

.lifecycle-node.done .node-dot {
  background: rgba(125, 211, 160, 0.15);
  border-color: var(--green);
  color: var(--green);
}

.lifecycle-node.current .node-dot {
  background: var(--gold-glow);
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 12px var(--gold-glow);
  animation: nodePulse 2s infinite;
}

@keyframes nodePulse {
  0%, 100% { box-shadow: 0 0 12px var(--gold-glow); }
  50% { box-shadow: 0 0 20px rgba(232, 184, 109, 0.3); }
}

.lifecycle-node.future .node-dot {
  background: var(--bg-card);
  border-color: var(--border);
  color: var(--text-muted);
}

.lifecycle-node .node-label {
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
}

.lifecycle-node.current .node-label { color: var(--gold); }
.lifecycle-node.done .node-label { color: var(--green); }

.lifecycle-line {
  position: absolute;
  top: 14px;
  left: 50%;
  width: 100%;
  height: 1.5px;
  background: var(--border);
  z-index: -1;
}

.lifecycle-node.done .lifecycle-line { background: var(--green); }

/* 方案推荐卡片 */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 16px;
  font-weight: 700;
}

.section-link {
  font-size: 11px;
  color: var(--gold);
}

/* 横向滚动方案卡 */
.solution-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin: 0 -16px;
  padding: 0 16px 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.solution-scroll::-webkit-scrollbar { display: none; }

.solution-card {
  min-width: 200px;
  background: var(--gradient-card);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
  transition: border-color var(--dur) var(--ease);
}

.solution-card:active { border-color: var(--border-active); }

.solution-thumb {
  height: 90px;
  background: linear-gradient(135deg, #1C2128, #222831);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  position: relative;
  overflow: hidden;
}

.solution-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(232, 184, 109, 0.08), transparent 60%);
}

.solution-body {
  padding: 10px 12px;
}

.solution-name {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.solution-desc {
  font-size: 10px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 最近活动 */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}

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

.activity-text {
  flex: 1;
  font-size: 12px;
  color: var(--text-secondary);
}

.activity-time {
  font-size: 10px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
}

/* ===== AI 对话页样式 ===== */

.chat-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 44px - var(--tabbar-h) - var(--safe-bottom));
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.chat-agent-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  position: relative;
}

.chat-agent-avatar::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--bg-base);
}

.chat-agent-info { flex: 1; }

.chat-agent-name {
  font-size: 14px;
  font-weight: 600;
}

.chat-agent-status {
  font-size: 10px;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-agent-status::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.chat-messages::-webkit-scrollbar { width: 3px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* 消息气泡 */
.msg {
  display: flex;
  gap: 8px;
  max-width: 88%;
  animation: msgIn 0.35s var(--ease-spring);
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.msg-ai { align-self: flex-start; }
.msg-user { align-self: flex-end; flex-direction: row-reverse; }

.msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.msg-ai .msg-avatar {
  background: var(--gradient-gold);
}

.msg-user .msg-avatar {
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.msg-bubble {
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.65;
  position: relative;
}

.msg-ai .msg-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top-left-radius: 4px;
  color: var(--text-primary);
}

.msg-user .msg-bubble {
  background: var(--gold-glow);
  border: 1px solid var(--gold-border);
  border-top-right-radius: 4px;
  color: var(--gold);
}

/* 分析详情按钮 */
.msg-analyze {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--r-sm);
  background: rgba(91, 168, 212, 0.08);
  border: 1px solid rgba(91, 168, 212, 0.15);
  font-size: 10px;
  color: var(--blue);
  transition: all var(--dur) var(--ease);
}

.msg-analyze:active {
  background: rgba(91, 168, 212, 0.15);
  transform: scale(0.96);
}

/* 消息中的意图标签 */
.msg-intents {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.msg-intent-tag {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: var(--r-full);
  font-family: 'JetBrains Mono', monospace;
}

/* 快速回复 */
.quick-replies {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 0;
  scrollbar-width: none;
}

.quick-replies::-webkit-scrollbar { display: none; }

.quick-reply {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: var(--r-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-secondary);
  transition: all var(--dur) var(--ease);
}

.quick-reply:active {
  border-color: var(--gold-border);
  color: var(--gold);
  background: var(--gold-glow);
}

/* 输入栏 */
.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.chat-input {
  flex: 1;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--r-full);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color var(--dur) var(--ease);
}

.chat-input:focus { border-color: var(--border-active); }

.chat-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gradient-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #0D1117;
  flex-shrink: 0;
  transition: transform var(--dur) var(--ease-spring);
}

.chat-send:active { transform: scale(0.88); }

/* 打字指示器 */
.typing-dots {
  display: flex;
  gap: 4px;
  padding: 4px 0;
}

.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ===== 方案页样式 ===== */

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  height: 38px;
  border-radius: var(--r-full);
  background: var(--bg-input);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

.search-bar input::placeholder { color: var(--text-muted); }

.category-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar { display: none; }

.cat-tab {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all var(--dur) var(--ease);
}

.cat-tab.active {
  background: var(--gold-glow);
  border-color: var(--gold-border);
  color: var(--gold);
}

.solution-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.solution-item {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--gradient-card);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  transition: border-color var(--dur) var(--ease);
}

.solution-item:active { border-color: var(--border-active); }

.solution-item-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

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

.solution-item-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.solution-item-desc {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.solution-item-meta {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

/* ===== 我的页样式 ===== */

.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 0;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.profile-name {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px;
  font-weight: 700;
}

.profile-tag {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 状态卡 */
.status-card {
  margin-bottom: 16px;
  background: linear-gradient(135deg, rgba(232, 184, 109, 0.06) 0%, rgba(91, 168, 212, 0.04) 100%);
  border: 1px solid var(--gold-border);
}

.status-card .card-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-current {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
}

.status-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.status-info { flex: 1; }

.status-name {
  font-size: 13px;
  font-weight: 600;
}

.status-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.status-progress {
  height: 4px;
  background: var(--bg-input);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 12px;
}

.status-progress-bar {
  height: 100%;
  background: var(--gradient-gold);
  border-radius: 2px;
  transition: width 0.6s var(--ease);
}

/* 菜单列表 */
.menu-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  transition: background var(--dur) var(--ease);
}

.menu-item:active { background: var(--bg-card-hover); }

.menu-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.menu-text {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
}

.menu-arrow {
  color: var(--text-muted);
  font-size: 12px;
}

.menu-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: var(--gold-glow);
  color: var(--gold);
}

/* ===== 弹窗 ===== */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur) var(--ease);
}

.popup-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.popup {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 430px;
  background: var(--bg-elevated);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  z-index: 501;
  transition: transform 0.4s var(--ease-spring);
  max-height: 75vh;
  overflow-y: auto;
}

.popup.show {
  transform: translateX(-50%) translateY(0);
}

.popup-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 10px auto;
}

.popup-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  padding: 0 20px;
}

.popup-content {
  padding: 0 20px 30px;
}

/* 分析详情弹窗内容 */
.analyze-section {
  margin-bottom: 18px;
}

.analyze-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.analyze-timeline {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.analyze-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-card);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}

.analyze-step-name {
  flex: 1;
  font-size: 12px;
}

.analyze-step-time {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--gold);
}

.analyze-bar {
  height: 3px;
  background: var(--bg-input);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.analyze-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.8s var(--ease);
}

/* 顾问对接弹窗 */
.connect-card {
  text-align: center;
  padding: 20px 0;
}

.connect-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--gold-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 16px;
}

.connect-title {
  font-family: 'Noto Serif SC', serif;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.connect-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

/* ===== 页脚 ===== */
.mini-footer {
  text-align: center;
  padding: 24px 0 16px;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

/* ===== 模拟/真实模式切换 ===== */
.mode-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 11px;
  margin-bottom: 8px;
  transition: all var(--dur) var(--ease);
}

.mode-banner.demo {
  background: rgba(240, 160, 75, 0.08);
  border: 1px solid rgba(240, 160, 75, 0.2);
  color: var(--amber);
}

.mode-banner.real {
  background: rgba(125, 211, 160, 0.08);
  border: 1px solid rgba(125, 211, 160, 0.2);
  color: var(--green);
}

.mode-banner-icon { font-size: 14px; flex-shrink: 0; }
.mode-banner-text { flex: 1; line-height: 1.4; }

.mode-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mode-toggle-label {
  font-size: 10px;
  color: var(--text-muted);
}

.mode-switch {
  width: 36px;
  height: 20px;
  border-radius: 10px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  position: relative;
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}

.mode-switch.on {
  background: rgba(125, 211, 160, 0.2);
  border-color: var(--green);
}

.mode-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all var(--dur) var(--ease-spring);
}

.mode-switch.on::after {
  left: 18px;
  background: var(--green);
}

/* 模拟消息标识 */
.msg-sim-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: var(--r-full);
  background: rgba(240, 160, 75, 0.1);
  color: var(--amber);
  margin-left: 4px;
  font-family: 'JetBrains Mono', monospace;
}

/* 真实模式输入栏禁用态 */
.chat-input-bar.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.real-mode-notice {
  padding: 12px;
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ===== 报告/关于弹窗内容 ===== */
.report-section {
  margin-bottom: 16px;
}

.report-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.report-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.report-score-row:last-child { border-bottom: none; }

.report-score-label {
  font-size: 12px;
  color: var(--text-secondary);
}

.report-score-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
}

.report-bar {
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 4px;
}

.report-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s var(--ease);
}

.about-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, #1C2128 0%, #0D1117 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid var(--gold-border);
  box-shadow: var(--shadow-gold);
  margin: 0 auto 16px;
}

.about-name {
  font-family: 'Noto Serif SC', serif;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}

.about-version {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 20px;
}

.about-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.8;
  text-align: center;
  margin-bottom: 20px;
  padding: 0 8px;
}

.about-stats {
  display: flex;
  gap: 1px;
  background: var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: 20px;
}

.about-stat {
  flex: 1;
  padding: 14px 8px;
  background: var(--bg-card);
  text-align: center;
}

.about-stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
}

.about-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* 顾问详情卡 */
.consultant-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.consultant-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.consultant-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gold-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.consultant-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.consultant-stats {
  display: flex;
  gap: 16px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}

.consultant-stat-item {
  flex: 1;
  text-align: center;
}

.consultant-stat-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
}

.consultant-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== 滚动渐入 ===== */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}
