﻿/*
Theme Name: Zamini Download Pro
Theme URI: https://github.com/yourname/zamini
Author: Gemini
Description: 修复版 V39：国内极速版 (移除Google字体 + 字节跳动CDN + 极速占位图)
Version: 39.0
Requires PHP: 7.4
*/

/* [优化] 移除 Google Fonts Import，使用系统字体加速加载 */

:root {
    --primary: #00b894;          /* 主题绿 */
    --primary-hover: #00a884;
    --text-main: #2d3436;
    --text-light: #636e72;
    --bg-body: #f9f9f9;
    --bg-card: #ffffff;
    --border-color: #eef2f5;
    --star-color: #f1c40f;
    --container-width: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0; padding: 0;
    /* [优化] 字体栈调整为国内常用配置，优先使用系统自带字体，无需下载 */
    font-family: -apple-system, "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* === 背景图片设置 === */
    background-color: var(--bg-body);
    /* 建议：将此 URL 替换为您网站本地的图片 (例如 /wp-content/uploads/bg.jpg) 以获得最快速度 */
    background-image: url('http://www.mcoo.cc/wp-content/uploads/2026/01/1767871849-bg.png'); 
    background-repeat: repeat;
    background-position: center center;
    background-attachment: fixed;
    background-size: auto;
    
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.6;
    overflow-y: scroll;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
img { max-width: 100%; display: block; }
ul { list-style: none; padding: 0; margin: 0; }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* =========================================
   Header Styling
   ========================================= */
.site-header {
    background: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.04);
    height: 72px;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 999;
    display: block;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    gap: 30px;
}

/* Logo */
.logo { display: flex; align-items: center; height: 100%; }
.logo a { font-size: 26px; font-weight: 800; color: #333; letter-spacing: -0.5px; line-height: 1; display: flex; align-items: center; }
.logo span { color: var(--primary); }

/* Search Box */
.header-search-box { width: 320px; }
.header-search-form { display: flex; align-items: center; border: 2px solid var(--primary); border-radius: 6px; overflow: hidden; height: 40px; background: #fff; }
.header-search-input { flex: 1; border: none; padding: 0 15px; font-size: 14px; height: 100%; outline: none; color: #333; background: transparent; }
.header-search-btn { background: var(--primary); border: none; color: #fff; width: 46px; height: 100%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.2s; padding: 0; }
.header-search-btn:hover { background: var(--primary-hover); }
.header-search-btn i { font-size: 18px; line-height: 1; }

/* Navigation */
.main-nav { display: flex; align-items: center; height: 100%; }
.main-nav .nav-menu { display: flex; gap: 25px; margin: 0; padding: 0; align-items: center; }
.main-nav .nav-menu li { position: relative; display: flex; align-items: center; height: 100%; }
.main-nav .nav-menu a { font-size: 15px; font-weight: 500; color: #444; text-decoration: none; padding: 8px 0; display: block; line-height: 1; }
.main-nav .nav-menu a:hover { color: var(--primary); }
.main-nav .nav-menu li::after { content: ''; position: absolute; bottom: -24px; left: 0; width: 0%; height: 3px; background: var(--primary); transition: width 0.3s ease; }
@media (min-width: 901px) { .main-nav .nav-menu li:hover::after { width: 100%; } }

/* =========================================
   Layout & Homepage
   ========================================= */
.grid-layout { 
    display: grid; 
    grid-template-columns: 1fr 320px;
    gap: 30px; 
    align-items: start;
    margin-top: 30px;
}

.section-head { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 8px 20px; margin-bottom: 10px; border-radius: 6px 6px 0 0; border-bottom: 1px solid #f0f0f0; border-left: 5px solid var(--primary); box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
.section-title { font-size: 20px; font-weight: 700; margin: 0; color: #2d3436; }
.btn-view-all { border: 1px solid #ddd; background: #fff; color: #666; padding: 6px 18px; border-radius: 4px; font-size: 13px; font-weight: 500; transition: all 0.2s; }
.btn-view-all:hover { border-color: var(--primary); color: var(--primary); background: #f0fdfa; }

.app-list { display: flex; flex-direction: column; gap: 8px; }
.app-card {
    background: #fff; padding: 12px;
    display: grid; grid-template-columns: 72px 1fr 110px 110px 80px;
    gap: 15px; align-items: center;
    border-radius: 4px; border: 1px solid transparent;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03); transition: all 0.2s ease;
}
.app-card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); z-index: 10; border-color: transparent; }
.app-icon { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; display: block !important; }

.app-info { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.app-title { font-size: 17px; font-weight: 700; color: #1a1a1a; margin-bottom: 5px; line-height: 1.4; }
.app-excerpt { font-size: 13px; color: #888; margin-bottom: 5px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-cat { font-size: 13px; color: var(--primary); font-weight: 500; text-decoration: none; align-self: flex-start; }
.app-cat:hover { text-decoration: underline; }

.meta-group, .rating-group { display: flex; flex-direction: column; gap: 6px; border-left: 1px solid #f0f0f0; padding-left: 15px; }
.meta-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #444; font-weight: 500; }
.meta-item i { font-size: 16px; margin-right: 2px; line-height: 1; }

/* Colors */
.icon-win { color: #00adef; }        
.icon-android { color: #3ddc84; }    
.icon-apple { color: #333333; }      
.meta-views i { color: #b2bec3; font-size: 17px; }

.stars { display: flex; gap: 2px; }
.stars i { font-size: 14px; }
.star-filled { color: var(--star-color); }
.star-empty { color: #e0e0e0; }
.rating-label { font-size: 12px; color: #999; }
.size-group { border-left: 1px solid #f0f0f0; padding-left: 10px; text-align: right; font-size: 16px; font-weight: 400; color: #2d3436; }

/* =========================================
   Single Page Content
   ========================================= */
.single-article-box { background: #fff; padding: 30px; border-radius: 4px; border: 1px solid var(--border-color); }
.single-head { display: block; margin-bottom: 30px; border-bottom: 1px solid #f5f5f5; padding-bottom: 20px; }
.single-head .single-icon, .single-head .single-thumb, .single-head .wp-post-image { display: none !important; }
.single-title { font-size: 28px; margin: 0 0 10px 0; color: #2d3436; line-height: 1.3; font-weight: 700; }
.single-meta { font-size: 13px; color: #999; display: flex; align-items: center; gap: 10px; }
.single-meta .sep { color: #ddd; }

/* Content Styles & Image Fix */
.entry-content { font-size: 16px; color: #444; line-height: 1.8; }
.entry-content h2, .entry-content h3 { color: #2d3436; margin-top: 30px; margin-bottom: 15px; font-weight: 600; }
.entry-content p { margin-bottom: 20px; }
/* 图片自适应修复 */
.entry-content img {
    max-width: 100%;
    height: auto;       /* 防止变形 */
    object-fit: contain;
    display: block;
    margin: 10px auto;
}
.entry-content iframe, .entry-content video { max-width: 100%; }

/* Download Panel */
.download-links-container { background-color: #fff; border: 1px solid #e1e4e8; border-radius: 12px; padding: 24px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); margin: 30px 0; }
.download-links-title { font-size: 18px; font-weight: 700; color: #24292e; margin-bottom: 20px; margin-top: 0; display: flex; align-items: center; }
.download-links-title::before { content: ""; display: inline-block; width: 24px; height: 24px; margin-right: 10px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' d='M0 0h24v24H0z'/%3E%3Cpath fill='%2300b894' d='M13 10h5l-6 6-6-6h5V3h2v7zm-9 9h16v2H4v-2z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; }
.download-item { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; border-bottom: 1px solid #eaecef; }
.download-item:last-child { border-bottom: none; }
.download-info { flex: 1; }
.drive-name { font-size: 15px; font-weight: 600; color: #24292e; margin-right: 15px; }
.extraction-code { font-size: 13px; color: #586069; background-color: #f6f8fa; padding: 4px 8px; border-radius: 6px; border: 1px solid #e1e4e8; }
.extraction-code strong { color: #d73a49; letter-spacing: 1px; }
.download-actions { display: flex; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 8px 16px; font-size: 13px; font-weight: 600; border-radius: 6px; cursor: pointer; transition: all 0.2s; text-decoration: none; line-height: 1.5; border: 1px solid transparent; }
.btn-copy { color: #24292e; background-color: #f6f8fa; border: 1px solid rgba(27, 31, 35, 0.15); }
.btn-copy:hover { background-color: #f3f4f6; }
.btn-copy.copied { background-color: #00b894; color: #fff; border-color: #00b894; }
.btn-download { color: #fff; background-color: #007bff; box-shadow: 0 1px 0 rgba(27, 31, 35, 0.1); }
.btn-download:hover { background-color: #0069d9; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3); }
.btn-zapro { background-color: #9b59b6; }
.btn-zapro:hover { background-color: #8e44ad; box-shadow: 0 4px 12px rgba(155, 89, 182, 0.3); }
.btn-custom { background-color: #f39c12; }
.btn-custom:hover { background-color: #e67e22; box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3); }
.btn-download::before, .btn-zapro::before, .btn-custom::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 8px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16'%3E%3Cpath fill='none' d='M0 0h24v24H0z'/%3E%3Cpath fill='%23ffffff' d='M13 10h5l-6 6-6-6h5V3h2v7zm-9 9h16v2H4v-2z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; }

/* Sidebar */
.sidebar-widget { background: #fff; padding: 25px; margin-bottom: 25px; box-shadow: 0 2px 8px rgba(0,0,0,0.02); border-radius: 6px; border: 1px solid var(--border-color); }
.widget-title { font-size: 16px; font-weight: 700; color: #2d3436; margin: 0 0 20px 0; padding-bottom: 12px; border-bottom: 2px solid #f0f0f0; position: relative; }
.widget-title::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 40px; height: 2px; background: var(--primary); }
.hot-post-list { padding: 0; margin: 0; list-style: none; }
.hot-item { margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid #f0f0f0; }
.hot-item:last-child { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
.hot-link { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.hot-thumb { width: 50px; height: 50px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: #f5f5f5; border: 1px solid #eee; }
.hot-info { display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.hot-title { 
    display: block; 
    font-weight: 600; 
    font-size: 14px; 
    color: #2d3436; 
    line-height: 1.4; 
    margin-bottom: 4px; 
    transition: color 0.2s;
    /* 限制显示两行 */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hot-link:hover .hot-title { color: var(--primary); }
.hot-meta { display: block; font-size: 12px; color: #999; font-weight: 400; }

.widget_categories ul li { border-bottom: 1px solid #f0f0f0; padding: 10px 0; display: flex; justify-content: space-between; align-items: center; }
.widget_categories ul li:last-child { border-bottom: none; }
.widget_categories ul li a { font-weight: 500; font-size: 14px; color: #444; transition: color 0.2s; flex: 1; }
.widget_categories ul li a:hover { color: var(--primary); }
.widget_categories ul li .count { font-size: 12px; color: #888; background: #f0f0f0; padding: 2px 8px; border-radius: 12px; }

/* =========================================
   Comments Area (复刻版样式)
   ========================================= */
.comments-area { background: #fff; padding: 30px; margin-top: 30px; border-radius: 6px; border: 1px solid var(--border-color); }
.comments-title-bar { border-left: 4px solid var(--primary); padding-left: 10px; font-size: 18px; font-weight: 700; color: #333; margin: 0 0 20px 0; line-height: 1; }

.comment-form { margin-bottom: 40px; }
.comment-textarea-wrapper { position: relative; margin-bottom: 15px; }
.comment-form textarea { width: 100%; padding: 12px; border: 1px solid #e5e5e5; background: #fff; border-radius: 2px; font-size: 14px; color: #333; height: 120px; resize: vertical; outline: none; transition: border 0.2s; }
.comment-form textarea:focus { border-color: var(--primary); }
.emoji-icon { position: absolute; bottom: 10px; right: 10px; font-size: 20px; color: #333; cursor: pointer; }

/* 姓名/邮箱 Flex 布局 */
.input-row { display: flex; gap: 20px; margin-bottom: 15px; }
.input-col { flex: 1; }
.comment-form input[type="text"], .comment-form input[type="email"] { width: 100%; padding: 10px; border: 1px solid #e5e5e5; border-radius: 2px; font-size: 14px; outline: none; }
.comment-form input:focus { border-color: var(--primary); }

.form-bottom-row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.check-col { font-size: 13px; color: #666; display: flex; align-items: center; }
.check-col input { margin-right: 5px; }
.btn-submit { background: var(--primary); color: #fff; border: none; padding: 8px 25px; border-radius: 2px; font-size: 14px; cursor: pointer; transition: 0.2s; }
.btn-submit:hover { opacity: 0.9; }

.comment-list { list-style: none; margin: 0; padding: 0; margin-top: 30px; }
.comment-list li { margin-bottom: 30px; border-bottom: 1px solid #f5f5f5; padding-bottom: 30px; }
.comment-list li:last-child { border-bottom: none; }
.comment-item { display: flex; gap: 15px; }
.comment-avatar-box img { width: 48px; height: 48px; border-radius: 50%; background: #eee; }
.comment-content-box { flex: 1; }
.comment-meta-info { margin-bottom: 8px; }
.comment-author-name { font-size: 14px; font-weight: bold; color: #333; margin-right: 10px; }
.comment-date-time { font-size: 12px; color: #999; }
.comment-text { font-size: 14px; color: #333; line-height: 1.6; }
.comment-text p { margin: 0; }
.comment-reply-btn a { font-size: 13px; color: #666; } .comment-reply-btn a:hover { color: var(--primary); }
.comment-notes, .logged-in-as { display: none; }
.children { list-style: none; margin: 20px 0 0 0; padding-left: 65px; }

/* =========================================
   Prism.js Code Highlight (Prism 代码高亮)
   ========================================= */
pre[class*="language-"] {
    border-radius: 8px; margin: 25px 0 !important; box-shadow: 0 4px 12px rgba(0,0,0,0.15); border: 1px solid #333;
}
code[class*="language-"], pre[class*="language-"] {
    white-space: pre-wrap !important; word-break: break-all; word-wrap: break-word;
}
pre[class*="language-"]::-webkit-scrollbar { height: 8px; }
pre[class*="language-"]::-webkit-scrollbar-thumb { background: #555; border-radius: 4px; }
pre[class*="language-"]::-webkit-scrollbar-track { background: #272822; }

/* =========================================
   Like Button Styling (点赞按钮样式)
   ========================================= */
/* 1. 底部大按钮 */
.btn-like-large {
    background: #fff;
    border: 2px solid #ff4757;
    color: #ff4757;
    padding: 10px 30px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    outline: none;
}
.btn-like-large i { font-size: 20px; transition: transform 0.2s; }

.btn-like-large:hover {
    background: #ff4757;
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
    transform: translateY(-2px);
}

/* 2. 点赞后的状态 */
/* 头部纯文字按钮 - 红色文字 */
.zamini-like-btn.liked { color: #ff4757; } 
.zamini-like-btn.liked i { transform: scale(1.2); font-weight: bold; }

/* [核心修复] 底部大按钮 - 强制白色文字 (防止隐身) */
.btn-like-large.liked {
    background: #ff4757;
    color: #fff !important; 
    cursor: default;
}

/* =========================================
   Mobile Optimization (移动端适配)
   ========================================= */
@media (max-width: 900px) {
    .site-header { height: auto; padding: 15px 0; position: relative; }
    .header-inner { flex-direction: column; gap: 15px; height: auto; align-items: flex-start; }
    .logo { width: 100%; justify-content: center; margin-bottom: 5px; }
    .logo a { font-size: 24px; }
    .header-search-box { width: 100%; max-width: none; order: 2; }
    .header-search-form { height: 44px; }
    .header-search-input { font-size: 16px; }
    
    /* 移动端菜单：换行 + 居中 */
    .main-nav { width: 100%; order: 3; overflow-x: visible; padding-bottom: 5px; margin-top: 10px; }
    .main-nav .nav-menu { display: flex; flex-wrap: wrap; white-space: normal; justify-content: center; gap: 10px 20px; padding: 0; }
    .main-nav .nav-menu li { height: auto; }
    .main-nav .nav-menu li::after { display: none; }
    .main-nav .nav-menu a { padding: 5px 0; font-size: 15px; }

    .grid-layout { grid-template-columns: 1fr; gap: 20px; margin-top: 20px; }
    .app-card { grid-template-columns: 60px 1fr; gap: 15px; padding: 15px; position: relative; align-items: start; }
    .app-icon { width: 60px; height: 60px; border-radius: 10px; }
    .meta-group, .rating-group { display: none; }
    .app-info { display: block; padding-right: 0; }
    .app-title { font-size: 16px; line-height: 1.4; margin-bottom: 6px; padding-right: 70px; white-space: normal; }
    .app-excerpt { font-size: 13px; color: #888; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 0; white-space: normal; }
    .size-group { position: absolute; top: 15px; right: 15px; border: none; font-size: 12px; background: #f5f5f5; padding: 3px 8px; border-radius: 4px; color: #666; text-align: center; border-left: none; }

    .single-title { font-size: 22px; }
    .download-links-container { padding: 20px; }
    .download-item { flex-direction: column; align-items: flex-start; gap: 15px; }
    .download-actions { width: 100%; display: flex; gap: 10px; }
    .btn { flex: 1; padding: 12px 0; font-size: 14px; }
    .sidebar { margin-top: 20px; }
    
    /* 评论区移动端 */
    .input-row { flex-direction: column; gap: 10px; }
    .form-bottom-row { flex-direction: column; align-items: flex-start; gap: 15px; }
    .btn-submit { width: 100%; }
    .children { padding-left: 20px; }
    .comment-avatar-box img { width: 40px; height: 40px; }
}
/* =========================================
   Footer Redesign (复刻版 V42)
   ========================================= */
.site-footer {
    background: #fff;
    border-top: 1px solid #eee;
    padding: 40px 0;
    margin-top: 50px;
    font-size: 13px;
    color: #666;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center; /* 垂直居中 */
    gap: 30px;
}

/* 左侧内容 */
.footer-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 页脚菜单 */
.footer-links {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    gap: 15px;
}
.footer-links li { display: inline-block; }
.footer-links li a {
    color: #333; /* 深色文字 */
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    position: relative;
}
.footer-links li:not(:last-child)::after {
    content: '|';
    margin-left: 15px;
    color: #ddd;
    font-weight: normal;
}
.footer-links li a:hover { color: var(--primary); }

/* 描述文字 */
.footer-desc { margin: 0; color: #888; }

/* 版权行 & Powered By 多彩颜色 */
.copyright { margin: 0; color: #999; }
.copyright strong { color: #333; }
.provider { font-weight: 500; font-style: italic; }
.provider:nth-child(1) { color: #0073aa; /* WordPress Blue */ }
.provider:nth-child(2) { color: #2ecc71; /* CloudCone Green */ }
.provider:nth-child(3) { color: #f39c12; /* Cloudflare Orange */ }

/* 右侧社交图标 */
.footer-right {
    display: flex;
    gap: 12px;
}

.social-btn {
    width: 40px;
    height: 40px;
    background: #f0f2f5;
    border-radius: 50%; /* 圆形 */
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 20px;
}

.social-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .footer-right {
        width: 100%;
        justify-content: flex-start; /* 靠左对齐 */
        margin-top: 10px;
    }
    .footer-links { flex-wrap: wrap; }
    .footer-links li:not(:last-child)::after { display: none; } /* 移动端移除分隔符 */
    .footer-links li { margin-right: 15px; }
}
/* =========================================
   Breadcrumbs Styling (面包屑导航)
   ========================================= */
.zamini-breadcrumbs {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #888;
    margin-bottom: 12px; /* 与标题保持距离 */
    flex-wrap: wrap;
    line-height: 1.5;
}

/* 链接样式 */
.zamini-breadcrumbs .crumb-link {
    color: #666;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px; /* 图标和文字的间距 */
    transition: color 0.2s;
    font-weight: 500;
}

.zamini-breadcrumbs .crumb-link i {
    font-size: 14px;
    margin-top: -1px; /* 微调图标垂直对齐 */
}

.zamini-breadcrumbs .crumb-link:hover {
    color: var(--primary); /* 悬停变绿 */
}

/* 分隔符 */
.zamini-breadcrumbs .crumb-sep {
    margin: 0 6px;
    color: #ccc;
    display: flex;
    align-items: center;
}
.zamini-breadcrumbs .crumb-sep i { font-size: 14px; }

/* 当前页面 (末尾文字) */
.zamini-breadcrumbs .crumb-current {
    color: #999;
    /* 防止标题过长换行太难看，限制单行省略 */
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 移动端优化 */
@media (max-width: 600px) {
    .zamini-breadcrumbs .crumb-current {
        max-width: 150px; /* 手机端标题缩短显示 */
    }
}
/* =========================================
   Content Heading Styling (文章内标题美化)
   ========================================= */

/* H2 标题 - 强力强调风格 */
.entry-content h2 {
    position: relative;
    font-size: 20px;
    font-weight: 700;
    color: #2d3436;
    
    /* 核心样式：白底 + 左侧绿条 */
    background: #fff;
    padding: 14px 20px;       /* 内部留白 */
    margin: 40px 0 20px 0;    /* 上下间距 (上方留多点呼吸感) */
    
    border-left: 5px solid var(--primary); /* 使用主题绿 */
    border-radius: 0 4px 4px 0; /* 右侧圆角 */
    
    /* 增加卡片质感 */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); 
    border-bottom: 1px solid #f5f5f5; /* 底部微弱边框 */
    
    line-height: 1.4;
}

/* H3 标题 - 次级标题风格 (配套美化) */
.entry-content h3 {
    font-size: 17px;
    font-weight: 600;
    color: #444;
    
    margin: 25px 0 15px 0;
    padding: 8px 12px;
    
    /* 简约风格：浅灰背景 + 灰色左条 */
    background: #f9f9f9; 
    border-left: 4px solid #dcdcdc;
    border-radius: 2px;
    transition: all 0.2s;
}

/* H3 鼠标悬停时变色互动 */
.entry-content h3:hover {
    border-left-color: var(--primary);
    background: #f0fdfa; /* 极浅的绿色背景 */
    color: var(--primary);
}
/* =========================================
   Sticky Sidebar (侧边栏智能浮动 - 适配 Zamini Grid)
   ========================================= */

/* 1. 针对包裹层 .sidebar 设置粘性定位 */
.sidebar {
    /* 核心属性：粘性定位 */
    position: -webkit-sticky;
    position: sticky;
    
    /* 2. 顶部距离计算 */
    /* Header高度(72px) + 视觉呼吸间距(20px) = 92px */
    top: 92px;
    
    /* 3. [至关重要] Grid 布局修正 */
    /* 默认 Grid 会拉伸子元素高度，导致 sticky 无法滚动。
       align-self: start 让侧边栏高度“收缩”到内容本身的高度，从而拥有浮动空间 */
    align-self: start;
    
    /* 4. 防止内容过长溢出 (可选) */
    max-height: calc(100vh - 100px);
    overflow-y: auto; /* 如果侧边栏比屏幕还高，允许内部滚动 */
    
    /* 5. 隐藏侧边栏滚动条 (美观) */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE */
}

/* 隐藏 Webkit (Chrome/Safari) 滚动条 */
.sidebar::-webkit-scrollbar { 
    display: none; 
}

/* 6. 移动端处理：取消浮动，恢复默认流式布局 */
@media (max-width: 900px) {
    .sidebar {
        position: static;
        top: auto;
        width: 100%;
        margin-top: 30px; /* 移动端给上方一点间距 */
    }
}