
/* 全屏加载蒙版 */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* 半透明黑色背景 */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* 确保在最顶层 */
}

/* 加载文本样式 */
.loading-text {
  color: white;
  font-size: 24px; /* 或你喜欢的字体大小 */
  font-weight: bold;
}

.container {
    background: white;
    padding:  0 30px 30px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 90%;
    height: 85%;
    width: 100%;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

h3 {
    margin: 0 0 10px 0;
    color: #444;
    font-size: 16px;
    font-weight: 600;
}

/* --- 核心修改 1：父容器 --- */
.input-section {
    display: flex;
    gap: 20px;
    justify-content: center;
    height: 95%;
    /* 关键属性：让所有子元素高度拉伸一致 */
    align-items: stretch;
}

/* --- 核心修改 2：子元素盒子 --- */
.upload-box,
.result-section {
    flex: 1;
    /* 平分宽度 */
    text-align: center;
    padding: 15px;
    border: 1px dashed #ccc;
    border-radius: 8px;
    background: transparent;
    min-width: 0;
    /* 防止内容溢出 */

    /* 关键属性：让盒子内部也变成 Flex 列布局，以便控制内部元素高度 */
    display: flex;
    flex-direction: column;
}

/* 结果区域样式微调 */
.result-section {
    border: 1px solid #ddd;
    background: transparent;
}

input[type="file"] {
    margin-bottom: 10px;
    font-size: 13px;
    width: 100%;
    flex-shrink: 0;
    /* 防止输入框被压缩 */
}

/* --- 核心修改 3：Canvas 高度自适应 --- */
canvas {
    display: block;
    width: auto;
    height: 95%;

    /* 关键属性：让 Canvas 占据盒子剩余的所有高度 */
    flex: 1;

    /* 保持图片比例，防止变形 */
    object-fit: contain;

    border: 1px solid #eee;
    background: transparent;
    border-radius: 4px;
    margin-top: auto;
    /* 可选：让 Canvas 尽量靠下，或者去掉这行让它紧贴 Label */
}

/* --- 控制台区域 --- */
.control-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.svg-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

#intensitySvg {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: crosshair;
}