/*
Theme Name: Minimal Pure Blog
Description: 极简纯博客主题，仿宋字体，绿色超链接，左右并排卡片布局。
Version: 4.0
*/

/* ===== 全局重置 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: "FangSong", "仿宋", "STFangsong", serif;
    background-color: #f4f5f7;
    color: #333;
    line-height: 1.8;
    font-size: 16px;
}
a { color: #5fb878; text-decoration: none; transition: color 0.2s; }
a:hover { color: #4aa368; text-decoration: underline; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

.container { width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== 首页与详情页两列布局 ===== */
.home-wrapper, .single-wrapper {
    display: flex !important;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}
.main-column, .single-main { flex: 1; min-width: 0; }
.sidebar-column, .single-sidebar { flex: 0 0 320px; width: 320px; max-width: 100%; }

/* ===== 头部导航 ===== */
.site-header {
    background: #fff;
    border-bottom: 1px solid #eef2f6;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 64px;
}
.logo { flex-shrink: 0; margin-right: 20px; }
.logo a { font-size: 24px; font-weight: bold; color: #1e293b; text-decoration: none; }
.logo a:hover { color: #5fb878; }

.nav-wrapper { flex: 1; display: flex; justify-content: center; }
.nav-menu { display: flex; gap: 20px; margin: 0; padding: 0; list-style: none; }
.nav-menu li a {
    color: #334155; font-size: 16px; font-weight: bold; text-decoration: none;
    padding: 8px 12px; border-radius: 6px; transition: all 0.2s;
}
.nav-menu li a:hover, .nav-menu .current-menu-item a { color: #5fb878; background: #f0fdf4; }

.header-login-box { flex-shrink: 0; margin-left: 20px; }
.login-btn {
    display: inline-block; background-color: #5fb878; color: #ffffff !important;
    padding: 8px 24px; border-radius: 6px; font-size: 15px; font-weight: bold;
    text-decoration: none; transition: all 0.3s ease; box-shadow: 0 2px 6px rgba(95, 184, 120, 0.3);
}
.login-btn:hover { background-color: #4aa368; transform: translateY(-1px); text-decoration: none; }

/* ===== 移动端导航与抽屉 ===== */
.mobile-menu-toggle {
    display: none; flex-direction: column; justify-content: space-between;
    width: 24px; height: 18px; background: transparent; border: none; cursor: pointer; padding: 0; z-index: 1001;
}
.mobile-menu-toggle span { width: 100%; height: 2px; background-color: #334155; border-radius: 2px; transition: all 0.3s ease; }
.mobile-menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 999; opacity: 0; transition: opacity 0.3s;
}

/* ===== Swiper 轮播图 ===== */
.home-slider {
    margin-bottom: 40px;
    border-radius: 12px; 
    overflow: hidden; 
    position: relative;
    background: #f0f2f5; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.home-swiper { width: 100%; aspect-ratio: 2 / 1; min-height: 200px; max-height: 410px; }
.home-swiper .swiper-slide { position: relative; display: flex; justify-content: center; align-items: center; overflow: hidden; }
.home-swiper .swiper-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-swiper .swiper-title {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.7), rgba(0,0,0,0.3), transparent);
    color: #fff; padding: 15px 24px; font-size: 18px; font-weight: 500; z-index: 2;
}
.home-swiper .swiper-pagination-bullet { width: 10px; height: 10px; background: #fff; opacity: 0.6; }
.home-swiper .swiper-pagination-bullet-active { background: #5fb878 !important; opacity: 1; }
.home-swiper .swiper-button-next, .home-swiper .swiper-button-prev {
    color: #fff !important; background: rgba(0, 0, 0, 0.4);
    width: 40px; height: 40px; border-radius: 50%; transition: all 0.3s ease;
}
.home-swiper .swiper-button-next:hover, .home-swiper .swiper-button-prev:hover { background: #5fb878; }
.home-swiper .swiper-button-next:after, .home-swiper .swiper-button-prev:after { font-size: 18px; }

/* ===== 文章卡片列表 ===== */
.article-feed { display: flex; flex-direction: column; gap: 20px; margin-top: 10px; }
.feed-card {
    display: flex; gap: 18px; background: #fff; padding: 18px;
    border-radius: 12px; border: 1px solid #eef2f6; transition: transform 0.2s, box-shadow 0.2s;
}
.feed-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.card-thumb { flex: 0 0 200px; height: 140px; border-radius: 8px; overflow: hidden; background: #f0f2f5; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-content { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.card-cat { background: #e8f5e9; color: #5fb878; font-size: 12px; padding: 2px 10px; border-radius: 20px; }
.card-title { font-size: 19px; margin: 0; line-height: 1.4; }
.card-title a { color: #1e293b; }
.card-title a:hover { color: #5fb878; text-decoration: none; }
.card-meta { font-size: 13px; color: #94a3b8; display: flex; gap: 14px; margin: 6px 0; flex-wrap: wrap; }
.meta-right { margin-left: auto; }
.card-excerpt { font-size: 15px; color: #64748b; margin: 6px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-tags a { display: inline-block; background: #f1f5f9; color: #475569; font-size: 12px; padding: 2px 8px; border-radius: 4px; margin-right: 6px; margin-bottom: 4px; }
.card-tags a:hover { background: #5fb878; color: #fff; text-decoration: none; }
.card-content.no-thumb { padding-left: 0; }

/* ===== 分页 ===== */
.pager { text-align: center; margin: 30px 0; }
.pager .page-numbers { display: inline-block; padding: 6px 12px; margin: 0 3px; border: 1px solid #e2e8f0; background: #fff; border-radius: 6px; color: #475569; }
.pager .current { background: #5fb878; color: #fff; border-color: #5fb878; }

/* ===== 侧边栏模块 ===== */
.widget-box { background: #fff; border-radius: 12px; padding: 20px; margin-bottom: 20px; border: 1px solid #eef2f6; }
.widget-title { font-size: 17px; color: #1e293b; margin: 0 0 15px 0; padding-bottom: 10px; border-bottom: 2px solid #eef2f6; position: relative; }
.widget-title::after { content: ''; position: absolute; left: 0; bottom: -2px; width: 50px; height: 2px; background: #5fb878; }

.widget-calendar-top { background: linear-gradient(135deg, #5fb878, #4aa368); color: #fff; border-radius: 8px; padding: 15px; text-align: center; margin-bottom: 15px; }
.widget-calendar-top h3 { font-size: 24px; margin: 0; }
.widget-calendar-top h3 span { font-size: 36px; font-weight: bold; margin-right: 6px; }
.widget-calendar-top p { font-size: 13px; opacity: 0.9; margin: 4px 0 0; }
.widget-calendar-bottom h4 { font-size: 14px; color: #475569; font-weight: normal; line-height: 1.6; margin-bottom: 10px; }
.widget-calendar-bottom ul li { display: flex; gap: 8px; font-size: 13px; color: #64748b; padding: 6px 0; border-bottom: 1px dashed #eef2f6; align-items: center; }
.tag-原创 { font-size: 10px; padding: 1px 6px; background: #e8f5e9; color: #5fb878; border-radius: 4px; }

/* 彩色标签云 (侧边栏) */
.tag-cloud-custom a {
    display: inline-block; padding: 5px 12px; margin: 0 6px 10px 0;
    border-radius: 20px; font-size: 13px !important; text-decoration: none;
    transition: all 0.3s ease; border: 1px solid transparent;
}
.tag-cloud-custom a:nth-child(6n+1) { background-color: #fff3e0; color: #f57c00; }
.tag-cloud-custom a:nth-child(6n+1):hover { background-color: #f57c00; color: #fff; }
.tag-cloud-custom a:nth-child(6n+2) { background-color: #e8f5e9; color: #43a047; }
.tag-cloud-custom a:nth-child(6n+2):hover { background-color: #43a047; color: #fff; }
.tag-cloud-custom a:nth-child(6n+3) { background-color: #ffebee; color: #e53935; }
.tag-cloud-custom a:nth-child(6n+3):hover { background-color: #e53935; color: #fff; }
.tag-cloud-custom a:nth-child(6n+4) { background-color: #e3f2fd; color: #1e88e5; }
.tag-cloud-custom a:nth-child(6n+4):hover { background-color: #1e88e5; color: #fff; }
.tag-cloud-custom a:nth-child(6n+5) { background-color: #fce4ec; color: #d81b60; }
.tag-cloud-custom a:nth-child(6n+5):hover { background-color: #d81b60; color: #fff; }
.tag-cloud-custom a:nth-child(6n)   { background-color: #e0f7fa; color: #00acc1; }
.tag-cloud-custom a:nth-child(6n):hover { background-color: #00acc1; color: #fff; }

/* 热门排行 */
.hot-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #eef2f6; align-items: flex-start; }
.hot-list li:last-child { border-bottom: none; }
.hot-index { flex: 0 0 22px; height: 22px; background: #eef2f6; color: #64748b; text-align: center; border-radius: 4px; font-size: 13px; font-weight: bold; line-height: 22px; }
.hot-list li:nth-child(1) .hot-index { background: #ef4444; color: #fff; }
.hot-list li:nth-child(2) .hot-index { background: #f59e0b; color: #fff; }
.hot-list li:nth-child(3) .hot-index { background: #eab308; color: #fff; }
.hot-info a { font-size: 14px; color: #1e293b; display: block; line-height: 1.4; }
.hot-info a:hover { color: #5fb878; }
.hot-meta { font-size: 12px; color: #94a3b8; margin-top: 4px; }

/* 网站统计 */
.site-stats li { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; color: #64748b; border-bottom: 1px dashed #eef2f6; }
.site-stats li:last-child { border-bottom: none; }

/* ===== 文章详情页 ===== */
.single-post { background: #fff; padding: 30px; border-radius: 12px; border: 1px solid #eef2f6; margin-bottom: 0 !important; }
.single-title { font-size: 28px; text-align: center; margin-bottom: 20px; color: #1e293b; }
.single-meta { text-align: center; font-size: 13px; color: #94a3b8; margin-bottom: 30px; padding-bottom: 15px; border-bottom: 1px solid #eef2f6; }
.single-content { font-size: 17px; line-height: 1.8; color: #334155; overflow-x: hidden; }
.single-content p { text-indent: 2em; margin-bottom: 16px; }

/* 面包屑导航 */
.breadcrumb-nav {
    font-size: 13px; color: #94a3b8; margin-bottom: 25px; padding-bottom: 15px;
    border-bottom: 1px dashed #eef2f6; display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
}
.breadcrumb-nav a { color: #64748b; text-decoration: none; transition: color 0.2s; }
.breadcrumb-nav a:hover { color: #5fb878; }
.breadcrumb-nav .sep { color: #cbd5e1; }
.breadcrumb-nav .current { color: #5fb878; font-weight: 500; }

/* 文章底部标签 */
.post-tags {
    margin-top: 30px; padding-top: 20px; border-top: 1px dashed #eef2f6;
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 14px;
}
.post-tags strong, .post-tags > span { color: #64748b; margin-right: 5px; }
.post-tags a {
    display: inline-block; background-color: #f1f5f9; color: #475569;
    padding: 4px 12px; border-radius: 6px; font-size: 13px; text-decoration: none;
    transition: all 0.2s ease; border: 1px solid transparent;
}
.post-tags a:hover { background-color: #5fb878; color: #ffffff; text-decoration: none; transform: translateY(-1px); }
.post-tags a:nth-child(4n+1) { background-color: #e8f5e9; color: #43a047; }
.post-tags a:nth-child(4n+2) { background-color: #e3f2fd; color: #1e88e5; }
.post-tags a:nth-child(4n+3) { background-color: #fff3e0; color: #f57c00; }
.post-tags a:nth-child(4n)   { background-color: #fce4ec; color: #d81b60; }

/* 图片排版与灯箱 */
.img-align-wrap { position: relative; display: block; width: fit-content; max-width: 100%; margin: 20px auto; line-height: 0; }
.img-align-wrap.align-left { margin-left: 0; margin-right: auto; }
.img-align-wrap.align-right { margin-left: auto; margin-right: 0; }
.img-align-wrap > img { display: block; margin: 0 !important; max-width: 100%; height: auto; border-radius: 8px; cursor: zoom-in; }
.img-align-tools { position: absolute; top: 8px; right: 8px; display: flex; gap: 2px; padding: 4px; background: rgba(15,23,42,.65); backdrop-filter: blur(4px); border-radius: 8px; opacity: 0; visibility: hidden; transition: all 0.2s; z-index: 3; }
.img-align-wrap:hover .img-align-tools { opacity: 1; visibility: visible; }
.img-align-tools button { border: 0; background: transparent; color: #fff; font-size: 12px; padding: 5px 8px; cursor: pointer; border-radius: 4px; }
.img-align-tools button:hover, .img-align-tools button.active { background: #5fb878; }

.img-lightbox { position: fixed; inset: 0; z-index: 999999; background: rgba(0,0,0,.93); display: none; align-items: center; justify-content: center; overflow: hidden; cursor: zoom-out; }
.img-lightbox.active { display: flex; }
.img-lightbox .lb-img { max-width: 88vw; max-height: 88vh; cursor: grab; user-select: none; transition: transform 0.1s; }
.img-lightbox .lb-img.dragging { cursor: grabbing; }
.img-lightbox .lb-toolbar { position: absolute; top: 18px; right: 18px; display: flex; gap: 8px; z-index: 2; }
.img-lightbox .lb-toolbar button { width: 38px; height: 38px; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; cursor: pointer; }
.img-lightbox .lb-toolbar button:hover { background: #5fb878; border-color: #5fb878; }

/* 相关阅读与上下篇 */
.related-posts { margin-top: 30px; border-top: 1px solid #eef2f6; padding-top: 20px; }
.related-grid { display: flex; flex-wrap: wrap; justify-content: space-between; }
.related-item { width: 48%; margin-bottom: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.post-nav { display: flex; justify-content: space-between; margin-top: 30px; border-top: 1px solid #eee; padding-top: 15px; font-size: 15px; }

/* 评论 */
.comments-area { margin-top: 30px; margin-bottom: 0 !important; background: #fff; padding: 25px; border-radius: 12px; border: 1px solid #eef2f6; }
.comment-list { padding: 0; }
.comment-list li { border-bottom: 1px dashed #eee; padding: 15px 0; display: flex; gap: 15px; }
.comment-avatar img { border-radius: 50%; }
.comment-body strong { display: block; margin-bottom: 5px; }
.comment-form input, .comment-form textarea { width: 100%; padding: 10px; border: 1px solid #e2e8f0; border-radius: 6px; margin-bottom: 15px; font-family: inherit; }
.comment-form .submit { background: #5fb878; color: #fff; border: none; padding: 10px 20px; cursor: pointer; border-radius: 6px; }

/* ===== 栏目页顶部标题背景框 ===== */
.archive-header {
    background-color: #ffffff; 
    border-radius: 12px; 
    padding: 25px 30px; 
    margin-bottom: 20px; 
    border: 1px solid #eef2f6; 
    border-left: 4px solid #5fb878; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.02); 
}
.archive-title { font-size: 26px; color: #1e293b; margin: 0 0 10px 0; font-weight: bold; }
.archive-desc { font-size: 15px; color: #64748b; line-height: 1.6; margin: 0; }
.no-posts-tip { background: #ffffff; border-radius: 12px; padding: 40px; text-align: center; color: #94a3b8; border: 1px solid #eef2f6; margin-bottom: 20px; }

/* ===== 广告位 ===== */
.single-ad-box { text-align: center; margin: 25px 0; overflow: hidden; }
.single-ad-box img { max-width: 100%; height: auto; }
.header-ad-box { margin-right: 20px; display: flex; align-items: center; max-width: 300px; }
.header-ad-box img { max-height: 50px; width: auto; border-radius: 4px; }

/* ===== 关于本站定制 ===== */
.widget-about-custom { border-top: 3px solid #5fb878; }
.about-buttons-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 15px; }
.about-btn { display: flex; align-items: center; justify-content: center; padding: 10px 0; border-radius: 6px; font-size: 14px; font-weight: 500; color: #fff !important; text-decoration: none !important; transition: all 0.2s ease; border: 1px solid transparent; }
.about-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.btn-green { background-color: #5fb878; } .btn-green:hover { background-color: #4aa368; }
.btn-blue { background-color: #3b82f6; } .btn-blue:hover { background-color: #2563eb; }
.btn-red { background-color: #ef4444; } .btn-red:hover { background-color: #dc2626; }

/* ===== 底部 ===== */
.site-footer { 
    background: #1e293b; color: #94a3b8; text-align: center; 
    padding: 30px 15px; font-size: 14px; margin-top: 0 !important; 
    width: 100% !important; max-width: 100% !important; box-sizing: border-box; 
}
.site-footer p { margin: 5px 0; }
.site-footer a { color: #5fb878; text-decoration: none; }
.site-footer a:hover { color: #4aa368; text-decoration: underline; }


/* ==========================================================================
   移动端优化 (Mobile Optimization)
   ========================================================================== */
@media (max-width: 900px) {
    /* 隐藏侧边栏，主内容占满 */
    .sidebar-column, .single-sidebar, aside.sidebar-column { display: none !important; }
    .main-column, .single-main { width: 100% !important; flex: 1 1 100% !important; max-width: 100% !important; }
    .home-wrapper, .single-wrapper { flex-direction: column !important; display: block !important; padding: 0 !important; margin: 15px 0 !important; }

    /* 头部导航 */
    .header-inner { padding: 10px 15px; position: relative; }
    .mobile-menu-toggle { display: flex; }
    .desktop-login, .header-ad-box { display: none !important; }
    .logo { position: absolute; left: 50%; transform: translateX(-50%); width: auto; margin: 0; }
    .logo a { font-size: 20px; }
    .header-inner::after { content: ""; width: 24px; display: block; }
    
    /* 移动端抽屉 */
    .nav-wrapper {
        position: fixed; top: 0; left: -280px; width: 280px; height: 100vh;
        background-color: #ffffff; box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        z-index: 1000; transition: left 0.3s ease; padding-top: 80px; overflow-y: auto; display: block;
    }
    .nav-wrapper.active { left: 0; }
    .mobile-menu-overlay.active { display: block; opacity: 1; }
    .nav-menu { flex-direction: column; gap: 0; width: 100%; padding: 0 20px; }
    .nav-menu li { width: 100%; border-bottom: 1px solid #eef2f6; }
    .nav-menu li a { display: block; padding: 15px 0; border-radius: 0; background: transparent; }
    .nav-wrapper::after {
        content: "登录"; display: block; margin: 30px 20px 20px; padding: 12px;
        text-align: center; background-color: #5fb878; color: white; border-radius: 6px; font-weight: bold; cursor: pointer;
    }
    
    /* 全面贴边优化 */
    .container { padding: 0 !important; width: 100% !important; max-width: 100% !important; }
    .home-slider { border-radius: 0 !important; margin-bottom: 15px !important; }
    .home-swiper { aspect-ratio: auto; height: 200px; }
    .home-swiper .swiper-button-next, .home-swiper .swiper-button-prev { display: none; }
    
    .article-feed { gap: 10px !important; }
    .feed-card { flex-direction: column; border-radius: 0 !important; border-left: none !important; border-right: none !important; padding: 15px 12px !important; margin: 0 !important; }
    .card-thumb { flex: none; width: 100%; height: 180px; border-radius: 0 !important; }
    
    .single-post { border-radius: 0 !important; border-left: none !important; border-right: none !important; padding: 20px 12px !important; margin: 0 !important; }
    .comments-area, .related-posts, .post-tags { border-radius: 0 !important; border-left: none !important; border-right: none !important; padding: 20px 12px !important; margin: 10px 0 !important; }
    .archive-header { border-radius: 0; border-left: none; border-right: none; padding: 20px 15px; margin-bottom: 10px; }
    
    .site-footer { padding: 20px 12px !important; margin-top: 0 !important; }
}
/* ===== 文章底部版权声明框 ===== */
.post-copyright-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6d9 100%);
    border: 2px solid #5fb878;
    border-radius: 16px;
    padding: 20px 25px;
    margin: 35px 0;
    font-size: 13px;
    line-height: 1.9;
    color: #2d4a2d;
    position: relative;
    box-shadow: 0 4px 15px rgba(95, 184, 120, 0.15);
}
.post-copyright-box .copyright-icon {
    font-size: 14px;
    margin-right: 5px;
    font-weight: bold;
}
.post-copyright-box a {
    color: #2e7d32;
    text-decoration: none;
}
.post-copyright-box a:hover {
    text-decoration: underline;
}