/* 「萌动的红日」公众号文章站 - 红日暖阳主题 */
:root {
  --red: #ff5f3c;
  --red-deep: #e8431f;
  --orange: #ffa440;
  --amber: #ffb35c;
  --bg: #fff9f4;
  --card: #ffffff;
  --text: #35281f;
  --text-sub: #8a7767;
  --line: #f3e4d7;
  --radius: 16px;
  --shadow: 0 6px 24px rgba(232, 67, 31, .08);
}

/* ---------- 搜索框与分页 ---------- */
.search-bar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 6px 4px 18px; box-shadow: var(--shadow);
}
.search-bar input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 15px; padding: 9px 0; font-family: inherit; color: var(--text);
}
.search-bar input::placeholder { color: #c4b3a4; }
.search-count { font-size: 13px; color: var(--red); padding-right: 12px; white-space: nowrap; }
.search-empty { text-align: center; color: var(--text-sub); padding: 30px 0; }
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 8px; flex-wrap: wrap; margin-top: 26px;
}
.page-btn {
  min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; padding: 0 12px; font-size: 14px; font-weight: 600;
  color: var(--text); transition: all .15s;
}
.page-btn:hover { border-color: var(--orange); color: var(--red); }
.page-cur {
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #fff; border-color: transparent; cursor: default;
}
.page-ellipsis { color: var(--text-sub); padding: 0 4px; user-select: none; }

/* ---------- 上一篇/下一篇导航 ---------- */
.post-nav {
  display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap;
}
.post-nav-item {
  flex: 1; min-width: 200px;
  display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fffdfb; padding: 12px 16px;
  transition: border-color .15s, transform .15s;
}
.post-nav-item:hover { border-color: var(--orange); transform: translateY(-1px); }
.post-nav-next { text-align: right; }
.post-nav-empty { border: none; background: none; }
.post-nav-label { font-size: 12px; color: var(--text-sub); }
.post-nav-title {
  font-size: 14px; font-weight: 700; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 249, 244, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 960px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; }
.brand-badge {
  font-size: 11px; font-weight: 600; color: var(--red);
  border: 1px solid var(--red); border-radius: 6px; padding: 0 6px;
  transform: translateY(-6px);
}
.header-follow {
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #fff; border: none; border-radius: 999px;
  padding: 8px 18px; font-size: 14px; font-weight: 600;
  cursor: pointer; box-shadow: 0 4px 14px rgba(255, 95, 60, .35);
  transition: transform .15s;
}
.header-follow:hover { transform: translateY(-1px); }

/* ---------- 首页 Hero ---------- */
.site-main { max-width: 960px; margin: 0 auto; padding: 0 16px 40px; }
.hero {
  text-align: center;
  padding: 56px 16px 44px;
  position: relative;
  overflow: hidden;
}
.hero-sun-wrap { animation: rise 2.4s ease both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-title {
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 800;
  background: linear-gradient(135deg, var(--red-deep), var(--orange));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 14px 0 6px;
}
.hero-name { font-size: 17px; color: var(--text); font-weight: 600; }
.hero-intro { color: var(--text-sub); max-width: 520px; margin: 10px auto 0; font-size: 15px; }
.hero-actions { margin-top: 22px; }
.hero-note { margin-top: 14px; font-size: 12px; color: var(--text-sub); }

.btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #fff; border: none; border-radius: 999px;
  padding: 12px 28px; font-size: 15px; font-weight: 700;
  cursor: pointer; box-shadow: 0 6px 20px rgba(255, 95, 60, .35);
  transition: transform .15s, box-shadow .15s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(255, 95, 60, .45); }
.btn-lg { padding: 14px 34px; font-size: 16px; }

.demo-notice {
  background: #fff7e8; border: 1px dashed var(--amber);
  color: #a05a00; border-radius: 12px;
  padding: 10px 16px; font-size: 13px; margin: 8px 0 16px; text-align: center;
}

/* ---------- 文章列表 ---------- */
.section { margin-top: 28px; }
.section-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.section-head h2 { font-size: 22px; }
.section-sub { color: var(--text-sub); font-size: 13px; }

.article-list { display: flex; flex-direction: column; gap: 14px; }
.article-card {
  display: flex; gap: 14px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .15s;
}
.article-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(232, 67, 31, .14); }
.card-pinned { border-color: #ffb35c; background: linear-gradient(135deg, #fffdf9, #fff6ea); }
.pin-badge {
  display: inline-block; vertical-align: 3px; margin-right: 8px;
  background: linear-gradient(135deg, var(--red), var(--orange)); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
  border-radius: 6px; padding: 3px 7px; letter-spacing: 1px;
}
.card-thumb {
  flex: 0 0 110px; height: 84px; border-radius: 10px; overflow: hidden;
  background: linear-gradient(135deg, #ffe9d6, #ffd2b8);
  display: flex; align-items: center; justify-content: center;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.card-title {
  font-size: 16.5px; font-weight: 700; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-digest {
  color: var(--text-sub); font-size: 13.5px; margin-top: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { margin-top: auto; padding-top: 6px; display: flex; gap: 12px; font-size: 12px; color: var(--text-sub); }
.card-src { margin-left: auto; color: var(--red); }

.empty-state { text-align: center; padding: 60px 0; color: var(--text-sub); }
.empty-sun { display: flex; justify-content: center; margin-bottom: 16px; }
.empty-state h2 { color: var(--text); margin-bottom: 8px; }
.empty-state .btn-primary { margin-top: 18px; }

/* ---------- 引流横带 ---------- */
.cta-band {
  margin-top: 40px;
  background: linear-gradient(135deg, #ff5f3c, #ff9a3c);
  border-radius: 20px; padding: 26px 24px;
  display: flex; align-items: center; gap: 18px; color: #fff;
  box-shadow: 0 12px 32px rgba(255, 95, 60, .3);
  flex-wrap: wrap;
}
.cta-text { flex: 1; min-width: 200px; }
.cta-text h3 { font-size: 19px; margin-bottom: 4px; }
.cta-text p { opacity: .9; font-size: 14px; }
.cta-band .btn-primary { background: #fff; color: var(--red-deep); box-shadow: none; }

/* ---------- 文章页 ---------- */
.article-page {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 26px; margin-top: 24px; max-width: 760px; margin-left: auto; margin-right: auto;
}
.article-top-tip {
  background: linear-gradient(135deg, #fff1e8, #ffe3d0);
  color: #b03a15; border-radius: 10px;
  font-size: 13.5px; padding: 9px 14px; margin-bottom: 18px;
}
/* 「打开原文」按钮（文章页开头与结尾） */
.open-original {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, #07c160, #10d070); /* 微信品牌绿 */
  color: #fff; border-radius: 12px;
  padding: 12px 20px; margin-bottom: 18px;
  font-size: 15px; font-weight: 700; letter-spacing: .5px;
  box-shadow: 0 6px 18px rgba(7, 193, 96, .28);
  transition: transform .15s, box-shadow .15s;
}
.open-original:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(7, 193, 96, .4); }
.open-original-band {
  margin-top: 26px; text-align: center;
  border-top: 1px dashed #ffd9c0; padding-top: 18px;
}
.open-original-band > p { color: var(--text-sub); font-size: 13px; margin-bottom: 12px; }
.open-original-band .open-original { margin-bottom: 0; }
.open-original-none { color: var(--text-sub); font-size: 13px; }
.article-title { font-size: clamp(20px, 4vw, 27px); line-height: 1.4; font-weight: 800; }
.article-meta { color: var(--text-sub); font-size: 13px; margin: 10px 0 18px; display: flex; gap: 14px; }
.article-cover { border-radius: 12px; overflow: hidden; margin-bottom: 18px; }

/* 微信正文样式兼容：限制内容宽度、恢复图片 */
.article-content { font-size: 16px; overflow-wrap: break-word; }
.article-content img { max-width: 100% !important; height: auto !important; border-radius: 6px; margin: 10px auto; }
.article-content section, .article-content p { max-width: 100% !important; }
.article-content a { color: #1a7f5a; }

.article-follow-card {
  margin-top: 30px;
  background: linear-gradient(135deg, #fff4ec, #ffe7d6);
  border: 1px solid #ffd9c0; border-radius: 16px;
  padding: 18px 20px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.afc-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 220px; }
.afc-left h3 { font-size: 16.5px; }
.afc-left p { color: var(--text-sub); font-size: 13px; }
.article-source { margin-top: 16px; font-size: 13px; color: var(--text-sub); }
.article-source a { color: var(--red); }

.related { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 18px; }
.related h3 { font-size: 17px; margin-bottom: 10px; }
.related-item {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px;
}
.related-item:hover { color: var(--red); }
.related-date { color: var(--text-sub); font-size: 12px; flex-shrink: 0; }
.back-home { display: inline-block; margin-top: 22px; color: var(--text-sub); font-size: 14px; }
.back-home:hover { color: var(--red); }

/* ---------- 悬浮关注按钮 ---------- */
.follow-fab {
  position: fixed; right: 18px; bottom: 24px; z-index: 60;
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: #fff; border-radius: 999px; padding: 11px 20px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 24px rgba(255, 95, 60, .45);
  animation: pulse 2.6s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(255, 95, 60, .45); }
  50% { box-shadow: 0 8px 34px rgba(255, 95, 60, .75); }
}

/* ---------- 二维码弹窗 ---------- */
.qr-modal { position: fixed; inset: 0; z-index: 100; display: none; }
.qr-modal.show { display: block; }
.qr-mask { position: absolute; inset: 0; background: rgba(30, 15, 8, .55); }
.qr-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: #fff; border-radius: 20px; padding: 30px 28px;
  width: min(340px, calc(100vw - 40px)); text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
.qr-close {
  position: absolute; right: 12px; top: 8px; border: none; background: none;
  font-size: 26px; color: var(--text-sub); cursor: pointer; line-height: 1;
}
.qr-sun { display: flex; justify-content: center; margin-bottom: 6px; }
.qr-card h3 { font-size: 18px; margin-bottom: 4px; }
.qr-sub { color: var(--text-sub); font-size: 13px; margin-bottom: 14px; }
.qr-img-wrap {
  background: #fff; border: 2px dashed var(--amber); border-radius: 14px;
  padding: 12px; margin-bottom: 12px;
}
.qr-img-wrap img { width: 100%; border-radius: 8px; }
.qr-hint { font-size: 13px; color: var(--text-sub); }

/* ---------- 页脚 ---------- */
.site-footer {
  margin-top: 56px; border-top: 1px solid var(--line);
  background: #fff4ec;
}
.footer-inner { max-width: 960px; margin: 0 auto; padding: 26px 16px 30px; text-align: center; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; margin-bottom: 8px; }
.footer-tip { color: var(--text-sub); font-size: 12.5px; max-width: 560px; margin: 0 auto 10px; }
.footer-stats {
  font-size: 12.5px; color: #a08d7d; margin-bottom: 10px;
}
.footer-stats span {
  color: var(--red); font-weight: 700; font-variant-numeric: tabular-nums;
}
.footer-icp { font-size: 13px; margin-bottom: 6px; }
.footer-icp a { color: #6b584a; }
.footer-icp a:hover { color: var(--red); }
.footer-copy { color: #a08d7d; font-size: 12px; }

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  .article-card { flex-direction: column; }
  .card-thumb { flex: none; width: 100%; height: 150px; }
  .article-page { padding: 20px 16px; }
  .follow-fab span { display: inline; }
  .hero { padding: 40px 8px 32px; }
  .cta-band { flex-direction: column; text-align: center; }
}
