/* 用户数据导出包内的统一样式。
   配色参考 web-ui src/styles/var.css，所有变量内联（离线可用）。
   主色 #5db89d（青绿色），文字 #020617，浅灰背景 #f5f5f7。
*/

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               "Noto Sans CJK SC", sans-serif;
  background-color: #f5f5f7;
  color: #020617;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 48px 24px;
}

.page-header {
  margin-bottom: 40px;
}

.page-title {
  margin: 0 0 8px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.page-subtitle {
  margin: 0;
  font-size: 15px;
  color: #6e6e73;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.notice {
  background: #f0faf6;
  border-left: 4px solid #5db89d;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: #2a5e4f;
}

.notice strong { color: #1f4438; }

.warn {
  background: #fff8e6;
  border-left: 4px solid #f0a500;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: #6b5500;
}

a { color: #5db89d; text-decoration: none; }
a:hover { text-decoration: underline; }

/* 索引页：对话列表 */
.conversation-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.conversation-item {
  padding: 16px 0;
  border-bottom: 1px solid #ececef;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.conversation-item:last-child { border-bottom: none; }

.conversation-link {
  flex: 1 1 auto;
  font-size: 16px;
  font-weight: 500;
  color: #020617;
}
.conversation-link:hover { color: #5db89d; }

.conversation-meta {
  flex: 0 0 auto;
  font-size: 13px;
  color: #86868b;
  white-space: nowrap;
}

/* 单对话页：消息气泡 */
.back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 14px;
  color: #6e6e73;
}

.chat-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.4px;
}

.chat-time {
  margin: 0 0 32px;
  font-size: 13px;
  color: #86868b;
}

.message {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
}

.message.user { align-items: flex-end; }
.message.assistant { align-items: flex-start; }

.bubble {
  max-width: 85%;
  padding: 16px 20px;
  border-radius: 16px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.message.user .bubble {
  background: rgba(233, 233, 233, 0.5);
  color: #020617;
  border-bottom-right-radius: 4px;
}

.message.assistant .bubble {
  background: #ffffff;
  color: #020617;
  border: 1px solid #ececef;
  border-bottom-left-radius: 4px;
}

.message-meta {
  margin-top: 4px;
  font-size: 11px;
  color: #86868b;
  padding: 0 8px;
}

.message.user .message-meta { text-align: right; }

.file-meta {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
  font-size: 12px;
  color: #6e6e73;
}

.file-meta-item {
  display: inline-block;
  margin-right: 12px;
  margin-bottom: 4px;
  cursor: help;
}

/* Markdown */
.markdown { font-size: 15px; line-height: 1.7; }
.markdown h1, .markdown h2, .markdown h3, .markdown h4 {
  margin: 1.5em 0 0.6em;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.markdown h1 { font-size: 24px; }
.markdown h2 { font-size: 20px; }
.markdown h3 { font-size: 17px; }
.markdown h4 { font-size: 15px; }
.markdown p { margin: 0.6em 0; }
.markdown ul, .markdown ol { margin: 0.6em 0; padding-left: 24px; }
.markdown li { margin: 0.3em 0; }
.markdown code {
  background: #f5f5f7;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
}
.markdown pre {
  background: #1d1d1f;
  color: #f5f5f7;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
}
.markdown pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  font-size: inherit;
}
.markdown blockquote {
  margin: 0.8em 0;
  padding: 4px 16px;
  border-left: 3px solid #5db89d;
  background: #f5f5f7;
  color: #6e6e73;
}
.markdown table {
  border-collapse: collapse;
  margin: 1em 0;
  width: 100%;
  font-size: 14px;
}
.markdown th, .markdown td {
  border: 1px solid #e0e0e0;
  padding: 8px 12px;
  text-align: left;
}
.markdown th { background: #f5f5f7; font-weight: 600; }
.markdown a { color: #5db89d; }

.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: #86868b;
}

.footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #ececef;
  font-size: 12px;
  color: #86868b;
  text-align: center;
}
