/* ============================================================
   1. 哔哩哔哩视频适配 (保持不动)
   ============================================================ */
.aspect-ratio {position: relative;width: 100%;height: 0;padding-bottom: 75%;margin: 3% auto;text-align: center;}      
.aspect-ratio iframe {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
}

/* ============================================================
/* /* ============================================================
   Butterfly 主题视觉增强：针对亮色背景的文字清晰度优化
   适用：导航栏、文章信息、版权区域
   ============================================================ */

/* --- 1. 顶部导航栏 (左上站点名 & 右上菜单) --- */
#nav #site-name, 
#nav .menus_items .menus_item a,
#nav #search-button, 
#nav .nav_authorInfo,
#nav #toggle-menu {
  color: #ffffff !important;
  /* 三层阴影：1px深色描边 + 扩散阴影 + 远端晕染，确保白底黑字分明 */
  text-shadow: 
    1px 1px 2px rgba(0, 0, 0, 0.8), 
    0 0 12px rgba(0, 0, 0, 0.5), 
    0 0 20px rgba(0, 0, 0, 0.3) !important;
}

/* --- 2. 文章页顶部标题区域 (左下文章元数据) --- */
/* 针对封面图上的标题、日期、分类、字数等信息 */
#site-info #site-title, 
#site-info #site-subtitle, 
#post-info #post-title,
#post-info #post-meta,
#post-info #post-meta a,
#post-info #post-meta .post-meta-separator {
  color: #ffffff !important;
  /* 强化阴影，防止文字融入亮色背景 */
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 0, 0, 0.5) !important;
}

/* 辅助遮罩：在文章页顶部加一层极淡的暗向渐变，从视觉上托出文字 */
#page-header.post-full .post-meta-white {
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 100%) !important;
  padding-bottom: 50px !important;
}

/* --- 3. 页脚与版权区域 (底部) --- */
/* 去除青色/灰色块，统一使用文字发光效果 */
#footer {
  background: transparent !important;
}

.copyright, .footer-separator, .icp, #footer #footer-wrap {
  color: #ffffff !important;
  background: none !important;
  font-weight: bold !important;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9), 0 0 5px rgba(0, 0, 0, 0.8) !important;
}

/* --- 4. 细节微调：社交图标与导航按钮 --- */
#nav .site-page i {
  text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5) !important;
}

/* ============================================================
   Butterfly 主题正文防复制选中样式调整
   目的：在启用防复制功能时，允许代码块内容被选中高亮显示
   ============================================================ */
/* --- 正文防御部分 --- */

/* 当 body 带有 copy-limit-active 类时，让正文选中的高亮“隐形” */
.copy-limit-active #article-container ::selection {
    background: transparent !important;
    color: inherit !important;
}

/* 兼容火狐 */
.copy-limit-active #article-container ::-moz-selection {
    background: transparent !important;
    color: inherit !important;
}

/* --- 代码块豁免部分 --- */

/* 强制恢复代码块内所有元素的选中可见性，不受父级 copy-limit-active 的影响 */
#article-container .highlight ::selection,
#article-container .highlight span ::selection,
#article-container figure.highlight ::selection {
    background: rgba(0, 100, 255, 0.3) !important; /* 这里用一个经典的半透明蓝色 */
    color: inherit !important;
}

/* 兼容火狐 */
#article-container .highlight ::-moz-selection,
#article-container .highlight span ::-moz-selection {
    background: rgba(0, 100, 255, 0.3) !important;
}