header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
    z-index: 1000;
    transition: transform .2s;
    transform: translate3d(0, 0, 0);
    /* 默认显示 */
}

#header.hidden {
    transform: translate3d(0, -100%, 0);
}

header nav {
    padding: 0 10px;
    max-width: 1440px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

header nav .logo {
    width: 120px;
    height: 30px;
}

header nav .logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

header nav .nav-list {
    display: flex;
    gap: 20px;
    align-items: center;
    height: 100%;
    line-height: 55px;
    margin-left: 30px;
}

header nav .nav-list>li {
    height: 100%;
    position: relative;
}

header nav .nav-list>li>a {
    color: #000;
    font-size: 15px;
    position: relative;
    display: block;
    height: 100%;
    font-weight: 700;
    padding: 0 5px;
}

header nav .nav-list>li>a::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 18px;
    width: 100%;
    height: 7px;
    border-radius: 30px;
    background-color: #0073ff76;
    transition: transform 0.3s ease;
    transform: scaleX(0);
    transform-origin: bottom center;
}

header nav .nav-list>li:hover>a::before {
    transform: scaleX(1);
}

/* 搜索框 */
header .Search {
    height: 36px;
    width: 346px;
    border: 1px solid #ccc;
    outline: none;
    border-radius: 7px;
    transition: width 0.2s ease;
    display: flex;
    background-color: #fff;
    position: relative;
}

/* ========== 搜索框容器 ========== */

.Search:focus-within {
    background: #fff; 
    border-color: var(--logo);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.Search:focus-within button {
    background: rgba(41, 151, 247, 0.1) !important;
    color: #2997f7 !important;
}

.Search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    padding: 8px 0;
    width: 200px;
    color: #333;
}

.Search input::placeholder {
    color: #999;
    font-weight: 300;
}

.Search button {
    background: #f0f2f5;
    border: none;
    border-radius: 50%;
    max-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    transition: all 0.2s;
}

.Search button:hover {
    background: #e0e4e9;
    color: #333;
}

/* ========== 下拉面板 ========== */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    overflow: hidden;
    animation: dropdownFadeIn 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 板块头部（搜索历史专用） ========== */
.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 3px;
}

.dropdown-title {
    padding: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 清空按钮 */
.clear-history {
    font-size: 12px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
}

.clear-history:hover {
    color: #ef4444;
}

/* ========== 搜索历史：标签式布局 ========== */
.recent-searches .search-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px 12px;
    margin: 0;
    list-style: none;
}

.recent-searches .search-list li {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: #f0f2f5;
    color: #1e293b;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
    /* 防止标签内文字换行 */
    line-height: 1.4;
}

.recent-searches .search-list li:hover {
    background-color: #e0e4e9;
}

/* ========== 热门搜索：带序号列表 ========== */
.hot-searches {
    border-top: 1px solid #edf2f7;
}

.hot-searches .search-list {
    list-style: none;
    margin: 0;
    padding: 4px 0 8px;
    counter-reset: hot-counter;
    /* 初始化计数器 */
}

.hot-searches .search-list li {
    padding: 10px 16px 10px 36px;
    font-size: 14px;
    color: #1e293b;
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s;
    counter-increment: hot-counter;
    /* 每项序号递增 */
}

.hot-searches .search-list li::before {
    content: counter(hot-counter) ". ";
    position: absolute;
    left: 16px;
    color: #94a3b8;
    font-weight: 400;
}

.hot-searches .search-list li:hover {
    background-color: #f1f5f9;
}

header .Search .inputjson {
    border: none;
    height: 100%;
    width: 100%;
    background: transparent;
    padding: 0 8px;
}

header .Search .inputjson:focus {
    outline: none;
}

/* 搜索按钮 */
header .Search button {
    border: none;
    background-color: #f2f3f5;
    color: #86909c;
    min-width: 40px;
    border-radius: 0 7px 7px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

header .Search button:hover {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* 登录成功之后... */
header .user-btnafr {
    display: flex;
    margin-left: 30px;
    gap: 15px;
    align-items: center;
}

header .user-btnafr .btn-Release {
    background-color: var(--logo);
    color: white;
    padding: 6px 18px;
    border-radius: 25px;
    font-weight: 510;
    font-size: 15px;
    box-shadow: 0 1px 3px rgba(30, 128, 255, 0.2);
    border: none;
}


.btn-Release:hover {
    opacity: 0.8;
}

.user-group {
    display: block;
    line-height: 33px;
    position: relative;
    cursor: pointer;
}

/* 用户头像 */
header .user-btnafr .user-avatar {
    width: 31px;
    height: 31px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 6px;  
    transition: border-color 0.3s ease;
}
 

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-btnafr .user-name {
    font-size: 16px;
    color: #00000073;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-btnafr .user-name .admin {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 通知 */
.info-data {
    padding-top: 5px;
    position: relative;
}

.info-data svg {
    color: var(--size);
}

.fili-tight::after {
    content: attr(badge);
    position: absolute;
    top: 0;
    left: 50%;
    height: 17px;
    line-height: 17px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 11px;
    text-align: center;
    white-space: nowrap;
    background-color: red;
    color: #fff;
}

/* 当 badge 属性不存在时，隐藏伪元素 */
.fili-tight:not([badge])::after {
    display: none;
}

/* ==================== 二级菜单样式优化版 ==================== */
.submenu {
    position: absolute;
    top: 100%;
    background-color: #fff;
    min-width: 140px;
    border-radius: 8px;
    box-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 2px 4px 0 rgba(0, 0, 0, 0.04);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
    overflow: hidden;
    padding: 4px 0;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* 导航栏二级菜单位置 */
.nav-list>li .submenu {
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
}

/* 用户组二级菜单位置 */
.user-btnafr .submenu {
    right: 0;
    left: auto;
}

.submenu li {
    padding: 0 8px;
}

.submenu a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: #333;
    font-size: 13px;
    line-height: 1.4;
    border-radius: 5px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.submenu a:hover {
    background-color: rgba(0, 114, 255, 0.05);
    color: var(--logo);
    transform: translateX(2px);
}

/* 鼠标悬停显示二级菜单 */
.nav-list>li:hover .submenu,
.user-group:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(3px);
}

.nav-list>li:hover .submenu {
    transform: translateX(-50%) translateY(3px);
}

/* 二级菜单图标优化 */
.submenu-icon {
    margin-right: 8px;
    font-size: 12px;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.submenu a:hover .submenu-icon {
    opacity: 1;
}

/* 登录特殊按钮 */
.login-button-wrap .btn-login {
    border: 1px solid rgba(30, 128, 255, .3);
    border-radius: 4px;
    padding: .3rem 1rem;
    background: rgba(41, 151, 247, 0.1);
    line-height: 1.8em;
    font-size: 14px;
    font-weight: 400;
    margin-right: 2rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 4px;
}

.login-button-wrap .btn-login a {
    color: #2997f7;
}

.login-button-wrap .btn-login .list-i {
    width: 2px;
    height: 12px;
    background: rgba(30, 128, 255, .3);
    transition: all 0.3s ease;
} 