/* GEO Monitor - GEO学院博客共享样式 */
/* 设计原则: 与主站一致的紫色渐变体系,内容优先,无干扰元素 */

:root {
  --primary: #4b2c8f;
  --primary-light: #8b5cf6;
  --bg: #f8fafc;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-light: #64748b;
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
}

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

/* ===== 顶部导航 ===== */
.site-nav {
  background: linear-gradient(135deg, #2d1b69, #4b2c8f 55%, #8b5cf6);
  color: #fff;
  padding: 18px 0;
}
.site-nav .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.site-nav .logo { font-size: 20px; font-weight: 700; color: #fff; text-decoration: none; letter-spacing: .5px; }
.site-nav .logo span { color: #c4b5fd; }
.site-nav .nav-links { display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav .nav-links a { color: #e9e4f8; text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: 8px; transition: background .2s; }
.site-nav .nav-links a:hover { background: rgba(255,255,255,.12); color: #fff; }
.site-nav .nav-links a.cta { background: #fff; color: var(--primary); font-weight: 600; }

/* ===== 文章头部 ===== */
.breadcrumb { font-size: 13px; color: var(--text-light); padding: 18px 0 0; }
.breadcrumb a { color: var(--primary); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.article-header { padding: 18px 0 26px; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.article-header h1 { font-size: 32px; line-height: 1.4; margin: 10px 0 14px; color: #150b33; }
.article-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--text-light); }
.article-meta .tag { background: #ede9fe; color: var(--primary); padding: 2px 10px; border-radius: 10px; font-weight: 600; }

/* ===== 首段结论框(自身GEO实践) ===== */
.tldr {
  background: linear-gradient(135deg, #f3efff, #ede9fe);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin-bottom: 32px;
}
.tldr strong { color: var(--primary); }

/* ===== 正文 ===== */
.article-body h2 {
  font-size: 24px; margin: 44px 0 16px; padding-left: 14px;
  border-left: 5px solid var(--primary-light); color: #150b33;
}
.article-body h3 { font-size: 19px; margin: 30px 0 12px; color: #2d1b69; }
.article-body p { margin: 14px 0; font-size: 16px; }
.article-body ul, .article-body ol { margin: 14px 0 14px 24px; font-size: 16px; }
.article-body li { margin: 8px 0; }
.article-body a { color: var(--primary); }
.article-body strong { color: #150b33; }

/* 表格 */
.article-body table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14.5px; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: 0 1px 4px rgba(20,10,50,.06); }
.article-body th { background: var(--primary); color: #fff; padding: 12px 14px; text-align: left; font-weight: 600; }
.article-body td { padding: 11px 14px; border-bottom: 1px solid var(--border); }
.article-body tr:last-child td { border-bottom: none; }
.article-body tr:nth-child(even) td { background: #faf9ff; }

/* 引用块 */
.article-body blockquote { border-left: 4px solid var(--primary-light); background: #fff; padding: 14px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 18px 0; color: #3b3554; }

/* 代码块 */
.article-body pre { background: #1a1a2e; color: #a8b2d1; padding: 16px 18px; border-radius: var(--radius); overflow-x: auto; font-size: 13px; line-height: 1.7; margin: 18px 0; }
.article-body code { font-family: Consolas, Monaco, monospace; }

/* 数据来源标注 */
.source-note { font-size: 13px; color: var(--text-light); background: #f1f5f9; border-radius: 8px; padding: 10px 14px; margin: 20px 0; }
.source-note strong { color: #475569; }

/* ===== FAQ ===== */
.faq-section { margin: 48px 0; }
.faq-section h2 { font-size: 24px; margin-bottom: 18px; padding-left: 14px; border-left: 5px solid var(--primary-light); color: #150b33; }
.faq-item { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.faq-item details summary { cursor: pointer; padding: 15px 20px; font-weight: 600; font-size: 15.5px; color: #2d1b69; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item details summary::after { content: '+'; font-size: 20px; color: var(--primary-light); }
.faq-item details[open] summary::after { content: '−'; }
.faq-item details .faq-answer { padding: 0 20px 16px; font-size: 15px; color: #334155; }

/* ===== CTA ===== */
.article-cta {
  background: linear-gradient(135deg, #2d1b69, #4b2c8f 60%, #8b5cf6);
  border-radius: 16px; padding: 34px 30px; text-align: center; color: #fff; margin: 48px 0;
}
.article-cta h2 { font-size: 22px; margin-bottom: 10px; color: #fff; }
.article-cta p { color: #d9d2f5; font-size: 15px; margin-bottom: 20px; }
.article-cta a.btn {
  display: inline-block; background: #fff; color: var(--primary); font-weight: 700;
  padding: 13px 34px; border-radius: 10px; text-decoration: none; font-size: 16px;
  box-shadow: 0 4px 14px rgba(0,0,0,.18); transition: transform .15s;
}
.article-cta a.btn:hover { transform: translateY(-2px); }

/* ===== 相关文章 ===== */
.related { margin: 40px 0; }
.related h2 { font-size: 21px; margin-bottom: 16px; padding-left: 14px; border-left: 5px solid var(--primary-light); color: #150b33; }
.related-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.related-list a {
  display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; text-decoration: none; color: var(--text); transition: box-shadow .2s, border-color .2s;
}
.related-list a:hover { box-shadow: 0 4px 16px rgba(75,44,143,.12); border-color: var(--primary-light); }
.related-list .rel-title { font-weight: 600; font-size: 15px; color: #2d1b69; margin-bottom: 4px; }
.related-list .rel-desc { font-size: 13px; color: var(--text-light); }

/* ===== 博客索引页 ===== */
.blog-hero { background: linear-gradient(135deg, #2d1b69, #4b2c8f 55%, #8b5cf6); color: #fff; padding: 56px 0 64px; text-align: center; }
.blog-hero h1 { font-size: 34px; margin-bottom: 12px; }
.blog-hero p { color: #d9d2f5; font-size: 16px; max-width: 620px; margin: 0 auto; }
.post-list { padding: 40px 0 60px; }
.post-card {
  display: flex; gap: 20px; background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 24px; margin-bottom: 18px; text-decoration: none; color: var(--text);
  transition: box-shadow .2s, border-color .2s; align-items: flex-start;
}
.post-card:hover { box-shadow: 0 6px 20px rgba(75,44,143,.13); border-color: var(--primary-light); }
.post-card .post-no { font-size: 30px; font-weight: 800; color: #ddd3f8; line-height: 1; min-width: 46px; padding-top: 4px; }
.post-card h2 { font-size: 19px; color: #2d1b69; margin-bottom: 8px; }
.post-card p { font-size: 14px; color: var(--text-light); margin-bottom: 10px; }
.post-card .post-meta { font-size: 12.5px; color: #9a94b8; }

/* ===== 页脚 ===== */
footer { background: #150b33; color: #8f87b3; padding: 28px 0; font-size: 13px; text-align: center; margin-top: 40px; }
footer a { color: #c4b5fd; text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .article-header h1 { font-size: 24px; }
  .article-body h2 { font-size: 20px; }
  .post-card { flex-direction: column; gap: 8px; }
  .site-nav .container { flex-direction: column; align-items: flex-start; }
}
