* { 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; background: #f5f5f5; color: #333; font-size: 15px; line-height: 1.8; }
a { text-decoration: none; color: #333; transition: color 0.2s; }
a:hover { color: #1890ff; }
img { max-width: 100%; height: auto; }

/* 顶部导航 */
.header { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 100; }
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.header-top { display: flex; justify-content: space-between; align-items: center; padding: 15px 0; }
.logo { font-size: 24px; font-weight: bold; color: #1890ff; }
.logo span { color: #333; }
.search-box { display: flex; gap: 0; }
.search-box input { width: 280px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px 0 0 4px; outline: none; font-size: 14px; }
.search-box input:focus { border-color: #1890ff; }
.search-box button { padding: 8px 16px; background: #1890ff; color: #fff; border: none; border-radius: 0 4px 4px 0; cursor: pointer; font-size: 14px; }
.nav { border-top: 1px solid #f0f0f0; }
.nav ul { list-style: none; display: flex; gap: 0; }
.nav li a { display: block; padding: 12px 20px; font-size: 15px; color: #555; border-bottom: 2px solid transparent; }
.nav li a:hover, .nav li a.active { color: #1890ff; border-bottom-color: #1890ff; }

/* 主体 */
.main { max-width: 1200px; margin: 20px auto; padding: 0 20px; display: flex; gap: 20px; }
.content { flex: 1; min-width: 0; }
.sidebar { width: 300px; flex-shrink: 0; }

/* 文章卡片 */
.article-card { background: #fff; border-radius: 6px; padding: 20px; margin-bottom: 15px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); transition: box-shadow 0.2s; }
.article-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.article-card h2 { font-size: 20px; margin-bottom: 10px; line-height: 1.4; }
.article-card h2 a { color: #222; }
.article-card h2 a:hover { color: #1890ff; }
.article-meta { font-size: 13px; color: #999; margin-bottom: 12px; display: flex; gap: 15px; flex-wrap: wrap; }
.article-meta span { display: flex; align-items: center; gap: 4px; }
.article-summary { color: #666; font-size: 14px; line-height: 1.7; margin-bottom: 12px; }
.article-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.article-tags a { font-size: 12px; padding: 2px 10px; background: #f0f7ff; color: #1890ff; border-radius: 3px; }
.article-tags a:hover { background: #1890ff; color: #fff; }

/* 侧边栏 */
.widget { background: #fff; border-radius: 6px; padding: 20px; margin-bottom: 15px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.widget h3 { font-size: 16px; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #1890ff; display: inline-block; }
.widget ul { list-style: none; }
.widget ul li { padding: 8px 0; border-bottom: 1px solid #f5f5f5; font-size: 14px; }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: #555; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.widget ul li a:hover { color: #1890ff; }
.hot-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.hot-tags a { font-size: 13px; padding: 4px 12px; background: #f5f5f5; border-radius: 20px; color: #666; }
.hot-tags a:hover { background: #1890ff; color: #fff; }

/* 文章详情 */
.article-detail { background: #fff; border-radius: 6px; padding: 30px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.article-detail h1 { font-size: 28px; line-height: 1.4; margin-bottom: 15px; color: #222; }
.article-detail .article-meta { padding-bottom: 15px; border-bottom: 1px solid #f0f0f0; margin-bottom: 20px; }
.article-content { font-size: 16px; line-height: 2; color: #333; }
.article-content p { margin-bottom: 18px; }
.article-content h2, .article-content h3 { margin: 25px 0 15px; color: #222; }
.article-content img { border-radius: 4px; margin: 15px 0; }
.article-content a { color: #1890ff; text-decoration: underline; }
.article-content blockquote { border-left: 4px solid #1890ff; padding: 10px 20px; background: #f9f9f9; margin: 15px 0; color: #666; }

/* 上下篇 */
.article-nav { display: flex; justify-content: space-between; margin-top: 30px; padding-top: 20px; border-top: 1px solid #f0f0f0; }
.article-nav a { font-size: 14px; color: #666; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.article-nav a:hover { color: #1890ff; }

/* 相关文章 */
.related-articles { margin-top: 30px; }
.related-articles h3 { font-size: 18px; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 2px solid #1890ff; display: inline-block; }

/* 分页 */
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 20px; list-style: none; }
.pagination li a, .pagination li span { display: inline-block; padding: 8px 14px; border: 1px solid #ddd; border-radius: 4px; color: #666; background: #fff; font-size: 14px; }
.pagination li.active span { background: #1890ff; color: #fff; border-color: #1890ff; }
.pagination li a:hover { border-color: #1890ff; color: #1890ff; }

/* 页脚 */
.footer { background: #fff; border-top: 1px solid #e8e8e8; margin-top: 40px; padding: 30px 0; text-align: center; color: #999; font-size: 13px; }
.footer p { margin-bottom: 8px; }
.footer a { color: #999; }

/* 面包屑 */
.breadcrumb { font-size: 13px; color: #999; margin-bottom: 15px; }
.breadcrumb a { color: #999; }
.breadcrumb a:hover { color: #1890ff; }

/* 空状态 */
.empty { text-align: center; padding: 60px 20px; color: #999; }
.empty-icon { font-size: 48px; margin-bottom: 15px; }

/* 响应式 */
@media (max-width: 768px) {
    .main { flex-direction: column; }
    .sidebar { width: 100%; }
    .search-box input { width: 150px; }
    .article-detail { padding: 20px; }
    .article-detail h1 { font-size: 22px; }
    .nav ul { overflow-x: auto; }
}
