@font-face{font-family:'Kingnammm Maiyuan II';src:url('/fonts/Kingnammm_Maiyuan_II-Regular.ttf') format('truetype');font-weight:400;font-style:normal;font-display:swap}
body > .video-wrapper{position:fixed;top:0;left:0;width:100%;height:var(--header-video-height,100lvh);min-height:100vh;isolation:isolate;z-index:0;overflow:hidden;background:#0a0a0a;display:none;contain:strict}
body.is-video-page > .video-wrapper{display:block}
body > .video-wrapper .header-video-mask{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.4);z-index:1;pointer-events:none}
body > .video-wrapper .header-video-bg{position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;z-index:0;pointer-events:none;transform:translateZ(0);-webkit-transform:translateZ(0);transition:filter .4s cubic-bezier(.4,0,.2,1),transform .4s cubic-bezier(.4,0,.2,1)}
body > .video-wrapper .header-video-bg.frosted{filter:blur(4px);transform:translateZ(0) scale(1.06);-webkit-transform:translateZ(0) scale(1.06);will-change:filter,transform}
body > .video-wrapper .header-video-bg.frosted-out{will-change:filter,transform}
body > .video-wrapper .header-welcome{position:absolute;top:0;left:50%;transform:translate3d(-50%,0,0);width:500px;height:500px;display:flex;flex-direction:column;justify-content:center;align-items:center;z-index:2;pointer-events:none;will-change:transform;contain:layout style paint}
body > .video-wrapper .header-welcome .welcome-text{font-size:50px;text-align:center;line-height:1.3;font-weight:400;text-shadow:0 2px 12px rgba(0,0,0,.25);font-family:'ZCOOL KuaiLe','PingFang SC','Microsoft YaHei',sans-serif;background:linear-gradient(135deg,#ffb3ba,#ffd700,#ff69b4,#ffeaa7,#ffb3ba);background-size:200% 200%;-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;animation:gradientShift 6s ease infinite}
body > .video-wrapper .header-welcome .poem-text{font-size:20px;text-align:center;margin-top:16px;line-height:1.8;font-weight:400;text-shadow:0 1px 6px rgba(0,0,0,.2);font-family:'ZCOOL KuaiLe','PingFang SC','Microsoft YaHei',sans-serif;background:linear-gradient(135deg,#ffb3ba,#ffd700,#ff69b4,#ffeaa7,#ffb3ba);background-size:200% 200%;-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;animation:gradientShift 6s ease infinite}
#page-header #site-title{display:none}
#page-header #nav,#page-header #site-info,#page-header #post-info,#page-header #page-site-info,#page-header #scroll-down{position:relative;z-index:1}
#page-header #nav::before{content:'';position:absolute;inset:0;backdrop-filter:blur(6px) brightness(.7);-webkit-backdrop-filter:blur(6px) brightness(.7);mask-image:linear-gradient(to top,transparent 0%,rgba(0,0,0,.5) 100%);-webkit-mask-image:linear-gradient(to top,transparent 0%,rgba(0,0,0,.5) 100%);z-index:-1;pointer-events:none;contain:layout style paint;transform:translateZ(0)}
body.is-homepage #page-header,body.is-video-page #page-header{background-color:transparent!important;transition:none;animation:none!important}
body.is-homepage #page-header:before,body.is-video-page #page-header:before{display:none!important}
body.is-homepage #page-header,body.is-video-page.is-homepage #page-header{height:100vh!important}
body.is-video-page:not(.is-homepage) #page-header{height:100vh!important}
html,body{min-height:100%}
#body-wrap{min-height:100%}
.is-homepage html,.is-homepage body{background:#0a0a0a}
.is-homepage #body-wrap > main.layout,.is-archives-page #body-wrap > main.layout,.is-tags-page #body-wrap > main.layout,.is-about-page #body-wrap > main.layout{margin-top:calc(-100vh + 400px);margin-left:auto;margin-right:auto;max-width:min(calc(100% - 56px),1200px);padding:38px;background:rgba(255,255,255,.15);border-radius:28px 28px 0 0;position:relative;z-index:1;border:1px solid rgba(255,255,255,.45);contain:layout style paint;isolation:isolate}
.is-homepage #body-wrap > main.layout::before,.is-archives-page #body-wrap > main.layout::before,.is-tags-page #body-wrap > main.layout::before,.is-about-page #body-wrap > main.layout::before{content:'';position:absolute;inset:0;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border-radius:inherit;z-index:-1;pointer-events:none;transform:translateZ(0);transition:backdrop-filter .2s ease-in-out,-webkit-backdrop-filter .2s ease-in-out}
body.is-main-frosted.is-homepage #body-wrap > main.layout::before,body.is-main-frosted.is-archives-page #body-wrap > main.layout::before,body.is-main-frosted.is-tags-page #body-wrap > main.layout::before,body.is-main-frosted.is-about-page #body-wrap > main.layout::before{backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);transition:backdrop-filter .2s ease-in-out .2s,-webkit-backdrop-filter .2s ease-in-out .2s}
.is-post-page #body-wrap > main.layout{background:rgba(255,255,255,.92);border-radius:28px 28px 0 0;position:relative;z-index:1}
#nav .site-name{font-family:'ZCOOL KuaiLe','PingFang SC','Microsoft YaHei',sans-serif;background:linear-gradient(135deg,#ffb3ba,#ffd700,#ff69b4,#ffeaa7,#ffb3ba);background-size:200% 200%;background-position:0% 50%;-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}
#nav .site-name{font-weight:700;font-size:inherit;letter-spacing:normal}
@keyframes gradientShift{0%{background-position:0% 50%}50%{background-position:100% 50%}100%{background-position:0% 50%}}
#card-mail-btn{display:block;margin-top:10px;background-color:var(--btn-bg);color:var(--btn-color);text-align:center;line-height:2.4;border-radius:7px;text-decoration:none;position:relative;overflow:hidden;transition:all .3s cubic-bezier(.4,0,.2,1)}
#card-mail-btn:hover{background-color:var(--btn-hover-color);box-shadow:0 4px 12px rgba(0,0,0,.15);text-decoration:none;transform:translateY(-1px) scale(1.02)}
#card-mail-btn:active{transition-duration:.1s;transform:translateY(0) scale(.98)}
#card-mail-btn i{display:inline-block;vertical-align:middle;transition:all .3s cubic-bezier(.4,0,.2,1)}
#card-mail-btn:hover i{animation:buttonIconBounce .6s ease-in-out}
#card-mail-btn i+span{margin-left:6px;vertical-align:middle}
#page-header.post-bg{height:350px;border-radius:0;background-size:cover!important;background-position:center!important;background-repeat:no-repeat!important}
#page-header.post-bg #post-info{position:absolute;bottom:0;left:0;right:0;padding:30px 50px;background:linear-gradient(to top,rgba(0,0,0,.5),transparent)}
#page-header.post-bg #post-info .post-title{color:#fff;text-shadow:0 2px 8px rgba(0,0,0,.4)}
#page-header.post-bg #post-info #post-meta{color:rgba(255,255,255,.85)}
#page-header.post-bg #post-info #post-meta a{color:rgba(255,255,255,.9)}
.recent-post-item .post_cover{padding:15px;background:0 0;border-radius:28px}
#recent-posts .recent-post-item .post_cover .post-bg,.post-bg{border-radius:28px}
.recent-post-item,.card-widget{border-radius:28px;background:rgba(255,255,255,.75)!important;border:1px solid rgba(255,255,255,.65);contain:content;overflow:hidden;content-visibility:auto}
.is-homepage .recent-post-item{max-width:950px}
.is-homepage #body-wrap > main.layout > #aside-content,.is-archives-page #body-wrap > main.layout > #aside-content,.is-tags-page #body-wrap > main.layout > #aside-content,.is-about-page #body-wrap > main.layout > #aside-content{padding-left:18px}
.card-widget{backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);contain:content;transform:translateZ(0)}
.is-post-page .card-widget{backdrop-filter:none;-webkit-backdrop-filter:none}
.recent-post-item{contain-intrinsic-size:auto 400px}
.card-widget{contain-intrinsic-size:auto 200px}
#footer{content-visibility:auto;contain-intrinsic-size:auto 300px}
#nav{border-radius:0}
#nav a,#nav .site-page,#nav a span,#nav .site-page span,#nav a i,#nav .site-page i,#nav #search-button span,#nav #search-button i{color:#fff!important}
#nav a:hover,#nav .site-page:hover,#nav a:hover span,#nav .site-page:hover span,#nav a:hover i,#nav .site-page:hover i,#nav #search-button:hover span,#nav #search-button:hover i{color:#fff!important}
[data-theme='dark'] #nav a,[data-theme='dark'] #nav .site-page,[data-theme='dark'] #nav a span,[data-theme='dark'] #nav .site-page span,[data-theme='dark'] #nav a i,[data-theme='dark'] #nav .site-page i,[data-theme='dark'] #nav #search-button span,[data-theme='dark'] #nav #search-button i{color:#fff!important}
[data-theme='dark'] #nav a:hover,[data-theme='dark'] #nav .site-page:hover,[data-theme='dark'] #nav a:hover span,[data-theme='dark'] #nav .site-page:hover span,[data-theme='dark'] #nav a:hover i,[data-theme='dark'] #nav .site-page:hover i{color:#fff!important}
#page-header.nav-fixed #nav{backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);transform:translateZ(0)}
.search-dialog{background:rgba(255,255,255,.85)!important;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.3);box-shadow:0 8px 32px rgba(0,0,0,.15);contain:layout style paint;overflow:hidden;transform:translateZ(0)}
.search-dialog .search-close-button{position:absolute;top:12px;right:12px;flex:0 0 auto;width:32px!important;height:32px;aspect-ratio:1;background:none!important;border:none!important;outline:none!important;box-shadow:none!important;padding:0!important;margin:0!important;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;color:var(--grey,#555);transition:color .2s;z-index:1}
.search-dialog .search-close-button:hover{color:var(--search-color,#000)}

/* ========== 移动端专属样式 ========== */

/* 关闭自定义鼠标样式 */
body.is-mobile .target-cursor-wrapper{display:none!important}
body.is-mobile,body.is-mobile *{cursor:auto!important}

/* 移动端 main 元素高斯模糊一直保持开启 */
body.is-mobile.is-homepage #body-wrap > main.layout,
body.is-mobile.is-archives-page #body-wrap > main.layout,
body.is-mobile.is-tags-page #body-wrap > main.layout,
body.is-mobile.is-about-page #body-wrap > main.layout{
  margin:0 20px;
  padding:20px;
  max-width:calc(100% - 40px);
  border-radius:24px 24px 0 0;
  background:rgba(255,255,255,.25);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  contain:layout style paint;transform:translateZ(0)
}

/* 移动端 post 页面 main 元素 */
body.is-mobile.is-post-page #body-wrap > main.layout{
  padding:16px;
  background:rgba(255,255,255,.92);
  contain:layout style paint
}

/* 移动端页面标题区域调整 */
body.is-mobile.is-homepage #page-header,
body.is-mobile.is-video-page #page-header{height:60vh!important}

/* 移动端侧边栏取消左边距 */
body.is-mobile.is-homepage #body-wrap > main.layout > #aside-content,
body.is-mobile.is-archives-page #body-wrap > main.layout > #aside-content,
body.is-mobile.is-tags-page #body-wrap > main.layout > #aside-content,
body.is-mobile.is-about-page #body-wrap > main.layout > #aside-content{
  padding-left:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  width:100%
}

/* 移动端首页文字初始位置在屏幕顶部与main上边界中间 */
body.is-mobile .video-wrapper .header-welcome{
  width:280px;
  height:280px;
  top:30vh;
  transform:translate(-50%,-50%)
}
body.is-mobile .video-wrapper .header-welcome .welcome-text{font-size:28px}
body.is-mobile .video-wrapper .header-welcome .poem-text{font-size:15px;margin-top:8px}

/* 移动端 recent-post-item 全宽 */
body.is-mobile.is-homepage .recent-post-item{max-width:100%}
body.is-mobile .recent-post-item .post_cover{padding:10px}

/* 移动端文章列表项调整 */
body.is-mobile .recent-post-item{flex-direction:column}
body.is-mobile .recent-post-item .post_cover{width:100%!important;padding:12px 12px 0 12px}
body.is-mobile .recent-post-item .post_cover .post-bg{border-radius:16px 16px 0 0!important;height:180px;object-fit:cover}
body.is-mobile .recent-post-item .recent-post-info{padding:16px;width:100%}

/* Cloudflare 节点信息卡片 */
#colo-info .webinfo{display:flex;flex-direction:column}
#colo-info .webinfo-item{display:flex;flex-direction:row;flex-wrap:wrap;align-items:baseline;padding:4px 10px;gap:0 6px}
#colo-info .webinfo-item .item-name{font-weight:500;flex-shrink:0}
#colo-info .webinfo-item .item-count{word-break:break-all;flex:1 1 auto;min-width:0}
#colo-info .item-headline i{animation:fa-flip 2s infinite linear}

/* 移动端 main 内所有框体宽度统一 */
body.is-mobile.mobile-card-unify #aside-content,
body.is-mobile.mobile-card-unify #recent-posts{
  width:100%!important;
  max-width:100%!important;
  padding:0!important
}
body.is-mobile.mobile-card-unify .card-widget,
body.is-mobile.mobile-card-unify .sticky_layout,
body.is-mobile.mobile-card-unify .recent-post-item{
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box
}

/* 移动端搜索框缩小 */
body.is-mobile .search-dialog{
  top:40px!important;
  left:40px!important;
  right:40px!important;
  bottom:25px!important;
  width:auto!important;
  max-width:300px!important;
  max-height:500px!important;
  border-radius:28px!important;
  margin:0 auto!important
}
body.is-mobile .search-dialog .local-search-input input{font-size:14px;padding:8px 12px}

/* 更新日志卡片 */
#update-log{cursor:pointer;transition:transform .2s,box-shadow .2s}
#update-log:hover{transform:translateY(-2px);box-shadow:0 4px 16px rgba(0,0,0,.1)}
#update-log .item-headline i{color:var(--theme-color,#3b82f6)}
#update-log .update-log-preview .update-version{font-size:15px;font-weight:600;color:var(--font-color,#333);margin-bottom:4px}
#update-log .update-log-preview .update-date{font-size:12px;color:var(--grey,#999);margin-bottom:6px}
#update-log .update-log-preview .update-item{font-size:13px;color:var(--font-color,#555);padding:2px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#update-log .update-log-hint{font-size:12px;color:var(--grey,#aaa);margin-top:6px;display:flex;align-items:center;justify-content:flex-end;gap:2px;padding:4px 12px 4px 8px;border-radius:6px;cursor:pointer;transition:background .2s,color .2s;float:right;clear:both}
#update-log .update-log-hint:hover{background:rgba(0,0,0,.05);color:var(--theme-color,#3b82f6)}
#update-log .update-log-hint i{font-size:10px}

/* 更新日志弹窗 */
.update-log-overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.4);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);opacity:0;visibility:hidden;transition:opacity .3s,visibility .3s;contain:layout style paint;transform:translateZ(0)}
.update-log-overlay.open{opacity:1;visibility:visible}
.update-log-modal{background:rgba(255,255,255,.95);border-radius:20px;border:1px solid rgba(255,255,255,.3);box-shadow:0 16px 48px rgba(0,0,0,.2);width:90vw;max-width:600px;max-height:80vh;display:flex;flex-direction:column;overflow:hidden;transform:scale(.95);transition:transform .3s;contain:layout style paint;transform:translateZ(0)}
.update-log-overlay.open .update-log-modal{transform:scale(1)}
.update-log-modal-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid rgba(0,0,0,.08);flex-shrink:0}
.update-log-modal-header span{font-size:18px;font-weight:600;color:var(--font-color,#333)}
.update-log-close{width:32px;height:32px;border:none;background:none;cursor:pointer;display:flex;align-items:center;justify-content:center;border-radius:8px;color:var(--grey,#555);transition:background .2s,color .2s;font-size:16px}
.update-log-close:hover{background:rgba(0,0,0,.06);color:var(--font-color,#333)}
.update-log-modal-body{flex:1;overflow-y:auto;padding:16px 20px 20px}
.update-log-version-block{margin-bottom:20px;padding-bottom:16px;border-bottom:1px solid rgba(0,0,0,.06)}
.update-log-version-block:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}
.update-log-version-title{font-size:16px;font-weight:700;color:var(--theme-color,#3b82f6);margin-bottom:2px}
.update-log-version-date{font-size:12px;color:var(--grey,#999);margin-bottom:8px}
.update-log-version-item{font-size:14px;color:var(--font-color,#555);padding:3px 0;line-height:1.6}

/* 移动端 */
body.is-mobile .update-log-modal{width:calc(100vw - 32px);max-width:calc(100vw - 32px);max-height:85vh;border-radius:16px;margin:0 16px}
body.is-mobile .update-log-modal-header{padding:14px 16px}
body.is-mobile .update-log-modal-header span{font-size:16px}
body.is-mobile .update-log-modal-body{padding:12px 16px 16px}
body.is-mobile .update-log-version-title{font-size:14px}
body.is-mobile .update-log-version-item{font-size:13px}
body.is-mobile #update-log .update-log-preview .update-item{font-size:12px}
body.is-mobile #update-log .update-log-hint{font-size:11px}

/* ========== 暗色模式高斯模糊适配 ========== */

/* PC 端 main 布局 */
[data-theme='dark'].is-homepage #body-wrap > main.layout,
[data-theme='dark'].is-archives-page #body-wrap > main.layout,
[data-theme='dark'].is-tags-page #body-wrap > main.layout,
[data-theme='dark'].is-about-page #body-wrap > main.layout {
  background: rgba(18, 18, 18, .55)
}
[data-theme='dark'].is-post-page #body-wrap > main.layout {
  background: rgba(18, 18, 18, .92)
}

/* PC 端卡片和文章列表项 */
[data-theme='dark'] .recent-post-item,
[data-theme='dark'] .card-widget {
  background: rgba(30, 30, 30, .75) !important;
  border-color: rgba(255, 255, 255, .08)
}

/* PC 端搜索框 */
[data-theme='dark'] .search-dialog {
  background: rgba(30, 30, 30, .85) !important;
  border-color: rgba(255, 255, 255, .1)
}

/* PC 端更新日志弹窗 */
[data-theme='dark'] .update-log-modal {
  background: rgba(30, 30, 30, .95);
  border-color: rgba(255, 255, 255, .08)
}
[data-theme='dark'] .update-log-modal-header {
  border-bottom-color: rgba(255, 255, 255, .08)
}
[data-theme='dark'] .update-log-version-block {
  border-bottom-color: rgba(255, 255, 255, .06)
}
[data-theme='dark'] .update-log-close:hover {
  background: rgba(255, 255, 255, .08);
  color: var(--font-color, #ccc)
}
[data-theme='dark'] #update-log .update-log-hint:hover {
  background: rgba(255, 255, 255, .06)
}

/* 暗色模式 nav 高斯模糊遮罩 */
[data-theme='dark'] #page-header #nav::before {
  backdrop-filter: blur(6px) brightness(.5);
  -webkit-backdrop-filter: blur(6px) brightness(.5)
}

/* 暗色模式移动端 main 布局 */
[data-theme='dark'] body.is-mobile.is-homepage #body-wrap > main.layout,
[data-theme='dark'] body.is-mobile.is-archives-page #body-wrap > main.layout,
[data-theme='dark'] body.is-mobile.is-tags-page #body-wrap > main.layout,
[data-theme='dark'] body.is-mobile.is-about-page #body-wrap > main.layout {
  background: rgba(18, 18, 18, .55);
  border-color: rgba(255, 255, 255, .08)
}
[data-theme='dark'] body.is-mobile.is-post-page #body-wrap > main.layout {
  background: rgba(18, 18, 18, .92);
  border-color: rgba(255, 255, 255, .08)
}

/* ========== 全局暗色模式适配 ========== */

/* 页面底层背景 */
[data-theme='dark'] html,
[data-theme='dark'] body {
  background: #0a0a0a
}

/* 页脚 */
[data-theme='dark'] #footer {
  background-color: #1a1a2e;
  background-image: none
}

/* 页面头部 fallback 背景 */
[data-theme='dark'] #page-header {
  background-color: #1a1a2e
}

/* 文章页内容区文字 */
[data-theme='dark'] #article-container {
  color: rgba(255, 255, 255, .85)
}

/* 文章版权声明 */
[data-theme='dark'] #post .post-copyright {
  border-color: rgba(255, 255, 255, .15)
}
[data-theme='dark'] #post .post-copyright:before {
  color: var(--lyx-theme, #3b8cff)
}
[data-theme='dark'] #post .post-copyright .post-copyright-meta {
  color: var(--lyx-theme, #3b8cff)
}
[data-theme='dark'] #post .post-copyright:hover {
  -webkit-box-shadow: 0 0 8px 0 rgba(0, 0, 0, .3), 0 2px 4px 0 rgba(0, 0, 0, .2);
  box-shadow: 0 0 8px 0 rgba(0, 0, 0, .3), 0 2px 4px 0 rgba(0, 0, 0, .2)
}

/* 文章上一篇/下一篇分页 */
[data-theme='dark'] .pagination-related {
  background: #1a1a1a
}

/* 搜索弹窗输入框 */
[data-theme='dark'] .search-dialog input {
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .85)
}

/* 归档页文章项 */
[data-theme='dark'] .article-sort-item:hover {
  background: rgba(255, 255, 255, .04)
}

/* 标签页 */
[data-theme='dark'] .tag-cloud-list a {
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .75)
}
[data-theme='dark'] .tag-cloud-list a:hover {
  background: rgba(255, 255, 255, .12)
}

/* 归档页内容区 */
[data-theme='dark'] #archive {
  background: rgba(30, 30, 30, .45);
  border-radius: 8px;
  padding: 20px
}

/* 关于/标签页内容区 */
[data-theme='dark'] #page {
  background: rgba(30, 30, 30, .45);
  border-radius: 8px;
  padding: 20px
}

/* 文章详情页内容区 */
[data-theme='dark'] #post {
  background: rgba(30, 30, 30, .45);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px
}
