/* 导航栏右侧内容样式 */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
/* 搜索容器 */
.search-container {
    flex: 1;
    max-width: 400px;
    min-width: 280px;
    margin-right: 24px;
}
.search-form {
    width: 100%;
}
.search-input-wrapper {
    position: relative;
    width: 100%;
    height: 40px;
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(229, 230, 235, 1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.search-input-wrapper:hover {
    border-color: rgba(63, 140, 255, 0.3);
    box-shadow: 0 4px 12px rgba(63, 140, 255, 0.08);
}
.search-input-wrapper:focus-within {
    border-color: rgba(63, 140, 255, 1);
    box-shadow: 0 4px 16px rgba(63, 140, 255, 0.15);
}
.search-icon {
    color: rgba(109, 114, 120, 0.6);
    font-size: 16px;
    margin-right: 12px;
    flex-shrink: 0;
    transition: all 0.3s ease;
}
.search-input-wrapper:focus-within .search-icon {
    color: rgba(63, 140, 255, 1);
}
.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: rgba(109, 114, 120, 1);
    font-family: PingFangSC-Regular;
    line-height: 1.4;
}
.search-input::placeholder {
    color: rgba(109, 114, 120, 0.5);
    font-size: 14px;
}
/* 右侧用户信息区域 */
.user-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    height: 100%;
}
/* 通知铃铛 */
.notification-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 1);
    border: 1px solid rgba(229, 230, 235, 1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.notification-wrapper:hover {
    border-color: rgba(63, 140, 255, 0.3);
    box-shadow: 0 4px 12px rgba(63, 140, 255, 0.15);
    transform: translateY(-1px);
}
.notification-icon {
    color: rgba(109, 114, 120, 0.8);
    font-size: 18px;
    transition: all 0.3s ease;
}
.notification-wrapper:hover .notification-icon {
    color: rgba(63, 140, 255, 1);
    transform: scale(1.1);
}
/* 用户信息容器 */
.user-dropdown-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}
.user-info-toggle {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
}
.user-info-toggle:hover {
    text-decoration: none;
    color: inherit;
}
.user-info-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
    background: rgba(255, 255, 255, 1);
    /* border: 1px solid rgba(229, 230, 235, 1); */
    border-radius: 12px;
    padding: 6px 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    min-height: 40px;
    width: auto;
    min-width: 120px;
    max-width: 180px;
    /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); */
}
.user-info-container:hover {
    border-color: rgba(63, 140, 255, 0.3);
    box-shadow: 0 4px 12px rgba(63, 140, 255, 0.15);
    transform: translateY(-1px);
}
.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.username {
    font-size: 14px;
    color: rgba(51, 51, 51, 0.85);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
    flex: 1;
}
.dropdown-arrow {
    font-size: 12px;
    color: rgba(109, 114, 120, 0.6);
    margin-left: 4px;
    transition: transform 0.3s ease;
}
.dropdown.show .dropdown-arrow {
    transform: rotate(180deg);
}
/* 下拉菜单 */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid rgba(229, 230, 235, 1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    min-width: 200px;
    padding: 8px 0;
    margin-top: 8px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}
.dropdown.show .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
/* 用户信息下拉菜单 */
.user-dropdown-menu {
    width: 240px;
}
/* 用户资料区域 */
.profile-details {
    flex: 1;
}
.profile-name {
    font-size: 14px;
    font-weight: 600;
    color: rgba(109, 114, 120, 1);
    margin-bottom: 2px;
}
.profile-email {
    font-size: 12px;
    color: rgba(109, 114, 120, 0.7);
    line-height: 1.4;
}
.user-dropdown-menu .dropdown-item {
    padding: 12px 20px;
    color: rgba(109, 114, 120, 1);
    font-size: 14px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border: none;
    background: transparent;
    text-decoration: none;
    width: 100%;
    text-align: left;
}
.user-dropdown-menu .dropdown-item:hover {
    background-color: rgba(63, 140, 255, 0.05);
    color: rgba(63, 140, 255, 1);
}
.user-dropdown-menu .dropdown-item i {
    margin-right: 12px;
    font-size: 16px;
    width: 16px;
    text-align: center;
}
.user-dropdown-menu .dropdown-divider {
    height: 1px;
    margin: 8px 0;
    background-color: rgba(229, 230, 235, 1);
    border: none;
}
/* 退出登录按钮特殊样式 */
.user-dropdown-menu .logout-item {
    color: rgba(220, 53, 69, 0.8);
}
.user-dropdown-menu .logout-item:hover {
    background-color: rgba(220, 53, 69, 0.05);
    color: rgba(220, 53, 69, 1);
}
/* 响应式处理 */
@media (max-width: 768px) {
    .search-container {
        max-width: 200px;
        min-width: 150px;
    }
    .user-info-container {
        min-width: 40px;
        padding: 6px;
    }
    .username, .dropdown-arrow {
        display: none;
    }
}



/* 移除下拉箭头样式 */
.user-dropdown-wrapper .dropdown-toggle::after {
    display: none !important;
}

/* 美化通知下拉菜单 */
.notification-wrapper .dropdown-menu {
    animation: fadeIn 0.2s ease-in-out;
}

/* 美化用户下拉菜单 */
.user-dropdown-menu .dropdown-item:hover {
    background-color: #f8f9fa;
}

.user-dropdown-menu .logout-item:hover {
    background-color: #fff5f5;
}

/* 搜索结果容器 */
.search-results {
    position: absolute;
    width: 35%;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 4px;
    display: none;
}

/* 搜索结果项 */
.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f8f9fa;
    color: #1890ff;
    text-decoration: none;
    transform: translateX(2px);
}

.search-result-item i {
    margin-right: 12px;
    font-size: 16px;
    color: #666;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.search-result-item:hover i {
    color: #1890ff;
}

.search-result-title {
    font-weight: 500;
    margin-right: 8px;
    flex: 1;
}

.search-result-uri {
    color: #999;
    font-size: 12px;
    background-color: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
}

/* 搜索状态样式 */
.search-loading,
.search-no-results,
.search-error {
    padding: 16px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

.search-loading {
    color: #1890ff;
}

.search-loading i {
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

.search-error {
    color: #ff4d4f;
}

.search-no-results i,
.search-error i {
    margin-right: 8px;
    font-size: 16px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .search-container {
        width: 250px;
    }
}

@media (max-width: 576px) {
    .search-container {
        width: 200px;
    }

    .search-result-item {
        padding: 10px 12px;
    }

    .search-result-uri {
        display: none;
    }
}
