/* post module extracted for per-page loading */

/* 主内容区样式 */
#wrapper {
        padding: 20px 0;
}

/* 表格布局样式已移至widgets.css */

#main.td {
        padding-left: 1.5625%;
}

@media (min-width: 1025px) {
  /* 全局主体容器（首页等）：收窄并居中，左右 20px 内边距 */
  #wrapper.inner {
    max-width: 1360px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
  }
  
  #main.td {
    padding-left: calc(1.5625% + 20px);
    padding-right: 20px;
  }
  /* 页面模板正文收窄与居中 */
  body.page #main #article .entry {
    max-width: 980px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
  }
}

/* 统一文章页正文样式与标签样式（从 single.php 迁移） */
.entry.style-news { max-width: 980px; margin: 0 auto; text-align: justify; line-height: 1.85; }
.entry.style-news p:first-of-type { font-weight: 600; }
.entry.style-image { max-width: 980px; margin: 0 auto; text-align: center; }
.entry.style-image img { display: block; margin: 10px auto; border-radius: 6px; }
.entry.style-poem { max-width: 720px; margin: 0 auto; font-family: "KaiTi","STKaiti","SimSun","Songti SC",serif; text-align: center; line-height: 2; letter-spacing: .3px; }
.entry.style-poem p { white-space: pre-line; text-indent: 0; }
.entry.style-novel { max-width: 980px; margin: 0 auto; text-align: justify; line-height: 1.95; }
.entry.style-novel p { text-indent: 2em; }
.entry.style-prose { max-width: 980px; margin: 0 auto; text-align: justify; line-height: 1.9; }
.entry.style-prose p { text-indent: 2em; }
.entry.style-review { max-width: 680px; margin: 0 auto; text-align: justify; line-height: 1.85; }
.entry.style-review p { margin-bottom: 1.2em; }

/* 标题与长词断行保护 */
.entry h1, .entry h2, .entry h3, .entry h4, .entry h5, .entry h6,
#main .boxTitle, .blogItem .title {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* 默认正文样式（未应用 style-* 标签时） */
.entry:not([class*="style-"]) { text-align: justify; }
.entry:not([class*="style-"]) p { text-indent: 2em; }

/* 上一篇/下一篇 导航 */
#postnavi { 
  clear: both;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px;
  width: 100%; box-sizing: border-box; padding: 16px 20px;
  margin: 16px auto 24px;
}
#postnavi .prev, #postnavi .next { margin: 0; float: none; display: block; flex: 0 1 45%; text-align: center; }
@media (max-width: 768px) {
  #postnavi { padding: 12px 5%; margin: 12px auto 20px; }
  #postnavi .prev, #postnavi .next { flex-basis: 48%; }
}

/* 轮播容器安全宽度与裁切 */
.carousel, .carousel .slick-list { overflow: hidden; }
.carousel .slick-load { width: 100%; }

#main .boxTitle {
        margin-bottom: 15px;
}

/* 首页顶部布局 */
#hmTop {
        display: table;
        width: 100%;
        table-layout: fixed;
}

#hmTop .td {
        display: table-cell;
        vertical-align: top;
}

/* 轮播图样式 */
#slides {
        width: 456px;
        padding-right: 30px;
}

#slides .item a {
        display: block;
        color: #fff;
        background: no-repeat center center;
        background-size: cover;
        padding-bottom: 70%;
        position: relative;
}

#slides .item h2 {
        position: absolute;
        left: 0;
        bottom: 0;
        width: 90%;
        padding: 5px 5%;
        font-size: 14px;
        line-height: 1.875em;
        overflow: hidden;
        text-align: center;
        color: #fff;
        white-space: nowrap;
        text-overflow: ellipsis;
        background-color: rgb(0 0 0 / .15);
        font-weight: normal;
}

#slides .load {
        padding-bottom: 100%;
        background-color: #f9f9f9;
        position: relative;
}

#slides .load span {
        display: block;
        position: absolute;
        left: 0;
        top: 50%;
        width: 100%;
        transform: translateY(-50%);
        font-size: 36px;
        line-height: 1.125em;
        color: #999;
        text-align: center;
}

/* 最新内容样式 */
#latest {
        overflow: hidden;
}

#latest .list {
        max-height: 416px;
        overflow: hidden;
        -webkit-overflow-scrolling: touch;
}

#latest ul {
        overflow: hidden;
}

#latest li {
        font-size: 14px;
        line-height: 32px;
        overflow: hidden;
        float: left;
        width: 48%;
}

#latest li:nth-child(2n) {
        float: right;
}

#latest li time {
        display: block;
        float: right;
        color: #888;
        font-size: 12px;
}

#latest li a {
        margin-right: 80px;
}

/* 内容轮播样式 */
.carousel .boxTitle {
        margin-bottom: 15px;
}

/* Slick轮播样式已移至slick.css */

.carousel .info {
        margin-right: 7.3%;
        overflow: hidden;
}

.carousel .thumbnail {
        margin-bottom: 10px;
}

.carousel .title {
        font-size: 14px;
        line-height: 1.5em;
        font-weight: normal;
        max-height: 3em;
        -webkit-line-clamp: 2;
}

.carousel .load {
        padding-bottom: 11.544%;
        margin-bottom: 55px;
}

/* 图片展示样式 */
.picture .boxTitle {
        margin-bottom: 5px;
}

.picture ul {
        overflow: hidden;
        width: 100%;
}

.picture li {
        float: left;
        width: 19%;
        padding: 1% 1% 0 0;
}

.picture .thumbnail {
        margin-bottom: 10px;
}

.picture .title {
        font-size: 14px;
        line-height: 1.5em;
        font-weight: normal;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
}

/* 栏目布局样式 */
.column .list {
        overflow: hidden;
        width: 100%;
}

.column .item {
        width: 31.333%;
        float: left;
        padding-right: 2%;
}

.column .item:nth-child(n+4) {
        padding-top: 2%;
}

.column li {
        overflow: hidden;
}

.column .thumbnail {
        width: 130px;
        float: left;
}

.column .info {
        margin-left: 145px;
        overflow: hidden;
}

.column .first {
        padding: 8px 0;
}

.column .first .title {
        margin-bottom: 5px;
}

.column .first .title a {
        display: block;
        font-size: 14px;
        line-height: 1.65em;
        max-height: 3.3em;
        -webkit-line-clamp: 2;
}

.column .first p {
        font-size: 13px;
        line-height: 1.75em;
        height: 3.5em;
        -webkit-line-clamp: 2;
        color: #888;
}

.column .li {
        border-top: 1px dashed #eee;
        padding-top: 5px;
        margin-top: 5px;
        line-height: 30px;
}

.column .li .title {
        font-weight: normal;
        font-size: 14px;
        margin-right: 70px;
}

.column time {
        display: block;
        float: right;
        font-size: 12px;
        color: #888;
}

.column .warning {
        margin-bottom: 0;
        text-align: center;
        padding: 5% 0;
}

/* 图库样式 */
.gallery {
        overflow: hidden;
}

.gallery ul {
        overflow: hidden;
        width: 100%;
}

.gallery li {
        float: left;
        width: 15.965%;
        padding: 0.7% 0.7% 0 0;
}

.gallery li .thumbnail {
        padding-bottom: 75%;
}

.gallery li img {
        transition: all .3s;
}

.gallery li:first-child {
        width: 32.615%;
}

.gallery li:first-child .thumbnail {
        padding-bottom: 75.5%;
}

.gallery li a {
        overflow: hidden;
        display: block;
        position: relative;
        background-color: #f9f9f9;
}

.gallery li a::before,
.gallery li a::after {
        content: '';
        display: block;
        position: absolute;
        opacity: 0;
        transition: all .3s;
}

.gallery li a::before {
        left: 0;
        top: 0;
        background-color: rgb(0 0 0 / .5);
        width: 100%;
        height: 100%;
        z-index: 1;
}

.gallery li a::after {
        left: 50%;
        top: 50%;
        z-index: 2;
        opacity: 0;
        width: 10%;
        padding-bottom: 10%;
        background: url("../images/icon_link.png") no-repeat center center;
        background-size: contain;
        margin-left: -5%;
        transform: translateY(-50%);
}

.gallery li a:hover::before {
        opacity: 1;
}

.gallery li a:hover::after {
        opacity: 1;
}

.gallery li a:hover img {
        transform: scale(1.1);
}

/* 新闻模块样式 */
.news .boxTitle {
        margin-bottom: 15px;
}

.news ul {
        overflow: hidden;
}

.news .top {
        float: right;
        width: 560px;
        position: relative;
}

.news .top h3 {
        position: absolute;
        left: 0;
        bottom: 0;
        width: 100%;
        font-size: 14px;
        font-weight: normal;
        line-height: 30px;
}

.news .top h3 a {
        display: block;
        padding: 0 3%;
        color: #fff;
        background-color: rgb(0 0 0 / .5);
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
}

.news .item {
        overflow: hidden;
        margin: 0 590px 15px 0;
}

.news .item:last-child {
        margin-bottom: 0;
}

.news .item .thumbnail {
        float: left;
        width: 125px;
}

.news .item .info {
        margin-left: 140px;
}

.news .item h3 {
        font-size: 16px;
        font-weight: normal;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 24px;
}

.news .item time {
        display: block;
        font-size: 12px;
        line-height: 2em;
        color: #999;
}

.news .item p {
        font-size: 13px;
        color: #888;
        line-height: 1.75em;
        height: 3.5em;
        -webkit-line-clamp: 2;
}

/* 图库页面样式 */
#gallery .list {
        overflow: hidden;
        margin-bottom: 20px;
}

#gallery ul {
        overflow: hidden;
        width: 100%;
        border-bottom: 1px dashed #e4e4e4;
}

#gallery li {
        float: left;
        width: 32.333%;
        padding: 0 1% 2% 0;
}

#gallery .listpic {
        clear: both;
        width: 99%;
}

#gallery .thumbnail {
        margin-bottom: 10px;
}

#gallery .title {
        font-size: 14px;
        line-height: 1.5em;
        font-weight: normal;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
}

/* 相关文章样式 */
#related ul {
        overflow: hidden;
        width: 100%;
}

#related li {
        float: left;
        width: 23%;
        padding: 1% 2% 1% 0;
}

#related .thumbnail {
        margin-bottom: 5px;
}

#related h4 {
        font-size: 14px;
        line-height: 1.75em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-align: center;
}

/* 诗歌样式与朗读按钮 */
.sptsz-theme .poem-content { position: relative; padding: 2em 1.2em; background: #fffefc; border-radius: 8px; border: 1px solid #f1ead6; }
.sptsz-theme .poem-badge { position: absolute; top: -10px; right: 20px; background: linear-gradient(135deg, #d4af37, #b8860b); color: white; padding: 5px 12px; border-radius: 15px; font-size: 12px; font-weight: bold; box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3); display:flex; align-items:center; gap:5px; }
.sptsz-theme .poem-read-btn, .sptsz-theme .poem-stop-btn, .sptsz-theme .poem-copy-btn, .sptsz-theme .poem-share-btn { position: absolute; bottom: 10px; background: rgba(212, 175, 55, 0.1); border: 1px solid #d4af37; color: #8b4513; padding: 5px 10px; border-radius: 15px; font-size: 12px; cursor: pointer; transition: all 0.3s ease; }
.sptsz-theme .poem-read-btn { left: 20px; }
.sptsz-theme .poem-stop-btn { left: 90px; background: rgba(220,53,69,0.1); border:1px solid #dc3545; color:#721c24; }
.sptsz-theme .poem-copy-btn { right: 90px; }
.sptsz-theme .poem-share-btn { right: 20px; }
#postTags{font-size:14px;line-height:1.75em;}
#postTags span{font-weight:bold;color:#000;}
#postTags a{margin:0 1.5%; display:inline-block;}
#postTags:empty{display:none;}

#postnavi{font-weight:bold;font-size:14px;line-height:1.75em;}
#postnavi .prev,#postnavi .next{width:45%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#postnavi .prev{float:left;}
#postnavi .next{float:right;text-align:right;}

#postTitle{font-size:24px;text-align:center;line-height:1.5em;padding:2% 0 3%;}

#postmeta{font-size:0;line-height:normal;text-align:center;margin-bottom:2.5%;border-bottom:1px dashed #eee;padding-bottom:2.5%;}
#postmeta span{font-size:14px;color:#888;margin:0 10px;display:inline-block;background:no-repeat left center;padding-left:20px;background-size:auto 12px;}
#postmeta a{color:#888;}
#postmeta a:hover{color:#006abe;}
#postmeta .views{background-image:url("../images/icon_01.png");}
#postmeta .tag{background-image:url("../images/icon_02.png");}
#postmeta .date{background-image:url("../images/icon_03.png");}

/* 文章列表样式 */
.blogItem{overflow:hidden;margin-bottom:20px;padding-bottom:20px;border-bottom:1px dashed #e4e4e4;}
.blogItem .thumbnail{float:left;width:250px;}
.blogItem .info{margin-left:265px;overflow:hidden;padding:5px 0;}
.blogItem .title{line-height:1.35em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:18px;margin-bottom:5px;}
.blogItem .title strong {color:#f00;}
.blogItem .meta{color:#888;margin-bottom:5px;overflow:hidden;}
.blogItem .meta a{color:#888;}
.blogItem .meta span{font-size:12px;background:no-repeat left center;padding:0 16px;background-size:auto 10px;display:block;float:left;}
.blogItem .meta .views{float:right;padding-right:0;background-image:url("../images/icon_01.png");}
.blogItem .meta .tag{background-image:url("../images/icon_02.png");}
.blogItem .meta .date{background-image:url("../images/icon_03.png");}
.blogItem .intro{font-size:14px;color:#666;line-height:1.75em;height:5.25em;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;margin-bottom:13px;text-align:justify;}
.blogItem .more{overflow:hidden;}

/* 文章阅读更多按钮样式 */
.blogItem .more a{display:block;float:right;color:#fff;background-color:#006abe;padding:0 10px;font-size:12px;height:26px;line-height:26px;}
.blogItem .more a:hover{opacity:.75;}

/* 现代按钮样式 */
.blogItem .more a{display:inline-flex; align-items:center; justify-content:center; gap:8px;
  height: var(--btn-height); padding:0 var(--btn-px); border-radius: var(--btn-radius);
  font-size: var(--btn-font-size); font-weight:600; cursor:pointer;
  background: var(--spt-grad); color:#fff; border:none; box-shadow: var(--btn-shadow);
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}
.blogItem .more a:hover{
  transform: translateY(-1px); filter: brightness(.98); box-shadow: 0 10px 20px rgb(var(--spt-primary-rgb) / .35);
}

/* 主题色相关 */
#postmeta a:hover { color: var(--spt-primary-dark); }
#postmeta .views,
#postmeta .tag,
#postmeta .date { background-color: transparent; }

/* 文章内容主题样式 */
.sptsz-theme .post-countent-data .poem-content { text-align: center; font-style: normal; }
.sptsz-theme .post-countent-data .poem-content::before { content: "\0000"; } /* 保留占位，防止 1 主题样式冲突 */

/* 响应式设计 */
@media (max-width: 1024px) {
  .blogItem{margin-bottom:15px;padding-bottom:15px;}
}

@media (max-width: 768px) {
  /* 文章列表响应式 */
  .blogItem{margin-bottom:10px;padding-bottom:10px;}
  .blogItem .thumbnail{width:100px;}
  .blogItem .info{margin-left:115px;padding:0;}
  .blogItem .info h2{font-size:14px;line-height:1.75em;height:3.5em;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;margin-bottom:0;white-space:normal;}
  .blogItem .intro{white-space:nowrap;display:block;height:auto;margin-bottom:0;}
  .blogItem .meta,.blogItem .more{display:none;}
  
  /* 文章导航响应式 */
  #postnavi{font-weight:normal;line-height:2em;}
  #postnavi .prev,#postnavi .next{float:none;width:auto;text-align:left;}
  
  /* 文章标题响应式 */
  #postTitle{font-size:20px;padding:3% 0 4%;}
  
  /* 文章元信息响应式 */
  #postmeta{margin-bottom:3%;padding-bottom:3%;}
  #postmeta span{margin:0 5px;font-size:12px;background-size:auto 12px;padding-left:18px;}
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
  .blogItem .more a{
    color:#fff;
    box-shadow: 0 6px 14px rgb(0 0 0 / .35);
  }
  
  /* 图标显色增强 */
  .sptsz-search-icon,
  #mzaback,
  .social .iconfont {
    color: var(--text-main) !important;
  }
  
  /* 链接与分隔线适配 */
  a {
    color: var(--spt-primary);
  }
  
  .sep {
    background-color: rgba(255,255,255,0.1);
  }
  
  /* 搜索框与表单适配 */
  #search input[type="text"],
  .comment-form input,
  .comment-form textarea {
    background-color: rgba(255,255,255,0.05);
    color: var(--text-main);
    border-color: rgba(255,255,255,0.1);
  }
  
  /* 登录模态框适配 */
  #sptsz-login-modal {
    background-color: var(--surface);
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
  }
  
  /* 模态框遮罩层适配 */
  #sptsz-login-mask {
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
  }
}

/* 文章相关文本样式 */
.text-primary { color: var(--spt-primary) !important; }
.text-secondary { color: var(--spt-secondary) !important; }
.text-success { color: var(--spt-success) !important; }
.text-danger { color: var(--spt-danger) !important; }
.text-warning { color: var(--spt-warning) !important; }
.text-info { color: var(--spt-info) !important; }
.text-light { color: var(--spt-light) !important; }
.text-dark { color: var(--spt-dark) !important; }
.text-muted { color: var(--spt-muted) !important; }
.text-white { color: #fff !important; }

/* 深色模式适配 */
@media (prefers-color-scheme: dark){
  :root{
    --surface: #12151b;
    --surface-soft: #0f1216;
    --text-main: #e8eaed;
    --text-secondary: #c2c7d0;
  }
  
  body {
    background-color: var(--surface-soft);
    color: var(--text-main);
  }
  
  .box, .widget, .breadcrumb, .comments-area .comment-list > li {
    background: var(--surface);
    border-color: rgba(255,255,255,0.1);
  }
}

/* 分页样式优化 */
.pagebar { padding:20px; overflow:hidden; clear:both}

.pagebar .pagination {
  display: flex;
  justify-content: center;
  margin-top: 10px;
  flex-wrap: wrap;
  gap: 6px;
}

.pagination a {
  background: #fff;
  border: 1px solid #ccc;
  color: #333;
  font-size: 12px;
  padding: 8px 10px;
  margin: 0 2px;
  border-radius: 3px; line-height:100%
}

.pagination span {
    color: #333;
    font-size: 12px;
    padding: 7px 2px;
    margin: 0 2px;
    border-radius: 3px;
}

.pagination a:hover {
  color: #333;
  border: 1px solid #333;
}

.pagination a.page-num-current {
  color: #fff;
  background: #333;
  border: 1px solid #333;
}
pagination .st{ font-family:"宋体"}
.text-secondary{ text-align:center; padding:20px 0}

/* 拼图网格样式 */
.sptsz-collage{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px;align-items:start}
.sptsz-collage figure{margin:0}
.sptsz-collage img{display:block;width:100%;height:auto;border-radius:8px}

@media (width <=560px){
  .sptsz-collage{grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px}
}

/* ab_img样式 */
.ab_img img{ max-width:100%; height:auto;display:inline-block;}
.ab_img p{text-wrap: inherit;}
.ab_img p span{text-wrap: inherit;}

/* 文章内容样式 */
.entry{overflow:hidden;}
.entry * {line-height:1.875em;}
.entry img{max-width:100%;height:auto;}
.entry blockquote{margin:0 2em 1.5%;overflow:hidden;padding:1.5% 1.5% 0;color:#555;background-color:#f9f9f9;font-style:italic;}
.entry ul,.entry ol{margin-bottom:1.5%;margin-left:2em;padding-left:1em;}
.entry ul li{list-style:outside disc none;}
.entry ol li{list-style:outside decimal none;}

/* 彻底清除标题的列表样式和伪元素 */
.entry h1, .entry h2, .entry h3, .entry h4, .entry h5, .entry h6 {
    list-style-type: none !important;
    margin-left: 0 !important;
    -webkit-list-style-type: none !important;
    -moz-list-style-type: none !important;
    -ms-list-style-type: none !important;
}

/* 强制移除所有标题相关的伪元素 */
.entry h1::before, .entry h2::before, .entry h3::before, 
.entry h4::before, .entry h5::before, .entry h6::before,
.entry h1::after, .entry h2::after, .entry h3::after, 
.entry h4::after, .entry h5::after, .entry h6::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* 确保全局标题也不受列表样式影响 */
h1, h2, h3, h4, h5, h6 {
    list-style-type: none !important;
    margin-left: 0 !important;
    -webkit-list-style-type: none !important;
    -moz-list-style-type: none !important;
    -ms-list-style-type: none !important;
}

h1::before, h2::before, h3::before, h4::before, h5::before, h6::before,
h1::after, h2::after, h3::after, h4::after, h5::after, h6::after {
    content: none !important;
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.entry li p{margin-bottom:0;}
.entry p,.entry h1,.entry h2,.entry h3,.entry h4,.entry h5,.entry h6{margin-bottom:1.5%;}
.entry a{color:#006abe;text-decoration:underline;}
.entry hr{border:none;margin-bottom:1.5%;border-bottom:1px solid #e4e4e4;overflow:hidden;clear:both;}

/* 调整文章段落间距，减少空白区域 */
.entry p{
  margin-top: 0.2em;     /* 减少段前距 */
  text-indent: 2em;      /* 每段首行缩进两个字符 */
  margin-bottom: 1em;    /* 减少段后距 */
}

.entry p:first-child{
  margin-top: 0;         /* 首段不加段前距 */
}

/* 调整特殊块后紧邻段落的间距 */
.entry blockquote + p,
.entry pre + p,
.entry figure + p,
.entry table + p,
.entry ul + p,
.entry ol + p,
.entry h1 + p,
.entry h2 + p,
.entry h3 + p,
.entry h4 + p,
.entry h5 + p,
.entry h6 + p{
  margin-top: 0.8em;    /* 减少段前距 */
}

/* 主题色和排版优化 */
.entry a{color: var(--spt-primary);}
.entry p{ text-indent: 0; }
body.lang-zh .entry p{ text-indent: 2em; }
