/*================================================================
  style.css
  
  TABLE OF CONTENTS:
  
  1.  Font Awesome Icons Import
  2.  CSS Variables
  3.  Global Resets & Base Styles
  4.  Layout Structure (Container, Columns)
  5.  Header & Navigation
  6.  Main Content Area (Article List, Pagination)
  7.  Sidebar & Widgets
  8.  Footer
  9.  Utility & Components (Back to Top)
  10. Responsive Design (Media Queries)
  11. Carousel Styles (NEW)
================================================================*/

/* 1. Font Awesome Icons Import */
/* @import url("/files/fonts/fontawesome5pro-all.min.css"); */

/* 2. CSS Variables */
:root {
    --Maincolor: #409EFF !important;
    --MaincolorHover: #409EFF !important;
    --fontSelectedColor: #3390ff !important;
    --theme-bd: #617eaf;
    --theme-color: #206be7;
    --theme-hover: #1162e8;
    --theme-font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Helvetica Neue, Helvetica, Arial, PingFang SC, Hirgino Sans GB, Microsoft YaHei UI, Microsoft YaHei, Source Han Sans CN, sans-serif;
    --text-color: #333;
    --text-color-light: #777;
    --bg-color: #f5f5f5;
    --widget-bg: #fff;
	--widget-bg-rgb: 255, 255, 255;
    --border-color: #fff;
}

/* 3. Global Resets & Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--theme-font-family);
    background: #f5f5f5;
    color: var(--text-color);
    line-height: 1.6;
    font-size: 14px;
}

a {
    text-decoration: none;
    color: var(--theme-color);
    transition: color 0.3s;
}

a:hover {
    color: var(--MaincolorHover) !important;
}

img {
    max-width: 100%;
    height: auto;
}

ul, li {
    list-style: none;
}

/*input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 1px #00000052;
}*/
input,
textarea {
    outline: none;
}

/* 4. Layout Structure (Container, Columns) */
.container {
    max-width: 1200px;
    margin: 0 auto;
    /*padding: 0 15px;*/
}

#wrap {
    padding: 80px 0;
}

.main-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* <--- 在这里添加此行 */
    /* overflow: hidden; */
}

.main-content {
    flex: 1;
    min-width: 0;
}

.left-column {
    /*margin-right: 18px;*/
    /* width: 100%; */ /* <-- 修改：注释掉或删除此行 */
    max-width: 870px;
    flex: 1; /* <-- 添加此行 */
    min-width: 0; /* <-- 添加此行 */
}

.right-column {
	margin-left: 18px;
    /* width: 100%; */ /* <-- 修改：注释掉或删除此行 */
    width: 310px; /* <-- 添加此行 */
    flex-shrink: 0; /* <-- 添加此行 */
    /* max-width: 310px; */ /* <-- 修改：此行可删除或注释掉 */
}

/* 5. Header & Navigation */
.site-header {
    width: 100%;
    background-color: #fff;
    box-shadow: 0 0.5px 0.5px 1px rgba(0,0,0,.1);
    position: fixed;
    z-index: 99999;

}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1260px;
    margin: 0 auto;
    height: 62px;
}

.header-left {
    display: flex;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 50px;
    margin-top: 8px;
    margin-right: 25px;
}

.blog-name {
    margin: -1px 25px 0 -18px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.main-nav > ul {
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    display: flex;
    align-items: center;
    padding: 0 8px;
    line-height: 40px;
    color: #555;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--MaincolorHover) !important;
}

.main-nav a .arrow-container {
    display: inline-block;
    margin-left: 8px;
    font-weight: 500;
    font-size: 20px;
    transition: transform 0.3s ease;
}

.main-nav .submenu-toggle,
.main-nav .close-menu-btn,
.main-nav .mobile-nav-header,
.main-nav .mobile-nav-footer {
    display: none;
}

.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 100%;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(26,26,26,.1);
    border-radius: 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    /* border-top: 1px solid #f0f0f0; */
}

.sub-menu a {
    line-height: 38px;
    width: 100%;
    padding: 0 8px;
    box-sizing: border-box;
    white-space: nowrap;
}

.sub-menu li {
    display: block;
    width: 100%;
    position: relative;
}

.sub-menu .sub-menu {
    top: 0;
    left: 100%;
    transform: translateX(-10px);
    border-top: none;
}

.main-nav li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav > ul > li:hover > a > .arrow-container {
    transform: rotate(-90deg);
}
.sub-menu li:hover > a > .arrow-container {
    transform: none;
}

.header-right {
    display: flex;
    align-items: center;
}

.search-icon, .login-link {
    font-size: 16px;
    color: #555;
    cursor: pointer;
    margin-left: 8px;
}

.search-icon:hover, .login-link:hover {
    color: #007bff;
}

.search-box-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    transform: translateY(-150%);
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px 15px;
    z-index: 9999;
    transition: transform 0.4s ease-in-out;
}

.search-box-container.visible {
    transform: translateY(0);
}

.search-input {
    border: 1px solid #ccc;
    padding: 10px 15px;
    border-radius: 4px;
    outline: none;
    width: 500px;
    max-width: 70%;
    margin-right: 10px;
}

.search-button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
}

.search-button:hover {
    background-color: #0056b3;
}
#close-search-btn {
    font-size: 18px;
    color: #999;
    cursor: pointer;
    margin-left: 20px;
    transition: color 0.3s;
}

#close-search-btn:hover {
    color: #333;
}

.mobile-menu-toggle {
    display: none;
    font-size: 19px;
    cursor: pointer;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

/* 6. Main Content Area (Article List, Pagination) */
.article-list {
    background-color: var(--widget-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.article-item-box {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 25px;
}

.article-item-box:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.article-item-image {
    flex: 0 0 220px;
    margin-right: 20px;
    overflow: hidden;
    position: relative;
    border-radius: 3px;
}

.article-item-image a {
    display: block;
    width: 100%;
    height: 140px;
}

.article-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
    transition: transform 0.3s ease;
}

.article-item-image img:hover {
    transform: scale(1.03);
}

.image-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,.6);
    color: #fff;
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 3px;
    line-height: 1.5;
    z-index: 2;
}

.image-category a {
    color: #fff !important;
    display: inline;
    width: auto;    /* 修正宽度 */
    height: auto;   /* 修正高度 */
}

/* --- 新增的置顶标签样式 --- */
.label-pinned {
    background-color: var(--Maincolor);
    color: #fff;
    font-size: 12px;
    padding: 1px 5px;
    line-height: 1.5;
    border-radius: 2px;
    /* margin-right: 3px; */
    font-weight: 500;
    position: relative;
    top: -1px;
}

/* 调整侧边栏热门文章中的标签大小 */
.recent-article-item-content a .label-pinned {
    font-size: 11px;
    padding: 1px 3px;
}

.article-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-item-content h3 {
	word-break: break-all;
    margin: 0 0 10px;
    font-size: 17px;
    font-weight: bold;
}

.article-item-content h3 a {
    color: #333;
}

.article-item-content h3 a:hover {
    color: var(--MaincolorHover) !important;
}

.article-item-content p {
    margin: 0 0 10px;
    color: #666;
    overflow: hidden;
	word-break: break-all;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 15px;
}

.article-meta {
    font-size: 0.85rem;
    color: #999;
    display: flex;
    align-items: center;
    margin-top: auto;
}

.article-meta span {
    margin-right: 15px;
}

.article-meta .meta-category a {
    color: #888;
}

.article-meta .meta-category a:hover {
    color: #555;
}

.article-meta .views {
    margin: 0 0 0 auto;
}

.pagination {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
}

.pagination a {
    padding: 10px 20px;
    border: 1px solid var(--theme-bd);
    border-radius: 5px;
}

.pages {
	text-align: center;
	background: #fff;
	padding: 20px;
	border-top: 1px solid #eeeeeecc;
}

.pageobj-item .current {
	color: #fff!important
}

.fenye a,.pagedbox,.page-numbers {
	display: inline-block;
	padding: 7px 8px;
	margin-left: 5px;
	margin-bottom: 5px;
	color: #999!important;
	line-height: 1;
	background-color: #f2f2f2;
	border-radius: 2px;
	transition: all .3s ease-out 0s;
	font-size: 14px
}

.fenye a:hover,.page-numbers:hover {
	background: var(--MaincolorHover)!important;
	color: #fff!important
}

.current {
	background: var(--Maincolor)!important;
	color: #fff!important
}

.page-count {
	display: inline-block;
	margin-left: 10px
}

/* 7. Sidebar & Widgets */
.widget {
    background-color: var(--widget-bg);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 15px;
    margin-bottom: 20px;
    box-sizing: border-box;
}
/* --- START: 新增规则以修复侧边栏抖动 --- */
.sidebar-inner-wrapper .widget:last-child {
    margin-bottom: 0;
}
/* --- END: 新增规则 --- */

.widget-title {
    font-size: 16px;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.widget-title::before {
    content: "";
    width: 3px;
    height: 1em;
    background-color: var(--theme-color);
    margin-right: 8px;
    border-radius: 2px;
}

.widget ul li {
    margin-bottom: 10px;
}

.widget ul li a {
    color: var(--text-color);
}
/* 为分类链接文本的左侧留出空间 */
.widget-categories ul li a {
    position: relative;
    padding-left: 15px;
}

/* 使用“边框技巧”创建并定位三角形 */
.widget-categories ul li a:before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border: 4px solid transparent;
    border-left: 5px solid #ccc;
}

/* --- 友情链接样式 (左对齐版) --- */
.friend-links {
    margin-top: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.friend-links .widget-title {
    margin-bottom: 15px;
    /* font-size: 18px; */
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.friend-links .links-container {
    text-align: left; /* 水平靠左对齐 */
    font-size: 0; /* 消除inline-block元素间的间隙 */
    padding: 10px 0;
}

.friend-links .link-item {
    display: inline-block; /* 将链接项变为行内块元素 */
    vertical-align: middle; /* 垂直居中对齐 */
    margin: 3px 12px 3px 0; /* 设置链接之间的间距 */
    font-size: 14px; /* 恢复链接项内的字体大小 */
}

.friend-links .link-item a {
    display: inline-flex;
    min-height: 22px;
    align-items: center;
    text-decoration: none;
    color: #666; /* 默认文字颜色为灰色 */
}

.friend-links .link-item a:hover {
    color: var(--MaincolorHover) !important; /* 鼠标悬停时文字颜色变为蓝色 */
}

.friend-links .link-item img {
    max-height: 38px; /* 限制图片的最大高度 */
    max-width: 120px;
    border-radius: 4px;
}

/* 8. Footer */
.footer {
    bottom: 0;
    width: 100%; 
    text-align: center;
    padding: 25px 0 30px 0;
    /* margin-top: 20px;  */
    background-color: #2d3236;
    color: #868689;
}

.footer a {
    color: #c1c1c1;
}

.footer a:hover {
    color: #fff !important;
}

/* 9. Utility & Components (Back to Top) */
.action {
    z-index: 99999;
    position: fixed;
    right: 20px;
    bottom: 20%;
}

.action-item.gotop {
    width: 40px;
    height: 40px;
    background-color: rgb(85 85 85 / 38%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.action-item.gotop:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.login-btn-mobile {
    display: none;
}

/* 10. Responsive Design (Media Queries) */
@media (max-width: 1199px) and (min-width: 991px) {
    .container {
        max-width: 96%;
    }
    .main-layout {
        justify-content: space-between;
    }
    .left-column {
        width: calc(100% - 310px - 18px);
        max-width: none;
    }
    .right-column {
        width: 310px;
        max-width: none;
    }
}

@media (max-width: 990px) {
    body {
        background-color: #fff;
    }
    .m-flex {
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }
    #wrap {
        padding: 70px 0 80px 0;
        flex-grow: 1;
        width: 100%;
    }
    .logo-image {
    height: 40px;
    margin-top: 7px;
    margin-right: 5px;
    }
    .search-icon {
    font-size: 18px;
    color: #555;
    cursor: pointer;
    margin-left: 8px
    }
    .site-header {
        padding: 0 15px;
    }
    .mobile-menu-toggle {
        display: block;
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
    }
    .header-container {
        height: 50px;
        justify-content: center;
    }
    .header-left {
        flex-grow: 1;
        justify-content: center;
    }
    .header-right {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }
    .logo-area {
        margin-right: 0;
    }
    .blog-name, .login-link {
        display: none;
    }
    
    .main-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 80%;
        max-width: 320px;
        background: #fff;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        padding-top: 0;
    }
    
    .main-nav a .arrow-container {
        display: none !important;
    }

    body.nav-open .main-nav {
        transform: translateX(0);
    }
    body.nav-open .overlay {
        display: block;
    }

    .main-nav .close-menu-btn {
        display: block;
        position: absolute;
        top: 15px;
        right: 20px;
        font-size: 30px;
        line-height: 1;
        color: #888;
        cursor: pointer;
        z-index: 1001;
    }

    .main-nav .mobile-nav-header {
        display: block;
        width: 100%;
    }
    .mobile-nav-header-image {
        width: 100%;
        height: auto;
        display: block;
    }

    .main-nav > ul {
        flex-direction: column;
        overflow-y: auto;
        flex-grow: 1;
        padding: 0px 0;
    }
    .main-nav li {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        position: relative;
    }
    .main-nav a {
        padding: 0 20px;
        border-bottom: 1px solid #f0f0f0;
        flex-grow: 1;
        gap: 10px;
    }
    
    .main-nav .submenu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 41px;
        width: 50px;
        cursor: pointer;
        color: #888;
        position: absolute;
        right: 0;
        top: 0;
    }
    .submenu-toggle i {
        font-size: 19px;
        transition: transform 0.3s ease;
    }
    
    .submenu-toggle.active > i.fa-angle-right {
        transform: rotate(90deg);
    }

    .main-nav .sub-menu {
        display: none;
        position: static;
        width: 100%;
        box-shadow: none;
        padding: 0 0 0 20px;
        opacity: 1;
        visibility: visible;
        transform: none;
        background-color: #f8f9fa;
        border-top: none;
    }
    .main-nav .sub-menu.open {
        display: block;
    }
    .main-nav .sub-menu a {
        border-color: #e9ecef;
    }
    .main-nav .sub-menu .sub-menu {
        padding-left: 15px;
        background-color: #f1f3f5;
        border-left: none;
    }
    
    .login-btn-mobile {
        display: block;
    }

    .login-btn-mobile a {
        padding: 0;
        width: 100%;
    }
    
    .login-btn-header {
        border: none;
        background: none;
        color: #555;
        font-size: 1em;
        padding: 0 20px;
        line-height: 40px;
        width: 100%;
        text-align: left;
        cursor: pointer;
    }

    .login-btn-header:hover {
        color: #007bff;
    }

    .main-nav .mobile-nav-footer {
        display: block;
        padding: 20px;
        margin-top: auto;
        border-top: 1px solid #f0f0f0;
    }

    .right-column {
        display: none;
    }

    .left-column {
        width: 100%;
        max-width: none;
    }
    .article-item-box {
        flex-direction: row;
        align-items: stretch;
    }
    .article-item-image {
        flex: 1 1 40%;
        max-width: 40%;
        margin-right: 0;
        height: auto;
    }
    .article-item-image a {
        display: block;
        width: 100%;
        height: 100%;
        aspect-ratio: 220 / 140;
        overflow: hidden;
        border-radius: 3px;
    }
    .article-item-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0;
    }
    .article-item-content {
        margin-left: 12px;
        flex: 1 1 60%;
        display: flex;
        flex-direction: column;
        /* aspect-ratio: 588 / 140; */
        overflow: hidden;
    }
    .article-item-content h3 {
        font-size: 16px;
        white-space: normal;
        margin-bottom: 8px;
    }
    .article-item-content p {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin: 0;
    }
    .article-meta {
        margin-top: auto;
        font-size: 12px;
    }
    .main-layout {
        margin: -10px auto;
        max-width: 870px;
    }
    .friend-links {
        margin: -20px auto;
        max-width: 870px;
    }
   .hidden-mobile {
        display: none;
    }
    .image-category a {
    color: #fff !important;
    display: inline;
    width: auto;    /* 修正宽度 */
    height: auto;   /* 修正高度 */
    }
}

@media (max-width: 800px) {
    .article-item-image {
        flex-basis: 35%;
        max-width: 35%;
    }
    .article-item-content {
        flex-basis: 65%;
    }
    .article-item-content p {
        -webkit-line-clamp: 1; 
    }
    .container {
    font-size: 12px;
    }
    .footer {
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 15px 0 15px 0;
    margin-top: -20px;
    }
}

@media screen and (max-width: 580px) {
    .article-item-content p {
        display: none;
    }
    .article-item-box {
        margin-bottom: 16px;
        padding-bottom: 16px;
    }
}

@media screen and (max-width: 500px) {
    .article-item-content h3 {
        font-size: 15px;
        font-weight: 500;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .image-category {
      display: none;
    }
    .fenye .pageobj-item {
        display: none;
    }
}

/* 11. Carousel Styles */
.carousel-container {
    max-width: 870px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: relative;
}

.carousel-container.swiper {
    padding: 0;
}

.swiper-slide a {
    display: block;
    width: 100%;
}

.swiper-slide img {
    width: 100%;
    height: auto;
    display: block;
}

.swiper-button-next,
.swiper-button-prev {
    position: absolute;
    top: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    z-index: 10;
    cursor: pointer;
    background-size: 20px 20px;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    color: #fff;
    opacity: 0;
    transform: translateX(0);
    transition: all .3s ease;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.swiper-button-prev {
    left: 10px;
    transform: translateX(-60px);
}

.swiper-button-next {
    right: 10px;
    transform: translateX(60px);
}

.carousel-container:hover .swiper-button-prev,
.carousel-container:hover .swiper-button-next {
    opacity: 1;
    transform: translateX(0);
}

.swiper-pagination-bullet {
    background: #fff;
    opacity: 0.7;
}
.swiper-pagination-bullet-active {
    background: rgba(var(--widget-bg-rgb), 0.5);
    opacity: 1;
}

@media (max-width: 870px) {
    .carousel-container {
        margin-bottom: 0px;
        margin-left: 3px;
        margin-right: 3px;
        width: calc(100% - 6px);
    }

    .swiper-button-next, .swiper-button-prev {
        opacity: 0;
        transform: translateX(0);
        width: 30px;
        height: 30px;
        margin-top: -15px;
        transition: opacity .3s ease;
    }
    .carousel-container:hover .swiper-button-next,
    .carousel-container:hover .swiper-button-prev {
        opacity: 1;
    }
    .swiper-button-next:after, .swiper-button-prev:after {
        font-size: 14px;
    }
    .swiper-button-prev { left: 5px; }
    .swiper-button-next { right: 5px; }
}

/* --- 热门文章模块样式修改 --- */
.recent-article-item-box {
	word-break: break-all;
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.recent-article-item-box:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.recent-article-item-image {
    flex: 0 0 100px;
    width: 100px;
    height: 63px;
    margin-right: 0;
}

.recent-article-item-image a,
.recent-article-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.recent-article-item-content {
    margin-left: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-self: stretch;
}

.recent-article-item-content a {
    color: #555;
    line-height: 1.4;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.recent-article-item-content a:hover {
    color: var(--MaincolorHover) !important;
}

.recent-article-item-date {
    font-size: 12px;
    color: #999;
    margin-top: auto;
}

/* --- 标签云样式修改 --- */
.widget .tag-cloud {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 0;
}

.widget .tag-cloud a {
    margin: 0;
    display: block;
    border: 1px solid rgba(100, 100, 100, .3);
    background-color: #fff;
    color: #777;
    font-size: 12px !important;
    text-align: center;
    border-radius: 2px;
    transition: background-color 0.3s, color 0.3s;
    white-space: nowrap;
    overflow: hidden;
}

.widget .tag-cloud a:hover {
    background-color: var(--MaincolorHover) !important;
    color: #fff !important;
    animation: marquee-text 1s linear infinite alternate;
}

@keyframes marquee-text {
    from {
        text-indent: 5px;
    }
    to {
        text-indent: -30px; 
    }
}

/* --- Article Page Enhancement --- */

/* Replace original article selector */
.post-article {
    flex: 1;
    min-width: 0;
}

/* Featured Image */
.article-featured-image {
    height: 350px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    margin-bottom: -60px; /* Overlap with the card */
    position: relative;
    z-index: 1;
}

/* Card style for article content and comments */
.entry-card {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
	color: #606266;
    /* box-shadow: 0 4px 12px rgba(0,0,0,.08); */
    position: relative;
    z-index: 2;
}

.entry-head {
    text-align: center;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
    margin-bottom: 25px;
}

.entry-title {
    font-size: 21px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.entry-info {
    font-size: 13px;
    color: #888;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.entry-info .dot {
    margin: 0 12px;
}

.entry-info span {
    display: flex;
    align-items: center;
}

.entry-info i {
    margin-right: 6px;
    color: #aaa;
}
.entry-info a {
    color: #888;
    margin: 0 3px;
}
.entry-info a:hover {
    color: var(--MaincolorHover) !important;
}
.entry-category a:not(:last-child)::after {
    content: ',';
}

/* Article Content Typography */
.entry-content {
    line-height: 1.8;
    font-size: 15px;
    overflow-wrap: break-word; /* 关键：允许在长单词或URL处换行 */
    word-wrap: break-word;     /* 兼容旧版浏览器 */
}
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5 {
    font-weight: 600;
    /*margin: 30px 0 15px;*/
    color: #333;
}
.entry-content p {
    margin-bottom: 1.2em;
}
.entry-content ul {
    list-style: disc !important; /* 使用 !important 强制覆盖全局重置 */
    margin: 0 0 1.5em 1.5em; /* 调整外边距 */
    padding-left: 0em; /* 调整内边距，让黑点显示出来 */
}
.entry-content ol {
    list-style: decimal !important; /* 使用 !important 强制覆盖全局重置 */
    margin: 0 0 1.5em 1.3em; /* 调整外边距 */
    padding-left: 0em; /* 调整内边距，让数字显示出来 */
}
.entry-content ul li,
.entry-content ol li {
    list-style: inherit !important; /* 列表项(li)继承父级(ul/ol)的样式 */
    margin-bottom: 0.1em; /* 列表项之间的间距 */
}
.entry-content img {
    border-radius: 9px;
    box-shadow: 0 2px 5px rgba(0,0,0,.1);
}
.entry-content blockquote {
    border-left: 3px solid var(--theme-color);
    padding: 15px 20px;
    margin: 20px 0;
    background: #f9f9f9;
    color: #666;
}

/* Article Footer */
.entry-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.entry-tag {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}
.entry-tag i {
    color: #aaa;
    margin-right: 10px;
}
.entry-tag a {
    display: inline-block;
    padding: 3px 10px;
    background: #f5f5f5;
    border-radius: 4px;
    margin-right: 8px;
    color: #777;
    font-size: 13px;
    transition: all .3s;
}
.entry-tag a:hover {
    background: var(--MaincolorHover) !important;
    color: #fff !important;
}

/* Comments Section */
#comments.entry-card {
    margin-top: 20px;
}

/* Responsive Adjustments for Article */
@media (max-width: 990px) {
    .article-featured-image {
        height: 250px;
        margin-left: -15px;
        margin-right: -15px;
        border-radius: 0;
        margin-bottom: -50px;
    }
    .post-article {
        width: 100%;
        max-width: none;
    }
    .entry-card {
        padding: 20px;
    }
    .entry-content {
        font-size: 15px;
    }
    
    /* 移除了旧的 .entry-page 媒体查询样式 */
}

/* --- 新的文章页 - 上一篇/下一篇 样式 (背景图版 - 修正为 width: 48.5% 方法) --- */

.entry-page {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap; /* 在小屏幕上允许换行 */
    /* gap: 20px;  <--- 移除 gap */
    margin-top: 30px;
}

.entry-page-prev,
.entry-page-next {
    /* flex: 1; <--- 移除 flex: 1 */
    width: 48.5%; /* <--- 新增：使用 width 实现间距 */
    min-width: 250px; /* 最小宽度，防止在 flex 中被过度压缩 (可保留) */
    position: relative; /* 关键：为内部绝对定位提供锚点 */
    height: 80px; /* 您可以根据需要调整此高度 */
    border-radius: 3px;
    overflow: hidden; /* 确保背景图不会溢出圆角 */
    background-color: #f0f0f0; /* 图片加载前/失败时的占位背景色 */
    background-size: cover; /* 关键：使背景图覆盖整个容器 */
    background-position: center; /* 关键：背景图居中显示 */
    transition: transform 0.3s ease;
}

/* 鼠标悬停时轻微放大
.entry-page-prev:hover,
.entry-page-next:hover {
    transform: scale(1.01);
} */

/* 链接和蒙版层 */
.entry-page-prev a,
.entry-page-next a {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* 标题顶部对齐 */
    padding: 6px 15px;
    text-decoration: none;
    color: #ffffff; /* 白色文字 */
    background: rgba(0, 0, 0, 0.45); /* 黑色蒙版 */
    transition: background 0.3s ease;
}

/* 分别为左右卡片设置文本对齐
.entry-page-prev a {
    text-align: left;
}
.entry-page-next a {
    text-align: right;
}  */

/* 悬停时蒙版变深 */
.entry-page-prev a:hover,
.entry-page-next a:hover {
    background: rgba(0, 0, 0, 0.6);
}

/* 文章标题 */
.entry-page-prev a span,
.entry-page-next a span {
	color: #ffffff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%; 
}

/* 底部信息 (上一篇/下一篇/日期) */
.entry-page-info {
    position: absolute; 
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex; 
    justify-content: space-between;
    align-items: center;
    padding: 5px 15px; 
    background: rgba(0, 0, 0, 0.2); 
    font-size: 12px;
    color: #f0f0f0; 
}

/* .pull-left 和 .pull-right 里的 float 就不再需要了 */
.entry-page-info .pull-left {}
.entry-page-info .pull-right {}


/* 响应式设计：在小屏幕上堆叠 */
@media (max-width: 767px) {
    .entry-page {
        flex-direction: column; /* 垂直堆叠 */
        /* gap: 15px; <--- 移除 gap */
    }
    .entry-page-prev, 
    .entry-page-next {
        width: 100%; /* <--- 修改：小屏幕占满全宽 */
        height: 60px; /* 移动端高度小一点 */
        min-width: 100%; /* 占满全宽 (冗余，但无害) */
        margin-bottom: 15px; /* <--- 新增：用 margin 替代 gap */
    }
    .entry-page-prev:last-child, /* <--- 新增：移除最后一个元素的下边距 */
    .entry-page-next:last-child {
        margin-bottom: 0;
    }
    
    /* 在移动端，将下一篇的标题也改回左对齐 
    .entry-page-next a {
        text-align: left;
    } */
}
/* --- H2/H3 标题左侧竖线样式 (可禁用版) --- */

/* 1. 为所有 "不带 .no-bar" 的 h2 和 h3 添加相对定位和内边距 */
.entry-content h2:not(.no-bar),
.entry-content h3:not(.no-bar) {
    position: relative;
    padding-left: 11px; 
}

/* 2. 为所有 "不带 .no-bar" 的 h2 和 h3 添加竖线 */
.entry-content h2:not(.no-bar):before,
.entry-content h3:not(.no-bar):before {
    position: absolute;
    content: '';
    width: 4px;
    background: #3598db; 
    /* height: 20px; */  
    /* top: 50%; 将竖条定位到标题的垂直中间 */
    /* left: 2px; */
    /* transform: translateY(-50%); 精确居中 */
    top: 0.30em;
    bottom: 0.30em;
    left: 0;
    border-radius: 5px;
    transition: .4s;
}
