/* 🎨 轻量悬浮代码块 */

/* 代码块容器 - 轻量渐变效果 */
figure.highlight {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(248, 250, 252, 0.98) 100%) !important;
  border: 1px solid rgba(200, 200, 200, 0.3) !important;
  border-radius: 16px !important;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.05),
    0 1px 3px rgba(0, 0, 0, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 1) !important;
  overflow: hidden !important;
}

/* 工具栏 - 更轻盈 */
.highlight-tools {
  background: rgba(255, 255, 255, 0.4) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
  padding: 10px 16px !important;
}

.highlight-tools .code-lang {
  color: #64748B !important;
  font-weight: 600 !important;
  font-size: 0.78em !important;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* 代码区域 - 透明背景 */
figure.highlight pre {
  background: transparent !important;
  padding: 16px 0 !important;
}

figure.highlight table {
  margin: 0 !important;
  background: transparent !important;
}

figure.highlight td {
  background: transparent !important;
}

/* 行号 - 无背景，自然融合 */
figure.highlight .gutter {
  background: transparent !important;
  border-right: none !important;
}

figure.highlight .gutter pre {
  padding: 16px 14px 16px 18px !important;
  color: #94A3B8 !important;
  font-size: 0.82em !important;
  text-align: right;
  background: transparent !important;
}

/* 代码内容 */
figure.highlight .code pre {
  padding: 16px 20px 16px 16px !important;
  color: #334155 !important;
  background: transparent !important;
}

/* 语法高亮 - 柔和清新 */
figure.highlight .comment { color: #94A3B8 !important; font-style: italic; }
figure.highlight .keyword { color: #8B5CF6 !important; }
figure.highlight .string { color: #059669 !important; }
figure.highlight .number { color: #D97706 !important; }
figure.highlight .function { color: #3B82F6 !important; }
figure.highlight .title { color: #EA580C !important; }
figure.highlight .class { color: #EA580C !important; }
figure.highlight .params { color: #475569 !important; }
figure.highlight .built_in { color: #0891B2 !important; }
figure.highlight .literal { color: #0891B2 !important; }
figure.highlight .attr { color: #D97706 !important; }
figure.highlight .variable { color: #DC2626 !important; }
figure.highlight .operator { color: #0891B2 !important; }
figure.highlight .tag { color: #DC2626 !important; }
figure.highlight .name { color: #DC2626 !important; }
figure.highlight .attribute { color: #D97706 !important; }
figure.highlight .selector-tag { color: #DC2626 !important; }
figure.highlight .selector-class { color: #EA580C !important; }
figure.highlight .selector-id { color: #3B82F6 !important; }

/* 行内代码 - 轻盈胶囊 */
.container code:not(figure code) {
  background: rgba(99, 102, 241, 0.1) !important;
  color: #6366F1 !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  font-size: 0.88em !important;
  border: none !important;
  font-weight: 500;
}

/* macStyle 小圆点 */
.highlight-tools .mac-close { background: #FF5F57 !important; }
.highlight-tools .mac-minimize { background: #FFBD2E !important; }
.highlight-tools .mac-maximize { background: #28CA42 !important; }

/* 滚动条 - 极简 */
figure.highlight pre::-webkit-scrollbar {
  height: 4px;
  background: transparent;
}

figure.highlight pre::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 2px;
}

figure.highlight pre::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

/* ===== 暗色模式 ===== */
[data-theme='dark'] figure.highlight {
  background: linear-gradient(135deg, 
    rgba(30, 41, 59, 0.95) 0%, 
    rgba(15, 23, 42, 0.98) 100%) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.2),
    0 1px 3px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
}

[data-theme='dark'] .highlight-tools {
  background: rgba(255, 255, 255, 0.03) !important;
  border-bottom-color: rgba(255, 255, 255, 0.05) !important;
}

[data-theme='dark'] .highlight-tools .code-lang {
  color: #94A3B8 !important;
}

[data-theme='dark'] figure.highlight .gutter pre {
  color: #64748B !important;
}

[data-theme='dark'] figure.highlight .code pre {
  color: #E2E8F0 !important;
}

[data-theme='dark'] .container code:not(figure code) {
  background: rgba(139, 92, 246, 0.15) !important;
  color: #A78BFA !important;
}

/* 暗色语法高亮 */
[data-theme='dark'] figure.highlight .comment { color: #64748B !important; }
[data-theme='dark'] figure.highlight .keyword { color: #A78BFA !important; }
[data-theme='dark'] figure.highlight .string { color: #34D399 !important; }
[data-theme='dark'] figure.highlight .number { color: #FBBF24 !important; }
[data-theme='dark'] figure.highlight .function { color: #60A5FA !important; }
[data-theme='dark'] figure.highlight .title { color: #FB923C !important; }
[data-theme='dark'] figure.highlight .built_in { color: #22D3EE !important; }
[data-theme='dark'] figure.highlight .variable { color: #F87171 !important; }
[data-theme='dark'] figure.highlight .tag { color: #F87171 !important; }
[data-theme='dark'] figure.highlight .attr { color: #FBBF24 !important; }

/* ===== 隐藏标题锚点 # ===== */
#article-container h1 a.markdownIt-Anchor,
#article-container h2 a.markdownIt-Anchor,
#article-container h3 a.markdownIt-Anchor,
#article-container h4 a.markdownIt-Anchor,
#article-container h5 a.markdownIt-Anchor,
#article-container h6 a.markdownIt-Anchor {
  display: none !important;
}

/* ============================================
   加密文章密码输入框美化
   覆盖 hexo-blog-encrypt 插件的默认样式
   ============================================ */

/* --- 外层容器 --- */
.hbe.hbe-content {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  min-height: 180px;
  padding: 30px 20px;
  text-align: center;
}

/* 标题提示 */
.hbe.hbe-content::before {
  content: "🔐 此文章已加密";
  display: block;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 600;
  color: #6366F1;
  letter-spacing: 1px;
}

/* --- 输入框容器 --- */
.hbe.hbe-input.hbe-input-default {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  max-width: 360px;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: visible !important;
  z-index: 1;
}

/* --- 输入框 --- */
.hbe.hbe-input-field.hbe-input-field-default {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 16px 20px !important;
  margin: 0 !important;
  font-size: 16px !important;
  font-family: inherit !important;
  color: #334155 !important;
  background: rgba(255, 255, 255, 0.95) !important;
  border: 2px solid rgba(99, 102, 241, 0.25) !important;
  border-radius: 12px !important;
  outline: none !important;
  opacity: 1 !important;
  float: none !important;
  z-index: 1 !important;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s !important;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.08), 0 1px 3px rgba(0,0,0,0.04) !important;
}

.hbe.hbe-input-field.hbe-input-field-default:focus {
  border-color: #6366F1 !important;
  background: #fff !important;
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.15), 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
}

/* --- 标签作为 placeholder --- */
.hbe.hbe-input-label.hbe-input-label-default {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 20px !important;
  margin: 0 !important;
  float: none !important;
  pointer-events: none !important;
  z-index: 2 !important;
  background: transparent !important;
  transform: none !important;
  transition: opacity 0.2s ease !important;
}

/* 隐藏标签的伪元素（原主题的动画线条） */
.hbe.hbe-input-label.hbe-input-label-default::before,
.hbe.hbe-input-label.hbe-input-label-default::after {
  display: none !important;
  content: none !important;
}

/* 标签文字样式 */
.hbe-input-label-content.hbe-input-label-content-default {
  display: block !important;
  padding: 0 !important;
  color: #9CA3AF !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  transform: none !important;
  transition: none !important;
}

/* 聚焦时隐藏标签 */
.hbe.hbe-input-field.hbe-input-field-default:focus ~ .hbe.hbe-input-label.hbe-input-label-default,
.hbe-input--filled .hbe.hbe-input-label.hbe-input-label-default {
  opacity: 0 !important;
}

/* ============================================
   暗色模式
   ============================================ */
[data-theme='dark'] .hbe.hbe-content::before {
  color: #A78BFA;
}

[data-theme='dark'] .hbe.hbe-input-field.hbe-input-field-default {
  color: #E2E8F0 !important;
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(139, 92, 246, 0.35) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2), 0 1px 3px rgba(0,0,0,0.15) !important;
}

[data-theme='dark'] .hbe.hbe-input-field.hbe-input-field-default:focus {
  border-color: #A78BFA !important;
  background: rgba(30, 41, 59, 0.98) !important;
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.2), 0 0 0 4px rgba(139, 92, 246, 0.15) !important;
}

[data-theme='dark'] .hbe-input-label-content.hbe-input-label-content-default {
  color: #64748B !important;
}

/* ============================================
   文章底部导航卡片（上一篇/下一篇）美化
   ============================================ */

/* 父容器 - 允许溢出显示浮动效果 */
.pagination-post {
  overflow: visible !important;
  padding: 6px 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* --- 日间模式 - 轻量浅色卡片 --- */
.pagination-post .pagination-related {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.95) 0%, 
    rgba(248, 250, 252, 0.98) 100%) !important;
  border: 1px solid rgba(200, 200, 200, 0.3) !important;
  border-radius: 16px !important;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.05),
    0 1px 3px rgba(0, 0, 0, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 1) !important;
  overflow: hidden !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.pagination-post .pagination-related:hover {
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 1) 0%, 
    rgba(250, 251, 253, 1) 100%) !important;
  box-shadow: 
    0 8px 28px rgba(0, 0, 0, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 1) !important;
  transform: translateY(-2px) !important;
}

/* 封面背景 */
.pagination-post .cover {
  background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%) !important;
  opacity: 0.6 !important;
  transition: opacity 0.3s ease !important;
}

.pagination-post .pagination-related:hover .cover {
  opacity: 0.8 !important;
}

/* 信息区域 */
.pagination-post .info {
  background: transparent !important;
}

/* 标签文字（上一篇/下一篇） */
.pagination-post .info-item-1 {
  color: #64748B !important;
  font-size: 0.85em !important;
  font-weight: 500 !important;
  letter-spacing: 0.5px !important;
}

/* 文章标题 */
.pagination-post .info-item-2 {
  color: #334155 !important;
  font-weight: 600 !important;
  font-size: 1.05em !important;
  transition: color 0.2s ease !important;
}

.pagination-post .pagination-related:hover .info-item-2 {
  color: #6366F1 !important;
}

/* --- 夜间模式 - 轻量深色卡片 --- */
[data-theme='dark'] .pagination-post .pagination-related {
  background: linear-gradient(135deg, 
    rgba(30, 41, 59, 0.95) 0%, 
    rgba(15, 23, 42, 0.98) 100%) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.25),
    0 1px 3px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
}

[data-theme='dark'] .pagination-post .pagination-related:hover {
  background: linear-gradient(135deg, 
    rgba(39, 52, 74, 0.98) 0%, 
    rgba(22, 33, 54, 1) 100%) !important;
  box-shadow: 
    0 8px 28px rgba(0, 0, 0, 0.35),
    0 2px 6px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

[data-theme='dark'] .pagination-post .cover {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
}

[data-theme='dark'] .pagination-post .info-item-1 {
  color: #94A3B8 !important;
}

[data-theme='dark'] .pagination-post .info-item-2 {
  color: #E2E8F0 !important;
}

[data-theme='dark'] .pagination-post .pagination-related:hover .info-item-2 {
  color: #A78BFA !important;
}

/* ============================================
   页脚 (Footer) 美化
   ============================================ */

/* --- 日间模式 --- */
#footer {
  background: linear-gradient(135deg, 
    rgba(248, 250, 252, 0.95) 0%, 
    rgba(241, 245, 249, 0.98) 100%) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.05) !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.03) !important;
}

#footer .footer-other {
  padding: 2rem 0 !important;
}

/* 版权文字 */
#footer .copyright {
  color: #64748B !important;
  font-size: 0.9em !important;
}

/* 框架信息 */
#footer .framework-info {
  color: #94A3B8 !important;
  font-size: 0.85em !important;
}

#footer .framework-info a {
  color: #6366F1 !important;
  transition: color 0.2s ease !important;
}

#footer .framework-info a:hover {
  color: #4F46E5 !important;
}

/* 自定义文字（备案号等） */
#footer .footer_custom_text {
  margin-top: 0.5rem !important;
}

#footer .footer_custom_text a {
  color: #94A3B8 !important;
  font-size: 0.85em !important;
  transition: color 0.2s ease !important;
}

#footer .footer_custom_text a:hover {
  color: #6366F1 !important;
}

/* --- 夜间模式 --- */
[data-theme='dark'] #footer {
  background: linear-gradient(135deg, 
    rgba(15, 23, 42, 0.95) 0%, 
    rgba(10, 15, 30, 0.98) 100%) !important;
  border-top-color: rgba(255, 255, 255, 0.05) !important;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15) !important;
}

[data-theme='dark'] #footer .copyright {
  color: #94A3B8 !important;
}

[data-theme='dark'] #footer .framework-info {
  color: #64748B !important;
}

[data-theme='dark'] #footer .framework-info a {
  color: #A78BFA !important;
}

[data-theme='dark'] #footer .framework-info a:hover {
  color: #C4B5FD !important;
}

[data-theme='dark'] #footer .footer_custom_text a {
  color: #64748B !important;
}

[data-theme='dark'] #footer .footer_custom_text a:hover {
  color: #A78BFA !important;
}

/* ============================================
   全局文字选中高亮
   ============================================ */
::-moz-selection {
  background: rgba(99, 102, 241, 0.2) !important;
  color: #312E81 !important;
}
::selection {
  background: rgba(99, 102, 241, 0.2) !important;
  color: #312E81 !important;
}

[data-theme='dark'] ::-moz-selection {
  background: rgba(139, 92, 246, 0.3) !important;
  color: #E0E7FF !important;
}

[data-theme='dark'] ::selection {
  background: rgba(139, 92, 246, 0.3) !important;
  color: #E0E7FF !important;
}

/* ============================================
   全局滚动条美化
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.25);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.45);
}

[data-theme='dark'] ::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.25);
}

[data-theme='dark'] ::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.45);
}

/* ============================================
   导航栏毛玻璃
   ============================================ */
#nav {
  backdrop-filter: saturate(180%) blur(20px) !important;
  -webkit-backdrop-filter: saturate(180%) blur(20px) !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ============================================
   首页文章卡片
   ============================================ */
#recent-posts > .recent-post-item {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(200, 200, 200, 0.2) !important;
  border-radius: 16px !important;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.02) !important;
  overflow: hidden !important;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

#recent-posts > .recent-post-item:hover {
  box-shadow:
    0 14px 40px rgba(99, 102, 241, 0.1),
    0 4px 12px rgba(0, 0, 0, 0.05) !important;
  transform: translateY(-4px) !important;
  border-color: rgba(99, 102, 241, 0.12) !important;
}

/* 封面图悬停缩放 */
#recent-posts > .recent-post-item .post-bg {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

#recent-posts > .recent-post-item:hover .post-bg {
  transform: scale(1.06) !important;
}

/* 文章标题悬停变色 */
#recent-posts .recent-post-info .article-title {
  transition: color 0.3s ease !important;
}

#recent-posts .recent-post-info .article-title:hover {
  color: #6366F1 !important;
}

/* 暗色模式 */
[data-theme='dark'] #recent-posts > .recent-post-item {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

[data-theme='dark'] #recent-posts > .recent-post-item:hover {
  box-shadow:
    0 14px 40px rgba(139, 92, 246, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.2) !important;
  border-color: rgba(139, 92, 246, 0.12) !important;
}

[data-theme='dark'] #recent-posts .recent-post-info .article-title:hover {
  color: #A78BFA !important;
}

/* ============================================
   侧边栏卡片统一风格
   ============================================ */
#aside-content .card-widget {
  background: rgba(255, 255, 255, 0.9) !important;
  border: 1px solid rgba(200, 200, 200, 0.2) !important;
  border-radius: 16px !important;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.02) !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
  overflow: hidden !important;
}

#aside-content .card-widget:hover {
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.07),
    0 2px 6px rgba(0, 0, 0, 0.03) !important;
  transform: translateY(-2px) !important;
}

[data-theme='dark'] #aside-content .card-widget {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

[data-theme='dark'] #aside-content .card-widget:hover {
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.25),
    0 2px 6px rgba(0, 0, 0, 0.15) !important;
}

/* 侧边栏社交图标悬停 */
#aside-content .card-info-social-icons a {
  transition: all 0.3s ease !important;
}

#aside-content .card-info-social-icons a:hover {
  transform: scale(1.2) translateY(-2px) !important;
}

/* ============================================
   文章页图片圆角与悬停效果
   ============================================ */
#article-container img:not(.inline-img):not(.no-lightbox) {
  border-radius: 12px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

#article-container img:not(.inline-img):not(.no-lightbox):hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.13) !important;
  transform: scale(1.015) !important;
}

[data-theme='dark'] #article-container img:not(.inline-img):not(.no-lightbox) {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25) !important;
}

[data-theme='dark'] #article-container img:not(.inline-img):not(.no-lightbox):hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35) !important;
}

/* ============================================
   引用块美化
   ============================================ */
#article-container blockquote {
  background: linear-gradient(135deg,
    rgba(99, 102, 241, 0.06) 0%,
    rgba(99, 102, 241, 0.02) 100%) !important;
  border-left: 4px solid #6366F1 !important;
  border-radius: 0 12px 12px 0 !important;
  padding: 16px 20px !important;
  margin: 1.2em 0 !important;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.06) !important;
  transition: all 0.3s ease !important;
}

#article-container blockquote:hover {
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1) !important;
}

#article-container blockquote p {
  color: #475569 !important;
}

[data-theme='dark'] #article-container blockquote {
  background: linear-gradient(135deg,
    rgba(139, 92, 246, 0.08) 0%,
    rgba(139, 92, 246, 0.03) 100%) !important;
  border-left-color: #A78BFA !important;
  box-shadow: 0 2px 10px rgba(139, 92, 246, 0.08) !important;
}

[data-theme='dark'] #article-container blockquote:hover {
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.15) !important;
}

[data-theme='dark'] #article-container blockquote p {
  color: #CBD5E1 !important;
}

/* ============================================
   表格美化
   ============================================ */
#article-container table:not(.highlight table) {
  border-radius: 12px !important;
  overflow: hidden !important;
  border: 1px solid rgba(200, 200, 200, 0.3) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04) !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  width: 100% !important;
}

#article-container table:not(.highlight table) thead {
  background: linear-gradient(135deg, #6366F1, #4F46E5) !important;
}

#article-container table:not(.highlight table) thead th {
  color: #fff !important;
  font-weight: 600 !important;
  padding: 12px 16px !important;
  border: none !important;
  font-size: 0.92em !important;
  letter-spacing: 0.3px;
}

#article-container table:not(.highlight table) tbody tr {
  transition: background-color 0.2s ease !important;
}

#article-container table:not(.highlight table) tbody tr:nth-child(even) {
  background: rgba(99, 102, 241, 0.03) !important;
}

#article-container table:not(.highlight table) tbody tr:hover {
  background: rgba(99, 102, 241, 0.07) !important;
}

#article-container table:not(.highlight table) tbody td {
  padding: 10px 16px !important;
  border-color: rgba(200, 200, 200, 0.15) !important;
}

[data-theme='dark'] #article-container table:not(.highlight table) {
  border-color: rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15) !important;
}

[data-theme='dark'] #article-container table:not(.highlight table) thead {
  background: linear-gradient(135deg, #4F46E5, #4338CA) !important;
}

[data-theme='dark'] #article-container table:not(.highlight table) tbody tr:nth-child(even) {
  background: rgba(139, 92, 246, 0.05) !important;
}

[data-theme='dark'] #article-container table:not(.highlight table) tbody tr:hover {
  background: rgba(139, 92, 246, 0.1) !important;
}

[data-theme='dark'] #article-container table:not(.highlight table) tbody td {
  border-color: rgba(255, 255, 255, 0.04) !important;
}

/* ============================================
   右下角悬浮按钮
   ============================================ */
#rightside > div > button,
#rightside > div > a {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border: 1px solid rgba(200, 200, 200, 0.2) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  color: #6366F1 !important;
}

#rightside > div > button:hover,
#rightside > div > a:hover {
  background: #6366F1 !important;
  color: #fff !important;
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.3) !important;
  transform: scale(1.1) !important;
  border-color: transparent !important;
}

[data-theme='dark'] #rightside > div > button,
[data-theme='dark'] #rightside > div > a {
  background: rgba(30, 41, 59, 0.92) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2) !important;
  color: #A78BFA !important;
}

[data-theme='dark'] #rightside > div > button:hover,
[data-theme='dark'] #rightside > div > a:hover {
  background: #7C3AED !important;
  color: #fff !important;
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.35) !important;
}

/* ============================================
   文章内链接下划线动画
   ============================================ */
#article-container a:not(.btn-beautify):not(.fancybox):not(.tag-plugin-link) {
  position: relative;
  text-decoration: none !important;
  background-image: linear-gradient(#6366F1, #6366F1) !important;
  background-size: 0% 2px !important;
  background-repeat: no-repeat !important;
  background-position: left bottom !important;
  transition: background-size 0.3s ease !important;
}

#article-container a:not(.btn-beautify):not(.fancybox):not(.tag-plugin-link):hover {
  background-size: 100% 2px !important;
}

[data-theme='dark'] #article-container a:not(.btn-beautify):not(.fancybox):not(.tag-plugin-link) {
  background-image: linear-gradient(#A78BFA, #A78BFA) !important;
}

/* ============================================
   Pace 加载进度条配色
   ============================================ */
.pace .pace-progress {
  background: linear-gradient(90deg, #6366F1, #818CF8) !important;
  height: 3px !important;
}

/* ============================================
   搜索弹窗美化
   ============================================ */
#local-search .search-dialog {
  border-radius: 16px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15) !important;
  border: 1px solid rgba(200, 200, 200, 0.2) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
}

#local-search .search-dialog .search-nav {
  border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
}

#local-search input#local-search-input {
  border-radius: 10px !important;
  border: 2px solid rgba(99, 102, 241, 0.2) !important;
  padding: 10px 16px !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

#local-search input#local-search-input:focus {
  border-color: #6366F1 !important;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
}

[data-theme='dark'] #local-search .search-dialog {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4) !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

[data-theme='dark'] #local-search input#local-search-input {
  border-color: rgba(139, 92, 246, 0.25) !important;
}

[data-theme='dark'] #local-search input#local-search-input:focus {
  border-color: #A78BFA !important;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15) !important;
}

/* ============================================
   TOC 目录美化
   ============================================ */
/* 激活项进度条改为半透明，不遮挡文字 */
#card-toc .toc-content .toc-link::before {
  opacity: 0.35 !important;
}

#card-toc .toc-content .toc-link.active {
  color: #4F46E5 !important;
  font-weight: 600 !important;
}

#card-toc .toc-content .toc-link:hover {
  color: #6366F1 !important;
}

[data-theme='dark'] #card-toc .toc-content .toc-link::before {
  opacity: 0.25 !important;
}

[data-theme='dark'] #card-toc .toc-content .toc-link.active {
  color: #C4B5FD !important;
}

[data-theme='dark'] #card-toc .toc-content .toc-link:hover {
  color: #A78BFA !important;
}

/* ============================================
   标签页 / 分类页标签胶囊
   ============================================ */
#tag-page-tags .tag-cloud-single a,
a.article-sort-item-title {
  transition: all 0.3s ease !important;
}

a.article-sort-item-title:hover {
  color: #6366F1 !important;
  transform: translateX(4px);
}

[data-theme='dark'] a.article-sort-item-title:hover {
  color: #A78BFA !important;
}

/* ============================================
   内容区统一卡片风格
   ============================================ */
#post,
#archive,
#tag,
#category {
  background: rgba(255, 255, 255, 0.9) !important;
  border-radius: 16px !important;
  border: 1px solid rgba(200, 200, 200, 0.2) !important;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.04),
    0 1px 3px rgba(0, 0, 0, 0.02) !important;
}

[data-theme='dark'] #post,
[data-theme='dark'] #archive,
[data-theme='dark'] #tag,
[data-theme='dark'] #category {
  background: rgba(30, 41, 59, 0.9) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.15),
    0 1px 3px rgba(0, 0, 0, 0.1) !important;
}
