/* 千卷书签 导航站 —— 前台补充样式 */
:root {
  
  --theme-color: #282a2d;
  --theme-color-hover:#f1404b;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

a { color: var(--theme-color); }
a:hover { color: var(--theme-color-hover); }

.icon-lg { font-size: 1.25em; }
.icon-fw { width: 1.35em; display: inline-block; text-align: center; }
.text-ss { font-size: 0.75em; }

/* 顶部天气栏 */
.weather-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 10px;
  row-gap: 2px;
  padding: 5px 16px;
  font-size: 12px;
  line-height: 20px;
  color: #6b7280;
  background: #fafbfd;
  border-bottom: 1px solid #eef1f6;
}
.weather-bar .weather-city { font-weight: 700; color: #282a2d; }
.weather-bar .weather-switch { color: var(--theme-color-hover); text-decoration: none; }
.weather-bar .weather-switch:hover { color: var(--theme-color-hover); text-decoration: underline; }
.io-black-mode .weather-bar { background: #1b1d22; border-color: #2c2f36; color: #9aa0aa; }
.io-black-mode .weather-bar .weather-city { color: #e9eaee; }

@media (max-width: 991.98px) {
  .weather-bar .weather-day-far { display: none; }
}

@media (max-width: 767.98px) {
  .weather-bar {
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 5px 12px;
    overflow: hidden;
  }
  .weather-bar .weather-day-extra { display: none; }
  .weather-bar .weather-day {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* 站点图标 */
.url-img { position: relative; }
.url-img .letter-avatar {
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--theme-color);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  border-radius: 50%;
}
.url-card .mini .url-img .letter-avatar { font-size: 11px; }
.url-img > img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}

/* 顶部用户区 */
.user-menu .dropdown-menu { font-size: .8rem; min-width: 8rem; }
.navbar-menu .nav-link { color: inherit; }
.navbar-menu .user-menu > .nav-link { display: flex; align-items: center; gap: 4px; }

/* 公告栏 */
#bulletin_box .bulletin-swiper { min-width: 0; }
#bulletin_box a { color: inherit; }
#bulletin_box .bulletin-close { color: inherit; }

/* 搜索 */
.s-search .s-type-list label { cursor: pointer; }
.s-search .search-type label { cursor: pointer; }
.s-search .super-search-fm input { border-radius: 30px; }
.hot-keywords .badge { color: #666; font-weight: 400; font-size: 14px;}

/* 我的导航编辑 */
#my-nav-box.editing .url-card { cursor: pointer; }
#my-nav-box.editing .url-card:hover .card { box-shadow: 0 0 0 2px var(--theme-color); }
.nav-remove-tip {
  display: none;
  position: absolute;
  top: -8px; right: 4px;
  z-index: 5;
  width: 20px; height: 20px;
  line-height: 18px;
  border-radius: 50%;
  background: #e74c3c;
  color: #fff;
  text-align: center;
  font-size: 12px;
}
#my-nav-box.editing .url-card { position: relative; }
#my-nav-box.editing .url-card .nav-remove-tip { display: block; }

/* 板块锚点偏移 */
.term-section { scroll-margin-top: 90px; }
.term-section .content-layout { padding: 0; }
.term-section h4 .site-tag { color: var(--theme-color); }

/* 详情页 */
.siteico { position: relative; }
.siteico .img-cover {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
  background: #f3f3f3;
  aspect-ratio: 383 / 328;
  object-fit: cover;
}
.siteico-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--theme-color);
  color: #fff;
  font-size: 40px;
  font-weight: 700;
  aspect-ratio: 383 / 328;
  border-radius: 8px;
}
.siteico .tool-actions { display: flex; justify-content: center; }
.site-body .btn-cat {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  background: rgba(136, 136, 136, .12);
  font-size: .75rem;
  color: #666;
  margin-bottom: 4px;
}
.site-body .site-name { word-break: break-word; }
.site-body .site-go .btn-arrow {
  background: var(--theme-color);
  border-color: var(--theme-color);
  color: #fff;
}
.site-content .panel-body {
  line-height: 1.9;
  word-break: break-word;
}
.site-content .panel-body img { border-radius: 6px; }

/* 面包屑 */
.breadcrumb-item + .breadcrumb-item::before { content: "/"; color: #bbb; }

/* 登录注册 */
.auth-card { border: 0; box-shadow: 0 20px 50px rgba(0, 0, 0, .08); border-radius: 12px; }
.auth-card .form-control { height: 44px; }

/* 用户中心 */
.user-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--theme-color);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
}
.btn-unfav { margin: -18px 10px 16px; position: relative; z-index: 3; }
#tab-fav .url-body { padding-bottom: 0; }

/* 分页 */
.pagination .page-link { color: #555; border-radius: 6px; margin: 0 2px; }
.pagination .page-item.active .page-link { background: var(--theme-color); border-color: var(--theme-color); }

/* 错误页 */
.error-code { font-size: 84px; line-height: 1; font-weight: 800; color: var(--theme-color); }
.nothing { background: transparent; }

/* 维护页 */
.maintenance-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: #f5f6f8;
}
.maintenance-box {
  background: #fff;
  border-radius: 14px;
  padding: 60px 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .08);
}

/* 移动端侧边栏（主题默认 display:none，仅展开时显示并滑入） */
@media (max-width: 767.98px) {
  .sidebar-nav {
    display: none;
    width: 100% !important;
    height: 100% !important;
  }
  .sidebar-nav > .sidebar-nav-inner {
    width: 260px !important;
    max-width: 260px !important;
  }
  body.sidebar-open .sidebar-nav {
    display: block !important;
    z-index: 1090;
  }
  body.sidebar-open .sidebar-nav > .sidebar-nav-inner {
    -webkit-transform: translate3d(0, 0, 0) !important;
    transform: translate3d(0, 0, 0) !important;
  }
  body.sidebar-open { overflow: hidden; }
  body.sidebar-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 1080;
  }
  .main-content { margin-left: 0 !important; }
  .main-content .page-header { left: 0 !important; }
}

/* 桌面端收缩侧边栏 */
body.sidebar-mini .sidebar-nav { width: 64px; }
body.sidebar-mini .sidebar-nav .sidebar-item span,
body.sidebar-mini .sidebar-nav .sidebar-more,
body.sidebar-mini .sidebar-nav .sidebar-item ul,
body.sidebar-mini .sidebar-nav .logo-expanded,
body.sidebar-mini .sidebar-footer { display: none; }
body.sidebar-mini .sidebar-nav .logo-collapsed { display: block !important; }
body.sidebar-mini .main-content { margin-left: 64px; }
body.sidebar-mini .main-content .page-header { left: 64px; }
.sidebar-nav .logo-collapsed { display: none; }
.sidebar-nav .logo-collapsed img { height: 24px !important; width: auto; }
.sidebar-nav .logo-collapsed,
.sidebar-nav .logo-expanded { text-align: center; }

/* 侧栏底部快捷链接：横向排列，去掉列表符号，使用本地图标 */
.sidebar-footer .sidebar-menu-inner ul {
  width: 100%;
  max-width: 190px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}
.sidebar-footer .sidebar-menu-inner li {
  list-style: none;
  line-height: 1.7;
}

.sidebar-footer .sidebar-menu-inner a { white-space: nowrap; }
.sidebar-footer .sb-link-icon {
  width: 16px;
  height: 16px;
  vertical-align: -2px;
  margin-right: 2px;
  filter: grayscale(60%);
  opacity: 0.75;
}
.io-black-mode .sidebar-footer .sb-link-icon { filter: grayscale(40%) brightness(1.3); opacity: 0.85; }
.io-black-mode .sidebar-footer .sidebar-menu-inner li + li::before { background: #3a3d45; }

/* ================= 响应式（Bootstrap 4：<576 手机 / 576-767 大屏手机 / 768-991 平板 / ≥992 桌面） ================= */

/* 详情页富文本中的宽表格改为局部滚动，避免整页横向溢出 */
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-scroll > table { margin-bottom: 0; }

@media (max-width: 767.98px) {
  /* 移动端不保留侧栏占位（覆盖收缩侧栏的 margin） */
  .main-content,
  body.sidebar-mini .main-content { margin-left: 0 !important; }
  .main-content .page-header,
  body.sidebar-mini .main-content .page-header { left: 0 !important; }

  .container.container-fluid.customize-width { padding-left: 12px; padding-right: 12px; }

  /* 搜索类型标签自动换行，避免右侧选项被裁掉 */
  .s-search .search-type {
    white-space: normal;
    flex-wrap: wrap;
  }
  .s-search .search-type li label { padding: 0 9px; font-size: 13px; }

  /* 站点卡片更紧凑 */
  .url-card .card-body { padding: .65rem .55rem; }
  .url-card .mini .url-img { width: 22px; height: 22px; }
  .url-card .url-info { min-width: 0; }
  .url-card .url-info strong { font-size: 13px; }

  /* 页脚长文本换行 */
  .main-footer .footer-text { white-space: normal; word-break: break-word; }
  .main-footer { padding-left: 16px !important; padding-right: 16px !important; }

  /* 返回顶部等悬浮按钮避开 iPhone 底部安全区 */
  #footer-tools {
    right: 8px !important;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* 小屏手机 */
@media (max-width: 359.98px) {
  .url-card .url-info strong { font-size: 12px; }
  .hot-keywords .badge { font-size: 11px; }
}

/* 置顶（返回顶部）按钮：主题默认隐藏 .go-up，这里恢复并在滚动后显示 */
#footer-tools .go-up {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 48px;
  visibility: hidden;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s, visibility .25s;
}
#footer-tools .go-up.is-visible {
  visibility: visible;
  opacity: 1;
  transform: none;
}
#footer-tools .go-up i {
  font-size: 14px;
  line-height: 1;
}
#footer-tools .go-up .go-up-label {
  font-size: 10px;
  line-height: 1.2;
  margin-top: 2px;
}
/* 夜间模式切换按钮：图标水平垂直居中 */
#switch-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
#switch-mode .mode-ico {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin: 0;
  object-fit: contain;
}

/* 夜间模式补充 */
.io-black-mode .auth-card,
.io-black-mode .maintenance-box { background: #222; }
.io-black-mode .site-body .btn-cat { background: rgba(255, 255, 255, .1); color: #bbb; }

/* 互动留言 */
.comment-avatar {
  width: 32px; height: 32px; line-height: 32px;
  display: inline-block; text-align: center;
  background: #f1404b; color: #fff; font-size: 13px; font-weight: 700;
}
.comment-content { line-height: 1.8; word-break: break-word; }

/* 友情链接页 */
.friend-link-item { border: 1px solid #eceef3; border-radius: 8px; color: inherit; }
.friend-link-item:hover { border-color: #f1404b; text-decoration: none; color: inherit; }
.friend-link-avatar {
  width: 38px; height: 38px; line-height: 38px; flex: 0 0 38px;
  display: inline-block; text-align: center; overflow: hidden;
  background: #f1404b; color: #fff; font-size: 14px; font-weight: 700;
}
.io-black-mode .friend-link-item { border-color: #333; }
.nav-link{
  padding-top:0px;
  padding-bottom:0px;
}
.nav-link.active {
  color: #fff !important;
  border-radius: 15px;
  background-color: #f1404b !important;
  height: 28px;
  line-height: 28px;
  box-sizing: border-box !important;
  padding-top:0px;
  padding-bottom:0px;
}
.nav-item{
    height: 28px;
  line-height: 28px;
  box-sizing: border-box;
}

.content-wrap{
  margin-top: 10px;
}
.text-commonnav{
      display: flex;
    align-items: center;
    word-break: keep-all;
    padding-left: 9pt;
    height: 31px;
  font-size: 14px  !important;

}
.text-commonnav.with-arrow::after {
  content: "";
  display: inline-block;
  width: 12px;           /* 箭头宽度 */
  height: 12px;          /* 箭头高度 */
  margin-left: 6px;      /* 与文字间距 */
  background-image: url("/static/images/arrow.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle; /* 垂直居中对齐文字 */
}

.weather-bar{
  margin:0 auto;
}

.sidebar-nav .flex-bottom a,.sidebar-menu-inner a{
  padding: 8px 0px;
  margin: 0px 8px;
}
.footer-text{
  font-size: 12px;
}
.text-lg{
  font-weight: 600;
}