/* ========================================
   BRUTALIST WEB DESIGN - 野蛮主义风格
   特点：粗边框、高对比度、无装饰、原始感
   ======================================== */

/* ---------- 重置与基础 ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: auto;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Courier New", "SimSun", "宋体", monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #000;
    background: #fff;
    -webkit-font-smoothing: none;
    -moz-osx-font-smoothing: unset;
}

/* ---------- 链接样式 ---------- */
a {
    color: #000;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

a:hover {
    background: #000;
    color: #fff;
    text-decoration: none;
}

a:active {
    background: #ff0000;
    color: #fff;
}

/* ---------- 列表重置 ---------- */
ul, ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

li {
    margin: 0;
    padding: 0;
}

/* ---------- 标题样式 ---------- */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    padding: 0;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---------- 图片 ---------- */
img {
    max-width: 100%;
    height: auto;
    display: block;
    border: 3px solid #000;
}

/* ---------- 清除浮动 ---------- */
.clear {
    clear: both;
    display: block;
}

/* ========================================
   布局容器
   ======================================== */

/* 主容器 */
#divAll {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    border: 4px solid #000;
    background: #fff;
}

/* 页面容器 */
#divPage {
    width: 100%;
    border-bottom: 4px solid #000;
}

/* 中间内容区 */
#divMiddle {
    width: 100%;
    padding: 0;
}

/* ---------- 顶部区域 ---------- */
#divTop {
    border-bottom: 4px solid #000;
    padding: 30px 20px;
    background: #ff0000;
}

#BlogTitle {
    font-size: 48px;
    margin: 0 0 10px 0;
    text-align: left;
}

#BlogTitle a {
    color: #fff;
    text-decoration: none;
    background: #000;
    padding: 5px 15px;
    display: inline-block;
}

#BlogTitle a:hover {
    background: #fff;
    color: #000;
}

#BlogSubTitle {
    font-size: 14px;
    color: #fff;
    margin: 0;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ---------- 导航栏 ---------- */
#divNavBar {
    border-bottom: 4px solid #000;
    background: #ffff00;
    padding: 0;
}

#divNavBar ul {
    display: flex;
    flex-wrap: wrap;
}

#divNavBar li {
    border-right: 4px solid #000;
}

#divNavBar li:last-child {
    border-right: none;
}

#divNavBar a {
    display: block;
    padding: 15px 25px;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 13px;
    color: #000;
    background: #ffff00;
}

#divNavBar a:hover,
#divNavBar a.on {
    background: #000;
    color: #ffff00;
}

/* ---------- 主内容区 ---------- */
#divMain {
    width: 70%;
    float: left;
    padding: 20px;
    border-right: 4px solid #000;
    min-height: 600px;
}

/* ---------- 侧边栏 ---------- */
#divSidebar {
    width: 30%;
    float: right;
    padding: 20px;
    background: #f0f0f0;
}

/* ========================================
   文章模块
   ======================================== */

.post {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 2px solid #000;
}

.post:last-child {
    border-bottom: none;
}

.post.multi {
    position: relative;
}

/* 文章标题 */
.post-title {
    font-size: 24px;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.post-title a {
    text-decoration: none;
    border-bottom: 3px solid #000;
    display: inline;
}

.post-title a:hover {
    background: #000;
    color: #fff;
}

/* 文章日期 */
.post-date {
    font-size: 12px;
    color: #666;
    margin: 0 0 10px 0;
    font-family: "Courier New", monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* 文章内容 */
.post-body {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 15px;
}

.post-body p {
    margin: 0 0 15px 0;
    text-indent: 0;
}

.post-body a {
    color: #0000ff;
    text-decoration: underline;
}

.post-body a:hover {
    background: #0000ff;
    color: #fff;
}

/* 文章底部 */
.post-footer {
    font-size: 11px;
    color: #666;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 置顶文章 */
.istop-post {
    background: #000;
    color: #fff;
    padding: 20px;
    margin-bottom: 30px;
}

.istop-post .post-title a {
    color: #fff;
    border-bottom-color: #fff;
}

.istop-post .post-title a:hover {
    background: #fff;
    color: #000;
}

.istop-post .post-date,
.istop-post .post-footer {
    color: #ccc;
}

/* 单篇文章 */
.single .post-title {
    font-size: 32px;
    border-bottom: 4px solid #000;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

/* ========================================
   分页
   ======================================== */
.pagebar {
    margin: 30px 0;
    padding: 15px;
    border: 3px solid #000;
    text-align: center;
}

.pagebar span,
.pagebar a {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    border: 2px solid #000;
    text-decoration: none;
    font-weight: bold;
}

.pagebar .now-page {
    background: #000;
    color: #fff;
}

.pagebar .now-page a {
    background: #000;
    color: #fff;
    border-color: #fff;
}

.pagebar .now-page a:hover {
    background: #ffff00;
    color: #000;
    border-color: #000;
}

.pagebar a:hover {
    background: #000;
    color: #fff;
}

/* ========================================
   侧边栏模块
   ======================================== */
.function {
    margin-bottom: 30px;
    border: 3px solid #000;
    background: #fff;
}

.function_t {
    background: #000;
    color: #fff;
    padding: 12px 15px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 3px solid #000;
}

.function_c {
    padding: 0;
}

.function_c ul {
    padding: 0;
}

.function_c li {
    border-bottom: 1px solid #000;
}

.function_c li:last-child {
    border-bottom: none;
}

.function_c li a {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    font-size: 13px;
}

.function_c li a:hover {
    background: #ffff00;
    color: #000;
}

/* 分类特殊样式 */
#divCatalog .function_c li a::before {
    content: "▸ ";
}

/* 友情链接 */
#divLinkage .function_c {
    padding: 15px;
}

#divLinkage .function_c a {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 10px 10px 0;
    border: 2px solid #000;
    text-decoration: none;
    font-size: 12px;
}

#divLinkage .function_c a:hover {
    background: #000;
    color: #fff;
}

/* ========================================
   评论区域
   ======================================== */
#divCommentPost {
    margin-top: 30px;
    padding: 20px;
    border: 3px solid #000;
    background: #f8f8f8;
}

#divCommentPost p {
    margin: 0 0 15px 0;
}

#divCommentPost a {
    font-weight: bold;
}

#txaArticle {
    width: 100%;
    padding: 15px;
    border: 3px solid #000;
    font-family: "Courier New", monospace;
    font-size: 14px;
    resize: vertical;
    background: #fff;
}

#txaArticle:focus {
    outline: none;
    background: #ffff00;
}

.button {
    padding: 12px 30px;
    background: #000;
    color: #fff;
    border: 3px solid #000;
    font-family: "Courier New", monospace;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
}

.button:hover {
    background: #fff;
    color: #000;
}

.button:active {
    background: #ff0000;
    color: #fff;
}

/* 回复框 */
.reply-frm {
    background: #ffff00 !important;
    border-color: #000 !important;
}

#cancel-reply {
    display: inline-block;
    margin-left: 15px;
    padding: 5px 10px;
    background: #ff0000;
    color: #fff;
    text-decoration: none;
}

#cancel-reply:hover {
    background: #000;
}

/* ========================================
   底部区域
   ======================================== */
#divBottom {
    clear: both;
    border-top: 4px solid #000;
    padding: 30px 20px;
    background: #000;
    color: #fff;
    text-align: center;
}

#BlogCopyRight {
    font-size: 12px;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

#BlogCopyRight a {
    color: #000;
    background: #ffff00;
    text-decoration: none;
    padding: 2px 8px;
    font-weight: bold;
    border: 2px solid #ffff00;
}

#BlogCopyRight a:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
}

/* ========================================
   文章内容样式
   ======================================== */
.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4,
.post-body h5,
.post-body h6 {
    margin: 25px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #000;
}

.post-body h1 { font-size: 28px; }
.post-body h2 { font-size: 24px; }
.post-body h3 { font-size: 20px; }
.post-body h4 { font-size: 18px; }
.post-body h5 { font-size: 16px; }
.post-body h6 { font-size: 14px; }

.post-body blockquote {
    margin: 20px 0;
    padding: 20px;
    border-left: 6px solid #000;
    background: #f0f0f0;
    font-style: italic;
}

.post-body code {
    background: #000;
    color: #0f0;
    padding: 2px 6px;
    font-family: "Courier New", monospace;
    font-size: 13px;
}

.post-body pre {
    background: #000;
    color: #0f0;
    padding: 20px;
    overflow-x: auto;
    font-family: "Courier New", monospace;
    font-size: 13px;
    line-height: 1.5;
}

.post-body pre code {
    background: transparent;
    padding: 0;
}

.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border: 3px solid #000;
}

.post-body th,
.post-body td {
    padding: 12px;
    border: 2px solid #000;
    text-align: left;
}

.post-body th {
    background: #000;
    color: #fff;
}

.post-body tr:nth-child(even) {
    background: #f0f0f0;
}

.post-body ul,
.post-body ol {
    margin: 15px 0;
    padding-left: 30px;
}

.post-body ul {
    list-style: square;
}

.post-body ol {
    list-style: decimal;
}

.post-body li {
    margin-bottom: 8px;
}

/* ========================================
   响应式设计
   ======================================== */
@media screen and (max-width: 900px) {
    #divMain,
    #divSidebar {
        width: 100%;
        float: none;
        border-right: none;
        border-bottom: 4px solid #000;
    }
    
    #divSidebar {
        border-bottom: none;
    }
    
    #divNavBar ul {
        flex-direction: column;
    }
    
    #divNavBar li {
        border-right: none;
        border-bottom: 2px solid #000;
    }
    
    #BlogTitle {
        font-size: 32px;
    }
    
    .single .post-title {
        font-size: 24px;
    }
}

@media screen and (max-width: 600px) {
    #divAll {
        margin: 10px;
    }
    
    #divTop {
        padding: 20px 15px;
    }
    
    #BlogTitle {
        font-size: 24px;
    }
    
    #divMain,
    #divSidebar {
        padding: 15px;
    }
    
    .post-title {
        font-size: 18px;
    }
}

/* ========================================
   辅助类
   ======================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.bg-black { background: #000; color: #fff; }
.bg-red { background: #ff0000; color: #fff; }
.bg-yellow { background: #ffff00; color: #000; }
.bg-gray { background: #f0f0f0; }

.border-thick { border: 4px solid #000; }
.border-thin { border: 2px solid #000; }
