body {
  background: #e8ecf1;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

/*自定义模式启动*/
.customize_mode .link-list-a {
  color: #75b1c7;
  cursor: pointer;
  position: relative;
}

.customize_mode .bianji {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  text-align: center;
  line-height: 45px;
  width: 100%;
  background: rgba(51, 132, 162, 0.9);
  color: #FFF;
  opacity: 0;
  border-radius: 6px;
  transition: opacity 0.2s;
  cursor: pointer;
  font-size: 14px;
  z-index: 5;
}

.customize_mode .bianji:hover {
  opacity: 1;
}

.edit-category {
  position: absolute;
  left: 0;
  top: 0;
}

.main .banner {
  margin-top: 90px;
}

.shaow-edit-category {
  display: block
}

/*自定义模式提示条*/
.customize-mode-tips {
  position: fixed;
  top: -70px;
  left: 50%;
  width: 500px;
  max-width: 90%;
  margin-left: -250px;
  background: #ea644a;
  z-index: 1000;
  text-align: center;
  color: #FFF;
  border-radius: 0 0 8px 8px;
  transition: top 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.customize-mode-tips h4 {
  font-size: 16px;
  font-weight: 400;
  margin: 10px 0 0 0;
}

.customize-mode-tips .customize {
  display: block;
  width: 100%;
  border-radius: 0 0 8px 8px;
  color: #FFF;
  padding: 6px 0;
}

.customize-mode-tips .customize:hover {
  background: #da542e;
}

.not_operational {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  background: rgba(255, 255, 255, .8);
  display: none;
}

.shaow_tips {
  display: block;
  top: 0;
}

/*头部flex布局，logo左、按钮自然居中靠右*/
header .main {
  display: flex;
  align-items: center;
  position: relative;
}

header .head-btn {
  font-size: 16px;
  z-index: 100;
  display: flex;
  gap: 6px;
  margin-left: auto;
  margin-right: 12px;
}

header .head-btn a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #666;
  transition: all 0.25s;
  text-decoration: none;
}

header .head-btn a:hover {
  background: rgba(0,0,0,0.06);
  color: #333;
}


/*-------------------内容区域----------------------*/
#content {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}

/*搜索区域*/
#Select {
  width: 85%;
  float: left;
  position: relative;
  padding-right: 10px
}

.Select-box {
  width: 80px;
  background: #FFF;
  border: 1px solid #ddd;
  border-right: none;
  border-radius: 8px 0 0 8px;
  text-align: center;
  overflow: hidden;
  font-size: 14px;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 10;
}

.Select-box ul {
  margin: 0;
  height: 46px;
}

.Select-box ul li {
  height: 46px;
  line-height: 46px;
  cursor: pointer;
}

.Select-box ul li:hover {
  background: #317ef3;
  color: #FFF;
}

.Select-box ul li.this_s {
  color: #317ef3;
  border-bottom: 1px solid #ddd;
}

.Select-box ul li.this_s:hover {
  background: #FFF;
  color: #317ef3;
}

#input {
  width: 100%;
  outline: none;
  padding: 0 10px;
  height: 46px;
  line-height: 46px;
  border: 1px solid #ddd;
  border-radius: 0 8px 8px 0;
  font-size: 15px;
  color: #333;
  transition: border-color 0.3s;
}

#input:focus {
  border-color: #317ef3;
}

#so-btn {
  width: 15%;
  float: right;
  height: 36px;
  background: #3385ff;
  color: #fff;
  border: none;
  font-size: 16px;
}

.qingkong {
  position: absolute;
  right: 20px;
  top: 50%;
  margin-top: -9px;
  width: 18px;
  height: 18px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 18px;
  line-height: 16px;
  color: #666;
  cursor: pointer;
  text-align: center;
  font-size: 14px;
  display: none;
}

.qingkong:hover {
  background: rgba(0, 0, 0, 0.2);
}

#so-btn i.icon {
  margin-right: 0;
  font-size: 20px;
}

/*---------------首页内容区域------------------*/
.linkList-item {
  max-width: 1400px;
  margin: 0 auto;
}

/* flex 布局替代 float，避免不等高卡片造成的空隙 */
/* 清除 Bootstrap container 对 flex 布局的干扰 */
.mainContent,
.linkList-item {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.linkList-item .row.dh {
  display: flex;
  flex-wrap: wrap;
  column-gap: 10px;
  row-gap: 10px;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 10px;
  padding-right: 10px;
}

.linkList-item .row.dh > .col-sm-6,
.linkList-item .row.dh > .col-md-4 {
  float: none !important;
  flex-shrink: 0;
  flex-grow: 0;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* 清除 .row 的 clearfix 伪元素，避免它们成为 flex 子项占位 */
.linkList-item .row.dh::before,
.linkList-item .row.dh::after {
  display: none;
}

/* 修复内层 .row 负 margin 溢出，避免卡片视觉重叠 */
.linkList-item .row.dh > .col-sm-6 > .row,
.linkList-item .row.dh > .col-md-4 > .row {
  margin-left: 0;
  margin-right: 0;
}

.linkList-item .row {
  background: #fff;
  border-radius: 4px;
  padding: 10px 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #e2e6ea;
}

.link-list-tit {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  display: block;
  margin-bottom: 8px;
  padding: 0 0 5px 6px;
  border-left: 3px solid #459df5;
  border-bottom: 1px solid #eef1f5;
  letter-spacing: 0.5px;
}

.edit-category {
  display: none
}

.link-list-a {
  background: #f5f6f8;
  display: block;
  margin-bottom: 3px;
  text-align: center;
  line-height: 36px !important;
  border-radius: 3px;
  border: 1px solid #e8ebef;
  font-size: 13px;
  color: #3a3f47;
  font-weight: 500;
  transition: all 0.15s ease;
  text-decoration: none;
}

.link-list-a:hover {
  color: #fff;
  background: #459df5;
  border-color: #459df5;
  text-decoration: none;
}

.link-list-a:last-child {
  margin-bottom: 0;
}

/*以上链接列表的样式为通用样式*/
.bianji {
  display: none;
}

.cnzz_stat_icon_1261855216 {
  display: none;
}

/* 移动端：单列 */
@media (max-width: 640px) {
  .linkList-item .row.dh > .col-sm-6 {
    width: 100% !important;
    flex-basis: 100% !important;
  }

  .linkList-item .row {
    padding: 8px 6px;
  }

  .link-list-a {
    line-height: 38px !important;
    font-size: 13px;
    margin-bottom: 3px;
  }

  .link-list-tit {
    font-size: 13px;
    margin-bottom: 6px;
    padding: 0 0 4px 5px;
  }

  header .head-btn {
    gap: 2px;
  }

  header .head-btn a {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}

/* 平板端：两列 */
@media (min-width: 641px) and (max-width: 991px) {
  .linkList-item .row.dh > .col-sm-6 {
    width: calc((100% - 10px) / 2) !important;
    flex-basis: calc((100% - 10px) / 2) !important;
  }
}

/* 桌面端：三列 */
@media (min-width: 992px) {
  .linkList-item .row.dh > .col-md-4 {
    width: calc((100% - 20px) / 3) !important;
    flex-basis: calc((100% - 20px) / 3) !important;
  }
}

/* ========== 暗黑模式 ========== */
body.dark-mode {
  background: #1a1a2e;
  color: #c9d1d9;
}

body.dark-mode header {
  background: #16213e;
  border-bottom-color: #2a2a4a;
}

body.dark-mode header .logo {
  background: #16213e;
}

body.dark-mode header .logo a {
  color: #c9d1d9;
}

body.dark-mode header .head-btn a {
  color: #8b949e;
}

body.dark-mode header .head-btn a:hover {
  background: rgba(255,255,255,0.08);
  color: #58a6ff;
}

body.dark-mode .search-box {
  border-color: #30363d;
}

body.dark-mode .search-input {
  color: #c9d1d9;
}

body.dark-mode .search-input::placeholder {
  color: #6e7681;
}

body.dark-mode .linkList-item .row {
  background: #16213e;
  border-color: #2a2a4a;
}

body.dark-mode .link-list-tit {
  color: #c9d1d9;
  border-bottom-color: #2a2a4a;
}

body.dark-mode .link-list-a {
  background: #1a1a2e;
  border-color: #30363d;
  color: #8b949e;
}

body.dark-mode .link-list-a:hover {
  background: #1f6feb;
  border-color: #1f6feb;
  color: #fff;
}

body.dark-mode .search-engine {
  background: #16213e;
  box-shadow: 0 5px 20px rgba(0,0,0,0.4);
}

body.dark-mode .search-engine-list li {
  background: #1a1a2e;
  color: #8b949e;
}

body.dark-mode .search-engine-list li:hover {
  background: #1f6feb;
  color: #fff;
}

body.dark-mode .search-btn {
  background: #16213e;
  color: #58a6ff;
  border-left-color: #30363d;
}

body.dark-mode .search-clear {
  color: #6e7681;
}

body.dark-mode .footer {
  background: #16213e;
  color: #6e7681;
}

body.dark-mode .footer a {
  color: #6e7681;
}

body.dark-mode #get-top {
  background: #1f6feb;
}

body.dark-mode .customize-mode-tips {
  background: #da542e;
}

/* 搜索输入框 */
body.dark-mode .search-input {
  background: #16213e;
  color: #c9d1d9;
}

/* 编辑弹窗 */
body.dark-mode .modal-content {
  background: #16213e;
  color: #c9d1d9;
}

body.dark-mode .modal-header {
  border-bottom-color: #2a2a4a;
}

body.dark-mode .modal-footer {
  border-top-color: #2a2a4a;
}

body.dark-mode .modal-body input {
  background: #1a1a2e;
  border-color: #30363d;
  color: #c9d1d9;
}

body.dark-mode .close {
  color: #c9d1d9;
  text-shadow: none;
}

body.dark-mode .modal-backdrop {
  opacity: 0.6;
}

/* 搜索面板列表项 hover 文字颜色修正 */
body.dark-mode .search-engine-list li:hover {
  color: #fff;
}

/* 链接区域搜索图标背景 */
body.dark-mode .search-icon {
  background: transparent;
}

