/*
Theme Name: Butterfly WP
Theme URI: https://timeseal.top
Author: timeseal
Description: 将 Hexo Butterfly 4.13 的模板层移植为 WordPress 主题，复用原有 CSS/JS，保持 1:1 外观。
Version: 1.0.0
Text Domain: butterfly-wp
*/

/* ===== WP 专用补充样式（原站没有的页面：归档/标签/分类/搜索/404/复制链接） ===== */

.page-title { color: #fff; text-align: center; font-size: 2rem; margin: 0; }
#page-info { display: flex; align-items: center; justify-content: center; padding: 0 20px; height: 100%; }

.archive-year { margin-bottom: 26px; }
.archive-year-title { font-size: 1.3rem; font-weight: 700; color: var(--btn-color, #49b1f5); margin-bottom: 10px; border-bottom: 1px dashed #ddd; padding-bottom: 6px; }
.archive-item { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 4px; border-radius: 6px; transition: background .2s; }
.archive-item:hover { background: rgba(73, 177, 245, .08); }
.archive-item-link { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-item-date { color: #999; font-size: .85rem; margin-left: 14px; }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-cloud-item { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 8px; background: rgba(73, 177, 245, .1); color: #49b1f5; transition: all .2s; }
.tag-cloud-item:hover { background: #49b1f5; color: #fff; }
.tag-count { font-size: .78rem; opacity: .75; }

.category-item { display: flex; justify-content: space-between; padding: 10px 6px; border-bottom: 1px dashed #eee; }
.category-item-link { font-weight: 600; }
.category-item-count { color: #999; }

.post-search-item { padding: 14px 6px; border-bottom: 1px dashed #eee; }
.post-search-title { font-size: 1.15rem; font-weight: 600; }
.post-search-meta { color: #888; font-size: .9rem; margin-top: 6px; }

.error-wrap { text-align: center; padding: 40px 0; }
.error-title { font-size: 5rem; font-weight: 800; color: #49b1f5; line-height: 1; }
.error-subtitle { color: #888; margin: 16px 0 26px; }
.error-btn { display: inline-block; margin: 0 6px; padding: 8px 22px; border-radius: 20px; background: #49b1f5; color: #fff !important; }

.bw-copy-link { cursor: pointer; display: inline-block; padding: 4px 12px; border-radius: 6px; background: rgba(73, 177, 245, .12); color: #49b1f5; font-size: .9rem; }
.bw-copy-link:hover { background: #49b1f5; color: #fff; }

#bw-search-form input[type=search] {
  width: 100%; padding: 12px 16px; border: 1px solid #ddd; border-radius: 8px;
  font-size: 1rem; outline: none; background: #fff;
}
.dark #bw-search-form input[type=search] { background: #2b2b2b; border-color: #444; color: #ddd; }

/* 修复分页多余空白方块（pangu 注入的 <pangu> 会被 .pagination > * 当成按钮） */
.pagination pangu, .pagination > pangu { display: none !important; }

/* WP 后台登录条在页面顶部时不遮挡 */
body.admin-bar #nav { top: 32px; }

/* ===== 首页卡片：移植后的稳定布局（封面在上，信息面板在下） ===== */
#recent-posts .recent-post-item { position: relative; height: 320px; }
#recent-posts .recent-post-content { display: block; height: 100%; }
#recent-posts .recent-post-cover { position: absolute; left: 0; right: 0; top: 0; bottom: 96px; }
#recent-posts .recent-post-cover img.article-cover { width: 100%; height: 100%; object-fit: cover; display: block; }
#recent-posts .recent-post-info {
  position: absolute; left: 0; right: 0; bottom: 0; height: 96px;
  padding: 10px 16px; align-items: flex-start; justify-content: flex-start;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(10px);
}
.dark #recent-posts .recent-post-info { background: rgba(30, 30, 30, .82); }
#recent-posts .recent-post-info .article-title { height: auto; justify-content: flex-start; }
#recent-posts .article-title-link { color: #333; font-size: .98rem; text-align: left; font-weight: 600; }
.dark #recent-posts .article-title-link { color: #eee; }
#recent-posts .article-meta-wrap,
#recent-posts .article-meta-label,
#recent-posts .post-meta-date-created,
#recent-posts .post-meta-date-updated,
#recent-posts .article-meta__categories { color: #777 !important; font-size: .74rem; }
.dark #recent-posts .article-meta-wrap,
.dark #recent-posts .article-meta-label,
.dark #recent-posts .post-meta-date-created,
.dark #recent-posts .post-meta-date-updated,
.dark #recent-posts .article-meta__categories { color: #aaa !important; }
#recent-posts .recent-post-arrow { display: none; }
#recent-posts .recent-post-item { background: transparent; }

/* 首页大标题 */
#page-header #site-info {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
#page-header #site-info .title-logo { font-size: 2.6rem; font-weight: 700; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
#page-header #site-subtitle { color: #fff; font-size: 1.15rem; text-shadow: 0 1px 6px rgba(0, 0, 0, .4); }

/* 顶部导航文字在浅色封面上的可读性 */
#nav .site-page, #blog-info .site-name { text-shadow: 0 1px 3px rgba(0,0,0,.45); }

