/* 头部样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 50%;
    margin: 0 auto;
    padding: 30px 0;
    font-family: "经典隶变简", sans-serif;
}

/* 左侧头部内容样式 */
.header-left {
    display: flex;
    align-items: center;
    transform: translateX(-30%);
}

.header-left .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
}

.header-left .blog-title {
    font-size: 1.5em;
    font-weight: bold;
}

/* 右侧头部内容样式 */
.header-right {
    display: flex;
    gap: 20px;
    transform: translateX(60%);
}

.header-right .menu-link {
    text-decoration: none;
    color: #333;
    font-size: 1.2em;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    letter-spacing: 2px;
}

.icon-text {
    margin-top: -5px;
}

.icon-text-size {
    margin-left: 20px;
}

.header-right .menu-link:hover {
    color: #007bff;
    font-weight: bold;
    font-size: 1.25em;
}

/* 登录状态样式 */
.header-logged {
    display: flex;
    margin-right: -300px;
}

.header-logged a, .header-logged p {
    text-decoration: none;
    margin: 0 10px;
    transition: opacity 0.3s ease-in-out;
}

.header-logged a:hover, .header-logged p:hover {
    opacity: 1;
    color: #5e5e5e;
    font-size: 1.05em;
    transition: font-size 0.3s, font-weight 0.3s;
}

/* 针对手机端的响应式优化 */
@media (max-width: 768px) {
    header {
        width: 100%;
        padding: 15px 0;
        flex-direction: column; /* 切换为纵向排列 */
    }

    .header-left {
        transform: translateX(0);
        margin-bottom: 15px; /* 增加下方间距 */
    }

    .header-right {
        transform: translateX(0);
        gap: 10px; /* 减少右侧元素之间的间距 */
    }

    .header-left .blog-title {
        font-size: 1em; /* 减小标题字体大小 */
    }

    .header-right .menu-link {
        font-size: 0.8em; /* 减小右侧菜单链接的字体大小 */
    }

    .header-right .menu-link:hover {
        font-size: 0.8em; /* 悬停时的字体调整 */
    }

    .header-left .avatar {
        width: 30px; /* 调整头像大小以适应小屏 */
        height: 30px;
    }

    .header-logged {
        margin-right: 0;
        justify-content: center; /* 居中显示登录状态 */
        font-size: 0.8em; /* 减小字体大小 */
    }
}
