﻿/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft YaHei", sans-serif;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

/* Banner 样式 */
.banner {
    background-color: #ff0000;
    color: white;
    position:relative;
    padding:10px;
    justify-content: space-between;
    align-items: center;
    position: relative;
    text-align: center;  
    height:50px;
    z-index:1000;
    
}

  

/* 汉堡菜单图标 (移动端显示) */
.menu-toggle {
    font-size: 0.5rem;
    cursor: pointer;
    display: none; /* 桌面端隐藏 */
    z-index: 100;
}

/* 主体容器 */
.main-container {
    display: flex;
   min-height: calc(100vh); /* 减去banner高度 */
}

/* 左侧树形导航 */
.sidebar {
    width: 220px;
    background-color: #ffffff;
    box-shadow: 1px 0 5px rgba(0,0,0,0.05); 
    transition: transform 0.3s ease;
    height: 100%;
    overflow-y: auto;
}


/* 右侧内容区 */
.content {
    flex: 1;
    padding: 10px;
    background-color: #ffffff;
    margin: 10px;
}

.dropbtn{ font-size:1.5em}


.content h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
    text-align:center
}

.content p {
    margin-bottom: 1rem;
    color: #666;
}



/* 媒体查询 - 移动端适配 (768px断点) */
@media (max-width: 768px) {
    /* 显示汉堡菜单 */
    .banner {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    /* 移动端默认隐藏侧边栏 */
    .sidebar {
        position: fixed;
        
        left: 0;
        height: calc(100vh - 70px);
        transform: translateX(-100%);
        z-index: 99;
    }

        /* 侧边栏展开状态 */
        .sidebar.show {
            transform: translateX(0);
        }

     
     
}

/* 遮罩层 (移动端展开导航时显示) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 98;
    display: none;
}

    .overlay.show {
        display: block;
    }
