/* ============================================================
   Xiabb Lab 墨绿皮肤 —— 基于 UinIO 定制层结构，色板整体替换
   主色 #44584a / 交互 #5f7666 / 浅 #d9e0d8 / hover #dfe6de / 代码底 #e6ece5
   ============================================================ */

/* ---- 根字号与背景壳（UinIO 同款手法） ---- */
html { font-size: 14px; }
.section {
    background: url("/images/background-sidebar.png") repeat;
}
.section .container { max-width: 1920px; }

/* ---- 卡片：纸纹背景 + 圆角 + 双层阴影 ---- */
.card .card-content,
.searchbox-body {
    background: url("/images/background-main.png") repeat #fff;
}
.card {
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05), 0 0 1px rgba(0, 0, 0, 0.1);
}
.card + .card { margin-top: 1.5rem; }

/* ---- 导航栏：墨绿通栏 ---- */
nav.navbar.navbar-main {
    background: #44584a;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.navbar-main .navbar-item, .navbar-main .navbar-link { color: #fff; }
.navbar-main .navbar-item:hover,
.navbar-main .navbar-item.is-active {
    background: #5f7666 !important;
    color: #272f32;
}

/* ---- 页脚 ---- */
.footer {
    background: #44584a;
    color: #fff;
}
.footer a { color: #fff; text-decoration: underline; }

/* ---- 文章卡片：居中标题 + 居中 meta + 胶囊阅读更多 ---- */
.article .title .link-muted, .article .title a { color: #44584a; }
.article .title .link-muted:hover { color: #44584a; font-weight: bolder; }
.article-meta { color: #7a7a7a; }
.article-more {
    display: block;
    width: 15rem;
    height: 3rem;
    margin: 0 auto;
    border-radius: 2rem;
    background: #5f7666;
    color: #fff;
    border-color: transparent;
}
.article-more:hover { background: #44584a; color: #fff; }

/* ---- 链接与选区 ---- */
.article .content a { color: #2a2f33; }
.article .content a:hover { color: #44584a; }
::selection { color: #fff; background: #5f7666; }

/* ---- 行内代码 / 引用 / 表格 ---- */
.article .content code {
    background: #e6ece5;
    border-radius: 0.3rem;
    padding: 0.1rem 0.4rem;
    color: #2a2f33;
}
.article .content blockquote {
    border-left: 0.5rem solid #5f7666;
    background: #f6f8f6;
}
.article .content tbody tr:hover { background: #dfe6de; }
.article .content table { border-color: #d9e0d8; }

/* ---- 代码块：monokai 底 ---- */
.highlight, .highlight pre { background: #272822 !important; }

/* ---- 侧栏 widget ---- */
.menu-label { color: #7a7a7a; letter-spacing: 0.1em; text-transform: uppercase; }
.widget .menu-list a { color: #2a2f33; }
.widget .menu-list a:hover {
    background: #5f7666;
    color: #fff;
}
.widget .tags .tag:first-child { background: #5f7666; color: #fff; }
.level-end .tag { background: #d9e0d8; }

/* ---- 分页 ---- */
.pagination .is-current { background: #44584a !important; border-color: #44584a; }
.pagination-link:hover { background: #d9e0d8; }

/* ---- TOC ---- */
#toc a.is-active {
    background: #dfe6de;
    font-weight: bold;
    color: #2a2f33;
}

/* ---- 搜索框头 ---- */
.searchbox-header { background: #5f7666; }

/* ---- Xiabb 修正项（UinIO 没有的优化） ---- */
/* 1) 正文行长上限，超宽屏可读性 */
.article .content { max-width: 75ch; margin: 0 auto; }
/* 2) 正文图片懒加载（配合 HTML 属性由 JS 注入，此处兜底样式） */
.article .content img { display: block; margin: 0 auto; }

/* ============================================================
   参考层补充（UinIO 定制层逐段对照后映射，选择器均已对照本地产物 DOM）
   映射：#8c634f→#44584a  #a38272→#5f7666  #e2d8d3→#d9e0d8
         #ded1c7→#dfe6de  #ebe4dd→#e6ece5；文字色/monokai 不变
   纹理指向自备文件（background-sidebar.png / background-main.png）
   ============================================================ */

/* ---- 壳层：横向裁剪 + 顶栏留白收紧 + 三栏弹性（宽屏主栏更宽，UinIO 同款比例） ---- */
body { overflow-x: clip; }
.section { padding-top: 1.35em; }
.section .container .columns .column-left {
    flex-grow: 1;
    flex-basis: 5%;
    flex-shrink: 1;
}
.section .container .columns .column-right {
    flex-grow: 1;
    flex-basis: 4%;
    flex-shrink: 1;
}
.section .container .columns .column-main {
    flex-grow: 1;
}

/* ---- 卡片内层圆角（UinIO 为 card-content 5px / card 4px 双层） ---- */
.card .card-content { border-radius: 5px; }

/* ---- 导航栏补充：90% 容器、大 logo、菜单字号、字体图标、呼吸灯搜索框 ---- */
nav.navbar.navbar-main .navbar-menu {
    background: #44584a;
}
nav.navbar.navbar-main .navbar-container {
    max-width: 90%;
}
nav.navbar.navbar-main .navbar-container .navbar-item {
    line-height: 1.3;
}
nav.navbar.navbar-main .navbar-container .navbar-brand a.navbar-logo {
    padding: 0 0.75rem !important;
    margin-right: 2vw;
}
/* UinIO 站长 logo 为 3rem 文字，本站为图片，等高替换 */
nav.navbar.navbar-main .navbar-container .navbar-brand a.navbar-logo img {
    height: 3rem;
    max-height: none;
}
nav.navbar.navbar-main .navbar-container .navbar-menu {
    font-size: 1.4rem;
}
nav.navbar.navbar-main .navbar-container .navbar-menu .navbar-start a {
    margin-right: 1rem;
}
/* 菜单字体图标（'fontawesome' 大小写不敏感匹配 CDN FontAwesome 的 "FontAwesome" 族） */
nav.navbar.navbar-main .navbar-container .navbar-menu .navbar-start a::before {
    font-family: 'fontawesome';
    margin-right: 0.5rem;
    font-size: 1.5rem;
}
nav.navbar.navbar-main .navbar-container .navbar-menu .navbar-start a:nth-child(1)::before { content: '\f015'; }
nav.navbar.navbar-main .navbar-container .navbar-menu .navbar-start a:nth-child(2)::before { content: '\f802'; }
nav.navbar.navbar-main .navbar-container .navbar-menu .navbar-start a:nth-child(3)::before { content: '\f03a'; }
nav.navbar.navbar-main .navbar-container .navbar-menu .navbar-start a:nth-child(4)::before { content: '\f02c'; }
/* 呼吸灯搜索按钮（白色脉冲边框，UinIO 标志性交互） */
nav.navbar.navbar-main .navbar-container .navbar-menu .navbar-end .search {
    height: 3rem;
    margin-top: 0.7rem;
    margin-left: 2rem;
    margin-right: 3rem;
    background: #44584a;
    font-size: 18px;
    line-height: 30px;
    font-weight: bold;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 10px;
    padding: 15px;
    animation: animated-border 1.5s infinite;
}
@keyframes animated-border {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    100% {
        box-shadow: 0 0 0 0.8rem rgba(255, 255, 255, 0);
    }
}

/* ---- 页脚补充：内边距与字号（本站页脚无 level-end 图标组，相关规则略） ---- */
.footer {
    padding: 2rem 2rem 2rem !important;
}
.footer .container .level-start * {
    font-size: 1.1rem !important;
}
.footer .container .level-start span {
    font-weight: bold;
}
.footer .container .level-start #busuanzi_container_site_uv {
    font-weight: normal;
    font-size: 1.2rem !important;
}
.footer .container .level-start #busuanzi_container_site_uv #busuanzi_value_site_uv {
    font-size: 1.4rem !important;
}

/* ---- 文章卡片补充：flex 纵向排序（DOM 中 meta 在前，靠 order 对调为标题在上） ---- */
.section .container .columns .column-main .article {
    display: flex;
    flex-direction: column;
    padding: 2rem;
}
.section .container .columns .column-main .article .title {
    order: 1;
    text-align: center !important;
    margin-bottom: 10px;
}
.section .container .columns .column-main .article .title .link-muted {
    font-size: 2.2rem;
    text-decoration: none;
}
.section .container .columns .column-main .article .article-meta {
    justify-content: center;
    order: 2;
}
.section .container .columns .column-main .article .article-meta .level-item a.link-muted {
    font-weight: bolder;
}
.section .container .columns .column-main .article .article-meta .level-item a.link-muted:hover {
    color: #44584a !important;
}
.section .container .columns .column-main .article .content {
    font-size: 16px;
    order: 3;
}
/* article-tags 必须显式排序，否则 flex 下会跳到最前 */
.section .container .columns .column-main .article .article-tags {
    order: 6;
}

/* ---- 正文排版补充 ---- */
.article .content h1,
.article .content h2,
.article .content h3,
.article .content h4,
.article .content h5,
.article .content h6 {
    font-weight: bolder !important;
}
.article .content strong { color: #2a2f33; }
.article .content a {
    text-decoration: underline;
    text-decoration-color: #2a2f33;
}
.article .content blockquote { padding: 1rem; }
.article .content hr { margin: 1rem 0; }
.article .content li ul,
.article .content li ol {
    margin-top: 0.3rem;
    margin-bottom: 0.5rem;
}

/* ---- 表格：全边框 + 表头灰底 + 斑马纹（UinIO 同款，色值映射） ---- */
.article .content table {
    margin: 0 0 1rem 0;
    border: 1px solid #d9e0d8;
}
.article .content table thead { background: #eee !important; }
.article .content table thead th { border-right: 1px solid #d9e0d8; }
.article .content table tbody td { border-right: 1px solid #d9e0d8; }
.article .content table tbody tr:nth-child(odd) { background: #fff !important; }
.article .content table tbody tr:nth-child(odd):hover { background: #dfe6de !important; }
.article .content table tbody tr:nth-child(even) { background: #eee !important; }
.article .content table tbody tr:nth-child(even):hover { background: #dfe6de !important; }

/* ---- 代码块与表格规则隔离（代码块保持 monokai 深底） ---- */
.article .content .highlight table {
    border: none;
    margin-bottom: 0;
}
.article .content .highlight table td { border: none; }
.article .content .highlight tbody tr,
.article .content .highlight tbody tr:hover { background: transparent !important; }

/* ---- 阅读更多补充：字号与行高（UinIO 数值，抵消 Bulma is-small） ---- */
.article .article-more {
    order: 4;
    line-height: 2.2rem;
    font-size: 1.1rem !important;
    background-color: #5f7666 !important;
}
.article .article-more:hover { background-color: #44584a !important; }

/* ---- 侧栏 widget 补充 ---- */
/* 链接/分类 widget 的徽标底色（UinIO .menu-list a .tag #e2d8d3 映射） */
.widget .menu-list a .tag { background: #d9e0d8; }
/* toc 子级菜单缩进 */
.widget .menu-list li ul { margin: 0.2em; }
/* profile 社交按钮（本站现有 RSS；品牌色保留 UinIO 原值） */
.section .container .columns [data-type='profile'] [title] {
    font-size: 1.8rem;
    border: 1px solid;
    margin: 0.31rem !important;
    padding: 1rem !important;
}
.section .container .columns [data-type='profile'] [title]:hover {
    background: #dfe6de;
    text-decoration: none !important;
}
.section .container .columns [data-type='profile'] [title='RSS'] { color: #ff6d2c; }
/* 头像圆形（UinIO 为 is-rounded 配置类，本站用 CSS 等效） */
.section .container .columns [data-type='profile'] .avatar { border-radius: 50%; }

/* ---- 灯箱（lightgallery 已启用）：纸纹底 + 白色控件 ---- */
.lg { background: url("/images/background-main.png") repeat #fff; }
.lg #lg-download { color: #fff !important; }
.lg .lg-close { color: #fff !important; }

/* ---- 滚动条与归档时间线收尾 ---- */
::-webkit-scrollbar { width: 1rem; }
.timeline .media:last-child:after { background: none; }

/* ---- 响应式（UinIO 断点同款，搜索/目录按钮浮动两角） ---- */
@media screen and (max-width: 1087px) {
    .navbar-item.search {
        opacity: 0.4;
        position: fixed;
        top: 0;
        right: 0;
        background: #44584a;
        margin: 0 !important;
        padding: 1.9rem 1rem !important;
        border: none !important;
        animation-play-state: paused !important;
        border-radius: 0 0 0 1rem !important;
    }
    .section {
        padding: 0.8rem 0 !important;
    }
    .section .column-left {
        padding: 0;
    }
    .section .column-main {
        padding-top: 0;
    }
    .section .card {
        margin-top: 0.8rem !important;
    }
    .section .column-right-shadow {
        margin-top: 0;
    }
}
@media screen and (max-width: 769px) {
    .navbar .navbar-container {
        max-width: 98% !important;
    }
    .navbar .navbar-item.navbar-logo {
        margin-right: 0 !important;
    }
    .navbar .navbar-item.catalogue {
        opacity: 0.4;
        position: fixed;
        top: 0;
        left: 0;
        background: #44584a;
        padding: 1rem !important;
        border-radius: 0 0 1rem 0;
    }
    .section .card {
        margin: 0.5rem 0 !important;
    }
    .section .card .article {
        padding: 1.5rem 0.5rem !important;
    }
}
