/* 自定义样式 - 统一管理所有自定义修改 */

/* ==========================================
   Logo 颜色自适应 - 深色/浅色模式切换
   ========================================== */

/* 导航栏 logo 图片 */
#site-name img {
  transition: filter 0.3s ease;
}

/* 深色模式下 logo 变白色 */
[data-theme="dark"] #site-name img {
  filter: brightness(0) invert(1);
}

/* 浅色模式下 logo 保持黑色 */
[data-theme="light"] #site-name img {
  filter: none;
}

/* 页脚 logo 图片 */
#footer-left .solitude {
  transition: filter 0.3s ease;
}

[data-theme="dark"] #footer-left .solitude {
  filter: brightness(0) invert(1);
}

[data-theme="light"] #footer-left .solitude {
  filter: none;
}

/* 页脚样式 */
#footer-bar {
  padding: 0 !important;
  border-top: 1px solid var(--efu-card-border, rgba(0, 0, 0, 0.1));
}

#footer-bar .footer-bar-links {
  padding: 10px 20px !important;
  line-height: 1.5 !important;
}

#footer-bar-tips {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#footer-bar-tips .copyright {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--efu-fontcolor, #4c4948);
}

#footer-bar-tips .copyright .author-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

#footer-bar-tips .copyright .author-avatar:hover {
  transform: scale(1.1) rotate(5deg);
}

#footer-bar-tips .beian-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px !important; /* 减小间距,覆盖主题默认的8px */
  align-items: center;
  font-size: 13px;
}

.beian-group .beian-icon {
  width: 16px;
  height: 16px;
  margin-right: 4px;
  vertical-align: middle;
}

.allsite_ok {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.status-light {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #52c41a;
  box-shadow: 0 0 4px #52c41a;
  animation: pulse-light 2s infinite;
}

.status-light.error {
  background: #ff4d4f;
  box-shadow: 0 0 4px #ff4d4f;
}

@keyframes pulse-light {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.footer-bar-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--efu-fontcolor, #4c4948);
}

.footer-bar-link:hover {
  color: var(--efu-main, #425aef);
  transform: translateY(-2px);
}

.footer-bar-link.cc {
  display: inline-flex;
  gap: 4px;
  font-size: 16px;
}

.footer-bar-link.cc i {
  transition: transform 0.3s ease;
}

.footer-bar-link.cc:hover i {
  transform: scale(1.2);
}

/* 响应式 */
@media screen and (max-width: 768px) {
  #footer-bar-tips { gap: 2px; }
  #footer-bar-tips .beian-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .footer-bar-right { margin-top: 8px; }
}

/* 深色模式 */
[data-theme="dark"] #footer-bar {
  border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .footer-bar-link {
  color: var(--efu-white, #f7f9fe);
}

[data-theme="dark"] .footer-bar-link:hover {
  color: var(--efu-main, #ffc848);
}

/* 隐藏主题广告链接 - 方案一 */
.footer-bar-link[href*="hexo"],
.footer-bar-link[href*="solitude"] {
  display: none !important;
}

/* ==========================================
   首页分类栏悬停效果优化
   ========================================== */

/* 深色模式下的分类栏项目样式 */
[data-theme="dark"] #category-bar .category-bar-item a {
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: 1px solid transparent;
}

/* 悬停时：白色→黄色 + 若隐若现的边框 */
[data-theme="dark"] #category-bar .category-bar-item a:hover {
  background: transparent !important;
  color: #ffc848 !important;
  border: 1px solid rgba(255, 200, 72, 0.3) !important;
  box-shadow: 0 0 12px rgba(255, 200, 72, 0.15);
}

/* 选中状态保持原样（黄色背景 + 黑色文字） */
[data-theme="dark"] #category-bar .category-bar-item.select a {
  background: var(--efu-theme) !important;
  color: #000 !important;
  border: 1px solid var(--efu-theme) !important;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(255, 200, 72, 0.3);
}

/* 选中状态悬停时保持选中样式 */
[data-theme="dark"] #category-bar .category-bar-item.select a:hover {
  background: var(--efu-theme) !important;
  color: #000 !important;
  border: 1px solid var(--efu-theme) !important;
}

/* 浅色模式下也优化一下（可选） */
[data-theme="light"] #category-bar .category-bar-item a {
  color: rgba(0, 0, 0, 0.7);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
}

[data-theme="light"] #category-bar .category-bar-item a:hover {
  background: transparent !important;
  color: #425AEF !important;
  border: 1px solid rgba(66, 90, 239, 0.3) !important;
  box-shadow: 0 0 12px rgba(66, 90, 239, 0.15);
}

[data-theme="light"] #category-bar .category-bar-item.select a {
  background: var(--efu-theme) !important;
  color: #fff !important;
  border: 1px solid var(--efu-theme) !important;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(66, 90, 239, 0.3);
}

[data-theme="light"] #category-bar .category-bar-item.select a:hover {
  background: var(--efu-theme) !important;
  color: #fff !important;
}

/* ==========================================
   底部翻页页码悬停效果优化
   ========================================== */

/* 深色模式 - 普通页码 */
[data-theme="dark"] #pagination .page-number {
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent !important;
  background: transparent !important;
}

/* 深色模式 - 悬停效果: 黄字+黄边框 */
[data-theme="dark"] #pagination .page-number:not(.current):hover {
  color: #ffc848 !important;
  border: 1px solid #ffc848 !important;
  box-shadow: 0 0 12px rgba(255, 200, 72, 0.2) !important;
  background: transparent !important;
}

/* 深色模式 - 当前页: 黄底黑字 */
[data-theme="dark"] #pagination .page-number.current {
  background: #ffc848 !important;
  color: #000 !important;
  border: 1px solid #ffc848 !important;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(255, 200, 72, 0.3) !important;
}

/* 浅色模式 - 普通页码 */
[data-theme="light"] #pagination .page-number {
  color: rgba(0, 0, 0, 0.7);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent !important;
  background: transparent !important;
}

/* 浅色模式 - 悬停效果: 蓝字+蓝边框 */
[data-theme="light"] #pagination .page-number:not(.current):hover {
  color: #425AEF !important;
  border: 1px solid #425AEF !important;
  box-shadow: 0 0 12px rgba(66, 90, 239, 0.2) !important;
  background: transparent !important;
}

/* 浅色模式 - 当前页: 蓝底白字 */
[data-theme="light"] #pagination .page-number.current {
  background: #425AEF !important;
  color: #fff !important;
  border: 1px solid #425AEF !important;
  font-weight: 700;
  box-shadow: 0 0 16px rgba(66, 90, 239, 0.3) !important;
}
