body {
    display: flex;
    min-height: 100vh;
    background-color: #121826;
    color: #e0e0e0;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 导航栏区域 */
.sidebar {
    width: 200px;
    background-color: #1a1f2e;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    border-right: 2px solid rgb(185 150 255);
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.3);
    z-index: 100;
    transition: all 0.3s ease;
}

/* 导航栏内上方logo区域 */
.logo {
    text-align: center;
    padding: 15px 0 25px;
    margin-bottom: 15px;
    border-bottom: 2px solid rgb(185 150 255);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: rgb(225, 90, 250);
    letter-spacing: 2px;
    text-shadow: 0 0 15px rgba(185, 150, 255, 1);
}

.logo p {
    font-size: 0.9rem;
    color: #8a8f9d;
    margin-top: 5px;
}

/* 导航分组区域 */
.nav-section {
    margin-bottom: 25px;
}

/* 分组标题样式 */
.section-title {
    padding: 10px 20px;
    font-size: 0.9rem;
    color: #6c7280;
    letter-spacing: 1px;
}

/* 导航按钮容器 */
.nav-buttons {
    display: flex;
    flex-direction: column;
}

/* 单个导航按钮样式 */
.nav-button {
    display: flex;
    align-items: center;
    padding: 14px 25px;
    color: #c0c5d0;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
    position: relative;
    cursor: pointer;
}

/* 悬停 */
.nav-button:hover {
    background-color: #232838;
    color: #ffffff;
    border-left: 4px solid rgb(225, 90, 250);
}

/* 激活 */
.nav-button.active {
    background-color: #232838;
    color: rgb(225, 90, 250);
    border-left: 4px solid rgb(225, 90, 250);
}

/* 图标 */
.nav-button i {
    margin-right: 12px;
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

/* 徽章样式（用于显示通知数量） */
.badge {
    background-color: rgb(225, 90, 250);
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 0.7rem;
    margin-left: auto;
}

/* ===== 右侧内容区域样式 ===== */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 顶部栏样式 */
.top-bar {
    background-color: #1a1f2e;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #b996ff;
    position: relative;
}

/* 变动标题 */
.top-bar h2 {
    font-weight: 600;
    color: rgb(225, 90, 250);
    font-size: 1.5rem;
}

/* 名称与职位容器区域 */
.user-info {
    display: flex;
    align-items: center;
}

/* 头像 */
.user-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    border: 2px solid rgb(225, 90, 250);
    object-fit: cover;
}

/* 用户详细信息容器 */
.user-details {
    display: flex;
    flex-direction: column;
}

/* 名称样式 */
.user-name {
    font-weight: 600;
    color: #ffffff;
}

/* 会长文字样式 */
.user-rank {
    font-size: 0.8rem;
    color: #ff0000;
}

/* 内联容器 */
.iframe-container {
    flex: 1;
    overflow: hidden;
    background-color: #121826;
}

/* 内联 */
iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
    background-color: #1a1f2e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: rgb(225, 90, 250);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    margin-right: 15px;
}

/* 移动端遮罩层 */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 99;
}

/* ===== 响应式 ===== */
@media (max-width: 968px) {

    /* 改为垂直布局 */
    body {
        flex-direction: column;
        overflow: auto;
    }

    /* 移动端菜单按钮显示 */
    .mobile-menu-toggle {
        display: block;
    }

    /* 导航栏默认隐藏 */
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 300px;
        height: 100%;
        padding: 20px 0;
        transition: left 0.3s ease;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    }

    /* 显示导航栏 */
    .sidebar.active {
        left: 0;
    }

    /* 显示遮罩层 */
    .mobile-overlay.active {
        display: block;
    }

    /* 导航按钮水平排列 */
    .nav-buttons {
        flex-direction: column;
        overflow-y: auto;
        padding: 0 10px;
        height: 100%;
    }

    /* 按钮样式 */
    .nav-button {
        padding: 12px 15px;
        border-left: none;
        border-bottom: 4px solid transparent;
        white-space: nowrap;
    }

    /* 悬停和激活使用底部边框 */
    .nav-button:hover,
    .nav-button.active {
        border-left: none;
        border-bottom: 4px solid rgb(225, 90, 250);
    }

    /* 调整Logo区域 */
    .logo {
        padding: 10px 0;
        margin-bottom: 10px;
    }

    /* 调整顶部栏 */
    .top-bar {
        padding: 10px 15px;
    }

    .top-bar h2 {
        font-size: 1.2rem;
    }

    /* 调整用户信息区域 */
    .user-info img {
        width: 35px;
        height: 35px;
    }

    .user-name {
        font-size: 0.9rem;
    }

    .user-rank {
        font-size: 0.7rem;
    }

    /* 调整iframe高度 */
    iframe {
        height: 100vh;
    }
}

/* 针对更小屏幕的优化 */
@media (max-width: 480px) {
    .sidebar {
        width: 85%;
    }

    .top-bar {
        padding: 8px 12px;
    }

    .top-bar h2 {
        font-size: 1.1rem;
    }

    .user-info img {
        width: 30px;
        height: 30px;
    }

    .user-details {
        display: none;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .logo p {
        font-size: 0.8rem;
    }

    .nav-button {
        padding: 10px 12px;
    }

    .nav-button i {
        font-size: 1rem;
        margin-right: 10px;
    }

    .badge {
        font-size: 0.6rem;
        padding: 1px 6px;
    }
}

/* 横屏优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .sidebar {
        overflow-y: auto;
    }

    .logo {
        padding: 8px 0 15px;
        margin-bottom: 8px;
    }

    .nav-section {
        margin-bottom: 15px;
    }

    .nav-button {
        padding: 8px 20px;
    }
}