/*:root { --xxx }= 整个网页的“设计参数表 / 主题配置中心”*/
:root {
    --primary: #3498db;
    --bg: #727885;
    --panel: #a6c1a1;
    --text: #f6f8f9;
    --hilight: #f0e69b;
}


body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui;
    overflow: hidden;
}

/* 确保 hide 类能彻底隐藏元素 */
.hide {
    display: none !important;
}
@media screen and (max-width: 500px) {
    #btnTest, 
    #btnLeakAssess, 
    #btnBreakAssess, 
    #btnStep, 
    #btnOpDemo {
        display: none !important;
    }
}
/* 1. 基础布局：始终填满当前视口 */
#app {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: var(--bg);
}

/* sidebar 内部子元素 纵向排列 ，右边一条灰色边界线*/
#sidebar {
    width: 100px;
    flex-shrink: 0;
    display: flex;
    background: var(--panel);
    border-right: 2px solid (--primary);
    flex-direction: column;
}

#clsSel {
    height: 30px;
    padding: 5px, 5px;
    font-size: 16px;
}

.list-title {
    padding: 5px, 5px;
    font-weight: bold;
    color: var(--primary);
}

/*flex: 1--占据父容器中除固定宽度元素外的所有剩余空间，flex-direction: column子元素纵向排列，默认是水平排列*/
#main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/*左一组，右一组，中间留空,左右内边距 15px,内容不贴边*/

#info-bar {
    height: 40px;
    background: var(--panel);
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    flex-shrink: 0;
}

/* 顶部仿真工具箱 */
#toolbar{
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    background: rgba(121, 148, 132, 0.85);
    color: #fff;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

#toolbar button{
    background: transparent;
    border: 4px solid rgba(49, 44, 191, 0.25);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}

#toolbar button:hover{ background: rgba(54, 48, 48, 0.3); }


/* 核心修复：给容器分配所有剩余空间 */
#container {
    flex: 1;
    width: 100%;
    min-height: 0;
    /* 极其重要：防止 flex 容器高度塌陷 */
    background: #f6f8f9;
    background-image: radial-gradient(rgba(0, 0, 0, .15) 1px, transparent 1px);
    background-size: 60px 60px;
    position: relative;
}

/*justify-content: space-between几个组件等距离、留空排列*/
#status-bar {
    height: 20px;
    background: var(--panel);
    border-top: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    font-size: 12px;
    color: var(--text);
    flex-shrink: 0;
}

/* 模式切换按钮，水平分布，圆角6px，里面的按钮，无border，无背景色，手型鼠标代表可点击，激活时背景变主色，文字为白色粗体 */
.mode-switcher {
    display: flex;
    background: var(--bg);
    padding: 3px;
    border-radius: 6px;
}

.m-btn {
    border: none;
    background: var(--bg);
    color: var(--text);
    padding: 5px 12px;
    cursor: pointer;
    font-size: 14px;
}

.m-btn.active {
    background: var(--primary);
    color: (--hilight);
    border-radius: 4px;
    font-weight: bold;
}

.mode-tag {
    color: var(--primary);
    font-weight: bold;
    font-size: 16px;
}

/* 在线学生列表 */
.student-item {
    background: var(--panel);
    color: var(--text);
    padding: 5px, 5px;
    cursor: pointer;
}

.student-item.active {
    background: var(--panel);
    color: var(--hilight);
    padding: 5px, 5px;
    border-left: 4px solid var(--primary);
}

/*inset: 0覆盖整个屏幕，background: rgba(0,0,0,0.9)，半透明几乎不可见，最顶层：普通面板：1～10。浮窗：100。全屏遮罩：1000 起步，登录框永远居中显示*/

#login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/*margin: 8px 0,输入项之间留间距*/
.login-box {
    background: (--text)f;
    padding: 30px;
    border-radius: 12px;
    width: 300px;
    color: (--bg);
}

.login-box input,
.login-box select {
    width: 100%;
    margin: 8px 0;
    padding: 10px;
    border: 1px solid (--bg);
    border-radius: 6px;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: var(--text);
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/*.hide { display: none !important; }任何元素，只要在class list 添加这个类属性，将被隐藏*/