/* ============================================================
   深信大招生 QQ 机器人 · 官网公共样式
   页面：home.html / docs.html / contact.html / association.html / updates.php
   ============================================================ */

:root {
  /* 与后台 theme.css 同一套色板：ElainaBot 风格的靛蓝主色 + 中性灰底 */
  --navy: #1a1a2e;
  --brand: #5865f2;
  --brand-2: #7c86f7;
  --brand-soft: rgba(88, 101, 242, .12);
  --teal: #23a559;
  --text: #1a1a2e;
  --muted: #4a4a6a;
  --faint: #8888a8;
  --line: rgba(0, 0, 0, .08);
  --bg: #f8f9fa;
  --radius: 12px;
  --shadow: 0 2px 4px rgba(20, 20, 40, .04), 0 8px 24px rgba(20, 20, 40, .08);
  --shadow-lg: 0 4px 10px rgba(20, 20, 40, .05), 0 18px 42px rgba(20, 20, 40, .10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 860px; }

/* ---------------- 顶部导航 ---------------- */
header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--navy); }
.brand img { height: 38px; width: auto; display: block; }
.brand small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); letter-spacing: .5px; }
.nav-links { display: flex; gap: 6px; margin-left: auto; font-size: 14px; color: var(--muted); }
.nav-links a {
  padding: 7px 13px; border-radius: 9px; transition: .16s;
}
.nav-links a:hover { color: var(--brand); background: var(--brand-soft); }
.nav-links a.active { color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.nav-cta { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 42px; padding: 0 20px; border-radius: 10px;
  font-size: 14px; font-weight: 600; transition: .18s;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(88, 101, 242, .28); }
.btn-primary:hover { background: #4752c4; transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); background: #fff; color: var(--navy); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------------- 首屏 hero ---------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 420px at 15% 0%, rgba(88, 101, 242, .14), transparent 60%),
    radial-gradient(700px 380px at 95% 20%, rgba(88, 101, 242, .08), transparent 60%),
    linear-gradient(180deg, #f7f8ff 0%, #fff 100%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.08fr .92fr; gap: 56px;
  align-items: center; padding: 84px 0 72px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 12px; font-weight: 600; letter-spacing: .4px;
}
h1 { margin: 18px 0 16px; font-size: 46px; line-height: 1.22; letter-spacing: -.5px; color: var(--navy); }
h1 em { font-style: normal; color: var(--brand); }
.lead { margin: 0 0 28px; font-size: 17px; color: var(--muted); max-width: 520px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--faint); }

/* ---------------- 聊天演示卡片 ---------------- */
.chat-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--line); background: #fff;
  font-size: 13px; font-weight: 600; color: var(--navy);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(35,165,89,.15); }
.chat-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.msg { max-width: 84%; padding: 10px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.6; }
.msg.user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.bot b { color: var(--brand); }
.chat-foot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: #9aa4b6; background: #fff; }

/* ---------------- 数据条 ---------------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 26px 0; }
.stat { text-align: center; }
.stat b { display: block; font-size: 26px; color: var(--navy); letter-spacing: -.5px; }
.stat span { font-size: 13px; color: var(--muted); }

/* ---------------- 通用 section ---------------- */
section { padding: 76px 0; }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 44px; }
.section-head h2 { margin: 0 0 12px; font-size: 32px; color: var(--navy); letter-spacing: -.4px; }
.section-head p { margin: 0; color: var(--muted); font-size: 15.5px; }

/* ---------------- 功能卡片 ---------------- */
.features { background: var(--bg); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 24px 22px; transition: .18s;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ico {
  width: 44px; height: 44px; border-radius: 12px; display: flex;
  align-items: center; justify-content: center; margin-bottom: 14px;
  background: var(--brand-soft); color: var(--brand);
}
.ico svg { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 8px; font-size: 17px; color: var(--navy); }
.feature p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* ---------------- 流程 ---------------- */
.flow-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 26px 24px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-size: 13px; font-weight: 700; color: var(--brand);
  background: var(--brand-soft); border-radius: 999px; padding: 3px 10px;
  display: inline-block; margin-bottom: 14px;
}
.step h3 { margin: 0 0 8px; font-size: 17px; color: var(--navy); }
.step p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* ---------------- 行动区 ---------------- */
.cta {
  background: linear-gradient(135deg, #4b57e8 0%, #5865f2 55%, #7c86f7 100%);
  color: #fff; border-radius: 16px; padding: 46px 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  box-shadow: var(--shadow-lg);
}
.cta h2 { margin: 0 0 10px; font-size: 28px; letter-spacing: -.3px; }
.cta p { margin: 0; color: rgba(255,255,255,.82); font-size: 14.5px; }
.cta .btn { background: #fff; color: var(--brand); box-shadow: none; flex: none; }
.cta .btn:hover { background: #f0f1ff; }

/* ---------------- 页头（子页面共用） ---------------- */
.page-head {
  position: relative; overflow: hidden;
  padding: 58px 0 46px;
  background:
    radial-gradient(720px 320px at 12% 0%, rgba(88, 101, 242, .16), transparent 62%),
    radial-gradient(620px 300px at 92% 10%, rgba(88, 101, 242, .08), transparent 62%),
    linear-gradient(180deg, #f8fbff 0%, #fff 100%);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { margin: 16px 0 10px; font-size: 36px; }
.page-head p { margin: 0; font-size: 15.5px; color: var(--muted); max-width: 660px; }
.page-head .eyebrow { margin-top: 0; }

/* ---------------- 页脚（含友情链接） ---------------- */
footer { border-top: 1px solid var(--line); padding: 40px 0 34px; color: var(--faint); font-size: 13px; background: #fff; }
.foot-links {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px;
  padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line);
}
.foot-title { font-weight: 600; color: var(--muted); font-size: 13px; }
.foot-links a { color: var(--faint); transition: color .16s; }
.foot-links a:hover { color: var(--brand); }
.foot-links a::after { content: " ↗"; opacity: .55; font-size: 11px; }
.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------------- 使用文档 ---------------- */
.doc-list { display: flex; flex-direction: column; gap: 20px; }
.doc-item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; box-shadow: 0 8px 24px rgba(20, 40, 80, .04);
}
.doc-item h2 {
  margin: 0 0 12px; font-size: 20px; color: var(--navy);
  display: flex; align-items: center; gap: 12px;
}
.doc-num {
  flex: none; width: 30px; height: 30px; border-radius: 9px;
  background: var(--brand-soft); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.doc-item p { margin: 0 0 10px; font-size: 14.5px; color: var(--text); }
.doc-item ul { margin: 0; padding-left: 20px; }
.doc-item li { margin: 6px 0; font-size: 14px; color: var(--muted); }
.doc-item li::marker { color: var(--brand); }
.code {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  background: #f0f1f3; color: var(--brand); font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* ---------------- 联系我们 ---------------- */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.contact-card {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 26px 24px; transition: .18s; text-align: center;
}
.contact-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.contact-card .ico { margin: 0 auto 14px; }
.contact-card h3 { margin: 0 0 8px; font-size: 17px; color: var(--navy); }
.contact-card p { margin: 0; font-size: 13.5px; color: var(--muted); }
.contact-card .big { font-size: 15px; color: var(--navy); font-weight: 600; }
.contact-note {
  margin-top: 24px; padding: 16px 20px; border: 1px dashed var(--line);
  border-radius: 12px; background: var(--bg); font-size: 13.5px; color: var(--muted); line-height: 1.8;
}

/* ---------------- 了解招协 ---------------- */
.asso-hero {
  display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center;
}
.asso-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 999px; background: rgba(35,165,89,.12); color: var(--teal);
  font-size: 12px; font-weight: 600;
}
.asso-tag-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.asso-tag {
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; color: var(--muted); font-size: 13px;
}

/* ---------------- 更新日志 ---------------- */
.timeline { padding: 42px 0 72px; }
.cl-item {
  position: relative;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px; box-shadow: 0 10px 26px rgba(20, 40, 80, .05); margin-bottom: 20px;
}
.cl-item::before {
  content: ""; position: absolute; left: 0; top: 22px; bottom: 22px;
  width: 4px; border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--brand), var(--brand-2));
}
.cl-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cl-version { font-size: 22px; font-weight: 700; color: var(--navy); letter-spacing: -.3px; }
.cl-date { font-size: 13px; color: var(--muted); }
.cl-latest {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-size: 11px; font-weight: 700; vertical-align: middle;
}
.cl-cat { margin: 16px 0 6px; font-size: 14px; font-weight: 700; color: var(--brand); }
.cl-cat:first-child { margin-top: 0; }
.cl-list { margin: 0 0 6px; padding-left: 20px; }
.cl-list li { margin: 6px 0; font-size: 14px; color: var(--text); }
.cl-list li::marker { color: var(--brand); }
.cl-text { margin: 8px 0; font-size: 14px; color: var(--text); }
.empty {
  padding: 60px 20px; text-align: center; color: var(--muted);
  background: #fff; border: 1px dashed var(--line); border-radius: var(--radius);
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .hero-grid, .asso-hero { grid-template-columns: 1fr; gap: 36px; padding: 56px 0; }
  h1 { font-size: 34px; }
  .feature-grid, .flow-grid, .stats-grid, .contact-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .cta { flex-direction: column; text-align: center; padding: 36px 24px; }
}
@media (max-width: 640px) {
  .nav { height: 62px; }
  .brand small { display: none; }
  .feature-grid, .flow-grid, .stats-grid, .contact-grid { grid-template-columns: 1fr; }
  h1 { font-size: 29px; }
  .page-head h1 { font-size: 26px; }
  section { padding: 54px 0; }
  .page-head { padding: 40px 0 34px; }
  .doc-item { padding: 20px 18px; }
  .cl-item { padding: 20px 18px; }
}
