html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    /* 防止主页面出现滚动条 */
}

.layui-layout-admin .layui-logo {
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    /* 稍微调小字体以适应更长的文字 */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.layui-body {
    position: absolute;
    top: 60px;
    bottom: 0;
    left: 200px;
    right: 0;
    padding: 0;
    overflow: hidden;
    background-color: #f2f2f2;
}

/* 移动端适配 */
@media screen and (max-width: 768px) {
    .layui-layout-admin .layui-side {
        transform: translate3d(-200px, 0, 0);
        transition: all .3s;
        z-index: 10000;
        /* 确保侧边栏在遮罩层之上，否则无法点击菜单 */
    }

    .layui-body {
        left: 0;
        transition: all .3s;
    }

    .layui-layout-admin.show-side .layui-side {
        transform: translate3d(0, 0, 0);
    }

    .layui-layout-admin.show-side .layui-body {
        transform: translate3d(200px, 0, 0);
    }

    /* 移动端遮罩 */
    .site-mobile-shade {
        content: '';
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        background-color: transparent;
        /* 去除遮罩颜色 */
        z-index: 999;
        display: none;
    }

    .layui-layout-admin.show-side .site-mobile-shade {
        display: block;
    }
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* 顶部切换按钮（移动端显示） */
.layui-header .layui-nav-item.mobile-toggle {
    display: none;
}

@media screen and (max-width: 768px) {

    /* 移动端重置左侧导航位置，使其靠右 */
    .layui-layout-left {
        left: auto !important;
        right: 0 !important;
        padding: 0 10px !important;
    }

    .layui-header .layui-nav-item.mobile-toggle {
        display: block;
        float: right;
        /* 按钮靠右 */
    }

    .layui-logo {
        text-align: center;
        padding-left: 0 !important;
    }
}