/* 公用导航栏样式（统一为index页风格） */
.header{
    width:100%;
    position: fixed;
    top:0;left:0;
    z-index: 10000;
    background: rgba(34, 61, 126, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0 40px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 6px 40px rgba(15, 23, 42, 0.18);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.scrolled {
    background: rgba(21, 47, 106, 0.85);
    box-shadow: 0 6px 40px rgba(15, 23, 42, 0.18);
    height: 64px;
}

.logo-box {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center left;
}
.logo-box:hover {
    transform: scale(1.01);
}
.logo-box img {
    height: 32px;
    width: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.logo-box:hover img {
    filter: drop-shadow(0 0 12px rgba(255,255,255,0.5)), drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}
.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}
.logo-box h1 {
    font-size: 24px !important;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    line-height: 1.1;
    white-space: nowrap;
    letter-spacing: 0.8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.logo-box:hover h1 {
    text-shadow: 0 0 20px rgba(255,255,255,0.6), 0 2px 8px rgba(0,0,0,0.15);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.icon-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(229, 231, 235, 0.2);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    flex-shrink: 0;
}
.icon-btn:hover{ 
    background: rgba(255, 255, 255, 0.9);
    border-color: #93c5fd;
    transform: translateY(-1px);
    box-shadow: 0 2px 0 #93c5fd, 0 3px 5px rgba(59, 130, 246, 0.2);
}
.icon-btn:active{
    box-shadow: 0 0 0 #cbd5e1, 0 1px 2px rgba(0,0,0,0.1);
    transform: translateY(1px);
}

.icon-btn .tooltip {
    position: absolute;
    top: 100%;
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 5px;
    background: rgba(0, 0, 0, 0.9) !important;
    color: #fff;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.icon-btn:hover .tooltip {
    background: rgba(0, 0, 0, 0.9) !important;
    color: #fff !important;
    opacity: 1;
    visibility: visible;
}

.icon-btn-wrapper {
    display: flex;
    align-items: center;
}

/* 下拉菜单（统一风格） */
.dropdown{
    position:relative;
    display:inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
}
.dropdown.active .dropdown-content {
    display: block !important;
}
.dropdown-content {
    display: none !important;
    position: absolute !important;
    right: 0 !important;
    top: 100% !important;
    background: #fff !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    border-radius: 8px !important;
    width: 140px !important;
    z-index: 99999 !important;
    padding: 4px 0 !important;
}
.dropdown-content a {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 8px 12px !important;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 13px !important;
    border-radius: 4px !important;
    margin: 2px 4px !important;
    transition: all 0.15s ease !important;
    white-space: nowrap !important;
}
.dropdown-content a:hover {
    background: #e8f3ff !important;
    color: #0057ad !important;
}

/* 子菜单样式 */
.dropdown-content .submenu {
    position: relative !important;
}
.dropdown-content .submenu-content {
    display: none !important;
    position: absolute !important;
    right: 100% !important;
    top: 0 !important;
    background: #fff !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    border-radius: 8px !important;
    width: 120px !important;
    z-index: 99999 !important;
    margin-right: 4px !important;
    padding: 4px 0 !important;
}
.dropdown-content .submenu:hover .submenu-content {
    display: block !important;
}
.dropdown-content .disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}
.dropdown-content .disabled:hover {
    background: transparent !important;
    color: #333 !important;
}

/* 个人中心下拉菜单（彻底修复样式错乱） */
.header .user-dropdown-wrapper {
    position: relative !important;
    display: inline-block !important;
}
.header .user-dropdown-menu {
    position: absolute !important;
    top: calc(100% + 8px) !important;
    right: 0 !important;
    width: 130px !important;
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15) !important;
    border: 1px solid #e2e8f0 !important;
    z-index: 999999 !important;
    display: none !important;
    overflow: hidden !important;
    padding: 4px 0 !important;
}
.header .user-dropdown-menu.show {
    display: block !important;
    animation: fadeDrop 0.2s ease !important;
}
@keyframes fadeDrop {
    from { opacity:0; transform: translateY(-6px); }
    to { opacity:1; transform: translateY(0); }
}
.header .dropdown-item {
    padding: 12px 16px !important;
    font-size: 15px !important;
    color: #1e293b !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    background: transparent !important;
    border: none !important;
}
.header .dropdown-item:hover {
    background: #f1f5f9 !important;
    color: #0057ad !important;
}
.header .dropdown-item .menu-icon {
    width: 18px !important;
    height: 18px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    flex-shrink: 0 !important;
}

.header .user-avatar-btn img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 6px !important;
}
.header .user-avatar-btn .tooltip,
.header .user-avatar-nav-btn .tooltip {
    position: absolute !important;
    top: 100% !important;
    bottom: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin-top: 5px !important;
    background: rgba(0, 0, 0, 0.9) !important;
    color: #fff !important;
    font-size: 12px !important;
    padding: 4px 12px !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    z-index: 99999 !important;
}
.header .user-avatar-btn:hover .tooltip,
.header .user-avatar-nav-btn:hover .tooltip {
    background: rgba(0, 0, 0, 0.9) !important;
    color: #fff !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* 清除 search.php 原有冲突样式（仅针对导航栏内的.btn） */
.header .btn {
    all: unset !important;
    padding: 6px 10px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    height: 36px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    background: #fff !important;
    cursor: pointer !important;
    font-size: 14px !important;
    color: #4a4a4a !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    font-weight: 500 !important;
    box-shadow: 0 2px 0 #cbd5e1, 0 3px 4px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.7) !important;
    transform-origin: center center !important;
}
.header .btn:hover {
    background: #e8f3ff !important;
    color: #0057ad !important;
    border-color: #cbd5e1 !important;
    transform: scale(1.04) !important;
    box-shadow: 0 4px 8px rgba(0,87,173,0.15), 0 2px 0 #cbd5e1 !important;
}