@charset "UTF-8";

/* ================== 基础重置 ================== */
a,abbr,address,article,aside,audio,b,blockquote,body,canvas,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,kbd,label,li,mark,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,u,ul,var,video {
    margin: 0; padding: 0; border: 0; vertical-align: baseline; font: inherit; font-size: 15px;
}
body { line-height: 1.65; background-image: url(/img/bimg.svg); color: #444; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif; }
a { color: #333; text-decoration: none; transition: color 0.2s; }
a:hover { color: #007BFF; }
img { max-width: 100%; height: auto; display: block; }

/* ================== 布局系统 ================== */
.container { margin: 0 auto; padding: 0 .4rem; width: 100%; }
.container.grid-sm { max-width: 760px; }
.column { padding: .4rem; width: 100%; }
.col-12 { width: 100%; }
.pull-left { float: left; }
.pull-right { float: right; }
.clearfix::after { content: ""; display: table; clear: both; }

/* ================== Header 区域 ================== */
.header { padding: 50px 0 0; }
.header .column { padding: 0; }

/* Logo */
.logo { display: inline-block; margin: 0 20px 0 10px; font-size: 60px; vertical-align: middle; }

/* --- 导航栏美化 --- */
.nav {
    float: none;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    margin: 10px 0 0 20px;
    vertical-align: middle;
}
.description {
    text-align: left;
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
    padding-bottom: 0;
    letter-spacing: 1px;
}
.nav-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin: 0; padding: 0; list-style: none;
}
.nav-menu li { float: none; display: block; margin: 0; }
.nav-menu a {
    display: block;
    padding: 6px 12px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s ease;
    background: transparent;
}
.nav-menu a:hover {
    color: #007bff;
    background-color: rgba(0, 123, 255, 0.08);
    transform: translateY(-1px);
}
.nav-menu a span[style*="color"] { font-weight: bold; }

/* --- 头部文字广告 (.headergg) --- */
.headergg {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 强制一行4个 */
    gap: 5px;
    margin: 10px 0;
}
.headergg strong { display: contents; } 

.headergg a {
    display: block;
    width: 100%;
    height: 36px;
    line-height: 36px;
    text-align: center;
    color: #fff !important;
    font-size: 13px;
    border-radius: 4px;
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    background-color: #ccc;
}
.headergg a:hover { opacity: 0.9; transform: translateY(-1px); }

/* 8色循环 */
.headergg a:nth-of-type(1) { background-color: #dc3545; font-weight: bold; }
.headergg a:nth-of-type(2) { background-color: #007bff; }
.headergg a:nth-of-type(3) { background-color: #28a745; }
.headergg a:nth-of-type(4) { background-color: #ffc107; color: #333 !important; }
.headergg a:nth-of-type(5) { background-color: #17a2b8; }
.headergg a:nth-of-type(6) { background-color: #6610f2; }
.headergg a:nth-of-type(7) { background-color: #fd7e14; }
.headergg a:nth-of-type(8) { background-color: #20c997; }

/* ================== 文章列表 ================== */
.posts { margin-top: 20px; }
.posts ol { list-style: none; padding: 0; }
.posts li { padding: 10px 0; border-top: 1px solid #e5e5e5; display: flex; justify-content: space-between; align-items: center; }
.posts li:first-child { border-top: none; }
.posts li p { margin: 0; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.posts li p span { color: #999; margin-right: 5px; }
.posts-time { color: #999; font-size: 12px; white-space: nowrap; margin-left: 10px; }

/* ================== 分页导航 ================== */
.lists-navigator, .pagination { margin: 30px 0; text-align: center; width: 100%; }
.lists-navigator ol, .lists-navigator ul, .page-navigator {
    list-style: none !important; padding: 0 !important; margin: 0 !important; display: block; text-align: center;
}
.lists-navigator li, .page-navigator li {
    display: inline-block !important; margin: 0 4px; vertical-align: middle;
}
.lists-navigator a, .page-navigator a, .lists-navigator span {
    display: inline-block; padding: 6px 14px; background-color: #fff; color: #666;
    border-radius: 4px; text-decoration: none; font-size: 14px; border: 1px solid #ddd;
}
.lists-navigator a:hover, .page-navigator a:hover {
    background-color: #007bff; color: #fff; border-color: #007bff;
}
.lists-navigator .current a, .page-navigator .current a, .lists-navigator .current span {
    background-color: #007bff; color: #fff; border-color: #007bff; cursor: default;
}

/* ================== 文章详情与相关推荐 ================== */
.post-title { text-align: center; font-size: 1.6rem; margin: 20px 0; font-weight: bold; }
.post-meta { text-align: center; color: #999; font-size: 12px; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.post-meta li { display: inline-block; margin: 0 5px; }

/* 正文与头部图片通用 */
.post-content { line-height: 1.8; word-wrap: break-word; font-size: 15px; color: #333; margin-bottom: 15px; }
.post-content h2, .post-content h3 { margin: 20px 0 10px; border-left: 4px solid #333; padding-left: 10px; font-weight: bold; font-size: 1.2rem; }
.post-content p { margin-bottom: 15px; }
.post-content img { max-width: 100%; display: block; margin: 0 auto; border-radius: 4px; }

.reply2view { background: #f8f8f8; padding: 15px; border-radius: 4px; text-align: center; margin: 20px 0; border: 1px dashed #ddd; }

/* 1. 相关推荐与TAGS容器 */
.related {
    width: 100%;
    background: #fff;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid #eef0f4;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    font-size: 14px;
    line-height: 1.8;
    position: relative;
    overflow: hidden;
    text-align: center;
    box-sizing: border-box;
}

.related strong { color: #333; font-weight: 600; margin-right: 5px; display: inline-block; vertical-align: middle; }

/* 2. TAGS 标签 */
.related a[href*="tag"] {
    display: inline-block;
    background-color: #f1f3f6;
    color: #666;
    padding: 3px 10px;
    margin: 3px 5px;
    border-radius: 15px;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    vertical-align: middle;
}
.related a[href*="tag"]:hover {
    background-color: #007bff; color: #fff; border-color: #007bff;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}

/* 3. 相关推荐列表 */
.related-list ul {
    list-style: none !important; padding: 0 !important; margin: 10px 0 0 0 !important;
}
.related-list li {
    margin-bottom: 8px;
    border-bottom: 1px dashed #f5f5f5;
    padding-bottom: 8px;
    line-height: 1.6;
    text-align: center;
}
.related-list li:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.related-list li::before {
    content: "›";
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
    font-size: 18px; 
    line-height: 1;
    color: #007bff; font-weight: bold;
}
.related-list li a {
    color: #555; 
    text-decoration: none; 
    display: inline-block;
    vertical-align: middle;
    max-width: 90%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.related-list li a:hover { color: #007bff; }
.related-list .no-related { color: #999; font-style: italic; }
.related-list .no-related::before { content: none; }

/* ================== 评论区 ================== */
.comment-list { list-style: none; margin-top: 20px; }
.comment-body { margin-bottom: 15px; border-bottom: 1px dashed #eee; padding-bottom: 15px; }
.comment-header { display: flex; align-items: center; font-size: 12px; margin-bottom: 10px; }
.avatar { border-radius: 50%; margin-right: 10px; border: 1px solid #eee; }
.comment-author { font-weight: bold; margin-right: 5px; }
.comment-author-approve { background: #febe77; color: #fff; padding: 1px 4px; border-radius: 2px; font-size: 10px; margin-right: 5px; }
.comment-content { padding-left: 50px; font-size: 14px; color: #666; }
.comment-reply { margin-left: auto; }
.comment-children { margin-left: 40px; margin-top: 15px; border-left: 2px solid #f0f0f0; padding-left: 10px; }
.comment-inputs { display: flex; gap: 10px; margin-bottom: 10px; }
input[type=text], input[type=email], textarea { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; background: #fff; }
textarea { height: 100px; resize: vertical; }
button.submit { background: #333; color: #fff; border: 0; padding: 8px 25px; border-radius: 4px; cursor: pointer; }

/* 搜索框与404 */
.search-page { padding: 10px 0; }
.search-box { position: relative; display: block; border: 1px solid #ddd; border-radius: 4px; background: #fff; }
.search-box .input { border: none; background: transparent; padding: 0 40px 0 10px; height: 38px; line-height: 38px; width: 100%; box-shadow: none; margin: 0; }
.search-box .spsubmit { position: absolute; right: 0; top: 0; height: 100%; width: 40px; background: transparent; color: #999; border: none; cursor: pointer; }
.icon-search::before { content: "🔍"; font-style: normal; }
.body404 { text-align: center; padding: 100px 0; }
.site-name404 { font-size: 100px; color: #eee; font-weight: bold; line-height: 1; }
.index404 { display: inline-block; margin-top: 20px; padding: 10px 30px; border: 1px solid #ddd; border-radius: 20px; transition: all 0.3s; }
.index404:hover { background: #007bff; color: #fff; border-color: #007bff; }

/* ================== 页脚 (Footer) ================== */
.footer { color: #999; font-size: 12px; }
.footer p:first-child { margin-top: 0; padding-top: 1rem; border-top: 1px solid #e6e6e6; }
.footer .column { padding-right: 0; padding-left: 0; }
.footer p, .footer a, .footer strong, .footer span { font-size: 12px !important; }

/* ================== 返回顶部按钮 ================== */
#top {
    float: right; position: fixed; bottom: 70px; right: 20px;
    color: #fff!important; background-color: #febe77; border-radius: 100%;
    width: 35px; height: 35px; line-height: 35px; text-align: center;
    z-index: 99; display: none; font-size: 12px;
}

/* ================== 移动端深度优化 (Mobile Optimization) ================== */
@media (max-width: 768px) {
    /* 1. 头部优化 */
    .header { padding-top: 30px; }
    .logo { width: 100%; text-align: center; margin: 0 auto 10px; display: block; }
    .logo img { height: 50px; width: auto; } /* 防止Logo过大撑开 */
    
    /* 2. 导航栏 */
    .nav { margin: 10px 0 20px; width: 100%; align-items: center; }
    .description { text-align: center; margin-bottom: 15px; }
    .nav-menu { justify-content: center; gap: 8px; }
    .nav-menu a { padding: 6px 10px; font-size: 13px; }

    /* 3. 广告位 */
    .headergg { grid-template-columns: repeat(2, 1fr); gap: 4px; }
    
    /* 4. 内容区域 */
    .container { padding: 0 12px; } /* 增加屏幕边缘间距 */
    .post-title { font-size: 1.45rem; margin: 15px 0; line-height: 1.3; }
    .post-content { font-size: 16px; text-align: justify; line-height: 1.75; } /* 提升阅读体验 */
    
    /* 5. 列表页 */
    .posts li { 
        flex-direction: column; 
        align-items: flex-start; 
        padding: 12px 0; 
    }
    .posts li p { 
        width: 100%; 
        margin-bottom: 6px; 
        display: block; 
    }
    .posts-time { 
        font-size: 12px; 
        color: #aaa; 
        margin-left: 0; 
    }
    
    /* 6. 相关推荐/标签 */
    .related { padding: 15px; margin-bottom: 15px; }
    .related-list li { text-align: left; padding-left: 20px; } /* 列表左对齐更易读 */
    .related-list li::before { left: 0; } /* 图标左置 */
    .related-list li a { display: block; max-width: 100%; } /* 允许长标题自动换行 */
    
    /* 7. 页脚 */
    .footer { text-align: center; padding-bottom: 30px; }
    #top { right: 15px; bottom: 30px; } /* 调整返回顶部位置 */
}