@import url("../fonts/alimama/result.css");

:root,
[data-bs-theme=light] {
    --bs-font-sans-serif: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif;
    --bg-auto-rgb: 242, 241, 246;
    --link-color-rgba: 0, 0, 0, 1;
    --link-color-second-rgba: 0, 0, 0, .65;
    --primary-color-rgba: var(--color-primary);
    --primary-bg-rgba: var(--color-primary-bg);
}

[data-bs-theme=dark] {
    --bg-auto-rgb: 10, 12, 25;
    --link-color-rgba: 222, 226, 230, 0.8;
    --link-color-second-rgba: 222, 226, 230, .65;
}

html[data-font="alimama"] {
    --bs-font-sans-serif: "Alimama FangYuanTi VF", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html[data-hue="blue"] {
    --color-primary: 13, 110, 253;
    --color-primary-bg: 13, 110, 253, 0.12;
}

html[data-hue="green"] {
    --color-primary: 22, 163, 74;
    --color-primary-bg: 22, 163, 74, 0.12;
}

html[data-hue="orange"] {
    --color-primary: 234, 124, 28;
    --color-primary-bg: 234, 124, 28, 0.12;
}

html[data-hue="purple"] {
    --color-primary: 124, 58, 237;
    --color-primary-bg: 124, 58, 237, 0.12;
}

html[data-hue="teal"] {
    --color-primary: 13, 148, 136;
    --color-primary-bg: 13, 148, 136, 0.12;
}

html[data-hue="red"] {
    --color-primary: 220, 38, 38;
    --color-primary-bg: 220, 38, 38, 0.12;
}

html {
    scroll-padding-top: 120px;
}

*,
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-display: swap;
}

a {
    text-decoration: none;
    color: rgba(var(--link-color-rgba));
    transition: .15s all ease-in-out;
}

a:hover,
a:focus,
a:focus-visible {
    text-decoration: none;
    color: rgba(var(--primary-color-rgba));
}

.break-all {
    word-break: break-all;
}

.bg-auto {
    --bg-auto-opacity: 1;
    background-color: rgba(var(--bg-auto-rgb), var(--bg-auto-opacity)) !important;
}

#left {
    height: 100vh;
    min-height: 100vh;
    z-index: 1030;
    background-color: var(--bs-tertiary-bg) !important;
    overflow: visible;
}

#left-nav {
    flex: 1 1 auto;
    scrollbar-color: rgba(var(--link-color-rgba), .18) transparent;
}


/* ===== 导航项 ===== */
#left .nav-item {
    position: relative;
}

#left .nav-link {
    width: 3.125rem;
    min-height: 3.125rem;
    height: auto;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: .18rem .78rem;
    background: transparent;
    border: 0;
    color: rgba(var(--link-color-second-rgba));
    font-size: .8125rem;
    line-height: 1.4;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-direction: column;
    justify-content: center;
    transition: all .15s ease-in-out;
}

#left .nav-link i {
    font-size: 1.125rem;
    flex: 0 0 auto;
}

#left .nav-link span {
    display: block;
    position: static;
    padding: 0;
    font-size: .8125rem;
    line-height: 1.2;
    letter-spacing: normal;
    white-space: nowrap;
}

#left .nav-link:hover,
#left .nav-item.active .nav-link {
    background: rgba(var(--primary-color-rgba), 1);
    color: rgb(255, 255, 255);
    box-shadow: 0 4px 18px rgba(var(--primary-color-rgba), 0.25);
}

/* ===== 左侧右上角LOGO ===== */
#left-nav .navbar-brand {
    width: 48px;
    height: 48px;
    min-height: 48px;
    font-size: 0;
}

#left .navbar-brand:hover {
    background: transparent;
    color: rgb(255, 255, 255);
    box-shadow: none;
}

#left .brand-icon {
    width: 48px;
    height: 48px;
    background: rgba(var(--primary-color-rgba), 1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgb(255, 255, 255);
    font-size: 26px;
    font-weight: 700;
    border-radius: var(--bs-border-radius);
    box-shadow: 0 4px 18px rgba(var(--primary-color-rgba), 0.25);
}

/* 移动端 logo 首字母 */
.brand-letter {
    width: 30px;
    height: 30px;
    min-width: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-color-rgba), 1);
    color: rgb(255, 255, 255);
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--bs-border-radius);
    flex-shrink: 0;
}

#left-nav .img-fluid {
    max-width: 100%;
    max-height: 48px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ===== 二级菜单 ===== */
#left-nav .category-arrow {
    margin-left: auto;
    position: absolute;
    bottom: 4px;
    right: 13px;
    font-size: .65rem !important;
}

#left-nav .category-submenu {
    position: fixed;
    z-index: 1060;
    top: 0;
    left: 0;
    width: 200px;
    padding: 8px;
    margin: 0;
    list-style: none;
    visibility: hidden;
    opacity: 0;
    transform: translateX(-8px);
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(31, 45, 61, .16);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

#left-nav .category-menu.is-open .category-submenu {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

#left-nav .category-menu.is-open>.category-trigger {
    background: rgba(var(--primary-bg-rgba));
    color: rgba(var(--primary-color-rgba));
}

#left-nav .category-submenu-title {
    padding: 6px 10px 8px;
    color: var(--bs-secondary-color);
    font-size: 12px;
    font-weight: 600;
}

#left-nav .category-link {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 5px;
    padding: 9px 10px;
    color: var(--bs-body-color);
    font-size: .875rem;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#left-nav .category-link:hover,
#left-nav .category-link.active {
    color: rgba(var(--primary-color-rgba));
    background: rgba(var(--primary-bg-rgba));
}

#middle .navbar-background {
    backdrop-filter: blur(6px);
}

#middle #form-search-icon {
    color: rgba(var(--link-color-second-rgba));
}

#middle #form-search-icon:hover {
    background: rgba(var(--primary-bg-rgba));
    color: rgba(var(--primary-color-rgba));
}

#middle #search-input,
#middle #search-input-mobile {
    width: 0;
    transition: all .25s ease-in-out;
    background: rgba(0, 0, 0, 0);
}

#middle #search-input:focus,
#middle #search-input:focus-visible {
    outline: none;
    width: 150px;
}

#middle .post-card-body {
    z-index: 1;
    flex-direction: column;
    justify-content: center;
    width: 75%;
    min-height: 130px;
    display: flex;
    position: relative;
}

#middle .thumbnail {
    inset-inline-end: 0;
    object-fit: cover;
    object-position: center;
    opacity: .8;
    pointer-events: none;
    z-index: 0;
    width: calc(25% + 2em);
    height: 100%;
    transition: opacity .3s, transform .3s;
    display: block;
    position: absolute;
    top: 0;
    -webkit-mask-image: linear-gradient(90deg, #0000 0, #000 40px);
    mask-image: linear-gradient(90deg, #0000 0, #000 40px)
}

#middle .link-primary,
#right .link-primary {
    color: rgba(var(--primary-color-rgba)) !important;
}

#middle .top-up-flag,
#middle .read-more {
    color: rgba(var(--primary-color-rgba));
}

#middle .moment-body {
    background: rgba(var(--primary-bg-rgba));
}

#content img {
    display: block;
    max-width: 100%;
    height: auto;
}

#pagination a,
#pagination span,
.sub-category a {
    position: relative;
    display: block;
    padding: var(--bs-pagination-padding-y) var(--bs-pagination-padding-x);
    font-size: var(--bs-pagination-font-size);
    color: rgba(var(--link-color-second-rgba)) !important;
    border: 1px solid var(--bs-border-color);
    text-decoration: none;
    background-color: rgb(var(--bg-auto-rgb));
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
    border-radius: var(--bs-border-radius) !important;
}

#pagination .current a,
#pagination span,
#pagination a:hover,
.sub-category a:hover {
    z-index: 3;
    background: rgba(var(--primary-bg-rgba));
    color: rgba(var(--primary-color-rgba)) !important;
    border-color: rgba(var(--primary-color-rgba), .28);
}

#post-article a {
    color: rgba(var(--link-color-rgba));
}

#post-article a:hover {
    color: rgba(var(--primary-color-rgba));
}

#post-content a {
    color: rgba(var(--primary-color-rgba));
    box-shadow: 0 -6px 0 0 rgba(var(--primary-bg-rgba)) inset;
    transition: box-shadow 0.2s ease-in;
}

#post-content a:hover {
    color: rgba(var(--primary-color-rgba));
    box-shadow: 0 -10px 0 0 rgba(var(--primary-bg-rgba)) inset;
    transition: box-shadow 0.2s ease-in;
}


#post-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
}

#post-content .tags {
    display: flex;
}

#post-content .tags a {
    color: RGBA(var(--bs-secondary-rgb), var(--bs-link-opacity, 1)) !important;
}

#post-content blockquote,
.text-border-left {
    --bs-text-opacity: 1;
    color: rgba(var(--link-color-second-rgba)) !important;
    border-left: 4px solid rgba(var(--link-color-second-rgba));
    font-weight: 400;
    letter-spacing: 0.01rem;
    padding-left: 10px;
}

#post-content blockquote p:last-child {
    margin-bottom: 0;
}

#post-content .table-group-divider {
    border-top: calc(var(--bs-border-width) * 1) solid currentcolor;
}

.form-control,
button {
    box-shadow: none !important;
}

.form-control:focus {
    border-color: rgba(var(--primary-color-rgba)) !important;
}

.input-group:focus .form-control {
    border-color: rgba(var(--primary-color-rgba)) !important;
}

.avatar {
    border-radius: var(--bs-border-radius) !important;
}

/* ==================== 评论系统 ==================== */
#comments {
    font-size: .9375rem;
}

#comments .avatar {
    border-radius: 50% !important;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(var(--primary-bg-rgba)), 0 2px 8px rgba(var(--primary-color-rgba), .12);
    transition: box-shadow .18s ease-in-out;
}

#comments a {
    color: rgba(var(--link-color-rgba));
}

#comments a:hover {
    color: rgba(var(--primary-color-rgba));
}

/* 顶级评论 */
#comments .comment-parent {
    border-bottom: 1px solid rgba(var(--link-color-rgba), .07);
    transition: background-color .18s ease-in-out;
}

#comments .comment-parent:last-child {
    border-bottom: 0;
}

#comments .comment-row:hover .avatar {
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgba), .35), 0 2px 8px rgba(var(--primary-color-rgba), .18);
}

/* 评论头部 */
#comments .comment-head {
    min-height: 1.5rem;
}

#comments .comment-meta {
    line-height: 1.4;
    min-width: 0;
}

#comments .author-name {
    font-weight: 600;
    font-size: .9375rem;
    color: rgba(var(--link-color-rgba));
}

#comments .comment-time {
    font-size: .8125rem;
    white-space: nowrap;
}

/* 回复按钮 */
#comments .reply-link {
    display: inline-flex;
    align-items: center;
    column-gap: .25rem;
    font-size: .8125rem;
    line-height: 1.5;
    color: rgba(var(--link-color-second-rgba)) !important;
    padding: .2rem .55rem;
    border-radius: 999px;
    background: transparent;
    border: 0;
    transition: all .18s ease-in-out;
}

#comments .reply-link:hover {
    background: rgba(var(--primary-bg-rgba));
    color: rgba(var(--primary-color-rgba)) !important;
}

/* 子评论树状缩进 */
#comments .comment-children {
    position: relative;
    margin-left: 1.15rem;
    padding-left: 1.15rem;
    border-left: 2px solid rgba(var(--primary-color-rgba), .12);
}

#comments .comment-child {
    border-top: 1px dashed rgba(var(--link-color-rgba), .08);
    margin-top: .35rem;
    padding-top: .35rem;
}

/* 评论内容 */
#comments .comment-content {
    font-size: .9375rem;
    line-height: 1.75;
    color: rgba(var(--link-color-second-rgba));
    overflow-wrap: anywhere;
}

#comments .comment-content p {
    margin-bottom: 0;
}

/* @提及高亮 */
#comments .comment-mention {
    color: rgba(var(--primary-color-rgba));
    font-weight: 500;
    background: rgba(var(--primary-bg-rgba), .35);
    border-radius: .25rem;
    padding: 0 .2rem;
    white-space: nowrap;
}

/* 回复提示条 */
.comment-reply-tip {
    display: none;
    align-items: center;
    column-gap: .5rem;
    padding: .5rem .75rem;
    margin-bottom: .75rem;
    background: rgba(var(--primary-bg-rgba));
    border: 1px solid rgba(var(--primary-color-rgba), .28);
    border-radius: var(--bs-border-radius);
    font-size: .875rem;
    color: rgba(var(--primary-color-rgba));
    animation: reply-tip-in .2s ease-in-out;
}

.comment-reply-tip i {
    font-size: 1rem;
}

.comment-reply-tip .comment-reply-tip-text {
    flex: 1 1 auto;
    font-weight: 500;
}

.comment-reply-tip a {
    display: inline-flex;
    align-items: center;
    column-gap: .2rem;
    font-size: .8125rem;
    color: rgba(var(--primary-color-rgba)) !important;
    padding: .15rem .5rem;
    border-radius: 999px;
    transition: all .15s ease-in-out;
}

.comment-reply-tip a:hover {
    background: rgba(var(--primary-color-rgba), .12);
}

@keyframes reply-tip-in {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cancel-comment-reply {
    display: flex;
    align-items: center;
}

.cancel-comment-reply a {
    display: inline-flex;
    align-items: center;
    column-gap: .25rem;
    padding: .55rem .9rem;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    line-height: 1.5;
    border-radius: .375rem;
}

#comments input#comment_submit,
.cancel-comment-reply a {
    background: rgba(var(--primary-bg-rgba));
    color: rgba(var(--primary-color-rgba)) !important;
    border: 0;
}

#comments input#comment_submit:hover,
.cancel-comment-reply a:hover {
    background: rgba(var(--primary-bg-rgba));
    color: rgba(var(--primary-color-rgba));
    border: 0;
}

#right a,
.foot,
.foot a {
    font-size: .9375rem;
    color: rgba(var(--link-color-second-rgba));
}

#right a:hover,
.foot a:hover {
    color: rgba(var(--primary-color-rgba));
}

#mobile-navbar button {
    background: rgba(var(--primary-bg-rgba));
    color: rgba(var(--primary-color-rgba));
}

#post-content h1,
#post-content h2,
#post-content h3 {
    display: inline-block;
    box-shadow: 0 -10px 0 0 rgba(var(--primary-bg-rgba)) inset;
    padding: 0 3px;
    font-size: calc(1.275rem + .3vw) !important
}

@media (min-width: 1400px) {

    .container,
    .container-lg,
    .container-md,
    .container-sm,
    .container-xl,
    .container-xxl {
        max-width: 1200px;
    }

    #post-content h1,
    #post-content h2,
    #post-content h3 {
        font-size: 1.5rem !important;
    }
}

/* ==================== 布局切换（双栏/三栏） ==================== */
@media (min-width: 992px) {
    html[data-layout="2"] #right {
        display: none !important;
    }
}

.layout-toggle {
    color: rgba(var(--link-color-second-rgba));
    transition: all .15s ease-in-out;
}

.layout-toggle:hover,
.layout-toggle:focus-visible {
    background: rgba(var(--primary-bg-rgba));
    color: rgba(var(--primary-color-rgba));
}

/* ==================== 移动端导航：二级菜单 ==================== */
#mobile-navbar .mobile-nav-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    column-gap: .5rem;
}

#mobile-navbar .mobile-nav-link {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#mobile-navbar .mobile-sub-toggle {
    background: none !important;
    border: 0;
    color: rgba(var(--link-color-second-rgba)) !important;
    padding: .25rem .5rem;
    line-height: 1;
    flex: 0 0 auto;
}

#mobile-navbar .mobile-sub-toggle i {
    display: inline-block;
    font-size: 1rem;
    transition: transform .2s ease-in-out;
}

#mobile-navbar .mobile-sub-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

#mobile-navbar .submenu-wrap {
    background: rgba(var(--bg-auto-rgb), .55);
    border: 0;
    padding: 0;
}

#mobile-navbar .submenu-wrap .list-group-item {
    padding: .5rem 1.5rem;
    background: transparent;
}

#mobile-navbar .list-group-flush>.list-group-item {
    border-width: var(--bs-list-group-border-width);
    border-top-width: 0;
}

#mobile-navbar .submenu-wrap .list-group-item a {
    color: rgba(var(--link-color-second-rgba));
    font-size: .9rem;
    display: block;
}

#mobile-navbar .submenu-wrap .list-group-item a:hover {
    color: rgba(var(--primary-color-rgba));
}

#mobile-navbar .list-group-item.active {
    background: rgba(var(--primary-bg-rgba));
}

@media (max-width: 991.98px) {
    #mobile-navbar .mobile-sub-toggle {
        background: none !important;
        position: static;
    }
}

.justify-between {
    justify-content: space-between;
}

.flex-direction {
    flex-direction: column;
}

#right .border-light-subtle:last-child {
    border-bottom: 0 !important;
}

.line-clamp-1 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1
}

.text-sm {
    font-size: .875rem;
    line-height: 1.25rem;
}

.user-tag {
    z-index: 3;
    background: rgba(var(--primary-bg-rgba));
    border: 1px solid rgba(var(--primary-color-rgba), .28);
    color: rgba(var(--primary-color-rgba));
    transition: all .25s ease-in-out;
    font-weight: 400 !important;
}

.icp-gov {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    justify-content: flex-end;
}

.w-3 {
    width: 1rem;
}

.h-3 {
    height: 1rem;
}

@media(max-width: 768px) {
    .pagination {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
}

/* ==================== 排版 ==================== */
/* 分类筛选条 */
.category-filter {
    gap: .35rem;
}

.category-filter-link {
    display: inline-flex;
    align-items: center;
    padding: .25rem .9rem;
    font-size: .875rem;
    line-height: 1.6;
    color: rgba(var(--link-color-second-rgba));
    background: rgba(var(--bg-auto-rgb), .5);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    transition: all .18s ease-in-out;
}

.category-filter-link:hover {
    color: rgba(var(--primary-color-rgba));
    background: rgba(var(--primary-bg-rgba));
    border-color: rgba(var(--primary-color-rgba), .25);
}

.category-filter-link.active {
    color: rgba(var(--primary-color-rgba));
    background: rgba(var(--primary-bg-rgba));
    border-color: rgba(var(--primary-color-rgba), .28);
    font-weight: 500;
}

/* 文章列表卡片 */
#index-content .block {
    transition: transform .2s ease-in-out, background-color .2s ease-in-out;
    border-radius: var(--bs-border-radius);
    overflow: hidden;
    container-type: inline-size;
}

#index-content .block:hover {
    transform: translateY(-2px);
    background-color: rgba(var(--primary-bg-rgba), .12);
}

#index-content .block .card-title {
    font-weight: 500;
    line-height: 1.5;
    transition: color .15s ease-in-out;
}

#index-content .block .card-title a:hover {
    color: rgba(var(--primary-color-rgba));
}

#index-content .block .card-text.more {
    line-height: 1.8;
    font-size: .9375rem;
}

#index-content .block .meta-line {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: .5rem;
    line-height: 1.6;
}

#index-content .block .meta-line .meta-item {
    display: inline-flex;
    align-items: center;
    column-gap: .25rem;
}

#index-content .block .meta-line .meta-item i {
    font-size: .875rem;
}

/* 文章正文排版 */
#post-content {
    font-size: .9375rem;
}

#post-content p {
    margin-bottom: 1rem;
    line-height: 1.9;
}

#post-content ul,
#post-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

#post-content li {
    margin-bottom: .35rem;
    line-height: 1.9;
}

#post-content li::marker {
    color: rgba(var(--primary-color-rgba), .8);
}

#post-content blockquote {
    margin: 1.5rem 0;
    padding: .75rem 1rem;
    background: rgba(var(--primary-bg-rgba), .16);
    border-left: 4px solid rgba(var(--primary-color-rgba), .7);
    border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
    font-size: .975rem;
}

#post-content pre {
    border-radius: var(--bs-border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    background: rgba(var(--bg-auto-rgb), .8);
}

#post-content code {
    padding: .15rem .35rem;
    border-radius: .25rem;
    font-size: .875em;
    background: rgba(var(--primary-bg-rgba), .22);
}

#post-content pre code {
    padding: 0;
    background: transparent;
}

#post-content hr {
    opacity: .15;
    margin: 1rem 0;
}

#post-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: auto;
    word-break: keep-all;
    border-collapse: collapse;
    margin-bottom: 16px;
    table-layout: auto;
}

/* 侧边栏组件标题 */
#right h6 {
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .03em;
    margin-bottom: 0;
}

#right .widget-head {
    display: flex;
    align-items: center;
    column-gap: .5rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid rgba(var(--link-color-rgba), .08);
    margin-bottom: .5rem;
}

#right .widget-head i {
    font-size: 1.1rem;
    color: rgba(var(--primary-color-rgba));
}

/* ==================== 独立页面模板 ==================== */
/* 关于我 */
.about-card {
    padding: 1rem;
    background: rgba(var(--bg-auto-rgb), .5);
    border: 1px solid rgba(var(--link-color-rgba), .08);
    border-radius: var(--bs-border-radius);
}

.about-avatar {
    width: 88px;
    height: 88px;
    min-width: 88px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(var(--bg-auto-rgb), 1), 0 0 0 6px rgba(var(--primary-color-rgba), .35);
}

.about-des {
    font-size: .875rem;
    line-height: 1.6;
}

.about-tags {
    list-style: none;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
}

.about-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: .15rem;
    padding: .75rem;
    background: rgba(var(--bg-auto-rgb), .5);
    border: 1px solid rgba(var(--link-color-rgba), .08);
    border-radius: var(--bs-border-radius);
}

.about-stat-num {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.2;
    color: rgba(var(--primary-color-rgba));
}

.about-stat-label {
    font-size: .75rem;
    color: rgba(var(--link-color-second-rgba));
}

/* 归档 */
.archive-list {
    display: flex;
    flex-direction: column;
    row-gap: 1rem;
}

.archive-year-title {
    display: flex;
    align-items: center;
    column-gap: .5rem;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 .5rem;
}

.archive-year-count {
    min-width: 1.4rem;
    padding: .05rem .4rem;
    font-size: .72rem;
    line-height: 1.5;
    text-align: center;
    color: rgba(var(--primary-color-rgba));
    background: rgba(var(--primary-bg-rgba));
    border-radius: 999px;
}

.archive-ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.archive-item {
    display: flex;
    align-items: baseline;
    column-gap: .9rem;
    padding: .42rem 0;
    border-bottom: 1px dashed rgba(var(--link-color-rgba), .1);
}

.archive-item:last-child {
    border-bottom: 0;
}

.archive-date {
    flex-shrink: 0;
    font-size: .78rem;
    color: rgba(var(--link-color-second-rgba));
    font-variant-numeric: tabular-nums;
}

.archive-link {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.archive-link:hover {
    color: rgba(var(--primary-color-rgba));
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: .55rem;
    row-gap: .55rem;
}

.tag-cloud-item {
    padding: .18rem .85rem;
    color: rgba(var(--link-color-second-rgba));
    background: rgba(var(--bg-auto-rgb), .5);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    transition: all .18s ease-in-out;
}

.tag-cloud-item:hover {
    color: rgba(var(--primary-color-rgba));
    background: rgba(var(--primary-bg-rgba));
    border-color: rgba(var(--primary-color-rgba), .28);
    transform: translateY(-1px);
}

/* 友情链接 */
.link-section {
    display: flex;
    flex-direction: column;
    row-gap: .9rem;
}

.link-section-title {
    display: flex;
    align-items: center;
    column-gap: .45rem;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0;
}

.link-section-title i {
    color: rgba(var(--primary-color-rgba));
}

.link-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
}

.link-card {
    display: flex;
    align-items: center;
    column-gap: .7rem;
    padding: .7rem .85rem;
    background: rgba(var(--bg-auto-rgb), .5);
    border: 1px solid rgba(var(--link-color-rgba), .08);
    border-radius: var(--bs-border-radius);
    transition: all .18s ease-in-out;
}

.link-card:hover {
    border-color: rgba(var(--primary-color-rgba), .35);
    transform: translateY(-2px);
}

.link-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    object-fit: cover;
    border-radius: 50%;
}

.link-letter {
    width: 34px;
    height: 34px;
    min-width: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: .95rem;
    color: rgb(255, 255, 255);
    background: rgba(var(--primary-color-rgba), 1);
    border-radius: 50%;
}

.link-card-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    row-gap: .1rem;
}

.link-name {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-des {
    font-size: .78rem;
    color: rgba(var(--link-color-second-rgba));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-apply-guide {
    padding: .75rem .9rem;
    font-size: .85rem;
    line-height: 1.9;
    color: rgba(var(--link-color-second-rgba));
    background: rgba(var(--primary-bg-rgba));
    border: 1px dashed rgba(var(--primary-color-rgba), .3);
    border-radius: var(--bs-border-radius);
}

@media (max-width: 575px) {
    #middle .post-card-body {
        width: auto;
        min-height: auto;
        padding: .75rem 1rem;
    }

    #middle .thumbnail {
        position: revert;
        aspect-ratio: 2.4;
        opacity: 1;
        width: 100%;
        max-height: 256px;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .about-avatar {
        width: 64px;
        height: 64px;
        min-width: 64px;
    }

    .imgcode {
        flex-shrink: 0;
        width: 100%;
        max-width: 100%;
    }

    .link-list {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 992px) {
    #middle>.navbar {
        height: 65px;
        min-height: 65px;
    }

    #comments .imgcode {
        width: 150px;
        max-width: 150px;
    }
}