/* 文章广场前台样式（列表页 + 详情页共用） */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; color: #333; background: #f6f7f9; }
a { text-decoration: none; color: inherit; }

/* 顶部导航 */
.topbar { background: #fff; border-bottom: 1px solid #ececec; }
.topbar-in { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; height: 60px; padding: 0 20px; }
.logo { font-size: 19px; font-weight: 700; color: #1f2d3d; }
.logo em { color: #2a6af5; font-style: normal; }
.topbar-links a { color: #2a6af5; font-size: 14px; margin-left: 22px; }
.topbar-links a:hover { text-decoration: underline; }

/* 首页 hero */
.hero { background: linear-gradient(135deg, #3b7cff, #2456d6); color: #fff; padding: 34px 20px 30px; text-align: center; }
.hero h1 { font-size: 26px; margin-bottom: 8px; }
.hero p { font-size: 14px; opacity: .92; margin-bottom: 16px; }
.hero a.cta { display: inline-block; background: #fff; color: #2456d6; font-size: 14px; font-weight: 600; padding: 9px 26px; border-radius: 20px; }
.hero a.cta:hover { box-shadow: 0 4px 14px rgba(0,0,0,.18); }

/* 站内搜索：一体化胶囊搜索框 */
.search-form { display: flex; justify-content: center; align-items: center; gap: 12px; max-width: 620px; margin: 0 auto 18px; }
.search-box {
  flex: 1; min-width: 0; display: flex; align-items: center; background: #fff;
  border-radius: 999px; padding: 5px 6px 5px 18px;
  box-shadow: 0 8px 24px rgba(13, 38, 94, .18);
  transition: box-shadow .2s ease;
}
.search-box:focus-within { box-shadow: 0 10px 30px rgba(13, 38, 94, .32); }
.search-box .s-ico { flex-shrink: 0; color: #9aa5b5; transition: color .2s; }
.search-box:focus-within .s-ico { color: #2a6af5; }
.search-box input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; padding: 10px 12px; font-size: 15px; color: #303133; }
.search-box input::placeholder { color: #9aa5b5; }
/* 去掉 type=search 自带的清除按钮，避免与胶囊设计冲突 */
.search-box input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-box button {
  flex-shrink: 0; border: none; border-radius: 999px; padding: 10px 26px;
  font-size: 14px; font-weight: 600; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, #3b7cff, #2456d6);
  transition: filter .15s ease, transform .1s ease;
}
.search-box button:hover { filter: brightness(1.1); }
.search-box button:active { transform: scale(.96); }
.search-clear { flex-shrink: 0; font-size: 13px; color: rgba(255,255,255,.85); }
.search-clear:hover { color: #fff; }

/* 主体布局 */
.main { max-width: 1100px; margin: 26px auto 0; padding: 0 20px 50px; display: flex; gap: 26px; align-items: flex-start; }
.content { flex: 1; min-width: 0; }

/* 文章卡片网格 */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.card { background: #fff; border-radius: 12px; padding: 10px 10px 12px; box-shadow: 0 1px 4px rgba(30,50,90,.06); transition: transform .15s, box-shadow .15s; display: block; }
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(30,50,90,.12); }
.card .cover { display: block; height: 150px; border-radius: 8px; background: #eef2f8 center/cover no-repeat; }
.card .cover .ph { display: flex; height: 100%; align-items: center; justify-content: center; color: #b7c2d4; font-size: 30px; font-weight: 700; letter-spacing: 3px; border-radius: 8px; }
.card .body { padding: 12px 6px 4px; }
.card h3 { font-size: 16px; line-height: 1.5; color: #26303c; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 48px; }
.card p { font-size: 13px; color: #7a8699; line-height: 1.7; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .meta { font-size: 12px; color: #9aa5b5; margin-top: 10px; display: flex; justify-content: space-between; }
.card .meta .views::before { content: "👁 "; }

/* 侧栏热榜 */
.side { width: 300px; flex-shrink: 0; }
.panel { background: #fff; border-radius: 10px; padding: 18px; box-shadow: 0 1px 4px rgba(30,50,90,.06); }
.panel h4 { font-size: 15px; color: #26303c; padding-bottom: 10px; border-bottom: 1px solid #f0f2f6; margin-bottom: 6px; }
.panel h4::before { content: "🔥 "; }
.hot-item { display: flex; gap: 10px; padding: 9px 0; align-items: baseline; border-bottom: 1px dashed #f3f4f8; }
.hot-item:last-child { border-bottom: none; }
.hot-item .no { width: 20px; font-size: 14px; font-weight: 700; color: #c3cbd8; flex-shrink: 0; font-style: italic; }
.hot-item:nth-child(1) .no, .hot-item:nth-child(2) .no, .hot-item:nth-child(3) .no { color: #ff7a2a; }
.hot-item .t { font-size: 14px; line-height: 1.55; color: #3d4858; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hot-item .t:hover { color: #2a6af5; }
.hot-item .v { font-size: 12px; color: #9aa5b5; flex-shrink: 0; }

/* 分页 */
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.pager a, .pager span { display: inline-block; min-width: 34px; height: 34px; line-height: 34px; text-align: center; border-radius: 6px; font-size: 14px; background: #fff; color: #3d4858; padding: 0 10px; }
.pager .cur { background: #2a6af5; color: #fff; }

/* ===== 详情页 ===== */
.crumbs { max-width: 860px; margin: 22px auto 0; padding: 0 20px; font-size: 13px; color: #9aa5b5; }
.crumbs a:hover { color: #2a6af5; }
.article-box { max-width: 860px; margin: 12px auto 0; padding: 0 20px 60px; }
.article-box .inner { background: #fff; border-radius: 12px; padding: 36px 44px 40px; box-shadow: 0 1px 6px rgba(30,50,90,.06); }
.article-box h1 { font-size: 26px; line-height: 1.45; color: #1f2d3d; margin-bottom: 14px; }
.article-meta { font-size: 13px; color: #9aa5b5; padding-bottom: 18px; border-bottom: 1px solid #f0f2f6; margin-bottom: 26px; display: flex; gap: 18px; flex-wrap: wrap; }
.article-content { font-size: 15.5px; line-height: 1.95; color: #3b4552; word-break: break-word; }
.article-content img { max-width: 100%; height: auto; border-radius: 6px; }
.article-content h1, .article-content h2, .article-content h3 { margin: 22px 0 12px; color: #1f2d3d; }
.article-content p { margin: 12px 0; }
.article-content blockquote { border-left: 3px solid #2a6af5; background: #f6f9ff; padding: 10px 16px; margin: 14px 0; border-radius: 0 6px 6px 0; color: #536074; }
.ai-note { margin-top: 34px; padding-top: 16px; border-top: 1px dashed #e6e9f0; font-size: 12px; color: #a3adc0; text-align: center; }

/* 底部 */
.footer { border-top: 1px solid #e8eaf0; background: #fff; text-align: center; padding: 22px 20px 26px; font-size: 12.5px; color: #9aa5b5; line-height: 2; }
.footer a { color: #7a8699; }
.footer a:hover { color: #2a6af5; }

@media (max-width: 900px) {
  .main { flex-direction: column; }
  .side { width: 100%; }
  .article-box .inner { padding: 24px 20px; }
}
@media (max-width: 600px) {
  .search-form { gap: 10px; }
  .search-box { padding-left: 14px; }
  .search-box input { font-size: 14px; padding: 9px 10px; }
  .search-box button { padding: 9px 18px; }
}
