body, html {
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

/* 主题变量：白天模式 */
:root {
  --layout-max-width: 1700px;
  --sidebar-width: 220px;
  --header-height: 64px;
  --border-color: #e5e6eb;
  --sidebar-bg: #f7f8fa;
  --header-bg: #fff;
  --cat-active-bg: #e5e6eb;
  --border-radius: 8px;
  --bg-color: #fff;
  --text-color: #222;
}

/* 夜间模式变量 */
body.dark-mode {
  --sidebar-bg: #181b20;
  --header-bg: #23272e;
  --border-color: #333941;
  --bg-color: #23272e;
  --text-color: #eee;
  --cat-active-bg: #24272c;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: var(--bg-color);
  box-sizing: border-box;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  color: var(--text-color);
}

*, *::before, *::after {
  box-sizing: inherit;
}

.layout-root {
  height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow: hidden;
  position: relative;
  background: var(--bg-color);
  box-sizing: border-box;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  height: var(--header-height);
  width: 100%;
  max-width: 100vw;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  overflow-x: auto;
}

.site-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  height: 100%;
  margin-left: 18px;
  margin-right: 0;
}

.site-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
  margin-right: 5px;
}

.logo-text {
  font-size: 1.7rem;
  color: var(--text-color);
  font-weight: 600;
  letter-spacing: .04em;
}

.header-inner {
  width: 100%;
  max-width: var(--layout-max-width);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  padding: 0 32px;
  box-sizing: border-box;
  flex: 1;
}

.site-pages-nav {
  display: flex;
  align-items: center;
  gap: 0;
}

.site-pages-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem;
  padding: 0 10px;
  border-radius: 6px;
  transition: background .15s;
  height: 32px;
  line-height: 32px;
  display: inline-block;
  position: relative;
}
.site-pages-nav a:hover {
  background: #f3f4f6;
}
body.dark-mode .site-pages-nav a:hover {
  background: #23272e;
}
.site-pages-nav a:not(:last-child)::after {

  color: #bbb;
  margin-left: 8px;
  margin-right: 0;
  font-size: 1.08em;
  vertical-align: middle;
  pointer-events: none;
  font-weight: normal;
}
body.dark-mode .site-pages-nav a:not(:last-child)::after {
  color: #555;
}

/* 左侧侧边栏固定 */
.sidebar-box {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: var(--sidebar-width);
  height: calc(100vh - var(--header-height));
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border-color);
  box-sizing: border-box;
  z-index: 200;
  padding: 14px 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  font-size: 0.92em;
  max-width: 100vw;
}

/* 分类列表与多级目录缩进美化（支持任意多级） */
.cat-list {
  list-style: none;
  margin: 0;
  padding: 0 16px;
  width: 100%;
  font-size: 1em;
}
.cat-list li {
  margin: 0 0 2px 0;
}
.cat-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-color);
  text-decoration: none;
  padding: 0 12px;
  height: 32px;
  border-radius: 7px;
  font-size: 1em;
  transition: background .15s, color .15s;
  background: transparent;
}
.cat-list a:hover, .cat-list .current > a, .cat-list li.current > a {
  background: var(--cat-active-bg);
  color: #444 !important;
  text-decoration: none;
}
body.dark-mode .cat-list a:hover, body.dark-mode .cat-list .current > a, body.dark-mode .cat-list li.current > a {
  background: #23272e;
  color: #eee!important;
}
.cat-list .cat-count {
  background: #ededed;
  border-radius: 10px;
  padding: 1px 9px;
  font-size: .92em;
  color: #999;
  margin-left: 8px;
  min-width: 22px;
  text-align: center;
  display: inline-block;
  font-weight: 500;
}
body.dark-mode .cat-list .cat-count {
  background: #23272e;
  color: #aaa;
}
.cat-item-all > a {
  background: #ededed;
  color: var(--text-color);
  font-weight: 600;
}
.cat-item-all.current > a {
  color: #444 !important;
}
.cat-list .cat-item-all {
  margin-bottom: 6px;
}

/* 多级目录缩进（核心） */
.cat-list ul.cat-children {
  padding-left: 16px;
  border-left: 2px solid #f0f1f5;
}
body.dark-mode .cat-list ul.cat-children {
  border-left: 2px solid #31343a;
}
.cat-list ul.cat-children ul.cat-children {
  padding-left: 18px;
}
.cat-list ul.cat-children ul.cat-children ul.cat-children {
  padding-left: 20px;
}
.cat-list ul.cat-children ul.cat-children ul.cat-children ul.cat-children {
  padding-left: 22px;
}
.cat-list .cat-children a {
  padding-left: 18px !important;
}

.cat-list ul.cat-children a {
  font-size: 0.96em;
  color: #888;
}
body.dark-mode .cat-list ul.cat-children a {
  color: #aaa;
}
.cat-list ul.cat-children ul.cat-children a {
  font-size: 0.94em;
  color: #bbb;
  opacity: 0.95;
}
body.dark-mode .cat-list ul.cat-children ul.cat-children a {
  color: #888;
  opacity: 0.95;
}
.cat-list ul.cat-children ul.cat-children ul.cat-children a {
  font-size: 0.92em;
  color: #ccc;
  opacity: 0.92;
}
body.dark-mode .cat-list ul.cat-children ul.cat-children a {
  color: #666;
  opacity: 0.92;
}

/* 二级分类竖直下拉/不会被遮挡 */
.cat-list li.has-children {
  position: relative;
}
.cat-list li.has-children > .cat-children {
  display: none;
  position: static;
  left: 0;
  top: auto;
  min-width: 0;
  background: none;
  border: none;
  z-index: auto;
  box-shadow: none;
  padding: 0;
  margin: 0;
}
.cat-list li.has-children:hover > .cat-children {
  display: block;
}
.cat-list .cat-children li {
  margin: 0;
  width: 100%;
}

/* 右侧主面板布局，修正错位 */
.main-panel {
  position: fixed;
  left: var(--sidebar-width);
  top: var(--header-height);
  width: calc(100% - var(--sidebar-width));
  max-width: calc(100vw - var(--sidebar-width));
  height: calc(100vh - var(--header-height));
  background: var(--bg-color);
  display: block; /* 改为block布局 */
  overflow-y: auto; /* 主面板整体可滚动 */
  overflow-x: hidden;
  z-index: 10;
  border-radius: 0; /* 移除圆角 */
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #ccc var(--bg-color);
  border-right: 1px solid var(--border-color); /* 只保留右侧边框 */
  border-bottom: 1px solid var(--border-color); /* 只保留底部边框 */
  box-shadow: 0 2px 8px rgba(0,0,0,0.02); /* 添加轻微阴影 */
}

/* Webkit 浏览器滚动条样式 - 移至主面板 */
.main-panel::-webkit-scrollbar {
  width: 8px;
}

.main-panel::-webkit-scrollbar-track {
  background: var(--bg-color);
}

.main-panel::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.main-panel::-webkit-scrollbar-thumb:hover {
  background: #999;
}

body.dark-mode .main-panel::-webkit-scrollbar-thumb {
  background: #555;
}

body.dark-mode .main-panel::-webkit-scrollbar-thumb:hover {
  background: #777;
}

/* 主面板头部区域样式 */
.main-panel-header {
  position: sticky; /* 粘性定位 */
  top: 0; /* 固定在顶部 */
  background: var(--bg-color);
  border-radius: 0; /* 移除圆角 */
  padding-right: 0; /* 移除右侧内边距 */
  box-sizing: border-box;
  z-index: 50; /* 确保头部始终在滚动内容之上 */
  width: 100%;
  border-right: 1px solid var(--border-color); /* 只保留右侧边框 */
  border-top: none; /* 移除顶部边框 */
  border-bottom: 1px solid #e5e6eb; /* 添加更明显的底部边框 */
  box-shadow: none; /* 移除阴影效果，避免出现两条线 */
}

.main-panel-header .site-search {
  min-width: 320px;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 32px;
  height: 56px;
  background: transparent;
  border: none;
 
  flex-shrink: 0;
  position: relative;
  z-index: 12;
}

/* 可滚动内容区域 - 现在不需要滚动 */
.main-scroll {
  padding: 32px 32px 32px 32px; /* 恢复完整内边距 */
  box-sizing: border-box;
  width: 100%;
  background: var(--bg-color);
  border-radius: 0; /* 移除圆角 */
  color: var(--text-color);
  overflow: visible; /* 不需要overflow */
  margin-top: 0; /* 移除顶部间距 */
}



.notice-bar {
  width: 100%; /* 填充整个可用空间 */
  background: #fff7e6;
  color: #ab6700;
  border-bottom: 1px solid #ffe2ba;
  padding: 0 32px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 1rem;
  position: relative;
  z-index: 20; /* 确保通知栏在搜索框上方 */
  box-sizing: border-box;
  transition: all 0.2s;
  border-radius: 0; /* 移除圆角 */
  max-width: 100vw;
}
body.dark-mode .notice-bar {
  background: #2a2d34;
  color: #ffb74d;
  border-bottom: 1px solid #333941;
}
.notice-content {
  flex: 1 1 0%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.notice-close {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  color: #ab6700;
  cursor: pointer;
  margin-left: 16px;
  padding: 0 8px;
  line-height: 1;
  transition: color .18s;
}
.notice-close:hover {
  color: #ff9800;
}
body.dark-mode .notice-close {
  color: #ffb74d;
}
body.dark-mode .notice-close:hover {
  color: #ffd700;
}

.site-search {
  min-width: 320px;
  width: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 32px;
  height: 56px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  position: relative;
  z-index: 12;
}
.site-search .search-input {
  flex: 1 1 0%;
  font-size: 1.06rem;
  padding: 0 0 0 8px;
  height: 56px;
  border: none;
  border-radius: 0;
  outline: none;
  background: transparent;
  box-sizing: border-box;
  transition: none;
  min-width: 0;
  max-width: 100%;
  color: var(--text-color);
}
.site-search .search-btn {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  height: 56px;
  width: 40px;
  min-width: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: none;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
}
.site-search .search-btn svg {
  stroke: #b0b0b0;
  width: 20px;
  height: 20px;
}
.site-search .search-input::placeholder {
  color: #b0b0b0;
  font-size: 1.06rem;
}
body.dark-mode .site-search {
  border-bottom: 1px solid #333941;
}
body.dark-mode .site-search .search-input {
  color: #eee;
  background: transparent;
}
body.dark-mode .site-search .search-input::placeholder {
  color: #888;
}

/* 搜索框样式已在上方main-panel-header中定义 */

/* 卡片内容区 */
.logo-grid {
  width: 100%;
  max-width: 100vw;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 28px 18px;
  padding: 0;
  margin-top: 20px; /* 添加上边距，防止与搜索框重叠 */
  overflow-x: auto;
  box-sizing: border-box;
}
.logo-card {
  background: var(--bg-color);
  border-radius: 5px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  height: 240px;
  min-height: 240px;
  max-height: 240px;
  overflow: hidden;
  padding: 34px 0 16px 0;
  box-sizing: border-box;
  transition: box-shadow .18s, border-color .18s, background .18s;
  position: relative; /* 右上角角标定位 */
}
body.dark-mode .logo-card {
  background: #23272e;
  border-color: #333941;
}
.logo-card:hover {
  background: #f3f4f6 !important;
  border-color: #e5e6eb !important;
  box-shadow: 0 2px 10px 0 #2062e623;
}
body.dark-mode .logo-card:hover {
  background: #23272e !important;
  border-color: #555 !important;
  box-shadow: 0 2px 10px 0 #222a33bb;
}

.logo-card-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
}
.logo-svg {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.logo-svg img {
  max-height: 44px;
  max-width: 180px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.logo-title {
  font-size: 1.02rem;
  font-weight: 500;
  margin: 0 0 1.5px 0;
  color: var(--text-color);
  text-align: center;
  letter-spacing: .01em;
  background: transparent;
  border: none;
  padding: 0;
  text-decoration: none !important;
  display: block;
  box-sizing: border-box;
}
body.dark-mode .logo-title {
  color: #eee;
}
.logo-title a {
  color: inherit;
  text-decoration: none;
  transition: color .15s;
  cursor: pointer;
}
.logo-title a:hover {
  color: #222;
  text-decoration: none;
}

/* logo-meta 分类名称按钮优化 */
.logo-meta,
a.logo-meta,
a.logo-meta:link,
a.logo-meta:visited,
a.logo-meta:active,
a.logo-meta:focus,
a.logo-meta:hover,
.logo-card .logo-meta,
.logo-card a.logo-meta,
.logo-card a.logo-meta:link,
.logo-card a.logo-meta:visited,
.logo-card a.logo-meta:active,
.logo-card a.logo-meta:focus,
.logo-card a.logo-meta:hover {
  color: #444 !important;
  font-size: 0.7rem !important;
  border: 1px solid #e5e6eb !important;
  border-radius: 6px !important;
  padding: 4px 14px !important;
  display: inline-block !important;
  margin: 7px 0 0 0 !important;
  background: #f3f4f6 !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  line-height: 1.6 !important;
  cursor: default !important;
}
body.dark-mode .logo-meta,
body.dark-mode .logo-card .logo-meta {
  color: #bbb !important;
  background: #23272e !important;
  border: 1px solid #333941 !important;
}
.logo-meta *,
.logo-card .logo-meta * {
  color: #444 !important;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  text-decoration: none !important;
}
body.dark-mode .logo-meta *, body.dark-mode .logo-card .logo-meta * {
  color: #bbb !important;
}
.logo-meta:hover,
a.logo-meta:hover,
.logo-card .logo-meta:hover,
.logo-card a.logo-meta:hover {
  border-color: #b0b0b0 !important;
  color: #222 !important;
  background: #ededed !important;
  text-decoration: none !important;
}
body.dark-mode .logo-meta:hover,
body.dark-mode .logo-card .logo-meta:hover {
  color: #fff !important;
  background: #23272e !important;
  border-color: #666 !important;
}

/* LOGO CARD 操作按钮样式 */
.logo-card-actions {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 2px;
  padding-top: 22px;
  margin-bottom: 10px;
}

/* 按钮初始和所有非悬停/聚焦/点击状态都透明 */
.logo-card-actions .icon-btn,
.logo-card-actions .icon-btn:active,
.logo-card-actions .icon-btn.active,
.logo-card-actions .icon-btn:focus,
.logo-card-actions .icon-btn:visited {
  width: 38px;
  height: 18px;
  border-radius: 14px;
  background: transparent !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  padding: 0;
  border: none;
  color: #2062e6;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
}

/* 图标颜色 */
.logo-card-actions .icon-btn .iconfont {
  font-size: 24px;
  color: #2062e6;
  display: block;
  line-height: 1;
}
.logo-card-actions .icon-btn[download] .iconfont {
  color: #06c167;
}

/* 只在悬停或聚焦时有底色 */
.logo-card-actions .icon-btn:hover,
.logo-card-actions .icon-btn:focus {
  background: #c4c5c6 !important;
  box-shadow: none !important;
}
body.dark-mode .logo-card-actions .icon-btn:hover,
body.dark-mode .logo-card-actions .icon-btn:focus {
  background: #26304a !important;
  box-shadow: none !important;
}

/* 禁止点击后有底色 */
.logo-card-actions .icon-btn:active,
.logo-card-actions .icon-btn.active {
  background: transparent !important;
  box-shadow: none !important;
}
body.dark-mode .logo-card-actions .icon-btn:active,
body.dark-mode .logo-card-actions .icon-btn.active {
  background: transparent !important;
  box-shadow: none !important;
}

/* 白色SVG角标（右上角） */
.white-svg-badge {
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  left: unset !important;
  background: transparent !important;   /* 没有底色 */
  color: #222 !important;               /* 图标颜色可自定，比如#222为深灰 */
  font-size: 20px;
  border-radius: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 1;
  font-weight: bold;
  pointer-events: none;
  box-shadow: none !important;          /* 无阴影 */
  padding: 0;
  margin: 0;
  border: none !important;              /* 无边框 */
}

/* 侧栏底部版权 */
.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  color: #1b1b1b;
  font-size: 0.96em;
  text-align: center;
  min-height: 36px;
}
.sidebar-footer a {
  color: #1b1b1b;
  text-decoration: underline;
  font-size: inherit;
}
body.dark-mode .sidebar-footer, body.dark-mode .sidebar-footer a {
  color: #bbb;
}
@media (max-width: 800px) {
  .sidebar-footer { display: none; }
}

/* 响应式优化 */
@media (max-width: 1500px) {
  :root { --layout-max-width: 1200px; }
  .logo-grid { grid-template-columns: repeat(4, 1fr);}
}
@media (max-width: 1000px) {
  :root { --layout-max-width: 96vw; }
  .logo-grid { grid-template-columns: repeat(2, 1fr);}
  .header-inner { padding: 0 10px; }
  .main-scroll, .site-search { padding-left: 10px; padding-right: 10px;}
  .notice-bar { padding-left: 10px; padding-right: 10px;}
  .sidebar-box { font-size: 0.99em;}
  .site-logo { margin-left: var(--sidebar-width); }
}
@media (max-width: 900px) {
  .main-panel-header {
    padding-right: 0; /* 移除右侧内边距 */
    border-right: 1px solid var(--border-color); /* 只保留右侧边框 */
    border-top: none; /* 移除顶部边框 */
    border-bottom: 1px solid #ccc; /* 保持明显的底部边框 */
    box-shadow: none; /* 移除阴影效果，避免出现两条线 */
  }
  
  .main-panel-header .site-search {
    padding: 0 16px;
    width: 100%; /* 填充整个可用空间 */
  }
  
  .main-scroll {
    padding: 16px;
  }
  
  .notice-bar {
    width: 100%; /* 填充整个可用空间 */
  }
}
@media (max-width: 800px) {
  .sidebar-box { display: none; }
  .main-panel {
    left: 0;
    width: 100%;
    max-width: 100vw;
    border-left: none; /* 移除左侧边框 */
  }
  .site-logo { margin-left: 0; }
}
@media (max-width: 600px) {
  .logo-grid { grid-template-columns: 1fr; gap: 18px;}
  .main-scroll, .site-search { padding-left: 4px; padding-right: 4px;}
  .notice-bar { font-size: 0.95rem; padding-left: 4px; padding-right: 4px;}
  .sidebar-box { font-size: 1em; }
  .icon-btn {
    width: 32px;
    height: 32px;
  }
  .icon-btn svg,
  .icon-btn img {
    width: 20px;
    height: 20px;
  }
  .logo-grid { 
    grid-template-columns: 1fr; 
    gap: 18px;
  }
}
/* 新增：让 post 页面 logo 卡片正方形并居中内容 */
.single-logo-card {
    width: 260px;
    height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0 auto;
}
.single-logo-card .logo-svg {
    width: 48px;
  height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px auto;
}
.single-logo-card .logo-svg img {
    max-height: 44px;
  max-width: 180px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.single-logo-card .logo-title {
    text-align: center;
    font-size: 1.1em;
    margin-bottom: 1.5px;
    font-weight: bold;
}
.single-logo-card .logo-meta {
    text-align: center;
    font-size: 0.95em;
    margin-bottom: 14px;
    display: inline-block;
}
.single-logo-card .logo-meta a {
    color: #666;
    text-decoration: none;
}
.single-logo-card .logo-card-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 10px;
}
.sidebar-footer a,
.sidebar-footer a:visited,
.sidebar-footer a:active,
.sidebar-footer a:focus,
.sidebar-footer a:hover {
    text-decoration: none !important;
}
/* 优化分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 2em 0;
    padding: 0;
}
.pagination ul {
    display: flex;
    gap: 2px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.pagination li {
    display: inline-block;
    background: none !important;
    box-shadow: none !important;
}
.pagination span, .pagination a {
    display: inline-block;
    min-width: 28px;
    height: 28px;
    line-height: 28px;
    font-size: 12px;
    text-align: center;
    color: #444;
    border-radius: 12px;
    background: #f6f7f8;
    margin: 0;
    text-decoration: none;
    border: none;
    transition: all 0.2s;
    box-sizing: border-box;
    cursor: pointer;
}
.pagination .current,
.pagination span.current {
    background: #bbb;
    color: #222;
    font-weight: bold;
}
.pagination a:hover, .pagination a:focus,
.pagination span:not(.current):hover {
    background: #bbb;
    color: #222;
}
.pagination .prev, .pagination .next {
    font-size: 16px;
    min-width: 60px;
    background: #f6f7f8;
    color: #444;
}
.pagination .prev:hover, .pagination .next:hover {
    background: #bbb;
    color: #222;
}
.pagination .current span {  background: #222;      /* 深色底，按需替换 */
  color: #fff !important;
  border-radius: 4px;    /* 圆角可选 */
  padding: 0 10px;
  font-weight: bold;
  box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}

/* Logo卡片按钮样式重置 */
.logo-card-actions .icon-btn,
.logo-card-actions .icon-btn:active,
.logo-card-actions .icon-btn.active,
.logo-card-actions .icon-btn:focus,
.logo-card-actions .icon-btn:visited,
.logo-card-actions .icon-btn[style],
.logo-card-actions .icon-btn:target {
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* 只在鼠标悬停时有底色 */
.logo-card-actions .icon-btn:hover {
  background: #c4c5c6 !important;
}
body.dark-mode .logo-card-actions .icon-btn:hover {
  background: #26304a !important;
}

.logo-card-actions .icon-btn,
.logo-card-actions .icon-btn:active,
.logo-card-actions .icon-btn.active,
.logo-card-actions .icon-btn:focus,
.logo-card-actions .icon-btn:visited,
.logo-card-actions .icon-btn[style],
.logo-card-actions .icon-btn:target,
.logo-card-actions .icon-btn:focus-visible {
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

/* Toast提示，风格与logo-card-actions按钮统一 */
.toast-tip {
    position: fixed;
    right: 36px;
    bottom: 36px;
    min-width: 120px;
    max-width: 80vw;
    background: #2062e6;       /* 主色，与icon-btn一致 */
    color: #fff;
    padding: 10px 22px;
    border-radius: 14px;       /* 圆角与按钮一致 */
    font-size: 1.06em;
    z-index: 9999;
    font-weight: 500;
    letter-spacing: .01em;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 10px 0 #2062e623;  /* 按钮hover的阴影 */
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s, transform .3s;
    transform: translateY(24px);
}
.toast-tip.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
/* 夜间模式适配 */
body.dark-mode .toast-tip {
    background: #26304a;
    color: #fff;
    box-shadow: 0 2px 10px 0 #222a33bb;
}
.correction-link { color: #ff5722; text-decoration: none; margin-left: 10px; }
.correction-link:hover { text-decoration: underline; }



.category-link, .post-meta a, .logo-meta a {
    text-decoration: none;
}
.category-link:hover, .post-meta a:hover, .logo-meta a:hover {
    text-decoration: underline;
}
.category-sep {
    color: #bbb;
    font-size: 14px;
    margin: 0 2px;
}
.sidebar-box {
    /* 保持默认样式，不需要特殊设置 */
    position: relative;
}

.cat-list {
    padding-left: 16px;
    padding-right: 16px;
}

.sidebar-ad {
    margin-top: 20px; /* 和分类内容有间隔 */
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
}
.sidebar-ad img {
    display: block;
    width: 100%;
    border-radius: 14px;
    height: auto;
}
/* 搜索和广告样式已在main-panel-header中定义 */

/* Logo右侧文本样式 */
.logo-right-text {
  margin-left: 12px;
  font-size: 15px;
  color: #888;
  vertical-align: middle;
  display: inline-block;
}

/* 分类链接样式 */

/* 搜索结果页广告位 */
.search-result-ad-container {
  display: flex;
  gap: 20px;
  margin: 0 auto 2em auto;
  max-width: 100%;
}

.search-result-ad {
  flex: 1;
  padding: 15px;
  background-color: var(--bg-color);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  text-align: center;
  overflow: hidden;
}

.search-result-ad img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

body.dark-mode .search-result-ad {
  background-color: var(--bg-color);
  border-color: #333941;
}

/* 移动端适配 - 小屏幕下广告位垂直排列 */
@media (max-width: 768px) {
  .search-result-ad-container {
    flex-direction: column;
  }
}

/* 响应式调整 - 确保在各种屏幕尺寸下滚动条都正确工作 */
@media (max-width: 900px) {
  .main-panel-header {
    padding-right: 0; /* 移除右侧内边距 */
    border-right: 1px solid var(--border-color); /* 只保留右侧边框 */
    border-top: none; /* 移除顶部边框 */
    border-bottom: 1px solid #ccc; /* 保持明显的底部边框 */
    box-shadow: none; /* 移除阴影效果，避免出现两条线 */
  }
  
  .main-panel-header .site-search {
    padding: 0 16px;
    width: 100%; /* 填充整个可用空间 */
  }
  
  .main-scroll {
    padding: 16px;
  }
  
  .notice-bar {
    width: 100%; /* 填充整个可用空间 */
  }
}

@media (max-width: 600px) {
  .main-panel-header {
    padding-right: 0; /* 移除右侧内边距 */
    border-right: 1px solid var(--border-color); /* 只保留右侧边框 */
    border-top: none; /* 移除顶部边框 */
    border-bottom: 1px solid #ccc; /* 保持明显的底部边框 */
    box-shadow: none; /* 移除阴影效果，避免出现两条线 */
  }
  
  .main-panel-header .site-search {
    padding: 0 8px;
    width: 100%; /* 填充整个可用空间 */
  }
  
  .main-scroll {
    padding: 8px;
  }
  
  .notice-bar {
    width: 100%; /* 填充整个可用空间 */
    font-size: 0.95rem;
    padding-left: 4px;
    padding-right: 4px;
  }
  
  .logo-grid { 
    grid-template-columns: 1fr; 
    gap: 18px;
  }
  
  .sidebar-box { 
    font-size: 1em; 
  }
  
  .icon-btn {
    width: 32px !important;
    min-width: 0 !important;
  }
  
  .icon-btn svg,
  .icon-btn .iconfont {
    margin: 0 !important;
  }
}

body.dark-mode .main-panel-header {
  border-bottom: 1px solid #444; /* 深色模式下更明显的边框 */
}

/* 文章页Logo上方广告位 */
.post-logo-ad {
  margin: 2em auto 0 auto;
  padding: 10px;
  text-align: center;
  max-width: 100%;
  overflow: hidden;
}

.post-logo-ad img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}