/* ==========================================================
   XCai's Blog - 深度定制美化样式库 (Custom CSS)
   ========================================================== */

/* 1. 顶栏导航胶囊化与动态毛玻璃质感 */
#nav {
  background: rgba(15, 23, 42, 0.55) !important;
  backdrop-filter: blur(16px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25) !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

#nav a,
#nav .site-page,
#nav #site-name,
#nav .title,
#nav .menus_item a,
#nav span {
  color: #ffffff !important;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85) !important;
  font-weight: 600 !important;
}

#nav a:hover,
#nav .menus_item a:hover,
#nav #site-name:hover {
  color: #38bdf8 !important;
  text-shadow: 0 0 16px rgba(56, 189, 248, 0.9) !important;
  transform: translateY(-1px);
}

/* 顶栏快捷键胶囊样式 */
#nav-group .key,
#nav-group kbd,
kbd {
  background: rgba(15, 23, 42, 0.75) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  border-radius: 6px !important;
  padding: 2px 7px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
}

/* 2. 暗黑模式 (Dark Mode) 背景动态切换为赛博像素原画 */
[data-theme='dark'] #page-header:not(.not-home-page) {
  background: url('/img/pixel-banner.webp') center center / cover no-repeat !important;
}

[data-theme='dark'] #page-header:not(.not-home-page)::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 15, 30, 0.45);
  pointer-events: none;
}

/* 3. 文章卡片拟物化流光与 Hover 动效升级 */
.recent-post-item {
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06) !important;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.recent-post-item:hover {
  transform: translateY(-8px) !important;
  box-shadow: 0 18px 36px rgba(56, 189, 248, 0.16), 0 0 0 1.5px rgba(56, 189, 248, 0.35) !important;
}

.recent-post-item .post_cover img {
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.recent-post-item:hover .post_cover img {
  transform: scale(1.06) !important;
}

/* 4. 全局极细渐变滚动条 */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #38bdf8 0%, #818cf8 50%, #c084fc 100%);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #0ea5e9 0%, #6366f1 50%, #a855f7 100%);
}

/* 5. 文章内引用块 (Blockquote) 科技渐变边框 */
#article-container blockquote {
  background: rgba(56, 189, 248, 0.06) !important;
  border-left: 4px solid #38bdf8 !important;
  border-radius: 0 12px 12px 0 !important;
  padding: 12px 18px !important;
  margin: 18px 0 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}

[data-theme='dark'] #article-container blockquote {
  background: rgba(30, 41, 59, 0.7) !important;
  border-left: 4px solid #818cf8 !important;
  color: #e2e8f0 !important;
}

/* 6. 文章内代码块仿 Mac 终端顶栏红黄绿小圆点 */
#article-container .highlight-wrap {
  border-radius: 14px !important;
  overflow: hidden !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

#article-container figure.highlight {
  border-radius: 12px !important;
}

/* 7. 首页分类按钮高光强化 */
.categoryGroup .categoryItem {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.categoryGroup .categoryItem:hover {
  transform: scale(1.04) translateY(-3px) !important;
}

/* 8. 侧边栏作者名片卡背景壁纸（像素赛博风）与柴犬头像动效 */
#aside-content > .card-widget.card-info {
  background: url('/img/pixel-banner.webp') center center / cover no-repeat !important;
  position: relative !important;
  overflow: hidden !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

#aside-content > .card-widget.card-info::before {
  content: '' !important;
  position: absolute !important;
  top: 0; left: 0; right: 0; bottom: 0 !important;
  background: rgba(15, 23, 42, 0.45) !important;
  backdrop-filter: blur(1px) !important;
  animation: none !important;
  z-index: 0 !important;
}

#aside-content > .card-widget.card-info > .card-content {
  position: relative !important;
  z-index: 1 !important;
}

/* 作者头像强制保底与微光边框（杜绝任何空白圆圈） */
.author-info-avatar img.avatar-img,
#aside-content .card-info .avatar-img {
  width: 118px !important;
  height: 118px !important;
  border-radius: 50% !important;
  border: 3px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
  object-fit: cover !important;
  background: #ffffff url('/img/avatar.jpg') center center / cover no-repeat !important;
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.author-info-avatar img.avatar-img:hover {
  transform: rotate(360deg) scale(1.08) !important;
}

/* 文章版权卡片头像强制显示与立体质感 */
.post-copyright__author_img img,
.post-copyright__author_img_back,
.post-copyright__author_img_front {
  width: 60px !important;
  height: 60px !important;
  border-radius: 50% !important;
  border: 2px solid rgba(255, 255, 255, 0.85) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) !important;
  object-fit: cover !important;
  background: #ffffff url('/img/avatar.jpg') center center / cover no-repeat !important;
}

/* 文章页版权卡片微光衬底 */
.post-copyright {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(56, 189, 248, 0.25) !important;
  border-radius: 16px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}

[data-theme='dark'] .post-copyright {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

/* 9. 底部备案号与状态微调 */
.footer-bar-link {
  font-weight: 600 !important;
  transition: color 0.25s ease !important;
}

.footer-bar-link:hover {
  color: #38bdf8 !important;
  text-decoration: underline !important;
}
