/* ============================================
   卢松松风格 emlog pro 主题 v0.3.2
   附加样式（关键布局已内联至header.php）
   ============================================ */

h1,h2,h3,h4,h5,h6{font-weight:600;line-height:1.4}

/* --- 页面标题区 --- */
.page-header{padding:16px 0;margin-bottom:16px;border-bottom:2px solid #c00}
.page-header h2{font-size:22px;color:#222}
.page-header p{color:#888;font-size:13px;margin-top:4px}

/* --- 文章列表（卢松松纯文字风格） --- */
.log-list{display:flex;flex-direction:column}
.log-item{padding:24px 0;border-bottom:1px solid #f0f0f0}
.log-title{font-size:26px;font-weight:700;margin-bottom:10px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;line-height:1.4}
.log-title a{color:#222}
.log-title a:hover{color:#c00}
.top-flag{display:inline-block;background:#c00;color:#fff;font-size:12px;padding:3px 10px;border-radius:2px;font-weight:normal;vertical-align:middle}
.edit-link{font-size:12px;color:#999;font-weight:normal}
.log-excerpt{color:#666;font-size:15px;line-height:1.7;margin-bottom:12px;text-align:justify;text-justify:inter-ideograph;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.log-meta{font-size:13px;color:#999;display:flex;flex-wrap:wrap;align-items:center}
.log-meta span{white-space:nowrap}
.log-meta a{color:#999}
.log-meta a:hover{color:#c00}
.no-logs{padding:60px 20px;text-align:center;color:#999}

/* --- 分页 --- */
.pagination{margin-top:28px;text-align:center}
.pagination a,.pagination span{display:inline-block;padding:7px 14px;margin:0 3px;border:1px solid #e0e0e0;border-radius:2px;font-size:14px;color:#555;transition:all .2s}
.pagination a:hover{border-color:#c00;color:#c00}
.pagination .page-current,.pagination span:not(.pageprev):not(.pagenext){background:#c00;border-color:#c00;color:#fff}

/* --- 文章详情 --- */
.log-detail-wrap{max-width:960px}
.log-detail{padding-bottom:20px}
.log-detail-title{font-size:26px;color:#222;margin-bottom:14px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;line-height:1.4}
.log-detail-meta{display:flex;flex-wrap:wrap;gap:18px;font-size:13px;color:#999;padding-bottom:16px;border-bottom:1px solid #eee;margin-bottom:22px}
.log-detail-meta a{color:#999}
.log-detail-meta a:hover{color:#c00}
.log-detail-cover{margin-bottom:22px;border-radius:3px;overflow:hidden}
.log-detail-content{font-size:15.5px;line-height:1.9;color:#333}
.log-detail-content p{margin-bottom:16px}
.log-detail-content h2,.log-detail-content h3,.log-detail-content h4{margin:24px 0 14px;color:#222}
.log-detail-content h2{font-size:21px;border-left:4px solid #c00;padding-left:12px}
.log-detail-content h3{font-size:18px}
.log-detail-content img{margin:16px auto;border-radius:3px}
.log-detail-content blockquote{border-left:4px solid #c00;background:#fafafa;padding:12px 18px;margin:16px 0;color:#666;border-radius:0 3px 3px 0}
.log-detail-content pre{background:#2d2d2d;color:#f8f8f2;padding:16px;border-radius:3px;overflow-x:auto;margin:16px 0;font-size:13.5px;line-height:1.6}
.log-detail-content code{background:#f4f4f4;padding:2px 6px;border-radius:2px;font-size:13.5px;color:#c00}
.log-detail-content pre code{background:none;padding:0;color:inherit}
.log-detail-content table{width:100%;border-collapse:collapse;margin:16px 0}
.log-detail-content th,.log-detail-content td{border:1px solid #e0e0e0;padding:8px 12px;text-align:left}
.log-detail-content th{background:#f8f8f8}
.log-detail-content ul,.log-detail-content ol{margin:12px 0 12px 24px}
.log-detail-content ul li{list-style:disc;margin-bottom:6px}
.log-detail-content ol li{list-style:decimal;margin-bottom:6px}
.log-detail-content a{color:#c00;border-bottom:1px dotted #c00}

/* 文章标签 */
.log-tags{margin-top:28px;padding-top:18px;border-top:1px solid #eee;display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.tags-label{color:#888;font-size:13px}
.log-tags a{display:inline-block;padding:4px 12px;background:#f5f5f5;border-radius:2px;font-size:12.5px;color:#666;transition:all .2s}
.log-tags a:hover{background:#c00;color:#fff}

/* 上下篇导航 */
.log-nav{display:flex;gap:16px;margin-top:28px;padding-top:20px;border-top:1px solid #eee}
.log-nav a,.log-nav span{flex:1;padding:14px 18px;background:#fafafa;border-radius:3px;display:flex;flex-direction:column;gap:4px;transition:background .2s}
.log-nav a:hover{background:#f0f0f0}
.log-nav .next-log{text-align:right;align-items:flex-end}
.nav-label{font-size:12px;color:#999}
.nav-title{font-size:14px;color:#333;font-weight:500}
.log-nav a:hover .nav-title{color:#c00}
.log-nav .disabled{opacity:.5;cursor:default}
/* 标准neighbor_log输出兼容 */
.prev_next{display:flex;gap:16px;margin-top:28px;padding-top:20px;border-top:1px solid #eee}
.prev_next .prev,.prev_next .next{flex:1;padding:14px 18px;background:#fafafa;border-radius:3px}
.prev_next .prev a,.prev_next .next a{display:block;font-size:14px;color:#333}
.prev_next .prev a:hover,.prev_next .next a:hover{color:#c00}
.prev_next .next{text-align:right}

/* --- 评论区 --- */
.comment-section{margin-top:24px;padding-top:24px;border-top:2px solid #f0f0f0}
.comment-section-title{font-size:18px;color:#222;margin-bottom:20px;padding-bottom:10px;border-bottom:2px solid #c00;display:inline-block}
.no-comment{text-align:center;padding:30px;color:#999;background:#fafafa;border-radius:3px;margin-bottom:20px}
.comment-list{display:flex;flex-direction:column;gap:18px;margin-bottom:24px}
.comment-item{display:flex;gap:14px;padding-bottom:18px;border-bottom:1px solid #f0f0f0}
.comment-item:last-child{border-bottom:none;padding-bottom:0}
.comment-avatar{flex-shrink:0;width:42px;height:42px;border-radius:50%;background:linear-gradient(135deg,#c00,#8b0000);color:#fff;display:flex;align-items:center;justify-content:center;font-size:18px;font-weight:600}
.comment-body{flex:1;min-width:0}
.comment-head{display:flex;align-items:center;gap:12px;margin-bottom:6px}
.comment-author{font-weight:600;color:#c00;font-size:14px}
.comment-time{font-size:12px;color:#aaa}
.comment-del{font-size:12px;color:#999;margin-left:auto}
.comment-del:hover{color:#c00}
.comment-content{font-size:14px;color:#444;line-height:1.7;word-break:break-word}
.comment-form-wrap{margin-top:20px}
.comment-form-title{font-size:16px;margin-bottom:14px;color:#222}
.comment-form-row{display:flex;gap:10px;margin-bottom:12px}
.comment-form-row input{flex:1;padding:10px 14px;border:1px solid #ddd;border-radius:3px;font-size:14px;outline:none;transition:border-color .2s}
.comment-form-row input:focus{border-color:#c00}
.comment-form-wrap textarea{width:100%;min-height:100px;padding:12px 14px;border:1px solid #ddd;border-radius:3px;font-size:14px;resize:vertical;outline:none;font-family:inherit;transition:border-color .2s;margin-bottom:12px}
.comment-form-wrap textarea:focus{border-color:#c00}
.btn-submit-comment{background:#c00;color:#fff;border:none;padding:10px 28px;border-radius:3px;font-size:14px;cursor:pointer;transition:background .2s}
.btn-submit-comment:hover{background:#a00}

/* --- 页脚 --- */
.site-footer{background:#fff;border-top:1px solid #e8e8e8;color:#999;padding:30px 20px 24px;text-align:center;font-size:13px;margin-top:20px}
.site-footer p{margin-bottom:6px;line-height:1.8}
.site-footer a{color:#888;transition:color .2s}
.site-footer a:hover{color:#c00}
.footer-links{display:flex;justify-content:center;flex-wrap:wrap;gap:8px 16px;margin-bottom:16px;padding-bottom:16px;border-bottom:1px solid #f0f0f0}
.footer-links a{display:inline-block;padding:4px 12px;background:#f7f7f7;border-radius:2px;font-size:12.5px;color:#666}
.footer-links a:hover{background:#c00;color:#fff}
.footer-info p{margin-bottom:4px}
.footer-custom{color:#aaa;font-size:12.5px}
.footer-powered{color:#bbb;font-size:12px;margin-top:8px!important}
.footer-powered a{color:#999}
.footer-custom-content{font-size:13px;line-height:1.8;color:#888}
.footer-custom-content p{margin-bottom:6px}

/* --- 返回顶部 --- */
#back-to-top{position:fixed;right:24px;bottom:60px;width:44px;height:44px;background:#c00;color:#fff;text-align:center;line-height:44px;border-radius:3px;font-size:20px;opacity:0;visibility:hidden;transition:all .3s;z-index:99;box-shadow:0 2px 8px rgba(0,0,0,.2)}
#back-to-top.show{opacity:1;visibility:visible}
#back-to-top:hover{background:#a00}

/* --- 404页面 --- */
.error-page{padding:80px 30px;text-align:center}
.error-code{font-size:96px;font-weight:800;color:#c00;line-height:1;margin-bottom:16px}
.error-page h2{font-size:22px;color:#333;margin-bottom:10px}
.error-page p{color:#888;margin-bottom:24px}
.error-actions{display:flex;justify-content:center;gap:14px;margin-bottom:28px}
.btn-primary,.btn-secondary{display:inline-block;padding:10px 26px;border-radius:3px;font-size:14px;transition:all .2s}
.btn-primary{background:#c00;color:#fff}
.btn-primary:hover{background:#a00;color:#fff}
.btn-secondary{background:#f0f0f0;color:#555}
.btn-secondary:hover{background:#e0e0e0;color:#333}
.error-search form{display:flex;max-width:400px;margin:0 auto;gap:8px}
.error-search input{flex:1;padding:10px 14px;border:1px solid #ddd;border-radius:3px;outline:none}
.error-search input:focus{border-color:#c00}
.error-search button{background:#c00;color:#fff;border:none;padding:10px 20px;border-radius:3px;cursor:pointer}

/* --- 移动端补充 --- */
@media(max-width:600px){
  .log-title{font-size:21px}
  .log-detail-title{font-size:21px}
  .comment-form-row{flex-direction:column}
  .log-nav{flex-direction:column}
  .log-nav .next-log{text-align:left;align-items:flex-start}
  .error-code{font-size:64px}
  .content-inner{padding:70px 16px 30px}
}

/* ============================================
   两栏布局：主内容 + 右侧边栏
   ============================================ */
.content-wrap{display:flex;gap:20px;align-items:flex-start}
.main-col{flex:1;min-width:0;max-width:780px;background:#fff;padding:24px 28px 30px;border-radius:2px}
.right-sidebar{width:300px;flex-shrink:0;display:flex;flex-direction:column;gap:16px}

/* --- 小工具通用样式 --- */
.right-sidebar .widget,
.right-sidebar .side-box,
.right-sidebar > div,
.right-sidebar > ul{background:#fff;border-radius:2px;overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,.05)}
.right-sidebar .widget-title,
.right-sidebar .side-title,
.right-sidebar h3,
.right-sidebar h2{font-size:15px;font-weight:600;color:#222;padding:12px 16px;border-bottom:2px solid #c00;margin:0;background:#fafafa}
.right-sidebar .widget-content,
.right-sidebar .widget ul,
.right-sidebar ul{padding:10px 16px;margin:0;list-style:none}
.right-sidebar .widget-content li,
.right-sidebar ul li{padding:8px 0;border-bottom:1px dashed #eee;font-size:13.5px;line-height:1.5}
.right-sidebar .widget-content li:last-child,
.right-sidebar ul li:last-child{border-bottom:none}
.right-sidebar .widget-content li a,
.right-sidebar ul li a{color:#555;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.right-sidebar .widget-content li a:hover,
.right-sidebar ul li a:hover{color:#c00}

/* 搜索小工具 */
.right-sidebar .widget_search form,
.right-sidebar .search form{display:flex;padding:12px}
.right-sidebar .widget_search input,
.right-sidebar .search input{flex:1;padding:8px 12px;border:1px solid #ddd;border-right:none;border-radius:3px 0 0 3px;font-size:13px;outline:none;min-width:0}
.right-sidebar .widget_search input:focus,
.right-sidebar .search input:focus{border-color:#c00}
.right-sidebar .widget_search button,
.right-sidebar .search button{background:#c00;color:#fff;border:none;padding:8px 16px;border-radius:0 3px 3px 0;font-size:13px;cursor:pointer;white-space:nowrap}
.right-sidebar .widget_search button:hover,
.right-sidebar .search button:hover{background:#a00}

/* 标签云 */
.right-sidebar .widget_tag .widget-content,
.right-sidebar .widget_tags .widget-content,
.right-sidebar .tag-cloud{display:flex;flex-wrap:wrap;gap:6px;padding:12px}
.right-sidebar .widget_tag a,
.right-sidebar .widget_tags a,
.right-sidebar .tag-cloud a{display:inline-block;padding:4px 10px;background:#f5f5f5;border-radius:2px;font-size:12.5px;color:#666}
.right-sidebar .widget_tag a:hover,
.right-sidebar .widget_tags a:hover,
.right-sidebar .tag-cloud a:hover{background:#c00;color:#fff}

/* 日历 */
.right-sidebar .widget_calendar table{width:100%;border-collapse:collapse;font-size:12px}
.right-sidebar .widget_calendar th,
.right-sidebar .widget_calendar td{text-align:center;padding:5px 2px;border:1px solid #f0f0f0}
.right-sidebar .widget_calendar th{background:#fafafa;font-weight:600;color:#666}
.right-sidebar .widget_calendar td a{color:#c00;font-weight:600}

/* 链接/友链 */
.right-sidebar .widget_link ul,
.right-sidebar .widget_links ul{display:flex;flex-wrap:wrap;gap:8px}
.right-sidebar .widget_link li,
.right-sidebar .widget_links li{border:none!important;padding:0!important}
.right-sidebar .widget_link li a,
.right-sidebar .widget_links li a{background:#f5f5f5;padding:5px 12px;border-radius:2px;font-size:12.5px;white-space:normal!important}

/* 自定义小工具：搜索 */
.right-sidebar .widget-search form{display:flex;padding:12px}
.right-sidebar .widget-search input{flex:1;padding:8px 12px;border:1px solid #ddd;border-right:none;border-radius:3px 0 0 3px;font-size:13px;outline:none;min-width:0}
.right-sidebar .widget-search input:focus{border-color:#c00}
.right-sidebar .widget-search button{background:#c00;color:#fff;border:none;padding:8px 16px;border-radius:0 3px 3px 0;font-size:13px;cursor:pointer;white-space:nowrap}
.right-sidebar .widget-search button:hover{background:#a00}

/* 自定义小工具：热门文章 序号+标题同行 */
.right-sidebar .widget-hotlogs li{display:flex;align-items:center;gap:10px;padding:8px 0}
.right-sidebar .widget-hotlogs .hot-num{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;background:#f0f0f0;color:#888;font-size:13px;font-weight:600;border-radius:2px;flex-shrink:0}
.right-sidebar .widget-hotlogs .hot-num.top3{background:#c00;color:#fff}
.right-sidebar .widget-hotlogs li a{display:inline!important;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#555}
.right-sidebar .widget-hotlogs li a:hover{color:#c00}

/* 自定义小工具：分类/归档 名称+数量同行 */
.right-sidebar .widget-sort li,
.right-sidebar .widget-record li{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 0}
.right-sidebar .widget-sort li a,
.right-sidebar .widget-record li a{display:inline!important;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#555}
.right-sidebar .widget-sort li a:hover,
.right-sidebar .widget-record li a:hover{color:#c00}
.right-sidebar .widget-sort .count,
.right-sidebar .widget-record .count{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:20px;padding:0 6px;background:#f0f0f0;color:#999;font-size:12px;border-radius:10px;flex-shrink:0}

/* 自定义小工具：日历 */
.right-sidebar .widget-calendar table{width:100%;border-collapse:collapse;font-size:12px}
.right-sidebar .widget-calendar th,
.right-sidebar .widget-calendar td{text-align:center;padding:5px 2px;border:1px solid #f0f0f0}
.right-sidebar .widget-calendar th{background:#fafafa;font-weight:600;color:#666}
.right-sidebar .widget-calendar td.today{background:#c00;color:#fff;font-weight:600;border-radius:2px}

/* 自定义小工具：微语 */
.right-sidebar .widget-twitter li{padding:10px 0;border-bottom:1px dashed #eee}
.right-sidebar .widget-twitter li:last-child{border-bottom:none}
.right-sidebar .widget-twitter .twitter-content{font-size:13px;color:#555;line-height:1.6;margin-bottom:4px}
.right-sidebar .widget-twitter .twitter-date{font-size:11.5px;color:#bbb}

/* 自定义小工具：链接 */
.right-sidebar .widget-link li{padding:6px 0}
.right-sidebar .widget-link li a{color:#555;font-size:13.5px}
.right-sidebar .widget-link li a:hover{color:#c00}

/* 响应式：平板侧边栏下移 */
@media(max-width:960px){
  .content-wrap{flex-direction:column}
  .main-col{max-width:100%;width:100%}
  .right-sidebar{width:100%}
}

/* 响应式：手机端隐藏右侧边栏 */
@media(max-width:768px){
  .right-sidebar{display:none!important}
  .content-wrap{gap:0}
}
