/* ===== 前台样式 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f6f7f9; color: #333; line-height: 1.7; }
a { color: #5b6ee1; text-decoration: none; }
a:hover { opacity: .85; }
.container { max-width: 860px; margin: 0 auto; padding: 0 20px; }

/* 头部 */
.site-header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: #fff; text-align: center; padding: 64px 0 56px; }
.site-header.slim { padding: 28px 0; text-align: left; }
.site-title a { color: #fff; font-size: 30px; letter-spacing: 1px; }
.site-header.slim .site-title a { font-size: 20px; }
.site-desc { margin-top: 10px; opacity: .85; font-size: 15px; }

/* 文章卡片 */
main { padding: 36px 0 50px; min-height: 55vh; }
.post-list { display: flex; flex-direction: column; gap: 22px; }
.post-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.05); display: flex; transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.post-card .cover { flex: 0 0 240px; }
.post-card .cover img { width: 240px; height: 100%; min-height: 160px; object-fit: cover; display: block; }
.post-card .info { padding: 22px 26px; flex: 1; }
.post-card h2 { font-size: 20px; margin-bottom: 10px; }
.post-card h2 a { color: #2c2c2c; }
.summary { color: #777; font-size: 14px; margin-bottom: 14px; }
.meta { color: #aaa; font-size: 13px; display: flex; gap: 18px; }
.meta.center { justify-content: center; margin-bottom: 30px; }

/* 分页 */
.pagination { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 34px; color: #999; font-size: 14px; }
.pagination a { background: #fff; padding: 8px 18px; border-radius: 8px; box-shadow: 0 1px 6px rgba(0,0,0,.06); }

/* 文章详情 */
.post-detail { background: #fff; border-radius: 14px; padding: 44px 48px; box-shadow: 0 2px 12px rgba(0,0,0,.05); }
.post-title { text-align: center; font-size: 28px; margin-bottom: 16px; color: #222; }
.post-content { font-size: 16px; color: #3a3a3a; word-wrap: break-word; }
.post-content p { margin: 0 0 1em; }
.post-content h2, .post-content h3 { margin: 1.4em 0 .6em; color: #222; }
.post-content img, .post-content video { max-width: 100%; border-radius: 10px; margin: 12px 0; display: block; }
.post-content blockquote { border-left: 4px solid #667eea; background: #f6f7ff; padding: 12px 18px; margin: 14px 0; border-radius: 0 8px 8px 0; color: #555; }
.post-content pre { background: #2d2d3a; color: #eee; padding: 16px 20px; border-radius: 10px; overflow-x: auto; font-size: 14px; margin: 14px 0; }
.post-content code { font-family: Consolas, Monaco, monospace; }
.post-content p code { background: #f0f0f5; color: #c7254e; padding: 2px 6px; border-radius: 4px; font-size: 90%; }
.post-content ul, .post-content ol { padding-left: 1.6em; margin-bottom: 1em; }
.post-content table { border-collapse: collapse; width: 100%; margin: 14px 0; }
.post-content th, .post-content td { border: 1px solid #e5e5e5; padding: 8px 12px; }
.post-content iframe { max-width: 100%; }
.back-link { margin-top: 36px; text-align: center; }

/* 其他 */
.empty { text-align: center; color: #999; padding: 80px 0; font-size: 15px; }
.site-footer { text-align: center; color: #aaa; font-size: 13px; padding: 26px 0; border-top: 1px solid #ececec; background: #fff; }
.site-footer a { color: #aaa; }

@media (max-width: 640px) {
    .post-card { flex-direction: column; }
    .post-card .cover, .post-card .cover img { width: 100%; flex: none; height: 180px; }
    .post-detail { padding: 28px 20px; }
    .site-header { padding: 44px 0 38px; }
}
