html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background: #111;
    color: #fff;
    transition: background 1.8s, color 1.8s;
}
body.dark-mode {
    background: #fff;
    color: #111;
}

.container {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

.info-panel {
    position: absolute;
    top: 50%;
    width: 15%;
    /* max-width: 26vw; */
    font-size: 14px;
    line-height: 1.6;
    padding: 14px 16px;
    border: 1px solid rgba(20, 20, 20, 0.5);
    background: rgba(255, 255, 255, 0.6);
    color: #111;
    transform: translateY(-50%);
    transition: background 1.5s, color 1.5s, transform 260ms ease, opacity 260ms ease;
    pointer-events: none;
}
body.dark-mode .info-panel {
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
}

.info-panel h2 {
    margin-top: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.5);
    padding-bottom: 8px;
}
body.dark-mode .info-panel h2 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.left-panel {
    left: 16px;
}

.right-panel {
    right: 16px;
}

.right-panel p {
    padding-left: 5px;
    line-height: 1.7;
    margin-bottom: 5px;
}

.right-panel span[id^="status-"] {
    font-weight: bold;
}

.container:not(.show-panels) .left-panel {
    transform: translate(-44px, -50%);
    opacity: 0;
}

.container:not(.show-panels) .right-panel {
    transform: translate(44px, -50%);
    opacity: 0;
}

.schematic-container {
    margin-top: 18px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.schematic-container svg {
    width: 100%;       /* 填满容器宽度 */
    height: auto;      /* 保持纵横比 */
    display: block;    /* 消除底部默认间隙 */
}

/* 
   计算逻辑：
   侧边栏宽度设为 15vw。
   SVG 原始设计宽度约为 180px。
   当 15vw < 180px (即屏幕宽度小于 1200px) 时，文字会变得难以阅读且布局拥挤。
   此时彻底隐藏该区域。
*/
@media (max-width: 1200px) {
    .schematic-container {
        display: none;
    }
}

#canvas {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
    transition: background 1.5s;
}

body.dark-mode #canvas {
    background: #333;
}