.header {
    height: 60px;
    padding: 0 20px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    color: #1890ff;
    font-size: 20px;
    font-weight: bold;
    user-select: none;
}

.header-user {
    position: relative;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0 8px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.header-user:hover {
    background-color: #e6f7ff;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

#username {
    font-size: 16px;
    color: #1890ff;
}

.arrow {
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    transition: transform 0.3s;
}

.arrow svg {
    width: 12px;
    height: 12px;
    color: #1890ff;
}

.header-user:hover .arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    position: absolute;
    top: 130%;
    right: 0;
    min-width: 120px;
    background-color: #fff;
    box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12),
        0 6px 16px 0 rgba(0, 0, 0, 0.08),
        0 9px 28px 8px rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    padding: 4px 0;
    display: none;
    z-index: 1000;
}

.header-user:hover .dropdown-content {
    display: block;
}

/* 添加过渡区域 */
.header-user::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px;
}

.dropdown-content::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
}

.dropdown-content a {
    display: block;
    padding: 8px 16px;
    color: #1890ff;
    font-size: 16px;
    text-decoration: none;
    transition: all 0.3s;
}

.dropdown-content a:hover {
    background-color: #e6f7ff;
}

.dropdown-content a[data-action="logout"] {
    color: #ff4d4f;
}

.dropdown-content a[data-action="logout"]:hover {
    background-color: #fff1f0;
}

.menu-toggle {
    display: none;
    width: 30px;
    height: 30px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    margin-right: 10px;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background-color: #1890ff;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media screen and (max-width: 768px) {
    .header {
        padding: 0 15px;
    }

    .header-logo {
        font-size: 18px;
    }

    #username {
        font-size: 14px;
    }
}