* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif; font-size: 14px; color: #333; background: #f5f5f5; line-height: 1.6; }
a { color: #333; text-decoration: none; transition: color 0.2s; }
a:hover { color: #c00; }
img { max-width: 100%; border: 0; }
ul, ol { list-style: none; }

/* 头部 */
.header { background: #fff; border-bottom: 2px solid #c00; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.header-top { background: #f8f8f8; border-bottom: 1px solid #eee; font-size: 12px; color: #999; }
.header-top .wrap { height: 30px; line-height: 30px; }
.wrap { width: 1200px; margin: 0 auto; }
.header-main { height: 80px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 28px; font-weight: bold; color: #c00; }
.logo span { color: #333; font-size: 14px; font-weight: normal; margin-left: 10px; }
.search-box { width: 400px; }
.search-box form { display: flex; }
.search-box input { flex: 1; height: 36px; padding: 0 15px; border: 2px solid #c00; border-right: 0; outline: none; font-size: 14px; }
.search-box button { width: 80px; height: 36px; background: #c00; color: #fff; border: 0; cursor: pointer; font-size: 14px; }
.search-box button:hover { background: #a00; }

/* 导航 */
.nav { background: #c00; height: 40px; line-height: 40px; }
.nav-left, .nav-right { display: none; }
.nav-logo { color: #fff; font-size: 16px; font-weight: bold; }
.nav-search-btn { color: #fff; cursor: pointer; display: flex; align-items: center; margin-right: 10px; }
.nav ul { display: flex; }
.nav li { position: relative; }
.nav a { display: block; padding: 0 20px; color: #fff; font-size: 15px; }
.nav a:hover, .nav li.active a { background: #a00; }

/* 汉堡按钮 */
.nav-toggle {
    display: none;
    width: 24px;
    height: 24px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 3px 0;
    transition: all 0.3s;
}
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* 移动端搜索框 */
.mobile-search { display: none; background: #fff; padding: 10px 15px; border-bottom: 1px solid #eee; }
.mobile-search form { display: flex; }
.mobile-search input { flex: 1; height: 36px; padding: 0 12px; border: 1px solid #ddd; border-right: 0; outline: none; font-size: 14px; border-radius: 4px 0 0 4px; }
.mobile-search button { width: 60px; height: 36px; background: #c00; color: #fff; border: 0; cursor: pointer; font-size: 14px; border-radius: 0 4px 4px 0; }

/* 主体 */
.main { padding: 20px 0; }
.main-content { display: flex; gap: 20px; }
.content-left { flex: 1; }
.content-right { width: 300px; }

/* 文章列表 */
.article-list { background: #fff; padding: 15px 20px; }
.article-list h2 { font-size: 18px; padding-bottom: 10px; border-bottom: 2px solid #c00; margin-bottom: 15px; }
.article-list h2 span { color: #c00; }
.article-item { padding: 15px 0; border-bottom: 1px dashed #eee; display: flex; gap: 15px; }
.article-item:last-child { border-bottom: 0; }
.article-thumb { width: 180px; height: 120px; flex-shrink: 0; overflow: hidden; border-radius: 4px; }
.article-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.article-thumb:hover img { transform: scale(1.05); }
.article-info { flex: 1; min-width: 0; }
.article-item h3 { font-size: 16px; margin-bottom: 8px; font-weight: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.article-item h3 a:hover { color: #c00; }
.article-item .summary { color: #666; font-size: 13px; line-height: 1.8; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-item .meta { font-size: 12px; color: #999; display: flex; align-items: center; justify-content: space-between; }
.article-item .meta .meta-left span { margin-right: 15px; }
.article-item .meta .cat { color: #c00; }

/* 分页 */
.pagination { text-align: center; padding: 20px 0; }
.pagination a, .pagination span { display: inline-block; padding: 6px 12px; margin: 0 3px; border: 1px solid #ddd; background: #fff; font-size: 13px; }
.pagination a:hover { border-color: #c00; color: #c00; }
.pagination .current { background: #c00; color: #fff; border-color: #c00; }

/* 侧边栏 */
.sidebar-box { background: #fff; margin-bottom: 20px; }
.sidebar-box .title { padding: 12px 15px; font-size: 16px; border-bottom: 2px solid #c00; font-weight: bold; }
.sidebar-box .title span { color: #c00; }
.sidebar-box .content { padding: 10px 15px; }
.hot-list li { padding: 8px 0; border-bottom: 1px dashed #eee; font-size: 13px; display: flex; align-items: center; }
.hot-list li:last-child { border-bottom: 0; }
.hot-list .num { display: inline-block; width: 20px; height: 20px; line-height: 20px; text-align: center; background: #ccc; color: #fff; font-size: 12px; margin-right: 8px; border-radius: 2px; flex-shrink: 0; }
.hot-list li:nth-child(1) .num { background: #c00; }
.hot-list li:nth-child(2) .num { background: #e74c3c; }
.hot-list li:nth-child(3) .num { background: #e67e22; }
.hot-list li a { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-list .views { color: #999; font-size: 12px; margin-left: 8px; flex-shrink: 0; }

/* 文章详情 */
.article-detail { background: #fff; padding: 25px 30px; }
.article-detail .title { font-size: 24px; text-align: center; margin-bottom: 15px; line-height: 1.4; }
.article-detail .meta { text-align: center; color: #999; font-size: 13px; padding-bottom: 15px; border-bottom: 1px solid #eee; margin-bottom: 20px; }
.article-detail .meta span { margin: 0 10px; }
.article-detail .content { font-size: 16px; line-height: 2; color: #333; text-indent: 2em; }
.article-detail .content p { margin-bottom: 15px; }
.article-detail .content img { display: block; max-width: 100%; height: auto; margin: 20px auto; }

/* 底部 */
/* 友情链接 */
.friend-links { background: #fff; border-top: 1px solid #eee; padding: 15px 0; margin-top: 20px; }
.friend-links-title { font-size: 14px; font-weight: bold; color: #333; margin-bottom: 10px; padding-left: 10px; border-left: 3px solid #c00; }
.friend-links-list { font-size: 13px; line-height: 2; }
.friend-links-list a { color: #666; margin-right: 15px; }
.friend-links-list a:hover { color: #c00; }

.footer { background: #fff; border-top: 1px solid #eee; padding: 20px 0; margin-top: 0; text-align: center; color: #999; font-size: 13px; }
.footer p { margin: 5px 0; }
.footer a { color: #999; }

/* 面包屑 */
.breadcrumb { padding: 10px 0; font-size: 13px; color: #999; }
.breadcrumb a { color: #666; }
.breadcrumb a:hover { color: #c00; }

/* 分类标签 */
.cat-tags { padding: 10px 0; }
.cat-tags a { display: inline-block; padding: 4px 12px; margin: 3px; background: #f5f5f5; border-radius: 3px; font-size: 13px; }
.cat-tags a:hover, .cat-tags a.active { background: #c00; color: #fff; }

/* 响应式 */
@media (max-width: 1200px) {
    .wrap { width: 100%; padding: 0 15px; }
}

/* 平板 */
@media (max-width: 992px) {
    .main-content { flex-direction: column; }
    .content-left { width: 100%; }
    .content-right { width: 100%; margin-top: 20px; }
    .sidebar-box { margin-bottom: 15px; }
}

/* 手机 */
@media (max-width: 768px) {
    body { font-size: 14px; }
    .wrap { padding: 0 10px; }

    /* 头部 */
    .header-top { display: none; }
    .header-main { display: none; }

    /* 导航 - 移动端 */
    .nav { height: 44px; line-height: 44px; }
    .nav .wrap { display: flex; align-items: center; justify-content: space-between; position: relative; }
    .nav-left { display: block; }
    .nav-right { display: flex; align-items: center; }
    .nav-toggle { display: flex; }
    .nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 44px;
        left: 0;
        right: 0;
        background: #c00;
        z-index: 999;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    }
    .nav ul.show { display: flex; }
    .nav li { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .nav li:last-child { border-bottom: none; }
    .nav a { padding: 0 15px; font-size: 14px; line-height: 42px; }

    /* 面包屑 */
    .breadcrumb { padding: 8px 0; font-size: 12px; }

    /* 文章列表 */
    .article-list { padding: 0 10px; }
    .article-list h2 { font-size: 16px; padding: 10px 0; }
    .article-item { padding: 12px 0; border-bottom: 1px solid #eee; display: flex; gap: 10px; }
    .article-thumb { width: 100px; height: 75px; flex-shrink: 0; border-radius: 3px; }
    .article-info { flex: 1; min-width: 0; }
    .article-item h3 { font-size: 15px; line-height: 1.4; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .article-item .meta { font-size: 11px; margin-top: 5px; display: flex; align-items: center; justify-content: space-between; }
    .article-item .meta .meta-left span { margin-right: 8px; }
    .article-item .summary { font-size: 12px; margin-top: 5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

    /* 分页 */
    .pagination { padding: 15px 0; }
    .pagination a, .pagination span { padding: 6px 10px; margin: 0 2px; font-size: 13px; }

    /* 文章详情 */
    .article-detail { padding: 15px; }
    .article-detail .title { font-size: 20px; line-height: 1.4; }
    .article-detail .meta { font-size: 12px; padding: 8px 0; margin: 10px 0; }
    .article-detail .meta span { margin: 0 5px; }
    .article-detail .content { font-size: 16px; line-height: 1.8; text-indent: 2em; }
    .article-detail .content p { margin-bottom: 15px; }
    .article-detail .content img { display: block; max-width: 100%; height: auto; margin: 15px auto; }

    /* 相关文章/推荐/猜你喜欢 */
    .article-list ul { columns: 1 !important; }
    .article-list ul li { font-size: 13px; padding: 6px 0; }

    /* 上下篇 */
    .article-list > div[style*="flex"] {
        flex-direction: column !important;
        gap: 8px;
    }
    .article-list > div[style*="flex"] > div {
        font-size: 13px;
    }

    /* 侧边栏 */
    .content-right { margin-top: 15px; }
    .sidebar-box { margin-bottom: 15px; }
    .sidebar-box .title { padding: 10px 12px; font-size: 15px; }
    .sidebar-box .content { padding: 8px 12px; }
    .sidebar-box li { padding: 6px 0; font-size: 13px; }
    .sidebar-box .num { width: 18px; height: 18px; line-height: 18px; font-size: 11px; }

    /* 分类标签 */
    .cat-tags { padding: 8px 0; }
    .cat-tags a { padding: 4px 10px; font-size: 12px; }

    /* 友情链接 */
    .friend-links { padding: 12px 0; }
    .friend-links-title { font-size: 13px; margin-bottom: 8px; }
    .friend-links-list { font-size: 12px; line-height: 2; }
    .friend-links-list a { margin-right: 10px; }

    /* 底部 */
    .footer { padding: 15px 0; font-size: 12px; }
    .footer p { margin: 3px 0; }
}

/* 小屏手机 */
@media (max-width: 480px) {
    .logo { font-size: 18px; }
    .nav a { padding: 0 12px; font-size: 13px; line-height: 40px; }
    .article-item h3 { font-size: 15px; }
    .article-detail .title { font-size: 18px; }
    .article-detail .content { font-size: 15px; }
    .pagination a, .pagination span { padding: 5px 8px; font-size: 12px; }
    .sidebar-box .title { font-size: 14px; }
}
