/* 雪宝——冰雪旅游AI智能引擎：冰雪蓝白主题 */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue: #1e6fdb;
  --blue-dark: #0d3b6e;
  --blue-light: #eaf4ff;
  --cta: #6c3df4;
  --orange: #ff8c1a;
  --text: #1f2d3d;
  --muted: #6b7c93;
  --bg: #f6fbff;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

a { color: var(--blue); text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block; padding: 12px 32px; border-radius: 24px;
  font-size: 16px; cursor: pointer; border: none; transition: opacity .2s, transform .2s;
}
.btn:hover { opacity: .9; transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-outline { background: transparent; color: #fff; border: 2px solid #fff; }
.btn-cta { background: var(--orange); color: #fff; }
.btn-back { background: var(--blue); color: #fff; padding: 8px 20px; font-size: 14px; }
.btn-send { background: var(--blue); color: #fff; padding: 10px 28px; border-radius: 20px; }

/* ---------- 头部 ---------- */
.site-header {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  padding: 20px 32px;
}
.site-header .logo img { height: 56px; width: auto; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; justify-content: center; }
.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  background-color: var(--blue-dark);
}
.hero-bg::after { content: ""; position: absolute; inset: 0; background: rgba(10, 40, 80, .45); }
.hero-content { position: relative; text-align: center; color: #fff; padding: 0 20px; }
.hero-content h1 { font-size: 44px; letter-spacing: 4px; margin-bottom: 32px; text-shadow: 0 2px 12px rgba(0,0,0,.4); }
.hero-actions { display: flex; gap: 20px; justify-content: center; }

/* ---------- 通用版块 ---------- */
.section { padding: 72px 20px; max-width: 1080px; margin: 0 auto; }
.section h2 { text-align: center; font-size: 30px; margin-bottom: 12px; }
.subtitle { text-align: center; color: var(--muted); margin-bottom: 36px; }
.subsection { margin-bottom: 56px; }
.subsection > h3 { text-align: center; font-size: 22px; margin-bottom: 8px; }

/* 核心优势 */
.feature-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature-card {
  background: #fff; border-radius: 12px; padding: 28px 20px; text-align: center;
  box-shadow: 0 4px 16px rgba(30, 111, 219, .08);
}
.feature-icon { font-size: 36px; margin-bottom: 12px; }
.feature-card h3 { font-size: 16px; margin-bottom: 10px; }
.feature-card p { font-size: 13px; color: var(--muted); }

/* 面向个人 */
.persona-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.persona-card {
  background: #fff; border-radius: 12px; padding: 28px 20px; text-align: center;
  box-shadow: 0 4px 16px rgba(30, 111, 219, .08);
}
.persona-icon { font-size: 32px; margin-bottom: 10px; }
.persona-card h4 { margin-bottom: 10px; }
.persona-card p { font-size: 13px; color: var(--muted); }

/* 面向行业 */
.industry { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; }
.industry-text h3 { text-align: left; font-size: 22px; margin-bottom: 4px; }
.industry-text .subtitle { text-align: left; margin-bottom: 20px; }
.industry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.industry-item { background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 2px 10px rgba(30,111,219,.07); }
.industry-icon { font-size: 24px; margin-bottom: 6px; }
.industry-item h4 { font-size: 14px; margin-bottom: 6px; }
.industry-item p { font-size: 12px; color: var(--muted); }
.industry-media img { border-radius: 12px; }

/* CTA 横幅 */
.cta-banner {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(90deg, var(--cta), #8f5bff);
  color: #fff; border-radius: 12px; padding: 28px 40px; font-size: 24px; font-weight: bold;
}

/* 调研与试点 */
.pilot-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.pilot-card img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px;
  border: 3px solid var(--blue-light); margin-bottom: 10px;
}
.pilot-card h4 { margin-bottom: 4px; font-size: 15px; text-align: center; }
.pilot-card p { color: var(--muted); font-size: 13px; }

/* 相关文章 */
.article-filter { display: flex; gap: 12px; justify-content: center; margin-bottom: 28px; }
.filter-btn {
  padding: 8px 20px; border-radius: 20px; border: 1px solid var(--blue);
  background: #fff; color: var(--blue); cursor: pointer; font-size: 14px;
}
.filter-btn.active { background: var(--blue); color: #fff; }
.article-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.article-card {
  background: #fff; border-radius: 12px; padding: 24px;
  box-shadow: 0 4px 16px rgba(30, 111, 219, .08); display: flex; flex-direction: column;
}
.article-category { color: var(--blue); font-size: 12px; font-weight: bold; }
.article-title { font-size: 17px; margin: 8px 0 6px; }
.article-title a { color: var(--text); }
.article-title a:hover { color: var(--blue); }
.article-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.article-summary { font-size: 13px; color: var(--muted); flex: 1; }
.read-more { margin-top: 12px; font-size: 13px; font-weight: bold; }

/* 关于我们 */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-media img { border-radius: 12px; }
.about-label { color: var(--muted); font-size: 13px; }
.about-text h2 { text-align: left; margin: 6px 0 16px; }
.about-text p { color: var(--muted); font-size: 14px; }

/* 页脚 */
.site-footer { text-align: center; padding: 32px 20px; color: var(--muted); font-size: 13px; background: var(--blue-light); }

/* ---------- 文章详情页 ---------- */
.article-page { max-width: 800px; margin: 0 auto; padding: 120px 20px 72px; }
.article-full h1 { font-size: 28px; margin: 10px 0 8px; }
.article-content { margin-top: 24px; }
.article-content p { margin-bottom: 12px; }
.comments { margin-top: 56px; }
.comments h2 { font-size: 20px; margin-bottom: 16px; }
.comment { background: #fff; border-radius: 10px; padding: 16px 20px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(30,111,219,.06); }
.comment-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 6px; }
.comment-time { color: var(--muted); font-size: 12px; }
.comment-site { font-size: 12px; }
.comment-body { font-size: 14px; }
.comment-empty { color: var(--muted); }
.comment-form { background: #fff; border-radius: 12px; padding: 24px; margin-top: 24px; box-shadow: 0 2px 10px rgba(30,111,219,.08); }
.comment-form h3 { margin-bottom: 16px; }
.comment-form label { display: block; font-size: 14px; margin-bottom: 14px; }
.comment-form input, .comment-form textarea {
  width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid #d5e4f5;
  border-radius: 8px; font-size: 14px; font-family: inherit;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.required { color: #e33; }
.form-hint { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.form-msg { margin-top: 12px; font-size: 14px; }
.form-msg.ok { color: #1a9850; }
.form-msg.err { color: #e33; }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding: 160px 20px; }
.not-found h1 { font-size: 72px; color: var(--blue); }
.not-found p { color: var(--muted); margin-bottom: 24px; }

/* ---------- 聊天页 ---------- */
.chat-page { display: flex; flex-direction: column; min-height: 100vh; }
.chat-header {
  background: var(--blue-dark); color: #fff; padding: 16px 24px;
  display: flex; align-items: center; gap: 20px;
}
.chat-header h1 { font-size: 20px; font-weight: 500; }
.chat-main { flex: 1; max-width: 860px; width: 100%; margin: 0 auto; padding: 24px 20px; }
.chat-welcome { text-align: center; color: var(--muted); margin: 48px 0; }
.chat-welcome img { width: 96px; margin: 0 auto 12px; }
.chat-messages { display: flex; flex-direction: column; gap: 16px; }
.msg { max-width: 78%; padding: 12px 16px; border-radius: 12px; font-size: 15px; white-space: pre-wrap; word-break: break-word; }
.msg.user { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: #fff; box-shadow: 0 2px 8px rgba(30,111,219,.08); border-bottom-left-radius: 4px; white-space: normal; }
/* Markdown 渲染内容样式 */
.msg.assistant p { margin: 0 0 8px; }
.msg.assistant p:last-child { margin-bottom: 0; }
.msg.assistant strong { font-weight: 700; color: var(--text); }
.msg.assistant em { font-style: italic; }
.msg.assistant h1,.msg.assistant h2,.msg.assistant h3,.msg.assistant h4 { margin: 12px 0 6px; font-weight: 700; color: var(--text); }
.msg.assistant h1 { font-size: 1.3em; }
.msg.assistant h2 { font-size: 1.15em; }
.msg.assistant h3 { font-size: 1.05em; }
.msg.assistant ul,.msg.assistant ol { margin: 6px 0; padding-left: 20px; }
.msg.assistant li { margin-bottom: 4px; }
.msg.assistant code { background: var(--blue-light); color: var(--blue-dark); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; font-family: "Cascadia Code", "Fira Code", Consolas, monospace; }
.msg.assistant pre { background: #f0f4f8; border-radius: 8px; padding: 12px 14px; overflow-x: auto; margin: 8px 0; }
.msg.assistant pre code { background: none; padding: 0; color: inherit; }
.msg.assistant blockquote { border-left: 3px solid var(--blue); padding-left: 12px; color: var(--muted); margin: 8px 0; }
.msg.assistant a { color: var(--blue); text-decoration: underline; }
.msg.assistant table { border-collapse: collapse; width: 100%; margin: 8px 0; font-size: 0.9em; }
.msg.assistant th,.msg.assistant td { border: 1px solid #d5e4f5; padding: 6px 10px; text-align: left; }
.msg.assistant th { background: var(--blue-light); font-weight: 700; }
.msg.assistant hr { border: none; border-top: 1px solid #d5e4f5; margin: 12px 0; }
.msg.error { align-self: flex-start; background: #fff1f0; color: #c00; }
.msg-actions { align-self: flex-start; display: flex; gap: 10px; }
.msg-actions button {
  font-size: 12px; padding: 4px 12px; border-radius: 12px; border: 1px solid var(--blue);
  background: #fff; color: var(--blue); cursor: pointer;
}
.typing { color: var(--muted); font-style: italic; }
.chat-footer { background: #fff; border-top: 1px solid #e3eefb; padding: 14px 20px 18px; }
.quick-questions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.quick-btn {
  padding: 8px 18px; border-radius: 18px; border: 1px solid var(--blue);
  background: var(--blue-light); color: var(--blue); cursor: pointer; font-size: 13px;
}
.quick-btn:hover { background: var(--blue); color: #fff; }
.chat-input-row { display: flex; gap: 12px; max-width: 860px; margin: 0 auto; }
.chat-input-row input {
  flex: 1; padding: 12px 18px; border: 1px solid #d5e4f5; border-radius: 22px;
  font-size: 15px; font-family: inherit; outline: none;
}
.chat-input-row input:focus { border-color: var(--blue); }
.chat-disclaimer { text-align: center; font-size: 12px; color: var(--muted); margin-top: 10px; }

/* ---------- 移动端适配 ---------- */
@media (max-width: 900px) {
  .feature-cards, .persona-cards, .article-cards { grid-template-columns: repeat(2, 1fr); }
  .pilot-cards { grid-template-columns: repeat(3, 1fr); }
  .industry, .about { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .hero-content h1 { font-size: 30px; }
  .feature-cards, .persona-cards, .article-cards, .industry-grid, .form-row { grid-template-columns: 1fr; }
  .pilot-cards { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .cta-banner { flex-direction: column; gap: 16px; font-size: 20px; text-align: center; }
  .hero-actions { flex-direction: column; align-items: center; }
  .msg { max-width: 92%; }
  .chat-header h1 { font-size: 16px; }
}
