/* ========================================
   bbs.kuxiaomiao.com 模板样式
   模仿179zl.cn蓝色调现代风格
   ======================================== */

/* 基础重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    color: #333;
    background: #f5f6f8;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}
a { color: #2a6bcc; text-decoration: none; transition: color 0.2s; }
a:hover { color: #1a4fa0; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
.clearfix::after { content: ""; display: table; clear: both; }
.fl { float: left; }
.fr { float: right; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* 容器 */
.container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* ============ 头部 ============ */
#header_main {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}
#header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}
.logo a {
    display: flex;
    align-items: center;
    font-size: 22px;
    font-weight: 700;
    color: #2a6bcc;
}
.logo img { height: 36px; margin-right: 8px; }

/* 导航 */
.header-nav ul { display: flex; align-items: center; gap: 4px; }
.header-nav .navbar-item a {
    display: block;
    padding: 6px 16px;
    font-size: 15px;
    color: #444;
    border-radius: 4px;
    transition: all 0.2s;
}
.header-nav .navbar-item a:hover,
.header-nav .navbar-item.active a {
    color: #fff;
    background: #2a6bcc;
}

/* 搜索 */
.search_top { position: relative; display: flex; align-items: center; gap: 10px; }
.search_top .fa-search {
    font-size: 18px;
    color: #666;
    cursor: pointer;
    padding: 6px;
    transition: color 0.2s;
}
.search_top .fa-search:hover { color: #2a6bcc; }
.top_search {
    position: absolute;
    right: 0;
    top: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    padding: 12px;
    display: none;
    z-index: 999;
    width: 280px;
}
.top_search.active { display: block; }
.searchform { display: flex; gap: 8px; }
.searchform .text {
    flex: 1;
    height: 36px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.searchform .text:focus { border-color: #2a6bcc; }
.searchform .btn {
    height: 36px;
    padding: 0 16px;
    background: #2a6bcc;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}
.searchform .btn:hover { background: #1a4fa0; }

/* ============ 横幅区域 ============ */
.top_bg {
    background: linear-gradient(135deg, #1a4fa0 0%, #2a6bcc 40%, #4a90d9 100%);
    color: #fff;
    padding: 50px 0 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.top_bg::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 200"><path fill="rgba(255,255,255,0.05)" d="M0,100 C200,150 400,50 600,100 C800,150 1000,50 1200,100 L1200,200 L0,200 Z"/></svg>') no-repeat center bottom;
    background-size: cover;
}
.top_bg h1, .top_bg h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
}
.top_bg p {
    font-size: 15px;
    opacity: 0.85;
    position: relative;
}
.breadcrumb-place {
    font-size: 13px;
    margin-top: 10px;
    position: relative;
    opacity: 0.8;
}
.breadcrumb-place a { color: #fff; }
.breadcrumb-place a:hover { text-decoration: underline; }
.breadcrumb-place .fa-angle-right { margin: 0 4px; }

/* ============ 主体布局 ============ */
.slide-wrap { display: flex; gap: 20px; margin-top: 20px; margin-bottom: 30px; }
.main { flex: 1; min-width: 0; }
.side { width: 300px; flex-shrink: 0; }

/* ============ 文章列表 ============ */
.post-list {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    gap: 18px;
    transition: box-shadow 0.2s;
    border: 1px solid #eee;
}
.post-list:hover { box-shadow: 0 4px 16px rgba(42,107,204,0.1); }
.post-pic { width: 220px; flex-shrink: 0; position: relative; border-radius: 6px; overflow: hidden; }
.post-pic img { width: 100%; height: 150px; object-fit: cover; transition: transform 0.3s; }
.post-list:hover .post-pic img { transform: scale(1.03); }
.post-cat {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #2a6bcc;
    color: #fff;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 3px;
    z-index: 2;
}
.post-info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.post-info h2 { font-size: 18px; font-weight: 600; line-height: 1.5; margin-bottom: 8px; }
.post-info h2 a { color: #222; }
.post-info h2 a:hover { color: #2a6bcc; }
.info-desc {
    font-size: 14px;
    color: #888;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}
.info-desc a { color: #888; }
.info-bottom {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #aaa;
}
.info-bottom i { margin-right: 3px; }
.info-bottom .fr { margin-left: auto; }

/* ============ 分页 ============ */
.pagination {
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
    border: 1px solid #eee;
}
.pagination ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.pagination li a, .pagination li span {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
    transition: all 0.2s;
}
.pagination li a:hover { border-color: #2a6bcc; color: #2a6bcc; }
.pagination li.active span {
    background: #2a6bcc;
    color: #fff;
    border-color: #2a6bcc;
}
.load-more-wrap { text-align: center; margin-top: 12px; }
.load-more {
    display: inline-block;
    padding: 8px 30px;
    background: #2a6bcc;
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.2s;
}
.load-more:hover { background: #1a4fa0; color: #fff; }

/* ============ 侧边栏 ============ */
.widget {
    background: #fff;
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 16px;
    border: 1px solid #eee;
}
.widget-title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 2px solid #2a6bcc;
    position: relative;
}
.widget-title::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: #4a90d9;
}

/* 热门文章 */
.side_hot .list-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.side_hot .list-item:last-child { border-bottom: none; }
.side_hot .list-media { width: 90px; height: 65px; flex-shrink: 0; border-radius: 4px; overflow: hidden; }
.side_hot .media-content {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}
.side_hot .list-content { flex: 1; }
.side_hot .list-title {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.side_hot .list-title:hover { color: #2a6bcc; }
.side_hot .list-footer { font-size: 12px; color: #aaa; margin-top: 4px; }

/* 最近发表 */
.divPrevious li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
}
.divPrevious li:last-child { border-bottom: none; }
.rankNum {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    font-size: 12px;
    border-radius: 4px;
    color: #fff;
    background: #ccc;
    flex-shrink: 0;
}
.num-1, .num-2, .num-3 { background: #2a6bcc; }
.divPrevious .text a {
    font-size: 14px;
    color: #444;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.divPrevious .text a:hover { color: #2a6bcc; }

/* 标签列表 */
.divTags { display: flex; flex-wrap: wrap; gap: 8px; }
.side-new-tags a {
    display: inline-block;
    padding: 3px 12px;
    background: #f0f4fa;
    color: #2a6bcc;
    font-size: 13px;
    border-radius: 3px;
    transition: all 0.2s;
}
.side-new-tags a:hover { background: #2a6bcc; color: #fff; }
.tag-count { font-size: 12px; color: #999; }

/* ============ 文章详情页 ============ */
.breadcrumb {
    background: #fff;
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #888;
    border: 1px solid #eee;
}
.breadcrumb a { color: #555; }
.breadcrumb a:hover { color: #2a6bcc; }
.breadcrumb .fa-home { margin-right: 4px; }
.breadcrumb .fa-angle-right { margin: 0 6px; }

.single {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 16px;
    border: 1px solid #eee;
}
.single-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    line-height: 1.4;
    margin-bottom: 14px;
}
.single-info {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 13px;
    color: #999;
    padding-bottom: 18px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.single-info i { margin-right: 4px; }
.single-info a { color: #2a6bcc; }

/* 文章正文 */
.single-entry {
    font-size: 16px;
    line-height: 1.9;
    color: #333;
    word-break: break-word;
}
.single-entry h2 {
    font-size: 20px;
    font-weight: 600;
    color: #222;
    margin: 28px 0 14px;
    padding-left: 12px;
    border-left: 3px solid #2a6bcc;
}
.single-entry p { margin-bottom: 16px; }
.single-entry img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 16px auto;
}

/* 文章底部 */
.end-line {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0 20px;
    color: #ccc;
    font-size: 13px;
}
.end-line i {
    flex: 1;
    height: 1px;
    background: #eee;
}
.end-line span { padding: 0 12px; }
.single-notice {
    background: #f8f9fb;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
}
.single-notice .single-author { color: #2a6bcc; font-weight: 600; }
.single-meta { margin-bottom: 10px; }
.post-tag { font-size: 13px; color: #888; }
.post-tag i { margin-right: 4px; }
.post-tag a {
    display: inline-block;
    padding: 2px 10px;
    background: #f0f4fa;
    color: #2a6bcc;
    border-radius: 3px;
    font-size: 13px;
    margin: 0 4px;
}
.post-tag a:hover { background: #2a6bcc; color: #fff; }

/* 上下篇导航 */
.single-nav {
    display: flex;
    justify-content: space-between;
    background: #fff;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid #eee;
}
.single-nav strong { color: #555; }
.single-nav a { color: #2a6bcc; }
.article-nav-prev, .article-nav-next { max-width: 48%; }

/* 相关文章 */
.related_post {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid #eee;
}
.related-t h2 {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    padding-bottom: 12px;
    border-bottom: 2px solid #2a6bcc;
    margin-bottom: 14px;
}
.list_3 { display: flex; flex-wrap: wrap; gap: 12px; }
.list_3 li a {
    font-size: 14px;
    color: #444;
    padding: 4px 0;
    display: block;
}
.list_3 li a:hover { color: #2a6bcc; }

/* ============ 页脚 ============ */
.footer {
    background: #1e2a3a;
    color: #8a9ab5;
    padding: 30px 0 20px;
    margin-top: 20px;
}
.footer_bottom { text-align: center; }
.foot-text { font-size: 13px; margin-bottom: 8px; }
.foot-text a { color: #8a9ab5; }
.foot-text a:hover { color: #fff; }
.foot-text .fa-copyright { margin: 0 4px; }
.footer-RunTime { font-size: 12px; color: #5a6a85; }

/* ============ 回到顶部 ============ */
.backtop {
    position: fixed;
    right: 20px;
    bottom: 60px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bt-box {
    width: 40px;
    height: 40px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #666;
    font-size: 18px;
}
.bt-box:hover { background: #2a6bcc; color: #fff; border-color: #2a6bcc; }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
    .slide-wrap { flex-direction: column; }
    .side { width: 100%; }
    .post-list { flex-direction: column; }
    .post-pic { width: 100%; }
    .post-pic img { height: 200px; }
    .header-nav ul { flex-wrap: wrap; gap: 2px; }
    .header-nav .navbar-item a { padding: 4px 10px; font-size: 13px; }
    #header .container { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 10px; }
    .top_bg h1, .top_bg h2 { font-size: 22px; }
    .single { padding: 18px; }
    .single-title h1 { font-size: 20px; }
    .single-nav { flex-direction: column; gap: 10px; }
    .article-nav-prev, .article-nav-next { max-width: 100%; }
}
