/* 字体 */
@font-face {
    font-family: '代码';
    font-display: swap;
    src: url('/font/consola.ttf') format('truetype');
}

@font-face {
    font-family: '黑体';
    font-display: swap;
    src: url('/font/SourceHanSansCN.woff2') format('woff2'), url('/font/SourceHanSansCN.otf') format('opentype');
}

@font-face {
    font-family: '宋体';
    font-display: swap;
    src: url('/font/SourceHanSerifSC.woff2') format('woff2'), url('/font/SourceHanSerifSC.otf') format('opentype');
}

@font-face {
    font-family: '手写体';
    font-display: swap;
    src: url('/font/font.ttf') format('truetype');
}

/*页面背景*/
#web_bg {
    background-image: linear-gradient(to left, #beeee3 0%, #f1f1d7 100%);
}

/* 解决行内公式导致的间距问题 */
mjx-container[display],
.has-jax {
    line-height: inherit !important;
}

/* 页脚footer
/* 渐变色滚动动画 */
/* 页脚透明渐变 */
#footer {
    background: rgba(255, 255, 255, 0.15);
    color: #000;
    border-top-right-radius: 20px;
    border-top-left-radius: 20px;
    backdrop-filter: saturate(100%) blur(5px);
}

#footer::before {
    background: rgba(255, 255, 255, 0.15);
}

#footer #footer-wrap {
    color: var(--font-color);
}

#footer #footer-wrap a {
    color: var(--font-color);
}

/*所有页面实现毛玻璃特效*/
#aside-content {
    background: rgba(255, 255, 255, 0);
}

#aside-content>.card-widget:first-child {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

#aside-content .card-widget {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

#layout_post>#post {
    background: rgba(255, 255, 255, 0.7);
}

.layout>div:first-child:not(.recent-posts) {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}

#recent-posts>.recent-post-item {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}

/*标题栏*/
#page-header.nav-visible #nav {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(50px);
}

/*搜索框美化*/
.search-dialog {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border-radius: 0px;
}

#search-mask {
    background: rgba(255, 255, 255, 0);
}

/*手机端毛玻璃优化*/
#sidebar #sidebar-menus.open {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}

#sidebar #menu-mask {
    background: rgba(255, 255, 255, 0);
}

/* 夜间模式 */
[data-theme="dark"] #aside-content .card-widget {
    background: rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] div#post {
    background: rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] #recent-posts>.recent-post-item {
    background: rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] #archive {
    background: rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] #page {
    background: rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] #category {
    background: rgba(0, 0, 0, 0.5) !important;
}

[data-theme="dark"] #tag {
    background: rgba(0, 0, 0, 0.5) !important;
}

/* 阅读模式 */
.read-mode #aside-content .card-widget {
    background: rgba(192, 218, 199, 0.5) !important;
}

.read-mode div#post {
    background: rgba(192, 218, 199, 0.5) !important;
}

[data-theme="dark"] .read-mode #aside-content .card-widget {
    background: rgba(0, 0, 0, 0.5) !important;
    color: #ffffff;
}

[data-theme="dark"] .read-mode div#post {
    background: rgba(0, 0, 0, 0.5) !important;
    color: #ffffff;
}