/* static/style.css - v2 多智能体版 */
 
:root {
  --bg: #faf8f5;
  --fg: #1a1d21;
  --muted: #6b7280;
  --accent: #4338ca;
  --accent-light: rgba(67, 56, 202, 0.08);
  --accent-hover: #3730a3;
  --card: #ffffff;
  --border: #e5e7eb;
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-bg: #f8f9fa;
  --warm-gray: #a8a29e;
  --warm-light: #f5f3f0;
}
 
* { margin: 0; padding: 0; box-sizing: border-box; }
 
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: #f5f3f0;
  color: var(--fg);
  line-height: 1.6;
  overflow-x: hidden;
}
 
#particles-canvas {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
 
.page { display: none; min-height: 100vh; position: relative; z-index: 1; }
.page.active { display: block; }
 
/* 导航栏 */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(245, 243, 240, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s;
}
nav.scrolled { box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06); }
.nav-inner {
  max-width: 1400px; margin: 0 auto; padding: 16px 24px;
  display: flex; justify-content: space-between; align-items: center;
}
.logo { font-size: 16px; font-weight: 700; color: var(--fg); display: flex; align-items: center; gap: 12px; cursor: pointer; }
.logo-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.logo-icon img { width: 100%; height: 100%; object-fit: cover; }
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-size: 16px; font-weight: 700; color: var(--fg); line-height: 1.2; }
.logo-slogan { font-size: 11px; font-weight: 400; color: #a8a29e; line-height: 1.4; margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a { padding: 8px 16px; text-decoration: none; color: #a8a29e; font-size: 15px; font-weight: 500; border-radius: var(--radius-sm); transition: all 0.2s; cursor: pointer; }
.nav-links a:hover { color: var(--fg); background: rgba(255, 255, 255, 0.6); }
.nav-links a.active { color: var(--fg); background: rgba(255, 255, 255, 0.8); }
.nav-cta { padding: 10px 20px; background: var(--accent); color: white; border-radius: var(--radius-sm); font-weight: 500; font-size: 14px; cursor: pointer; transition: all 0.2s; border: none; }
.nav-cta:hover { background: var(--accent-hover); transform: translateY(-1px); }
 
/* 首页 Hero */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 120px 24px 80px; position: relative; background: linear-gradient(180deg, #fefdfb 0%, #faf8f5 100%); overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -50%; right: -20%; width: 600px; height: 600px; background: radial-gradient(circle, rgba(67, 56, 202, 0.05) 0%, transparent 70%); pointer-events: none; }
.hero::after { content: ''; position: absolute; bottom: -30%; left: -10%; width: 500px; height: 500px; background: radial-gradient(circle, rgba(168, 162, 158, 0.06) 0%, transparent 70%); pointer-events: none; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: rgba(255, 255, 255, 0.8); border-radius: 100px; font-size: 13px; font-weight: 500; color: var(--fg); margin-bottom: 24px; opacity: 0; transform: translateY(20px); animation: fadeUp 0.6s ease forwards 0.2s; border: 1px solid rgba(0, 0, 0, 0.06); }
.hero-badge-dot { width: 6px; height: 6px; background: #10b981; border-radius: 50%; animation: pulse 2s infinite; }
.hero h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 700; line-height: 1.15; margin-bottom: 20px; letter-spacing: -0.02em; opacity: 0; transform: translateY(30px); animation: fadeUp 0.7s ease forwards 0.3s; }
.hero h1 .highlight { color: var(--accent); }
.hero-desc { font-size: 18px; color: #a8a29e; max-width: 560px; margin-bottom: 40px; opacity: 0; transform: translateY(30px); animation: fadeUp 0.7s ease forwards 0.4s; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; opacity: 0; transform: translateY(30px); animation: fadeUp 0.7s ease forwards 0.5s; }
.btn-primary { display: inline-flex; align-items: center; gap: 8px; padding: 16px 32px; background: var(--accent); color: white; border-radius: var(--radius); text-decoration: none; font-weight: 500; font-size: 16px; transition: all 0.25s; cursor: pointer; border: none; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(67, 56, 202, 0.25); }
 
/* 功能区 */
.features { padding: 100px 24px; max-width: 1100px; margin: 0 auto; position: relative; background: #f5f3f0; }
.features::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 300px; height: 300px; background: radial-gradient(circle, rgba(168, 162, 158, 0.05) 0%, transparent 70%); pointer-events: none; }
.section-header { text-align: center; margin-bottom: 60px; }
.section-header h2 { font-size: 32px; font-weight: 600; margin-bottom: 12px; color: var(--fg); }
.section-header p { color: #a8a29e; font-size: 17px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.feature-card { background: var(--card); border-radius: var(--radius); padding: 32px; border: 1px solid rgba(0, 0, 0, 0.06); transition: all 0.3s; opacity: 0; transform: translateY(40px); position: relative; overflow: hidden; }
.feature-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--accent) 0%, #6366f1 100%); opacity: 0; transition: opacity 0.3s; }
.feature-card:nth-child(1)::before { background: linear-gradient(90deg, #4338ca 0%, #6366f1 100%); }
.feature-card:nth-child(2)::before { background: linear-gradient(90deg, #10b981 0%, #34d399 100%); }
.feature-card:nth-child(3)::before { background: linear-gradient(90deg, #8b5cf6 0%, #a78bfa 100%); }
.feature-card.visible { opacity: 1; transform: translateY(0); }
.feature-card:hover { border-color: transparent; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08); transform: translateY(-4px); }
.feature-card:hover::before { opacity: 1; }
.feature-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.feature-card:nth-child(1) .feature-icon { background: rgba(67, 56, 202, 0.1); }
.feature-card:nth-child(2) .feature-icon { background: rgba(16, 185, 129, 0.1); }
.feature-card:nth-child(3) .feature-icon { background: rgba(139, 92, 246, 0.1); }
.feature-icon svg { width: 24px; height: 24px; fill: none; stroke-width: 2; }
.feature-card:nth-child(1) .feature-icon svg { stroke: #4338ca; }
.feature-card:nth-child(2) .feature-icon svg { stroke: #10b981; }
.feature-card:nth-child(3) .feature-icon svg { stroke: #8b5cf6; }
.feature-card h3 { font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.feature-card p { color: #a8a29e; font-size: 15px; line-height: 1.7; }
 
/* 场景区 */
.scenarios { padding: 80px 24px; background: linear-gradient(180deg, var(--bg) 0%, var(--accent-light) 100%); }
.scenarios-inner { max-width: 1100px; margin: 0 auto; }
.scenario-list { display: flex; flex-direction: column; gap: 16px; margin-top: 40px; }
.scenario-item { display: flex; align-items: center; gap: 20px; padding: 24px 28px; background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); transition: all 0.3s; cursor: pointer; opacity: 0; transform: translateX(-30px); }
.scenario-item.visible { opacity: 1; transform: translateX(0); }
.scenario-item:hover { box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06); border-color: var(--accent); }
.scenario-num { width: 40px; height: 40px; background: var(--accent); color: white; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 16px; flex-shrink: 0; }
.scenario-content h4 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.scenario-content p { color: var(--muted); font-size: 14px; }
 
/* 聊天页面 - 新布局 */
.chat-page { display: none; height: 100vh; }
.chat-page.active { display: flex; }
.chat-container { display: flex; height: 100%; width: 100%; }
 
/* 左侧：智能体列表 */
.chat-agents-sidebar {
  width: 240px;
  border-right: 1px solid var(--border);
  background: #f5f3f0;
  display: flex;
  flex-direction: column;
  padding: 0;
  flex-shrink: 0;
  overflow-y: auto;
}

.agent-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.agent-brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
  flex-shrink: 0;
}

.agent-brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agent-brand-text {
  display: flex;
  flex-direction: column;
}

.agent-brand-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.2;
}

.agent-brand-slogan {
  font-size: 11px;
  color: #a8a29e;
  line-height: 1.4;
  margin-top: 2px;
}

.agent-sidebar-header {
  padding: 16px 16px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #a8a29e;
  letter-spacing: 0.5px;
}

.agent-list {
  display: flex;
  flex-direction: column;
  padding: 0 12px;
  gap: 0;
}

.agent-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 12px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  position: relative;
  background: transparent;
}

.agent-card:hover {
  background: rgba(255, 255, 255, 0.6);
}

.agent-card.active {
  background: rgba(255, 255, 255, 0.8);
  border: 1.5px solid var(--accent);
}

.agent-card:not(.active) {
  border: 1.5px solid transparent;
}

.agent-step {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  background: var(--border);
  color: var(--muted);
  transition: all 0.2s;
}

.agent-card.active .agent-step {
  background: var(--accent);
  color: white;
}

.agent-card:hover .agent-step {
  background: var(--accent);
  color: white;
}

.agent-info {
  flex: 1;
  min-width: 0;
}

.agent-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 2px;
  transition: color 0.2s;
}

.agent-card.active .agent-name {
  color: var(--accent);
}

.agent-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.agent-sub-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 46px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  background: transparent;
  margin-top: 4px;
}

.agent-sub-item:hover {
  background: rgba(255, 255, 255, 0.6);
}

.agent-sub-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(139, 92, 246, 0.1);
}

.agent-sub-icon svg {
  width: 14px;
  height: 14px;
  stroke: #8b5cf6;
}

.agent-sub-item:hover .agent-sub-icon {
  background: rgba(139, 92, 246, 0.2);
}

.agent-sub-info {
  flex: 1;
  min-width: 0;
}

.agent-sub-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  margin-bottom: 1px;
}

.agent-sub-desc {
  font-size: 11px;
  color: var(--muted);
}

.agent-sub-item:hover .agent-sub-name {
  color: #8b5cf6;
}

.agent-arrow {
  display: flex;
  justify-content: center;
  padding: 4px 0;
  color: var(--border);
}

.agent-arrow svg {
  width: 16px;
  height: 16px;
}

.agent-sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
  margin-bottom: 8px;
}

.footer-item:hover {
  background: rgba(139, 92, 246, 0.08);
}

.footer-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.footer-icon svg {
  width: 14px;
  height: 14px;
  stroke: white;
}

.footer-text {
  flex: 1;
  min-width: 0;
}

.footer-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
}

.footer-desc {
  font-size: 11px;
  color: var(--muted);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: rgba(139, 92, 246, 0.04);
  border-radius: var(--radius-sm);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}

.logout-btn {
  width: 100%;
  padding: 10px;
  background: transparent;
  color: #a8a29e;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.agent-footer-placeholder {
  text-align: center;
  padding: 20px;
  color: #a8a29e;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-sm);
  border: 1px dashed #d6d3d1;
}
 
/* 中间：历史记录 */
.chat-sidebar {
  width: 260px;
  border-right: 1px solid var(--border);
  background: #faf8f5;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 20px 16px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.sidebar-title {
  font-size: 12px;
  font-weight: 600;
  color: #a8a29e;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.sidebar-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}

.sidebar-actions {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.new-chat-btn {
  width: 100%;
  padding: 10px;
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(67, 56, 202, 0.2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.new-chat-btn:hover {
  background: rgba(67, 56, 202, 0.08);
  border-color: var(--accent);
}

.new-chat-btn svg {
  width: 16px;
  height: 16px;
}

.chat-history {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.history-card {
  padding: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 8px;
  background: transparent;
  position: relative;
}

.history-card:hover {
  background: rgba(255, 255, 255, 0.6);
}

.history-card.active {
  background: rgba(255, 255, 255, 0.8);
  border: 1.5px solid var(--accent);
}

.history-card:not(.active) {
  border: 1.5px solid transparent;
}

.history-card-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.history-card-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.history-card.active .history-card-icon {
  background: var(--accent-light);
}

.history-card-icon svg {
  width: 14px;
  height: 14px;
  stroke: var(--muted);
}

.history-card.active .history-card-icon svg {
  stroke: var(--accent);
}

.history-card-content {
  flex: 1;
  min-width: 0;
}

.history-card-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-card-time {
  font-size: 11px;
  color: #a8a29e;
  margin-top: 2px;
}

.history-card-delete {
  position: absolute;
  right: 8px;
  top: 8px;
  background: transparent;
  border: none;
  color: #a8a29e;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s;
  padding: 4px;
  border-radius: 4px;
}

.history-card:hover .history-card-delete {
  opacity: 1;
}

.history-card-delete:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
}
 
/* 右侧：主对话区 */
.chat-main { flex: 1; display: flex; flex-direction: column; background: var(--bg); min-width: 0; }
.chat-messages { flex: 1; overflow-y: auto; padding: 32px; display: flex; flex-direction: column; gap: 24px; }
 
/* 消息气泡 */
.message { display: flex; gap: 16px; max-width: 800px; animation: messageIn 0.3s ease; position: relative; }
.message.user { margin-left: auto; flex-direction: row-reverse; }
.message-avatar { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; background: #eee; }
.message-avatar img { width: 100%; height: 100%; object-fit: cover; }
.message.assistant .message-avatar { background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%); }
.message.user .message-avatar { background: var(--accent-light); }
.message-content { padding: 16px 20px; padding-bottom: 40px; border-radius: var(--radius); font-size: 15px; line-height: 1.7; position: relative; }
.message.assistant .message-content { background: var(--card); border: 1px solid var(--border); }
.message.user .message-content { background: var(--accent); color: white; }
 
/* Markdown 渲染样式 */
.message-content h1, .message-content h2, .message-content h3 { margin: 16px 0 8px; font-weight: 600; line-height: 1.3; }
.message-content p { margin-bottom: 12px; }
.message-content ul, .message-content ol { padding-left: 20px; margin-bottom: 12px; }
.message-content li { margin-bottom: 4px; }
.message-content code { background: rgba(0, 0, 0, 0.05); padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 0.9em; }
.message-content pre { background: #2d2d2d; color: #f8f8f2; padding: 12px; border-radius: 8px; overflow-x: auto; margin: 12px 0; }
.message-content pre code { background: none; padding: 0; font-size: 13px; }
 
/* 复制按钮 */
.copy-btn { position: absolute; bottom: 8px; right: 8px; background-color: rgba(67, 56, 202, 0.08); color: #000; border: none; border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer; opacity: 0; transition: all 0.2s; z-index: 10; }
.message.assistant .message-content:hover .copy-btn { opacity: 1; }
.copy-btn:hover { background-color: rgba(67, 56, 202, 0.15); }
.copy-btn.copied { background-color: #d1fae5; color: #047857; }
 
/* 欢迎屏幕 */
.welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 40px 60px;
}

.welcome-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  overflow: hidden;
}

.welcome-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.welcome-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--fg);
}

.welcome-text {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
  max-width: 480px;
}
 
/* 输入区 */
.chat-input-area { padding: 20px 32px 32px; background: var(--bg); flex-shrink: 0; }
.profile-selector-wrapper {
  max-width: 800px;
  margin: 0 auto 8px;
  position: relative;
}
.profile-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--muted);
}
.profile-icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.profile-icon-btn.has-profile {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.profile-icon-btn svg {
  width: 18px;
  height: 18px;
}
.input-wrapper { max-width: 800px; margin: 0 auto; display: flex; gap: 8px; padding: 8px 8px 8px 20px; background: var(--card); border: 1px solid var(--border); border-radius: 20px; transition: border-color 0.2s, box-shadow 0.2s; }
.input-wrapper:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.1); }
.chat-input { flex: 1; border: none; outline: none; font-size: 15px; font-family: inherit; background: transparent; resize: none; max-height: 120px; }
.voice-btn { width: 44px; height: 44px; background: transparent; border: 1px solid var(--border); border-radius: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; color: #a8a29e; }
.voice-btn:hover { background: rgba(67, 56, 202, 0.08); border-color: var(--accent); color: var(--accent); }
.voice-btn.recording { background: #ef4444; border-color: #ef4444; color: white; }
.voice-btn svg { width: 20px; height: 20px; }
.send-btn { width: 44px; height: 44px; background: var(--accent); border: none; border-radius: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; }
.send-btn:hover { background: var(--accent-hover); }
.send-btn:disabled { background: #d1cdc7; cursor: not-allowed; }
.send-btn svg { width: 20px; height: 20px; stroke: white; fill: none; stroke-width: 2; }

.recording-indicator {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 12px 24px;
  border-radius: 100px;
  display: none;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  animation: fadeInUp 0.2s ease;
}

.recording-indicator.show {
  display: flex;
}

.recording-dot {
  width: 12px;
  height: 12px;
  background: #ef4444;
  border-radius: 50%;
  animation: recordingPulse 1s infinite;
}

@keyframes recordingPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
 
/* 动画 */
.typing-indicator { display: flex; gap: 4px; padding: 16px 20px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); width: fit-content; }
.typing-dot { width: 8px; height: 8px; background: var(--muted); border-radius: 50%; animation: typingBounce 1.4s infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
 
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes messageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }
 
/* 登录弹窗 */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.4); z-index: 2000; display: none; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.modal-content { background: #faf8f5; padding: 40px; border-radius: var(--radius); width: 100%; max-width: 400px; position: relative; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15); animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes popIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.close-modal { position: absolute; top: 16px; right: 16px; background: rgba(0, 0, 0, 0.05); border: none; font-size: 18px; color: #a8a29e; cursor: pointer; line-height: 1; width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.close-modal:hover { background: rgba(0, 0, 0, 0.08); color: var(--fg); }

.modal-logo { text-align: center; margin-bottom: 28px; }
.modal-logo-icon { width: 56px; height: 56px; border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%); display: inline-flex; align-items: center; justify-content: center; }
.modal-logo-icon img { width: 100%; height: 100%; object-fit: cover; }

.modal-tabs { display: flex; gap: 8px; margin-bottom: 28px; background: rgba(0, 0, 0, 0.04); padding: 4px; border-radius: 10px; }
.modal-tab { flex: 1; padding: 10px 16px; cursor: pointer; color: #a8a29e; font-weight: 500; font-size: 14px; transition: all 0.2s; text-align: center; border-radius: 8px; border: none; }
.modal-tab.active { background: var(--accent); color: white; }
.modal-tab:hover:not(.active) { color: var(--fg); }

.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; font-size: 13px; color: #a8a29e; font-weight: 500; }
.form-group input { width: 100%; padding: 14px 16px; border: 1px solid rgba(0, 0, 0, 0.06); border-radius: var(--radius-sm); font-size: 15px; outline: none; transition: all 0.2s; box-sizing: border-box; background: #ffffff; }
.form-group input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.08); }
.form-group input::placeholder { color: #c4b8b0; }
.btn-submit { width: 100%; padding: 14px; background: var(--accent); color: white; border: none; border-radius: var(--radius-sm); font-size: 15px; font-weight: 500; cursor: pointer; transition: all 0.2s; margin-top: 10px; }
.btn-submit:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-submit:disabled { background: #d1cdc7; cursor: not-allowed; transform: none; }
.error-msg { color: #ef4444; font-size: 13px; margin-top: 10px; text-align: center; display: none; background: rgba(239, 68, 68, 0.08); padding: 10px; border-radius: 8px; }
.loading { display: none; width: 20px; height: 20px; border: 2px solid #fff; border-top-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }
 
/* 移动端基础样式 - 必须放在媒体查询之前 */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  align-items: center;
  padding: 0 12px;
  z-index: 1000;
  gap: 12px;
}

.mobile-menu-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  transition: all 0.2s;
}

.mobile-menu-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.mobile-menu-btn svg {
  width: 24px;
  height: 24px;
}

.mobile-nav-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-new-chat-btn {
  padding: 8px 14px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.mobile-new-chat-btn:hover {
  background: var(--accent-hover);
}

.mobile-new-chat-btn svg {
  width: 14px;
  height: 14px;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
  display: block;
  opacity: 1;
}

.mobile-session-section {
  display: none;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  background: #faf8f5;
  flex: 1;
  overflow-y: auto;
  flex-direction: column;
}

.mobile-session-header {
  padding: 16px 16px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-session-title {
  font-size: 12px;
  font-weight: 600;
  color: #a8a29e;
  letter-spacing: 0.5px;
}

.mobile-session-list {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 12px;
}

/* 移动端适配媒体查询 */
@media (max-width: 1024px) {
  .chat-agents-sidebar { width: 60px; }
  .agent-sidebar-header { display: none; }
  .agent-list { padding: 8px; }
  .agent-card { padding: 10px; }
  .agent-info { display: none; }
  .agent-step { width: 36px; height: 36px; font-size: 14px; }
  .agent-arrow { display: none; }
  .agent-sidebar-footer { display: none; }
}

@media (max-width: 768px) {
  .chat-agents-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: none;
  }
  .chat-agents-sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  }
  .chat-sidebar { display: none; }
  .agent-sidebar-header { display: block; }
  .agent-list { padding: 0 12px; }
  .agent-card { padding: 14px 12px; }
  .agent-info { display: block; }
  .agent-step { width: 28px; height: 28px; font-size: 13px; }
  .agent-arrow { display: flex; }
  .agent-sidebar-footer { display: block; margin-top: auto; }
  .mobile-nav { display: flex !important; }
  .mobile-session-section { display: flex; }
  .chat-main { padding-top: 56px; }
  .chat-messages { padding: 16px; gap: 16px; }
  .chat-input-area { padding: 12px; }
  .message { gap: 12px; }
  .message-avatar { width: 32px; height: 32px; }
  .message-content { padding: 12px 16px; padding-bottom: 36px; font-size: 14px; }
  .hero h1 { font-size: 32px; }
  .feature-grid { grid-template-columns: 1fr; }
  .welcome-screen { padding: 24px; }
  .welcome-icon { width: 64px; height: 64px; }
  .welcome-title { font-size: 22px; }
  .welcome-text { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
footer { text-align: center; padding: 40px 24px; color: #a8a29e; font-size: 14px; background: #f5f3f0; }

/* 档案选择器样式 */
.profile-selector-area {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 800px;
  margin: 0 auto 12px;
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.profile-selector-area label {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.profile-selector-area select {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg);
  color: var(--fg);
  cursor: pointer;
  outline: none;
  max-width: 300px;
}

.profile-selector-area select:focus {
  border-color: var(--accent);
}

.profile-manage-link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}

.profile-manage-link:hover {
  text-decoration: underline;
}

/* 历史记录中的档案标记 */
.profile-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
  font-weight: 500;
}

/* 用户信息中的档案管理入口按钮 */
.profile-link-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(67, 56, 202, 0.08);
  color: var(--accent);
  text-decoration: none;
  transition: all 0.2s;
  font-size: 13px;
  font-weight: 500;
}

.profile-link-btn:hover {
  background: rgba(67, 56, 202, 0.15);
}

.profile-link-btn svg {
  stroke: var(--accent);
}

.profile-link-text {
  color: var(--fg);
}

/* 档案下拉菜单 */
.profile-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  min-width: 200px;
  max-width: 280px;
  z-index: 100;
  overflow: hidden;
}
.profile-dropdown-header {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.02);
}
.profile-dropdown-list {
  max-height: 240px;
  overflow-y: auto;
}

.profile-dropdown-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-dropdown-item:hover {
  background: var(--accent-light);
}

.profile-dropdown-item.active {
  background: var(--accent-light);
  color: var(--accent);
}

.profile-dropdown-item.active .profile-dropdown-name {
  font-weight: 600;
}

.profile-dropdown-name {
  font-size: 14px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}