* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.sidebar-block ul,
#under_post_card1 {
    padding: 0 1em;
}

body {
    background-color: #f0f2f5;    /* 浅灰底 */
    font-family: system-ui, -apple-system, 'Segoe UI', 'Roboto', 'Noto Sans', sans-serif;
    color: #1e2a3e;
    line-height: 1.5;
    padding: 24px 20px;
}

/* 硬阴影 + 浅色边框 */
.day,
#sidebar_news,
#blog-calendar,
.catListEssay,
.catListLink,
.catListNoteBook,
.catListTag,
.catListPostCategory,
.catListPostArchive,
.catListArticleArchive,
.catListImageCategory,
.catListComment,
.catListView,
.catListFeedback,
.catListMyTeams,
.catListBlogRank,
#blog-sidecolumn > div,
#sidebar_search,
#sidebar_categories,
#sidebar_scorerank,
#sidebar_blograting,
#sidebar_visitors,
#sidebar_common,
#sidebar_topviewedposts,
#sidebar_topcommentedposts,
#sidebar_topdiggposts,
#sidebar_recentcomments,
#sidebar_shortcut,
#sidebar_followme,
#sidebar_about,
#sidebar_announce,
#sidebar_links,
#sidebar_recentposts,
#sidebar_archive,
#sidebar_photocalendar,
#sidebar_custom,
.commentbox_main,
.post,
.entrylist,
#gallery,
.profile,
.feedbackItem,
.pfl_feedbackItem,
.PostList,
.entrylistItem,
.sidebar-block > div
#mylinks,
#mytopmenu,
#header,
#under_post_card1,
.footer {
    background: #ffffff;
    border-radius: 0;
    border: 1px solid #d4dce6;
    box-shadow: 3px 3px 0 0 rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.15s ease, transform 0.1s ease;
/*     margin-bottom: 1em; */
}

/* hover时阴影略微加深，保持硬边 */
.day:hover,
.post:hover,
.entrylistItem:hover,
.newsItem:hover,
.catListEssay:hover {
    box-shadow: 4px 4px 0 0 rgba(0, 0, 0, 0.12);
}

/* 内部间距统一 */
.day,
#sidebar_news,
#blog-calendar,
.catListEssay,
.catListLink,
.catListNoteBook,
.catListTag,
.catListPostCategory,
.catListPostArchive,
.catListArticleArchive,
.catListImageCategory,
.catListComment,
.catListView,
.catListFeedback,
.catListMyTeams,
.catListBlogRank,
#blog-sidecolumn > div,
#sidebar_search,
#sidebar_categories,
#sidebar_scorerank,
#sidebar_blograting,
#sidebar_visitors,
#sidebar_common,
#sidebar_topviewedposts,
#sidebar_topcommentedposts,
#sidebar_topdiggposts,
#sidebar_recentcomments,
#sidebar_shortcut,
#sidebar_followme,
#sidebar_about,
#sidebar_announce,
#sidebar_links,
#sidebar_recentposts,
#sidebar_archive,
#sidebar_photocalendar,
#sidebar_custom,
.post,
.entrylist,
#gallery,
.profile,
.feedbackItem,
.pfl_feedbackItem,
.PostList,
.entrylistItem,
.sidebar-block{
    padding: 1.4rem 1.6rem;
}

/* ---------- 头部区域 ---------- */
#header {
    margin-bottom: 28px;
    background: #ffffff;
    padding: 1.2rem 2rem;
}

.headerText a.headermaintitle {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.3px;
    color: #1e2a3e;
    text-decoration: none;
    transition: color 0.2s;
}

.headerText a.headermaintitle:hover {
    color: #5a6e7c;
}

/* 顶部导航菜单 (#mylinks) */
#mylinks {
    margin-bottom: 20px;
    padding: 0.8rem 1.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 28px;
    align-items: center;
    background: #ffffff;
}

#mylinks .menu {
    text-decoration: none;
    color: #2c3e4e;
    font-weight: 500;
    padding: 4px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

#mylinks .menu:hover {
    border-bottom-color: #8e9eae;
    color: #000000;
}

#mylinks a img {
    vertical-align: middle;
    margin-left: 4px;
}

/* 统计信息区域 */
#mytopmenu {
    margin-bottom: 28px;
    padding: 0.8rem 1.8rem;
    display: flex;
    justify-content: flex-end;
    font-size: 0.85rem;
    color: #5b6e7e;
    background: #ffffff;
    float: right;
}

#blog_stats_place_holder {
    font-size: 0.85rem;
}

/* ---------- 左右两栏布局 ---------- */
#leftcontent {
    width: 300px;
    float: left;
    margin-right: 30px;
    background: transparent;
    word-wrap: break-word;
}

#centercontent {
    overflow: hidden;  /* BFC，自适应宽度 */
    background: transparent;
    clear: right;
}

/* 侧边栏模块间距 */
#leftcontentcontainer > div,
#blog-sidecolumn > div {
    margin-bottom: 28px;
}

/* 侧边栏标题统一样式 */
.catListTitle,
.newsItem h3,
#calendar caption,
#sidebar_search h3,
#sidebar_categories h3,
#sidebar_scorerank h3,
#sidebar_blograting h3,
#sidebar_visitors h3,
#sidebar_common h3,
#sidebar_topviewedposts h3,
#sidebar_topcommentedposts h3,
#sidebar_topdiggposts h3,
#sidebar_recentcomments h3,
#sidebar_shortcut h3,
#sidebar_followme h3,
#sidebar_about h3,
#sidebar_announce h3,
#sidebar_links h3,
#sidebar_recentposts h3,
#sidebar_archive h3,
#sidebar_photocalendar h3,
#sidebar_custom h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e6ed;
    color: #1e2a3e;
    display: flex;
    align-items: center;
}

/* 标题左侧 */
.catListTitle:before,
.newsItem h3:before,
#sidebar_search h3:before,
#sidebar_categories h3:before {
    content: "";
    width: 4px;
    height: 18px;
    background: #9aaebf;
    display: inline-block;
    margin-right: 10px;
    border-radius: 0;
}

/* 侧边栏列表样式 */
.catListEssay ul,
.catListLink ul,
.catListNoteBook ul,
.catListTag ul,
.catListPostCategory ul,
.catListPostArchive ul,
.catListArticleArchive ul,
.catListImageCategory ul,
.catListComment ul,
.catListView ul,
.catListFeedback ul,
.catListMyTeams ul,
.catListBlogRank ul {
    list-style: none;
    margin-top: 8px;
}

.catListEssay li,
.catListLink li,
.catListNoteBook li,
.catListTag li,
.catListPostCategory li,
.catListPostArchive li,
.catListArticleArchive li,
.catListImageCategory li,
.catListComment li,
.catListView li,
.catListFeedback li,
.catListMyTeams li,
.catListBlogRank li {
    margin-bottom: 10px;
    font-size: 0.9rem;
    border-left: 1px solid #e0e6ed;
    padding-left: 12px;
}

.catListEssay li a,
.catListLink li a,
.catListNoteBook li a,
.catListTag li a,
.catListPostCategory li a,
.catListPostArchive li a,
.catListArticleArchive li a,
.catListImageCategory li a,
.catListComment li a,
.catListView li a,
.catListFeedback li a,
.catListMyTeams li a,
.catListBlogRank li a {
    text-decoration: none;
    color: #2c3e4e;
    transition: color 0.2s;
}

.catListEssay li a:hover,
.catListLink li a:hover,
.catListNoteBook li a:hover,
.catListTag li a:hover,
.catListPostCategory li a:hover,
.catListPostArchive li a:hover,
.catListArticleArchive li a:hover,
.catListImageCategory li a:hover,
.catListComment li a:hover,
.catListView li a:hover,
.catListFeedback li a:hover,
.catListMyTeams li a:hover,
.catListBlogRank li a:hover {
    color: #000;
    text-decoration: underline;
}

/* 积分与排名 */
.liScore, .liRank {
    font-weight: 500;
    background: #f4f6f9;
    padding: 6px 12px;
    border: 1px solid #e0e6ed;
    display: inline-block;
    margin-bottom: 6px;
    box-shadow: 1px 1px 0 rgba(0,0,0,0.05);
}

/* ---------- 首页文章列表 (day) ---------- */
.day {
    margin-bottom: 28px;
}

.dayTitle {
    font-size: 0.8rem;
    color: #6f8faa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    background: #f4f6f9;
    display: inline-block;
    padding: 2px 14px;
    border: 1px solid #dce3ec;
    box-shadow: 1px 1px 0 rgba(0,0,0,0.05);
}

.postTitle {
    margin: 8px 0 12px;
}

.postTitle a {
    font-size: 1.6rem;
    font-weight: 600;
    text-decoration: none;
    color: #1f2e3a;
    transition: color 0.2s;
}

.postTitle a:hover {
    color: #5f7f9a;
}

.c_b_p_desc {
    color: #2d3e4e;
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 12px 0;
}

.c_b_p_desc_readmore {
    display: inline-block;
    margin-top: 6px;
    font-weight: 500;
    color: #5a6e7c;
    text-decoration: none;
}

.c_b_p_desc_readmore:hover {
    text-decoration: underline;
    color: #1e2a3e;
}

.postDesc {
    font-size: 0.78rem;
    color: #6f8faa;
    border-top: 1px solid #e0e6ed;
    padding-top: 12px;
    margin-top: 12px;
}

/* 分页区域 */
.topicListFooter {
    margin-top: 28px;
    text-align: center;
}

.pager, #nav_next_page {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 20px 0;
}

.pager a, .pager span, #nav_next_page a {
    background: white;
    border: 1px solid #d4dce6;
    padding: 6px 14px;
    text-decoration: none;
    color: #2c3e4e;
    font-size: 0.85rem;
    transition: all 0.2s;
    box-shadow: 1px 1px 0 rgba(0,0,0,0.05);
}

.pager a:hover, #nav_next_page a:hover {
    background: #eef2f8;
    border-color: #c0c8d4;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.08);
}

.pager .current {
    background: #1e2a3e;
    color: white;
    border-color: #1e2a3e;
    box-shadow: none;
}

/* ---------- 日历样式 ---------- */
#calendar table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

#calendar th, #calendar td {
    text-align: center;
    padding: 8px 4px;
    border: 1px solid #dce3ec;
    font-size: 0.85rem;
}

#calendar caption {
    font-weight: bold;
    margin-bottom: 10px;
}

/* ---------- 搜索框 ---------- */
#sidebar_search input[type="text"],
#widget_mysearch input[type="text"] {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d0d8e4;
    background: white;
    font-size: 0.9rem;
    outline: none;
    transition: 0.2s;
    border-radius: 0;
}

#sidebar_search input[type="text"]:focus,
#widget_mysearch input[type="text"]:focus {
    border-color: #9aaebf;
    box-shadow: inset 0 0 0 1px #9aaebf;
}

#sidebar_search input[type="submit"],
#widget_mysearch input[type="submit"] {
    margin-top: 12px;
    background: #eef2f8;
    border: 1px solid #c8d0dc;
    padding: 6px 16px;
    cursor: pointer;
    font-size: 0.8rem;
    border-radius: 0;
    box-shadow: 1px 1px 0 rgba(0,0,0,0.05);
    transition: all 0.1s;
}

#sidebar_search input[type="submit"]:hover,
#widget_mysearch input[type="submit"]:hover {
    background: #e2e8f0;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.08);
}

/* ---------- Copyright ---------- */
.copyright::before {
    content: "©";
    color: #999;
    font-weight: bold;
    font-size: 24pt;
    float: left;
    shape-outside: circle(16pt);
}

.copyright {
    padding: 10pt 20pt;
}

.copyright > :last-child,
.copyright > :last-child *{
    height: 0;
    overflow: visible;
    clear: both;
    color: transparent !important;;
}

/* ---------- 评论 ---------- */
#comment_form_container {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "tit tit"
        "tip tip"
        "editor editor"
        "shortcuts opt"
        "under under";
}

#commentform_title { grid-area: tit; }
#tip_comment { grid-area: tip; }
.commentbox_main {
    grid-area: editor;
    width: 100%;
}

#commentbox_opt {
    grid-area: opt;
    display: flex;
    justify-content: end;
}

#tip_comment2 { display: none; }
#commentbox_opt + div + p { grid-area: shortcuts; }

/* ---------- 页脚 ---------- */
.footer {
    margin-top: 40px;
    padding: 1.2rem 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: #6c7e8f;
    background: #ffffff;
    clear: both;
}

.footer a {
    text-decoration: none;
    color: #4a627a;
}

.footer a:hover {
    text-decoration: underline;
}

/* ---------- 响应式设计 (移动端) ---------- */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    
/*     #leftcontent::before {
        color: #5b6e7e;  
        border-radius: 0;
        border: 1px solid #d4dce6;
        box-shadow: 3px 3px 0 0 rgba(0, 0, 0, 0.08);
        transition: box-shadow 0.15s ease, transform 0.1s ease;
        background: #ffffff;
        clear: none;
        float: left;
        padding: 0.65rem 1.2rem;
        margin-left: 0.5rem;
        content: ">";
        font-size: large;
    } */

    #leftcontent {
        width: 100%;
        float: none;
        margin-right: 0;
        margin-bottom: 28px;
        height: 15rem;
        overflow-y: scroll;
        overflow-x: visible;
    }
    
    #leftcontent div:first-child {
        clear: both;
    }

    #centercontent {
        overflow: visible;
        width: 100%;
    }

    .postTitle a {
        font-size: 1.3rem;
    }

    .day,
    .newsItem,
    .catListEssay,
    .catListLink,
    #blog-sidecolumn > div,
    .post,
    .entrylistItem {
        padding: 1rem;
    }

    #mylinks {
        padding: 0.6rem 1rem;
        gap: 12px 20px;
    }

    #header {
        padding: 0.8rem 1.2rem;
    }

    .headerText a.headermaintitle {
        font-size: 1.5rem;
    }

    .pager a, .pager span, #nav_next_page a {
        padding: 4px 12px;
        font-size: 0.75rem;
    }
}

/* 超宽屏优化 */
@media (min-width: 1600px) {
    #leftcontent {
        width: 340px;
        margin-right: 40px;
    }
}

/* ---------- 文章阅读页面及其他页面通用 (直角风格) ---------- */
.post {
    padding: 1.8rem;
    margin-bottom: 28px;
}

/* .post .postTitle {
    font-size: 1.8rem;
    margin-bottom: 20px;
} */

.postBody {
    font-size: 1rem;
    line-height: 1.65;
    color: #1e2e3e;
}

#EntryTag {
    margin: 20px 0 10px;
    font-size: 0.85rem;
}

#EntryTag a {
    background: #eef2f8;
    padding: 4px 12px;
    text-decoration: none;
    color: #2e5c7a;
    margin-right: 8px;
    display: inline-block;
    border: 1px solid #d4dce6;
    box-shadow: 1px 1px 0 rgba(0,0,0,0.05);
}

.feedback_area_title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 28px 0 18px;
}

.feedbackItem {
    margin-bottom: 20px;
}

.feedbackListSubtitle {
    font-size: 0.75rem;
    color: #6a859c;
    margin-bottom: 8px;
}

.feedbackCon {
    background: #fafcff;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #e0e6ed;
}

/* 分类档案列表页面 */
.entrylist {
    padding: 1.6rem;
}

.entrylistTitle {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.entrylistDescription {
    background: #f4f6f9;
    padding: 12px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    border: 1px solid #e0e6ed;
    box-shadow: inset 0 0 0 1px #fff, 1px 1px 0 rgba(0,0,0,0.03);
}

.entrylistItem {
    margin-bottom: 24px;
}

.entrylistPosttitle a {
    font-size: 1.3rem;
    font-weight: 600;
    text-decoration: none;
    color: #1f2e3a;
}

/* 相册页面 */
#gallery {
    padding: 1.5rem;
}

.thumbTitle {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

/* 留言页面 */
.profile {
    padding: 1.5rem;
}

.pfl_feedbackItem {
    margin-bottom: 20px;
}

/* 辅助元素 */
a {
    color: #2c5a74;
}

img {
    max-width: 100%;
    height: auto;
}

input, textarea, button {
    font-family: inherit;
    border-radius: 0;
}

textarea {
    border: 1px solid #d0d8e4;
    padding: 12px;
    width: 100%;
}

/* 清除浮动 */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* ========== 打印样式 ========== */
@media print {
    body, 
    #centercontent, 
    .day, 
    .post, 
    .entrylist, 
    .feedbackItem,
    .footer {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* 隐藏装饰元素 */
    #header,
    #top_nav,          /* 顶部导航栏 */
    .navbar,
    #mylinks,          /* 菜单栏 */
    #leftcontent,      /* 侧边栏（包括公告、日历、分类等） */
    #mytopmenu,        /* 统计信息区域 */
    .topicListFooter,  /* 分页区域 */
    .c_b_p_desc_readmore, /* “阅读全文”链接 */
    .post-view-count,
    .post-comment-count,
    .post-digg-count,
    #green_channel,    /* 转发按钮 */
    #div_digg,         /* 评分按钮 */
    .feedback_area_title,
    .feedbackItem .feedbackListSubtitle a,
    #AjaxHolder_PostComment_divCommnentArea, /* 评论表单 */
    #divRefreshComments,
    .pager,
    #nav_next_page,
    #blog-calendar,
    #sidebar_search,
    .catListTitle,
    .newsItem,
    #blog_stats_place_holder,
    .clearfix,
    script,
    style,
    link[rel="stylesheet"],
    iframe{
        display: none !important;
    }

    /* 正文容器 */
    #centercontent {
        display: block !important;
        width: 100% !important;
        float: none !important;
        overflow: visible !important;
    }

    /* 文章列表, 每个条目独立分页 */
    .day {
        page-break-after: avoid;
        page-break-inside: avoid;
        margin-bottom: 20pt !important;
    }

    /* 文章标题 */
    .postTitle a, 
    .postTitle {
        font-size: 18pt !important;
        font-weight: bold !important;
        color: black !important;
        text-decoration: none !important;
    }

    /* 日期（时间） */
    .dayTitle {
        font-size: 11pt !important;
        color: #444 !important;
        background: none !important;
        border: none !important;
        padding: 0 !important;
        margin-bottom: 8pt !important;
        text-transform: none !important;
    }

    /* 正文摘要 / 全文 */
    .c_b_p_desc,
    .postBody {
        font-size: 12pt !important;
        line-height: 1.4 !important;
        color: black !important;
    }

    /* 附加信息（作者、发布时间） */
    .postDesc {
        font-size: 9pt !important;
        color: #555 !important;
        border-top: 1px solid #ccc !important;
        padding-top: 6pt !important;
        margin-top: 12pt !important;
    }

    .footer {
        display: block !important;
        margin-top: 30pt !important;
        text-align: center !important;
        font-size: 9pt !important;
        border-top: 1px solid #ccc !important;
        padding-top: 10pt !important;
    }

    /* 代码块背景 */
    pre, code {
        background: #f5f5f5 !important;
        border: 1px solid #ddd !important;
        page-break-inside: avoid;
        text-wrap: wrap;
    }

    /* 图片限制宽度 */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }
}