/* ========================================== */
/* ohwhat.com/go首页LOGO大小控制 */
/* ========================================== */
/* 1. 标题区域保持居中 */
    .title {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 1000px !important;
        min-height: 120px !important; 
        margin: 10px auto !important;
    }

    /* 2. 电脑端：仅通过 ID 锁定 */
    #main_index .index .title img {
        width: 300px !important;    
        max-width: 300px !important;
        height: auto !important;
        display: block !important;
    }

    /* 3. 手机端：媒体查询 */
    @media (max-width: 600px) {
        #main_index .index .title img {
            width: 40vw !important;        
            max-width: 140px !important;   
        }
    }





/* ========================================== */
/* ohwhat.com/go右上角按钮与头像样式 */
/* ========================================== */
/* --- 更新后的 Sign in 按钮样式：绿蓝渐变 --- */
.signin-button {
    display: inline-block;
    /* 替换为绿蓝渐变 */
    background: linear-gradient(90deg, #10b981, #06b6d4) !important;
    color: white !important;
    padding: 8px 24px;
    border-radius: 20px; /* 保持你喜欢的圆角 */
    text-decoration: none !important;
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    margin-right: 15px;
    transition: all 0.3s ease !important; /* 调整为 0.3s 使过渡更平滑 */
    border: none !important; /* 确保没有默认边框 */
}

/* 增加悬停时的阴影效果 */
.signin-button:hover {
    background: linear-gradient(90deg, #059669, #0891b2) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

/* --- 进阶：已登录时的“头像模式” --- */
.signin-button.has-avatar {
    background-color: transparent !important;
    background: transparent !important; /* 双重保险，彻底移除背景色 */
    padding: 2px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    box-shadow: none !important;
}

/* 鼠标悬停在头像上的反馈 */
.signin-button.has-avatar:hover {
    background-color: rgba(60, 64, 67, 0.08) !important;
}

/* 头像图片大小 */
.user-avatar-img {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
}





/* ========================================== */
/* 隐藏侧边栏+处理中等屏幕宽度下搜索结果的左对齐 */
/* ========================================== */
/* 隐藏侧边栏元素本身 */
#sidebar,
.sidebar {
  display: none !important;
}

/* 修复搜索结果页(/go/search)在中等屏幕宽度下的左对齐问题 */
@media screen and (min-width: 50em) and (max-width: 79.75em) {
  html.center-alignment-no #main_results div#results {
    grid-template:
      "corrections" min-content
      "answers" min-content
      "urls" 1fr
      "pagination" min-content
      / min(100%, 45rem) !important;
    justify-content: start !important;
    padding-left: 36px !important;
    box-sizing: border-box !important;
  }
}





/* 给 Favicon 添加一点圆角和微小的间距，显得更高级 */
.result-favicon {
    border-radius: 4px !important;
    margin-right: 8px !important;
    opacity: 0.8;
}

/* 如果有些网站没有图标，隐藏那个破碎的占位符 */
.result-favicon[src=""] {
    display: none !important;
}





/* ========================================== */
/* 隐藏SearXNG的一些默认元素 */
/* ========================================== */
/* .about_link 和 .info-link 是常见的类名，涵盖了不同页面结构 */
.about_link,
.info-link,
#links_on_top .link_on_top_about,
nav#links_on_top a[href*="/about"] {
    display: none !important;
}

/* 针对性清理：确保搜索结果页和首页不会有遗漏 */
header .about_link,
header .info-link {
    display: none !important;
}

/* 隐藏 Preferences 页面顶部 Logo */
.preferences_endpoint main.page_with_header a[href="/go/"] .logo {
    display: none !important;
}

/* 隐藏 Preferences 页面右上角的关于按钮 */
.preferences_endpoint nav#links_on_top a.link_on_top_about {
    display: none !important;
}

/* 隐藏右上角的设置图标（齿轮），而不影响其他地方 */
a[href="/go/preferences"] {
    display: none !important;
}

/* 隐藏go/preferences右上角的头像，而不影响其他地方 */
.preferences_endpoint .signin-button {
    display: none !important;
}

/* 隐藏go/preferences页面的返回按钮 */
.preferences_back:has(a[href="/go/"]) {
    display: none !important;
}





/* ========================================== */
/* 修复:"Powered by SearXNG © 2026" 文字被裁切一半的问题 */
/* ========================================== */
html, body {
    overflow-x: hidden;
    overflow-y: visible !important;
}

footer {
    display: block !important;
    position: relative !important;
    z-index: 10 !important;
    clear: both !important;
    width: 100% !important;
    text-align: center;
    overflow: visible !important;
    padding-bottom: 24px !important; /* 给最后一行文字留出足够的呼吸空间,防止贴底被裁 */
}





/* ========================================== */
/* 搜索结果页 搜索框左侧图标 */
/* ========================================== */
/* 1. 彻底隐藏原来的 SVG 图标 */
#search_logo svg,
.search_logo svg {
    display: none !important;
}

/* 2. 在所有搜索框容器前插入自定义图标 */
/* 增加 .header_logo 和 #search_logo 的兼容性，确保搜索页也能命中 */
#search_logo::before,
.search_logo::before,
header form::before,
.search_filters form::before {
    content: "" !important;
    display: inline-block !important;
    background-image: url('https://ohwhat.com/wp-content/uploads/2026/04/cropped-Oh_What__iCon.png') !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    margin-right: 12px !important;
    flex-shrink: 0 !important;
    vertical-align: middle !important;
}

/* 3. 手机端专项适配 */
@media (max-width: 600px) {
    #search_logo::before,
    .search_logo::before,
    header form::before,
    .search_filters form::before {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        margin-right: 8px !important;
    }
}

/* 4. 强制搜索栏容器使用 Flex 布局，防止图标被挤开 */
header form,
.search_filters form {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}





/* ========================================== */
/* 左上角 天气标签样式 */
/* ========================================== */
/* 默认电脑端：保持 30px 或你喜欢的间距 */
#weather-widget {
  position: fixed !important;
  left: 35px !important; 
  right: auto !important;
}

/* 屏幕宽度小于 768px 时（手机端）：强制设为 10px */
@media (max-width: 768px) {
  #weather-widget {
    left: 10px !important;
  }
}





/* ========================================== */
/* 搜索结果页:头像与搜索框自适应布局(避免挤压 + 垂直居中对齐)+js */
/* ========================================== */
body.results_endpoint #search_header {
  padding-right: calc(var(--nav-width, 50px) + -2px) !important;
  box-sizing: border-box !important;
}
/* 手机端单独微调 */
@media (max-width: 480px) {
  body.results_endpoint #search_header {
    padding-right: calc(var(--nav-width, 50px) - 10px) !important;
  }
}





/* ============================================================== */
/* 仅修复: 窗口宽度小于 801px 时, 强制移除首页淡蓝色背景 */
/* ============================================================== */
@media (max-width: 800px) {
  /* 针对 html、body 以及 SearXNG 首页容器进行背景透明化 */
  html, 
  body, 
  body.index_endpoint,
  html.theme-auto,
  #main_index,
  .main-content,
  .page-content,
  body > div {
      background: none !important;
      background-color: transparent !important;
      background-image: none !important;
      box-shadow: none !important;
  }
}





/* ========================================== */
/* 调整ohwhat.com/go页面的区域颜色 */
/* ========================================== */
/* 将页眉背景强制设为纯白 */
#search_header {
    background-color: #ffffff !important;
}

/* 将页脚背景强制设为纯白 */
footer {
    background-color: #ffffff !important;
}





/* ========================================================================= */
/* 首页(/go/):禁用移动端搜索框聚焦时的全屏接管效果,始终保持桌面端布局 */
/* ========================================================================= */
@media screen and (max-width: 50em) {
  html.center-alignment-no #search_view,
  html.center-alignment-no #search_view:focus-within {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    max-height: none !important;
    z-index: auto !important;
    background: transparent !important;
  }

  html.center-alignment-no .index .title,
  html.center-alignment-no #links_on_top,
  html.center-alignment-no #weather-widget {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  html.center-alignment-no #search_view:focus-within .search_box,
  html.center-alignment-no #search_view:focus-within .search_box * {
    border: none !important;
  }

  html.center-alignment-no #search_view:focus-within .search_box {
    border-radius: 11.52px !important;
    box-shadow: rgba(34, 38, 46, 0.25) 0px 2px 8px 0px !important;
    background: rgb(255, 255, 255) !important;
  }

  /* 不用 overflow:hidden 裁剪(会连带裁掉下拉推荐菜单),改为让首尾两个按钮各自贴合对应方向的圆角 */
  html.center-alignment-no #search_view:focus-within .search_box #q {
    border-radius: 11.52px 0 0 11.52px !important;
    background: transparent !important;
  }

  html.center-alignment-no #search_view:focus-within .search_box #send_search {
    border-radius: 0 11.52px 11.52px 0 !important;
  }

  html.center-alignment-no #search_view:focus-within .search_box #clear_search {
    border-radius: 0 !important;
  }
}





/* ========================== */
/* 页脚Community样式 */
/* ========================== */
a[href*="activity"] {
    background: linear-gradient(90deg, #10b981, #06b6d4) !important; /* 绿蓝渐变 */
    color: #fff !important;
    padding: 5px 12px !important;
    border-radius: 6px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}
a[href*="activity"]:hover {
    background: linear-gradient(90deg, #059669, #0891b2) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}





/* ========================== */
/* 隐藏、替换SearXNG默认的蓝色 */
/* ========================== */
/* 鼠标悬停在搜索按钮上时，背景色与 Community/Sign in 按钮保持一致 */
#send_search:hover {
    background: linear-gradient(90deg, #10b981, #06b6d4) !important;
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4) !important; /* 增强蓝绿色发光感 */
    color: #ffffff !important;
    cursor: pointer;
}



/* go/preferences页面“保存”与“恢复默认设置”按钮与 Community/Sign in 按钮保持一致 */
/* 1. 默认状态下的样式重构 */
#search_form input[type="submit"],
.preferences_back a[href*="clear_cookies"] {
    background: linear-gradient(90deg, #10b981, #06b6d4) !important;
    color: #ffffff !important;
    padding: 6px 14px !important;       /* 统一内边距 */
    border-radius: 6px !important;      /* 完美匹配 Community 边缘圆角 */
    border: none !important;            /* 剔除 input 原生边框 */
    font-weight: bold !important;
    text-decoration: none !important;
    display: inline-block !important;
    cursor: pointer !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important; /* 丝滑过渡动画 */
}

/* 2. 移除“恢复默认设置”外层 div 容器的自带背景和内边距（防止背景重叠形成奇怪小圆点） */
.preferences_back:has(a[href*="clear_cookies"]) {
    background: none !important;
    padding: 0 !important;
    border: none !important;
}

/* 3. 鼠标悬停（Hover）状态下的高质感蜕变 */
#search_form input[type="submit"]:hover,
.preferences_back a[href*="clear_cookies"]:hover {
    background: linear-gradient(90deg, #10b981, #06b6d4) !important; /* 保持明亮版渐变 */
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4) !important;       /* 精致发光阴影 */
    opacity: 0.95; /* 悬停时轻微亮化反馈 */
}



/* go/preferences页面“启用所有”和“禁用所有”按钮与 Community/Sign in 按钮保持一致 */
/* 1. 默认状态下的样式重构 */
button.enable-all-engines,
button.disable-all-engines {
    background: linear-gradient(90deg, #10b981, #06b6d4) !important;
    color: #ffffff !important;
    padding: 6px 14px !important;       /* 统一内边距，保持与其他按钮高度对齐 */
    border-radius: 6px !important;      /* 完美匹配 Community 边缘圆角 */
    border: none !important;            /* 剥离原本可能存在的边框线 */
    font-weight: bold !important;
    font-size: 14px !important;
    cursor: pointer !important;
    display: inline-block !important;
    transition: all 0.3s ease !important; /* 丝滑过渡动画 */
}

/* 2. 鼠标悬停（Hover）状态下的微光发散反馈 */
button.enable-all-engines:hover,
button.disable-all-engines:hover {
    background: linear-gradient(90deg, #10b981, #06b6d4) !important; /* 维持通透的高亮版渐变 */
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4) !important;       /* 标志性的绿蓝青发光阴影 */
    opacity: 0.95;                                                   /* 悬停微调透明度达到呼吸效果 */
}



/* go/preferences页面“复制”按钮与 Community/Sign in 按钮保持一致 */
/* 1. 默认状态下的样式重构 */
button#copy-hash.button {
    background: linear-gradient(90deg, #10b981, #06b6d4) !important;
    color: #ffffff !important;
    padding: 8px 16px !important;       /* 适当加宽加大，使其比例更像一个紧凑的块级按钮 */
    border-radius: 6px !important;      /* 完美匹配 Community 边缘圆角 */
    border: none !important;            /* 剥离原本的自带细边框 */
    font-weight: bold !important;
    font-size: 14px !important;
    cursor: pointer !important;
    display: inline-block !important;
    line-height: 1.2 !important;        /* 修正文字垂直居中 */
    transition: all 0.3s ease !important; /* 丝滑过渡动画 */
}

/* 2. 鼠标悬停（Hover）状态下的高质感呼吸闪烁 */
button#copy-hash.button:hover {
    background: linear-gradient(90deg, #10b981, #06b6d4) !important; /* 维持通透的高亮版渐变 */
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4) !important;       /* 标志性的绿蓝青发光阴影 */
    opacity: 0.95;                                                   /* 悬停微调透明度达到呼吸效果 */
}



/* go/preferences页面“开关按钮“与 Community/Sign in 按钮保持一致 */
/* 1. 模式 A（常规按钮）：当被勾选时，::before 渲染深蓝色勾（用户界面、隐私选项卡） */
input.checkbox-onoff[type="checkbox"]:not(.reversed-checkbox):checked::before,

/* 2. 模式 B（反转按钮）：当未被勾选时，::before 渲染深蓝色勾（常规、插件选项卡） */
input.checkbox-onoff.reversed-checkbox[type="checkbox"]:not(:checked)::before {
    background: linear-gradient(135deg, #10b981, #06b6d4) !important;
    
    /* 严格锁定原生尺寸，确保不拉伸、不影响任何卡片下的长框 */
    width: 20.24px !important;
    height: 20.24px !important;
    border-radius: 50% !important;
}

/* 确保两种开启模式下的基础文字/图标颜色维持纯白默认 */
input.checkbox-onoff[type="checkbox"]:not(.reversed-checkbox):checked,
input.checkbox-onoff.reversed-checkbox[type="checkbox"]:not(:checked) {
    color: #ffffff !important;
}



/* 搜索结果页面：“上一页”与“下一页”按钮完美替换为 Community 风格 */
/* 1. 联合定位：精准匹配分页导航中的“上一页”和“下一页”提交按钮 */
form.previous_page button[type="submit"],
form.next_page button[type="submit"] {
    background: linear-gradient(135deg, #10b981, #06b6d4) !important;
    border: none !important;
    color: #ffffff !important;
    transition: opacity 0.2s ease-in-out !important; /* 增加悬停过渡动画 */
}

/* 2. 悬停（Hover）效果：轻轻变亮，提升交互质感 */
form.previous_page button[type="submit"]:hover,
form.next_page button[type="submit"]:hover {
    opacity: 0.9 !important;
}



/* go/preferences页面“选项卡”美化：将“常规、用户界面、隐私...”等选项卡被选中时的深蓝色替换为青色 */
/* 1. 当选项卡被选中（对应的单选框被 checked）时，将 label 文字颜色改为 Community 青色 */
.tabs > input:checked + label {
    color: #06b6d4 !important;
    border-bottom-color: #06b6d4 !important; /* 被选中时的下划线 */
}

/* 2. 悬停（Hover）在未选中的选项卡上时，同步使用青色文字与青色底线条 */
.tabs > label:hover {
    color: #06b6d4 !important;
    border-bottom-color: #06b6d4 !important; /* 悬停时的下划线染成青色 */
    border-color: #06b6d4 !important;        /* 兜底：如果有些主题用的是 border-color */
}

/* 3. 保险起见，通过 ID 属性选择器进一步兜底，确保对所有首选项 label 生效 */
label[id^="tab-label-"] {
    transition: color 0.15s ease-in-out, border-color 0.15s ease-in-out !important;
}



/* go/preferences页面“默认类别”被选中及悬停时的深蓝色替换为 Community 青色 */
/* 1. 当分类被选中时：将 label 文字颜色和边框改为青色 */
.preferences_categories input:checked + label.tooltips,
.category input:checked + label.tooltips,
label.tooltips[class*="active"], /* 兼容部分主题的 active 类名 */
input:checked + label.tooltips {
    color: #06b6d4 !important;
    border-color: #06b6d4 !important;
}

/* 2. 当分类被选中时：将 label 内部的 SVG 图标染成青色 */
.preferences_categories input:checked + label.tooltips svg,
.category input:checked + label.tooltips svg,
input:checked + label.tooltips svg {
    fill: #06b6d4 !important;   /* 针对 SVG 填充颜色 */
    stroke: #06b6d4 !important; /* 针对 SVG 描边颜色 */
}

/* 3. 悬停（Hover）在任意分类标签上时：同步呈现青色边框、文字和 SVG */
label.tooltips:hover {
    color: #06b6d4 !important;
    border-color: #06b6d4 !important;
}
label.tooltips:hover svg {
    fill: #06b6d4 !important;
    stroke: #06b6d4 !important;
}



/* 搜索结果页面：“综合、图片...”等分类被选中及悬停时的深蓝色替换为青色 */
/* 1. 当分类按钮被选中（含有 selected 类名）时：文字、下划线染成青色 */
button.category_button.selected {
    color: #06b6d4 !important;
    border-bottom-color: #06b6d4 !important; /* 选中时的底部边框线 */
}

/* 2. 当分类按钮被选中时：文字容器和里面的 SVG 图标同步染成青色 */
button.category_button.selected .category_name {
    color: #06b6d4 !important;
}
button.category_button.selected svg {
    fill: #06b6d4 !important;
    stroke: #06b6d4 !important;
}

/* 3. 悬停（Hover）在任意分类按钮上时：文字、底线和 SVG 同步变为青色 */
button.category_button:hover {
    color: #06b6d4 !important;
    border-bottom-color: #06b6d4 !important;
}
button.category_button:hover .category_name {
    color: #06b6d4 !important;
}
button.category_button:hover svg {
    fill: #06b6d4 !important;
    stroke: #06b6d4 !important;
}



/* 搜索结果页面：页码美化｜选中为青色，未选中为淡青色 */
/* 1. 当前所在的激活页码（当前第 1 页） -> 设为 Community 标准青色 */
#pagination input.page_number_current,
input.page_number_current {
    color: #06b6d4 !important;    /* 标准青色 */
    font-weight: bold !important; /* 加粗显示 */
}

/* 2. 其他未选中的常规页码（2, 3, 4...） -> 默认直接使用淡青色 */
#pagination form.page_number button[type="submit"],
#pagination form.page_number input[type="submit"] {
    color: #22d3ee !important;    /* 柔和的淡青色 */
    text-decoration: underline !important;
    background: none !important;  /* 清空可能存在的背景 */
    border: none !important;      /* 清空边框 */
    transition: color 0.15s ease-in-out !important;
}

/* 3. 鼠标悬停在其他常规页码上时 -> 稍微加深变成标准青色，提供优雅的交互反馈 */
#pagination form.page_number button[type="submit"]:hover,
#pagination form.page_number input[type="submit"]:hover {
    color: #06b6d4 !important;    /* 悬停时转换为标准青色 */
    text-decoration: underline !important;
}



/* 搜索结果页面：搜索结果标题美化｜仅将结果标题（含标题内高亮）改为 Community 青色，不影响正文高亮 */
/* 1. 改变整个结果标题链接的文字颜色（以及标题内可能包含的高亮文本） */
.result h3 a,
h3.result a,
.result h3 a span.highlight,
h3.result a span.highlight {
    color: #06b6d4 !important; /* 仅对标题及标题内的文字生效 */
}

/* 2. 悬停（Hover）在标题链接上时的交互效果 */
.result h3 a:hover,
h3.result a:hover {
    opacity: 0.9 !important;
    text-decoration: underline !important; /* 悬停时显示下划线提示 */
}



/* 搜索结果页面：搜索结果激活状态美化｜宽屏选中结果时左侧深蓝色竖线、窄屏全包围框替换为 Community 青色 */
/* 1. 核心选中状态：无论是宽屏的左侧单竖线，还是 801px 以下的全包围框，一律染青 */
article[data-vim-selected="true"] {
    border-color: #06b6d4 !important;      /* 完美覆盖 801px 以下的全包围框颜色 */
    border-left-color: #06b6d4 !important; /* 稳妥覆盖宽屏下的左侧单竖线 */
}

/* 2. 背景微调：配合你之前保留的淡淡青色背景，让整体卡片感更高级 */
article[data-vim-selected="true"] {
    background: rgba(6, 182, 212, 0.05) !important; /* 淡淡的青色背景互动 */
}



/* 搜索结果页面：将右下角的“快照”链接字体调成和搜索引擎一致的灰色 */
/* 1. 常规状态：使用和搜索引擎来源相同的灰色 */
.result .engines a.cache_link,
a.cache_link {
    color: #666666 !important;         /* 舒适低调的暗灰色 */
    font-size: smaller !important;
    text-decoration: none !important;  /* 默认隐藏下划线，保持清爽 */
}

/* 2. 鼠标悬停状态：略微变暗或出现下划线提示 */
.result .engines a.cache_link:hover,
a.cache_link:hover {
    color: #333333 !important;         /* 鼠标滑过时稍微加深 */
    text-decoration: underline !important; /* 出现下划线作为点击提示 */
}



