/* 在a1.css开头添加 */
:root {
    --text-color: #000000;
    --search-bg-light: rgba(255, 255, 255, 0.7);
    --search-bg-dark: rgba(30, 30, 30, 0.7);
    --search-input-light: rgba(255, 255, 255, 0.85);
    --search-input-dark: rgba(50, 50, 50, 0.85);
    --search-shadow-light: 0 4px 20px rgba(0, 0, 0, 0.21);
    --search-shadow-dark: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* 修改相关文本样式使用变量 */
.search-type li label {
    color: var(--text-color);
}

.type-text {
    color: var(--text-color);
}

/* 搜索模块基础样式 - 新增磨玻璃效果 */
#search {
    /* 基础样式保留，移除定位相关属性 */
    background: var(--search-bg-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0px;
    border-radius: 18px;
    box-shadow: var(--search-shadow-light);
}

#search form {
    position: relative
}

#search-text {
    color: var(--text-color);
    width: 100%;
    height: 35px;
    font-size: 1pc;
    border: none;
    border-radius: 15px;
    background-color: var(--search-input-light);
    text-indent: 80px;
    transition: all 0.3s ease;
}

#search button {
    position: absolute;
    top: -8px;
    left: 13px;
    background: none;
    border: 0;
    width: 30px;
    height: 36px;
    margin: 7px 9pt 0;
    line-height: 36px;
    border-radius: 3px

}

#search label:hover {
    background: rgba(203,203,203,0.26);/*搜索框选中*/
    cursor: pointer
}

#search button i {
    color: var(--text-color);
    font-size: 18px
}

.search-group {
    display: none;
    padding-left: 75px
}

.s-current .search-type {
    padding-left: 0;
    display: block
}

.s-current {
    display: block
}

#search-list {
    position: relative
}

.s-type {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 13;
    width: 75px
}

.s-type:hover {
    height: auto
}

.s-type>span {
    display: block;
    height: 31px;
    width: 75px
}

.s-type-list {
    display: none;
    position: absolute;
    top: 31px;
    width: 70px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 6px;
    box-shadow: 0 0 6px rgba(0,0,0,0.18);
    padding: 9pt 0;
}

.s-type-list label {
    display: block;
    font-size: 15px;
    text-align: center;
    padding: 2px 0;
    color: var(--text-color);
}

.s-type-list .tile-lg {
    color: var(--text-color);
    width: 3pc;
    height: 3pc;
    font-size: 1.25rem;
    line-height: 3rem;
    border-radius: .3rem;
    display: block;
    margin: auto
}

.s-type-list label:hover {
    color: var(--text-color)
}

.s-type:hover .s-type-list {
    display: block;
    padding-top: 8px
}

.type-text {
    position: absolute;
    left: 6px;
    width: 75px;
    padding-left: 9pt;
    font-size: 1pc;
    line-height: 31px
}

.search-type {
    white-space: nowrap;
    margin: 0
}

.search-type label {
    margin: 0
}

.search-type li {
    display: inline-block
}

.search-type li label {
    display: inline-block;
    padding: 0 8px;
    font-size: 14px;
    line-height: 31px;
    border-radius: 3px 3px 0 0;
    cursor: pointer
}

.search-type input:checked+label,.search-type input:hover+label {
    background-color: rgba(0,0,0,0.06);/*菜单选准*/
}

.set-check {
    margin-top: 3px;
    font-size: 9pt
}

.set-check label {
    margin-left: 3px
}

.set-check input,.set-check label {
    opacity: 0;
    transition: all .3s ease
}

.search-type li {
    list-style: none;
    display: inline-block
}

@media (max-width: 600px) {
    #search {
        width: 90%;
        padding: 10px;
    }
    
    .search-type {
        overflow: scroll
    }

    .search-list {
        height: 30px;
        overflow-y: hidden;
        overflow-x: scroll;
        white-space: nowrap
    }

    .s-type-list {
        width: 60px;
    }
}

.fa-2x {
    padding-top: 15px;
    font-size: 1.5em;
}
.wei{
    list-style: none;
    position: relative;
    text-indent: 10px;
}
.wei:hover{
     background: rgba(231,231,231,0.44);/*搜索联想选中*/
}
.a{
     display: inline-block;
     width: 90%;
     color: var(--text-color);/*搜索联想字体*/
     height: 27px;
     line-height: 30px;
     overflow:hidden;
     text-overflow: ellipsis;
}
.ko{
	display: none;
    top: 10px;
    position: relative;
}

* {
    padding: 0;

    margin: 0;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}
.bgo{
	background: url();
    background-size: cover;
    filter: brightness(0.9);
    width: 100%;
    height: 100%;
    z-index: 1;
}

html {
    font-family: 'Noto Sans SC Sliced', PingFangSC-Light, Microsoft YaHei UI, Microsoft YaHei, helvetica, sans-serif;
    font-weight: 300;
    color: var(--text-color);/*菜单字体颜色*/
}

ul,
li {
    display: block;
    list-style: none;
}

a {
    text-decoration: none;
    color: #00B8FF;
}

/* 按钮容器样式 */
#button-container {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2000000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* 通用贴边按钮样式 */
/* 通用贴边按钮样式 */
.edge-button {
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: 0.5s;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.8);
    border-radius: 8px 0 0 8px; /* 右侧贴边圆角处理 */
    margin: 5px 0;
    position: relative; /* 确保right偏移基于自身位置计算 */
}

/* 按钮隐藏状态 */
.edge-button.hidden {
    display: none !important;
}

/* 当一个面板激活时隐藏另一个按钮 */
#menu.on ~ #settings-button:not(.on),
#settings-button.on ~ #menu:not(.on) {
    display: none;
}

/* 按钮文字样式 */
.button-text {
    color: var(--text-color);
    font-size: 14px;
    font-weight: 500;
}

/* 导航按钮（上）样式 */
.top-button {
    margin-bottom: 3px;
}

/* 设置按钮（下）样式 */
.bottom-button {
    margin-top: 3px;
}

/* 导航按钮样式 */
#menu {
    width: 50px;
    height: 50px;
    position: relative;
    z-index: 2000000;
    cursor: pointer;
    transition: 0.5s;
}

/* 导航按钮激活状态 */
#menu.on {
    right: 380px;/* 337px(面板宽) + 40px(右侧内边距) + 3px(间隙)，保持原计算逻辑 */
    background: rgba(255,255,255,1);
    border-radius: 25px;
}

/* 移除原菜单图标样式 */
#menu i,
#menu i:before,
#menu i:after {
    display: none;
}

.list {
    width: 337px;
    padding: 0 40px;
    height: 100%;
    overflow: hidden;
    overflow-y: auto;
    /* 关键修改：基于视口右上角定位，不受页面其他元素影响 */
    position: fixed; /* 改为 fixed 定位，相对于视口 */
    top: 0; /* 从顶部开始 */
    right: -15px; /* 保持原右侧偏移 */
    z-index: 2000;
    background: var(--search-bg-light);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--search-shadow-light);
    transition: 0.3s all linear;
}

/* 修改为露出30px宽度 */
.list.closed {
    right: -450px;
}

.list ul {
    width: calc(110% + 20px);/* 向左扩展30px */
    margin-left: -20px;/* 向左偏移30px，利用左侧空间 */
    float: left;
    padding: 0 0 20px;
    margin-bottom: 10px;
}

.list ul li {
    float: left;
    margin: 3px;/*书签间距*/
    width: calc(25% - 6px);
    height: 20px;
    text-align: left;
    line-height: 20px;
}

.list ul li a {
    width: 100%;
    border-radius: 5px;
    transition: 0.2s all linear;
    height: 100%;
    display: flex;
    align-items: center;
    color: var(--text-color);
    font-weight: 500;
    background: rgba(0, 0, 0, 0);
    text-align: left;
    font-size: 12px;
    text-indent: 1em;
}

.list ul li a i {
    margin-right: 5px;
    margin-left: 15px;

    transition: 0.2s all linear;
}

.list ul li a i.iconfont {
    font-size: 14px;
}

.list ul li:hover a {
    color: #000;/*书签选中火苗*/
    background-color: #E2E2E2;
    background-image: linear-gradient(135deg, rgba(35, 153, 255) 0%, rgba(84, 175, 253) 100%);
    box-shadow: 0 3px 3px rgba(0, 40, 70, .3);
}

.list ul li:hover a i {
    color: #000 !important;/*书签选中火苗*/
}

.list ul li.title {
    width: 100%;
    height: 20px;
    line-height: 0px;
    margin: 30px 0 0;
    text-align: left;
    text-indent: 10px;
    color: #3F9DFF;/*书签表头字体*/
    font-size: 18px;
    font-weight: bold;
}

.list ul li.title i {
    color: #3F9DFF;/*书签表头火苗*/
    margin-right: 5px;
    font-weight: normal;
}
.logo{
    position: absolute;
    z-index: 99;
    top: 15%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    opacity: 1;
}

/* 移动端适配调整 */
@media (max-width: 640px) {
    .list {
        width: 227px;
    }
    .list ul {
        width: 220px;
    }
    .list ul li {
        width: calc(25% - 4px);
    }
    #menu {
        top: 5px;
    }
    #menu.on {
        right: 270px;
    }
    /* 移动端露出20px宽度 */
    .list.closed {
        right: -207px;
    }
    .bgo{
        background: url();
        background-size: cover;
    }
    .logo{
        width: 35%;
    }
    .ko{
        height: 158px;
        overflow-y: scroll;
    }
}
.ssln:hover{
    background: #FFF;
}

/* 公告提示样式 */
.center-container {  
    position: fixed;  
    top: 0;  
    left: 0;  
    width: 100%;  
    height: 300%;  
    display: flex;  

    align-items: center; /* 垂直居中 */  
    justify-content: center; /* 水平居中 */  
    pointer-events: none; /* 使容器本身不响应点击事件 */  
}  

.floating-alert {  
    background-color: #7E7E7E;  
    color: white;  
    padding: 10px 20px;  
    border-radius: 5px;  
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);  
    z-index: 9999;  
    display: flex;  
    align-items: center;  
    justify-content: space-between;  
    pointer-events: auto; /* 公告提示需要响应点击事件 */  
    transition: opacity 1s ease-in-out;  
}  

.close-btn {  
    background-color: transparent;  
    border: none;  
    color: black;  
    font-size: 1.2em;  
    cursor: pointer;  
}  

/* 公告提示隐藏时的样式 */  
.floating-alert.hidden {  
    opacity: 0;  
    pointer-events: none; /* 不响应鼠标事件 */  
}

/* 夜间模式基础样式 */
body.dark-mode {
    --text-color: #ffffff;
    background-color: #1a1a1a;
    color: #f0f0f0;
}

/* 夜间模式下导航列表样式 */
.dark-mode .list {
    background: var(--search-bg-dark);
    box-shadow: var(--search-shadow-dark);
}

.dark-mode .s-type-list {
    background: rgba(30, 30, 30, 0.9);
}

.dark-mode .search-type input:checked+label,

.dark-mode .search-type input:hover+label {
    background-color: rgba(255, 255, 255, 0.1);
}

.dark-mode #search {
    background: var(--search-bg-dark);
    box-shadow: var(--search-shadow-dark);
}

.dark-mode #search-text {
    background-color: var(--search-input-dark);
}

.dark-mode #menu.on {
    background: rgba(50, 50, 50, 1);
}

.dark-mode .wei:hover {
    background: rgba(70, 70, 70, 0.44);
}

/* 夜间模式适配按钮 */
.dark-mode .edge-button {
    background: rgba(50,50,50,0.8);
}

.dark-mode #menu.on,
.dark-mode #settings-button.on {
    background: rgba(50,50,50,1);
}

/* 底部信息样式 */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    text-align: center;
    padding: 15px 0 30px; /* 底部留出更多空间给版权信息 */
    z-index: 90; /* 确保在背景之上但不遮挡主要内容 */
}

.site-info {
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 10px; /* 与版权信息区域保持距离 */
}

.copyright {
    height: 20px; /* 预留版权信息高度 */
    font-size: 12px;
    color: var(--text-color);
    opacity: 0.8;
}

/* 夜间模式适配 */
.dark-mode .site-info,
.dark-mode .copyright {
    color: #bbb;
}
.search-type input[name="search-type"] {
    display: none;
}
.mod-header {
  position: absolute; /* 保持原有定位方式 */
  z-index: 100 !important; /* 强制覆盖原有z-index，需大于搜索框的z-index:99 */
}
/* 在 xin/css/s/sa1.css 中添加或修改以下样式 */

/* 搜索结果容器样式调整 */
#ul.ko {
    position: absolute;
    top: 100%; /* 与输入框底部对齐 */
    left: 0;
    right: 0;
    margin: 0;
    padding: 5px 0;
    background: var(--search-input-light);
    border-radius: 0 0 15px 15px;
    box-shadow: var(--search-shadow-light);
    max-height: calc(6 * 30px); /* 最多显示6项，每项约30px高 */
    overflow-y: auto; /* 超出时显示滚动条 */
    z-index: 100;
    box-sizing: border-box;
}

/* 搜索结果项样式调整 */
.wei {
    list-style: none;
    position: relative;
    text-indent: 40px; /* 与输入框的text-indent保持一致 */
    margin: 0;
    padding: 0;
    height: 30px; /* 固定高度，确保6项正好填满容器 */
}
/* 搜索下拉框夜间模式单独适配 */
.dark-mode #ul.ko {
    background: var(--search-input-dark);
    box-shadow: var(--search-shadow-dark);
}

.dark-mode #ul.ko .wei {
    background: transparent;
}

.dark-mode #ul.ko .wei:hover {
    background: rgba(70, 70, 70, 0.44);
}

.dark-mode #ul.ko .a {
    color: #f0f0f0;
}

.dark-mode #ul.ko .a span {
    color: #aaa;
}
/* 搜索结果链接样式优化 */
.wei .a {
    width: calc(100% - 80px); /* 减去缩进宽度 */
    height: 30px;
    line-height: 30px;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 滚动条样式优化 */
#ul.ko::-webkit-scrollbar {
    width: 6px;
}

#ul.ko::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

#ul.ko::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

#ul.ko::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}
