*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; -webkit-font-smoothing: antialiased; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: #f0f1f2; color: #1a1a1a; line-height: 1.6; }
a { color: #1a73e8; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== 前端网站 ===== */
.site-header { background: #fff; border-bottom: 1px solid #e0e0e0; }
.site-header-inner { max-width: 1100px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 56px; }
.site-logo { font-size: 18px; font-weight: 700; color: #1a1a1a; letter-spacing: 0.5px; }
.site-nav { display: flex; gap: 24px; }
.site-nav a { font-size: 14px; color: #444; }
.site-nav a:hover { color: #1a73e8; text-decoration: none; }
.main-container { max-width: 1100px; margin: 0 auto; padding: 32px 24px; min-height: calc(100vh - 160px); }
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.article-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 2px; transition: box-shadow 0.2s; }
.article-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.card-link { display: block; color: inherit; text-decoration: none; }
.card-link:hover { text-decoration: none; }
.card-cover { width: 100%; height: 180px; overflow: hidden; background: #f5f5f5; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px; }
.card-title { font-size: 16px; font-weight: 600; line-height: 1.4; margin-bottom: 8px; color: #1a1a1a; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-desc { font-size: 13px; color: #666; line-height: 1.6; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { font-size: 12px; color: #999; display: flex; gap: 12px; }
.site-footer { background: #f5f5f5; border-top: 1px solid #e0e0e0; padding: 24px; text-align: center; font-size: 12px; color: #999; }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; }
.page-btn { padding: 8px 14px; border: 1px solid #ddd; background: #fff; color: #333; font-size: 13px; border-radius: 2px; text-decoration: none; }
.page-btn:hover, .page-btn.active { background: #1a73e8; color: #fff; border-color: #1a73e8; }

/* 文章页 */
.breadcrumb { max-width: 760px; margin: 0 auto; padding: 16px 24px 0; font-size: 13px; color: #888; }
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: #1a73e8; }
.breadcrumb span { margin: 0 6px; }
.article-container { max-width: 760px; margin: 0 auto; padding: 24px 24px 40px; }
.article-title { font-size: 28px; font-weight: 700; line-height: 1.4; margin-bottom: 12px; color: #1a1a1a; }
.article-meta { font-size: 13px; color: #888; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #eee; }
.article-meta span { margin: 0 6px; }
.article-meta span:first-child { margin-left: 0; }
.article-cover { width: 100%; max-height: 400px; object-fit: cover; border-radius: 2px; margin-bottom: 24px; }
.article-content { font-size: 16px; line-height: 1.8; color: #333; }
.article-content h2 { font-size: 22px; margin: 32px 0 14px; color: #1a1a1a; }
.article-content h3 { font-size: 18px; margin: 24px 0 10px; color: #1a1a1a; }
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol { margin-bottom: 16px; padding-left: 28px; }
.article-content li { margin-bottom: 6px; }
.article-content blockquote { border-left: 3px solid #ddd; padding-left: 16px; color: #666; font-style: italic; margin: 20px 0; }
.article-content img { max-width: 100%; height: auto; border-radius: 2px; margin: 16px 0; }
.article-content pre { background: #f5f5f5; border: 1px solid #e0e0e0; border-radius: 2px; padding: 14px 16px; overflow-x: auto; font-family: "SF Mono", Monaco, monospace; font-size: 13px; line-height: 1.6; }
.article-content code { background: #f5f5f5; padding: 2px 6px; border-radius: 2px; font-size: 14px; }
.ad-slot { background: #fafafa; border: 1px dashed #ccc; padding: 20px; text-align: center; color: #999; font-size: 12px; margin: 20px 0; border-radius: 2px; }
.related-section { max-width: 760px; margin: 0 auto; padding: 0 24px 40px; }
.related-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; color: #1a1a1a; }
.related-item { padding: 14px 0; border-bottom: 1px solid #eee; }
.related-item a { font-size: 15px; color: #1a1a1a; font-weight: 500; text-decoration: none; }
.related-item a:hover { color: #1a73e8; }
.related-meta { font-size: 12px; color: #999; margin-top: 4px; }
.not-found { text-align: center; padding: 80px 24px; }
.not-found h1 { font-size: 72px; font-weight: 700; color: #ddd; margin-bottom: 16px; }
.not-found p { color: #999; margin-bottom: 24px; }

@media (max-width: 768px) {
  .article-grid { grid-template-columns: 1fr; }
  .article-title { font-size: 22px; }
}
