/* ============================================================
   ui_pro.css — 首页 UI 优化覆盖层（现代简约卡片风 + 响应式）
   加载顺序：style.css → 主题 style.css → 本文件（最后加载，可整体回滚）
   作用范围：仅引入本文件的页面（首页入口），不影响其他页面
   ============================================================ */

/* ---------- 0. 设计 tokens ---------- */
:root {
  --uip-main: #43a047;        /* 主色：站点绿 */
  --uip-main-dark: #2e7d32;
  --uink-1: #2b3330;          /* 主文字 */
  --uink-2: #525f58;          /* 次文字 */
  --uink-3: #66716a;          /* 弱文字（对比度≥4.5:1，保证可读） */
  --uip-line: #e6eae6;        /* 边框 */
  --uip-bg: #f5f7f5;          /* 页面背景 */
  --uip-card: #ffffff;        /* 卡片背景 */
  --uip-radius: 10px;
  --uip-shadow: 0 1px 3px rgba(20, 40, 20, 0.05), 0 2px 8px rgba(20, 40, 20, 0.04);
}

/* ---------- 1. 全局基调 ---------- */
body {
  background: var(--uip-bg) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif !important;
  color: var(--uink-1);
}

/* 统一链接色：正文链接收敛为灰绿两色，hover 主色 */
#body a, #search_bottom a, #foot a {
  color: var(--uink-2);
  transition: color 0.15s ease, background-color 0.15s ease;
}
#body a:hover, #search_bottom a:hover, #foot a:hover {
  color: var(--uip-main-dark);
}
/* 消灭杂色语义类（红/蓝/橙标题统一进卡片色系） */
#body a.redword, #body a.blueword, #body a.orangeword,
#body .redword, #body .blueword, #body .orangeword {
  color: var(--uink-2) !important;
}
#body a.redword:hover, #body a.blueword:hover, #body a.orangeword:hover {
  color: var(--uip-main-dark) !important;
}

/* ---------- 2. 顶部工具条（天气/登录/换肤） ---------- */
#new_top td {
  background-color: transparent !important;
  border-bottom: 1px solid var(--uip-line) !important;
  border-right: none !important;
  border-left: none !important;
  font-size: 12px;
}
#new_top { background: var(--uip-card); }
#new_top a { color: var(--uink-3) !important; }
#new_top a:hover { color: var(--uip-main-dark) !important; }
/* 首页模式切换按钮弱化为小圆点组 */
#new_top td.mode, #new_top td.mode_is {
  width: 34px !important;
  line-height: 32px !important;
}
#new_top td.mode a,
#new_top td.mode_is a {
  background: none !important;
  min-height: 32px;
}
#new_top td.mode a .mode_other {
  background: var(--uip-card) !important;
  border: 1px solid var(--uip-line) !important;
  border-radius: 8px;
  box-shadow: var(--uip-shadow);
  width: auto !important;
  min-width: 96px;
  overflow: hidden;
}
#new_top td.mode a:hover div.mode_other div {
  padding: 0 14px;
  color: var(--uink-2);
}
#new_top td.mode a:hover div.mode_other div:hover {
  background: #f2f7f2;
  color: var(--uip-main-dark);
}

/* ---------- 3. 头部：logo + 搜索 ---------- */
#head { padding: 18px 0 6px; }
#logo { text-align: left; }
#logo img { border-radius: 12px; }
/* 搜索区留白与圆角（search_h.js 生成的输入框/按钮） */
#search_ { text-align: left; }
#search_body { margin-top: 4px; }
#search_body #kw,
#search_body #kw2,
#search_body #f {
  border: 1px solid var(--uip-line) !important;
  border-radius: 8px !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
  outline: none;
}
#search_body #kw:focus, #search_body #kw2:focus {
  border-color: var(--uip-main) !important;
  box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.12);
}
/* 搜索分类导航（网页/商品/图片…）与按钮收敛为主色系 */
#search_bar_in a { border-radius: 6px 6px 0 0; }
#search_body #su, #search_body #su2 {
  border-radius: 8px !important;
  filter: none;
}
/* 站点名灰字弱化 */
#search_hot_word, #search_hot_word a { color: var(--uink-3) !important; font-size: 12px !important; }

/* ---------- 4. 推广条（head_ad） ---------- */
#head_ad {
  max-width: 1170px;
  margin: 8px auto 10px;
  padding: 5px 16px;
  background: var(--uip-card);
  border: 1px solid var(--uip-line);
  border-radius: 999px;
  box-shadow: var(--uip-shadow);
  text-align: center;
  line-height: 24px;
}
#head_ad a {
  color: var(--uink-2) !important;
  font-size: 13px !important;
  margin: 0 14px !important;
  text-decoration: none;
}
#head_ad a:hover { color: var(--uip-main-dark) !important; }

/* ---------- 5. 卡片体系（名站/强调块/栏目/收藏） ---------- */
#mingz, .mingz, .qiangdiao, .column, #collection {
  background: var(--uip-card) !important;
  border: 1px solid var(--uip-line) !important;
  border-radius: var(--uip-radius) !important;
  box-shadow: var(--uip-shadow);
  overflow: hidden;
}
/* 惰性加载容器：内容未展开（仅注释）时去掉卡片外观，不占视觉空间 */
.column.uip-lazy-empty {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
}
#mingz, #collection, .qiangdiao {
  margin-top: 0 !important;
  margin-bottom: 12px !important;
  padding: 4px 10px !important;
}
/* 卡片标题：左侧主色竖条 + 常规字重 */
.mingz .class_name, .qiangdiao .class_name, .column_title, .column_title a, #collection .class_name {
  color: var(--uink-1) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
}
#mingz .class_name, .qiangdiao .class_name, #collection .class_name {
  display: inline-block;
  padding-left: 9px;
  position: relative;
}
#mingz .class_name::before, .qiangdiao .class_name::before, #collection .class_name::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: var(--uip-main);
}
/* 卡片内链接：统一灰绿、点状分隔更轻 */
.mingz li a, .qiangdiao li a, #collection li a {
  color: var(--uink-2) !important;
  font-size: 13px;
}
.mingz li a:hover, .qiangdiao li a:hover, #collection li a:hover {
  color: var(--uip-main-dark) !important;
  background: #f0f6f0;
  border-radius: 4px;
}
/* 强调块去 hover 变色与文字阴影 */
.qd1, .qd2, .qd3, .qd4, .qd5, .qd6, .qd7, .qd8, .qd9 {
  background: transparent !important;
  border: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
}
.qd1:hover, .qd2:hover, .qd3:hover, .qd4:hover, .qd5:hover,
.qd6:hover, .qd7:hover, .qd8:hover, .qd9:hover { background: transparent !important; }
/* 名站大卡片行距更松 */
#mingz li { line-height: 220%; }
.mingz li a { padding: 2px 4px; }

/* 左栏卡片 */
.left .column {
  padding: 8px 12px !important;
  margin-bottom: 12px !important;
  line-height: 210%;
}
.left .column_title {
  border-bottom: 1px solid var(--uip-line) !important;
  margin-bottom: 4px;
  padding: 4px 2px 6px !important;
}
.left .class li a { color: var(--uink-2) !important; }
.left .class li a:hover { color: var(--uip-main-dark) !important; }
/* 左栏彩色括号标签弱化为圆角小胶囊 */
.left .class li b, .left .class_side li b { color: var(--uip-main) !important; }

/* ---------- 6. 收藏条 ---------- */
#collection {
  background-image: none !important;
  padding: 6px 10px !important;
}

/* ---------- 7. 底部「最新点入」折叠为一行（ui_pro.js 配合） ---------- */
#search_bottom { margin-top: 4px; }
#search_bottom .bottom {
  background: var(--uip-card) !important;
  border: 1px solid var(--uip-line) !important;
  border-radius: var(--uip-radius);
  box-shadow: var(--uip-shadow);
  padding: 2px 14px;
  width: auto !important;
  max-width: 1170px;
  margin: 0 auto 12px;
}
#search_bottom .bottom_in {
  border-bottom: none !important;
  margin-bottom: 0 !important;
}
/* 折叠态：只显示一行，点击标题展开 */
#search_bottom .bottom.uip-collapsed .bottom_in {
  max-height: 26px;
  overflow: hidden;
}
#search_bottom .bottom_title {
  cursor: pointer;
  color: var(--uink-2) !important;
  font-weight: 600;
  font-size: 13px;
  user-select: none;
  display: inline-block;
  padding: 3px 0;
}
#search_bottom .bottom_title::after {
  content: "展开 ▾";
  margin-left: 8px;
  font-weight: 400;
  font-size: 12px;
  color: var(--uink-3);
}
#search_bottom .bottom.uip-expanded .bottom_title::after {
  content: "收起 ▴";
}
/* 折叠态下点入链接一行省略 */
#search_bottom .bottom.uip-collapsed .bottom_in a { font-size: 12px; }
/* 底部搜索框卡片化 */
#search_bottom .body {
  background: var(--uip-card) !important;
  border: 1px solid var(--uip-line) !important;
  border-radius: var(--uip-radius);
  box-shadow: var(--uip-shadow);
  padding: 10px 14px;
}

/* 底部搜索按钮收敛为主色系 */
#search_bottom #su2, #search_bottom .bottom_uip_btn,
#search_bottom input[type="submit"], #search_bottom button {
  background-color: var(--uip-main-dark) !important;
  background-image: none !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  filter: none !important;
}

/* ---------- 8. 页脚 ---------- */
#foot {
  color: var(--uink-3) !important;
  font-size: 12px;
  padding: 14px 0 20px;
  line-height: 200%;
}
#foot a { color: var(--uink-3) !important; }
#foot a:hover { color: var(--uip-main-dark) !important; }

/* ---------- 9. 响应式 ---------- */
@media (max-width: 1200px) {
  #head_out { min-width: 0 !important; }
  #head, .body, #foot, #search_bottom .bottom { width: auto !important; max-width: 1170px; margin-left: auto; margin-right: auto; padding-left: 12px; padding-right: 12px; }
  #search_ { width: auto !important; }
  /* 中间宽度隐藏会换行撑高头部的热词广告位（桌面宽屏仍保留） */
  #search_ .forQQ_1, #search_hot_word { display: none !important; }
  #search_body.forQQ1 { margin-bottom: 0 !important; }
  .right { width: 72% !important; }
  .left { width: 25% !important; }
  #new_top td.new_top_1, #new_top td.new_top_class, #new_top td.new_top_4 { width: auto !important; }
}

@media (max-width: 768px) {
  /* 隐藏次要信息：天气只保留城市与温度，隐藏重复/冗长片段 */
  #new_top td.mode, #new_top td.mode_is,
  #date_time, .w_dt_line,
  #new_sc { display: none !important; }
  #new_top td { border-bottom: none !important; }
  #new_top td.new_top_1 { display: block; width: 100% !important; text-align: center; overflow: hidden; white-space: nowrap; }
  #weather_datetime { margin: 0 auto !important; }
  #weather #w_kq, #weather #w_moday, #weather_show > .w_xiangqing { display: none !important; }
  #new_top td.new_top_4 { display: block; width: 100% !important; text-align: center; }

  /* 头部堆叠 */
  #head { display: block; padding: 12px 12px 4px; width: auto !important; }
  #head tbody, #head tr { display: block; width: 100% !important; }
  #head td { display: block; width: 100% !important; }
  #logo { text-align: center; }
  #logo img { max-height: 64px; }
  #search_ { text-align: center; width: 100% !important; }
  /* 压过主题里 630px !important 的硬编码宽度 */
  #search_body, #search_body.forQQ1, #search_bar, #search_bar_in, #f {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  #search_body #kw, #search_body.forQQ1 #kw, #f #kw, #kw {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  #kw2 {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  #search_bar_in a, #search_bar_in a span { width: auto !important; min-width: 0 !important; }
  /* 推广条改为普通圆角矩形，避免窄屏胶囊被撑成椭圆 */
  #head_ad { margin: 8px 12px; padding: 6px 10px; line-height: 22px; border-radius: 10px; }
  #head_ad a { display: inline-block; margin: 2px 8px !important; font-size: 12px !important; }

  /* 主区单列堆叠：左栏移到主内容下方 */
  .body { display: flex; flex-direction: column; padding: 0 10px; width: auto !important; }
  .right { float: none !important; width: 100% !important; order: 1; }
  .left  { float: none !important; width: 100% !important; order: 2; }

  /* 表格卡片：td 堆叠 */
  #mingz table, .qiangdiao table, .column table, #collection table { display: block; width: 100% !important; }
  #mingz tbody, .qiangdiao tbody, .column tbody, #collection tbody { display: block; }
  #mingz tr, .qiangdiao tr, .column tr, #collection tr { display: block; }
  #mingz td, .qiangdiao td, .column td, #collection td { display: block; width: auto !important; text-align: left !important; }
  #mingz td ul, .qiangdiao td ul, .column td ul { text-align: left; }

  /* 名站链接在窄屏改为紧凑三列网格 */
  #mingz .mingz_align { text-align: left; }
  #mingz ul {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px 4px;
    padding: 0;
    margin: 0;
  }
  #mingz li, .mingz li {
    width: auto !important;
    min-width: 0 !important;
    display: block !important;
    line-height: 220%;
    padding: 0 2px !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #mingz li.br_line_100, .mingz li.br_line_100 {
    grid-column: 1 / -1;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* 底部折叠区与页脚 */
  #search_bottom .bottom, #search_bottom .body { margin-left: 10px; margin-right: 10px; padding-left: 10px; padding-right: 10px; }
  #search_bottom .bottom_in a { word-break: break-all; }
  #foot { width: auto !important; padding: 10px 14px 18px; }
}

/* 小屏再降一级：超窄 */
@media (max-width: 420px) {
  #mingz li a, .qiangdiao li a { font-size: 12px; }
  .left .class li { font-size: 13px !important; }
}

/* ============================================================
   视觉增强层 —— 渐变 / 色彩层次 / 动效（在简约卡片风基础上增色）
   ============================================================ */

/* A. 页面背景：顶部淡绿光晕过渡，页面不再"一张白纸" */
body {
  background: linear-gradient(180deg, #e7f4e8 0%, #f0f7f0 280px, var(--uip-bg) 640px) !important;
  background-attachment: scroll !important;
}

/* B. 头部 hero 带：淡绿渐变 */
#head_out {
  background: linear-gradient(180deg, rgba(215, 239, 217, 0.55) 0%, rgba(215, 239, 217, 0) 100%);
}

/* C. 顶部工具条：淡绿底 */
#new_top { background: linear-gradient(180deg, #edf6ed, #ffffff); }

/* D. 卡片 hover：上浮 + 阴影加深 + 边框着色 */
#mingz, .mingz, .qiangdiao, .column, #collection,
#search_bottom .bottom, #search_bottom .body {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
#mingz:hover, .qiangdiao:hover, .column:not(.uip-lazy-empty):hover, #collection:hover,
#search_bottom .bottom:hover, #search_bottom .body:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(30, 80, 35, 0.08), 0 8px 22px rgba(30, 80, 35, 0.07);
  border-color: #cfe6cf !important;
}

/* E. 名站/分类卡片顶部细渐变条，强化卡片轮廓 */
#mingz, .qiangdiao { position: relative; }
#mingz::before, .qiangdiao::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #66bb6a, #a5d6a7 55%, rgba(165, 214, 167, 0));
  pointer-events: none;
}

/* E2. 卡片顶部渐变条跟随分类色（与彩色徽章呼应，:has 降级时保持默认绿） */
.qiangdiao:has(.qd1)::before { background: linear-gradient(90deg, #f0a066, #f8d8ba 55%, rgba(248,216,186,0)); }
.qiangdiao:has(.qd2)::before { background: linear-gradient(90deg, #e8c84a, #f6e7a6 55%, rgba(246,231,166,0)); }
.qiangdiao:has(.qd3)::before { background: linear-gradient(90deg, #aacf8a, #d8ecc8 55%, rgba(216,236,200,0)); }
.qiangdiao:has(.qd4)::before { background: linear-gradient(90deg, #7fc98a, #c6e9cb 55%, rgba(198,233,203,0)); }
.qiangdiao:has(.qd5)::before { background: linear-gradient(90deg, #4fc7b4, #b3e9df 55%, rgba(179,233,223,0)); }
.qiangdiao:has(.qd6)::before { background: linear-gradient(90deg, #6ba8e8, #c4ddf7 55%, rgba(196,221,247,0)); }
.qiangdiao:has(.qd7)::before { background: linear-gradient(90deg, #9b8ad8, #d5cded 55%, rgba(213,205,237,0)); }
.qiangdiao:has(.qd8)::before { background: linear-gradient(90deg, #d68ae0, #efc9f2 55%, rgba(239,201,242,0)); }
.qiangdiao:has(.qd9)::before { background: linear-gradient(90deg, #e88ab0, #f5cad9 55%, rgba(245,202,217,0)); }

/* F. 恢复分类彩色识别：各分类标题色条用各自主题色（渐变） */
.qd1 .class_name::before { background: linear-gradient(180deg, #f0a066, #e8873d) !important; }
.qd2 .class_name::before { background: linear-gradient(180deg, #e8c84a, #dbb52e) !important; }
.qd3 .class_name::before { background: linear-gradient(180deg, #aacf8a, #8cbd68) !important; }
.qd4 .class_name::before { background: linear-gradient(180deg, #7fc98a, #5cb471) !important; }
.qd5 .class_name::before { background: linear-gradient(180deg, #4fc7b4, #35ae9c) !important; }
.qd6 .class_name::before { background: linear-gradient(180deg, #6ba8e8, #4d8fd6) !important; }
.qd7 .class_name::before { background: linear-gradient(180deg, #9b8ad8, #7f6cc7) !important; }
.qd8 .class_name::before { background: linear-gradient(180deg, #d68ae0, #c26ccd) !important; }
.qd9 .class_name::before { background: linear-gradient(180deg, #e88ab0, #d66e99) !important; }

/* G. 链接 hover：微上移，手感更活 */
.mingz li a, .qiangdiao li a, #collection li a, .left .class li a {
  transition: color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
  display: inline-block;
}
.mingz li a:hover, .qiangdiao li a:hover, #collection li a:hover, .left .class li a:hover {
  transform: translateY(-1px);
}

/* H. 推广条：淡绿渐变 + 主色文字，成为页面点缀而不是灰色杂讯 */
#head_ad {
  background: linear-gradient(90deg, #e7f4e8, #f7fbf7 50%, #e7f4e8);
  border: 1px dashed #b7dbb9;
  box-shadow: none;
}
#head_ad a { color: var(--uip-main-dark) !important; font-weight: 500; }
#head_ad a:hover { color: #1b5e20 !important; }

/* I. 收藏条：淡绿渐变底 */
#collection {
  background-image: linear-gradient(90deg, #edf6ed, #ffffff) !important;
}

/* J. 左栏卡片标题：淡绿渐变标题区 */
.left .column_title {
  background: linear-gradient(90deg, #e9f4e9, rgba(233, 244, 233, 0));
  border-radius: 6px;
}

/* K. 搜索分类 tab：hover/选中态主色胶囊 */
#search_bar_in a { transition: background-color 0.15s ease, color 0.15s ease; }
#search_bar_in a:hover { background-color: #e7f4e8; color: var(--uip-main-dark); }

/* L. 底部按钮：主色渐变 + hover 提亮（深色渐变保证白字可读） */
#search_bottom #su2, #search_bottom input[type="submit"], #search_bottom button {
  background-image: linear-gradient(135deg, #2e7d32, #1b5e20) !important;
  box-shadow: 0 2px 6px rgba(46, 125, 50, 0.28);
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}
#search_bottom #su2:hover, #search_bottom input[type="submit"]:hover, #search_bottom button:hover {
  filter: brightness(1.1);
  box-shadow: 0 3px 9px rgba(46, 125, 50, 0.35);
}

/* M. 底部折叠区标题 hover */
#search_bottom .bottom_title:hover { color: var(--uip-main-dark) !important; }

/* N. 页脚：渐变分割线 + 淡绿底 */
#foot {
  border-top: 1px solid transparent;
  border-image: linear-gradient(90deg, rgba(103, 178, 106, 0), #a5d6a7 30%, #a5d6a7 70%, rgba(103, 178, 106, 0)) 1;
  background: linear-gradient(180deg, rgba(231, 244, 232, 0.6), rgba(231, 244, 232, 0));
}

/* O. Logo：柔和光晕 */
#logo img {
  box-shadow: 0 3px 10px rgba(46, 125, 50, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#logo a:hover img {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(46, 125, 50, 0.3);
}

/* P. 惰性容器不参与动效 */
.column.uip-lazy-empty { transform: none !important; transition: none !important; }
.column.uip-lazy-empty::before { content: none !important; }

/* Q. 移动端：关闭上浮动效（触屏无 hover 意义），保留配色增强 */
@media (max-width: 768px) {
  #mingz:hover, .qiangdiao:hover, .column:hover, #collection:hover,
  #search_bottom .bottom:hover, #search_bottom .body:hover,
  .mingz li a:hover, .qiangdiao li a:hover, #collection li a:hover, .left .class li a:hover {
    transform: none;
  }
}

/* ============================================================
   点睛层 —— 彩色徽章 / 胶囊标签 / 选中态
   ============================================================ */

/* R. 分类标题升级为「彩色徽章」：文字用分类色 + 淡色圆角底 */
.qiangdiao .class_name {
  padding: 2px 10px 2px 12px;
  border-radius: 6px;
  background: #f4f8f3;
}
.qiangdiao .class_name::before { left: 4px; }
.qd1 .class_name { color: #9c4c0a !important; background: #fdf3e9 !important; }
.qd2 .class_name { color: #8f7107 !important; background: #fcf8e6 !important; }
.qd3 .class_name { color: #4c7a2e !important; background: #f1f8ec !important; }
.qd4 .class_name { color: #2f7d44 !important; background: #edf8f0 !important; }
.qd5 .class_name { color: #1d7a6a !important; background: #eaf8f6 !important; }
.qd6 .class_name { color: #2a5eb0 !important; background: #edf4fc !important; }
.qd7 .class_name { color: #5d4bb2 !important; background: #f2effb !important; }
.qd8 .class_name { color: #99379f !important; background: #f9eefb !important; }
.qd9 .class_name { color: #b23a6e !important; background: #fbeef4 !important; }

/* S. 推广链接升级为白色胶囊徽章（压过 a 标签内联的 16px/50px 样式） */
#head_ad a {
  display: inline-block;
  padding: 2px 14px !important;
  font-size: 13px !important;
  line-height: 24px !important;
  background: #ffffff;
  border: 1px solid #cfe6cf;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(46, 125, 50, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
#head_ad a:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(46, 125, 50, 0.16);
}

/* T. 搜索分类 tab：当前项主色下划线胶囊 */
#search_bar_in a#searchNavIs, #search_bar_in a.is {
  color: var(--uip-main-dark) !important;
  background: linear-gradient(180deg, rgba(103, 178, 106, 0), rgba(103, 178, 106, 0.16));
  border-bottom: 2px solid var(--uip-main);
}

/* U. 名站/收藏标题行淡绿底，与内容区分
   注意：#mingz 是右栏大容器（内含 .qiangdiao 分类块），
   必须限定 .mingz 子层，否则 ID 特异性会压掉分类彩色徽章文字 */
#mingz .mingz .class_name, #collection .class_name {
  padding: 2px 10px 2px 12px;
  border-radius: 6px;
  background: #eef7ee;
  color: var(--uip-main-dark) !important;
}
#mingz .mingz .class_name::before, #collection .class_name::before { left: 4px; }

/* V. 左栏标题前加一个小圆点，强化模块感 */
.left .column_title { position: relative; padding-left: 16px !important; }
.left .column_title::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--uip-main);
  box-shadow: 0 0 0 3px rgba(67, 160, 71, 0.14);
}

/* W. 最终收尾：移动端推广胶囊紧凑一行（置于所有增强层之后） */
@media (max-width: 768px) {
  #head_ad {
    padding: 6px 6px;
    white-space: nowrap;
    overflow-x: auto;
  }
  #head_ad a {
    padding: 2px 8px !important;
    margin: 2px 3px !important;
    font-size: 11px !important;
    line-height: 20px !important;
  }
  #head_ad a:hover { transform: none; }

  /* 移动端搜索按钮：原精灵图在窄宽下错位，白字「搜网页」裸奔在浅色背景上看不见。
     #f 是 relative 容器，把按钮绝对定位内嵌到输入框右端，不占文档流、不与推广条冲突 */
  #f { background-image: none !important; }
  #search_body #kw, #f #kw {
    width: 100% !important;
    max-width: 100% !important;
    height: 34px !important;
    padding-right: 76px !important;
    box-sizing: border-box;
  }
  #search_body #su {
    position: absolute !important;
    right: 3px;
    top: 45px;
    float: none !important;
    display: block !important;
    width: 68px !important;
    height: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: linear-gradient(135deg, #2e7d32, #1b5e20) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 7px !important;
    font-size: 12px !important;
    line-height: 28px !important;
    text-align: center !important;
    text-indent: 0 !important;
  }
}

/* X. 可读性补强：主题残留的几处低对比文字（实测 < 4.5:1） */
/* 搜索分类 tab 未选中项：原 #6983a5（3.62） */
#search_bar_in a span { color: #4a6486 !important; }
#search_bar_in a:hover span { color: var(--uip-main-dark) !important; }
#search_bar_in a#searchNavIs span, #search_bar_in a.is span { color: var(--uip-main-dark) !important; }
/* 收藏条提示文字：原 #999（2.85） */
.grayword { color: var(--uink-3) !important; }
/* 天气温度橙字：原 #ff6600（2.73），仅调色不改天气功能 */
.w_wendu_ls { color: #b04600 !important; }

/* Y. 桌面搜索按钮归位：#f 固定 632px，#su 被 float 布局挤出表单，
   白字「搜网页」掉到左下角浅绿背景上看不见，精灵图橙块却空着没有文字。
   把按钮绝对定位回 #f 右端（正好接输入框右沿），重建为清晰深绿按钮。
   与 W 段的移动端规则互补：769px 以上走这里，768px 及以下走 W。 */
@media (min-width: 769px) {
  /* 精灵图橙块去掉，避免按钮右缘露橙；输入框边框由基础层提供 */
  #f { background-image: none !important; }
  /* 14px 的换搜索引擎小箭头 c_bar_1.gif 正好压在新按钮右下角，
     像是残留橙色碎片；隐藏它（左侧 Bai百度 logo 仍可展开引擎列表） */
  #changebar { display: none !important; }
  #search_body #su {
    position: absolute !important;
    right: 1px;
    top: 5px;
    float: none !important;
    display: block !important;
    width: 81px !important;
    height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: linear-gradient(135deg, #2e7d32, #1b5e20) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    line-height: 32px !important;
    text-align: center !important;
    text-indent: 0 !important;
    white-space: nowrap;
  }
}
