/* 界面样式 */
body {
    font-family: Arial, sans-serif;
    background-color: #FFF;

    display: flex;
    justify-content: left;
    /* 
    background: linear-gradient(to right, rgb(32, 74, 157), rgb(148, 190, 128));
    align-items: center;
    height: 100vh;
    */
    margin: 0;
}

.container {
    /* background-color: #F5F5DC; */
    background-color:rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    top: 0px;
    width: 450px;
    height: 90vh;
    overflow: hidden;
    position: absolute;
    overflow-y: auto; /* 内容超出时显示垂直滚动条 */
    z-index: 6;
    /* resize:both; */
    /* resize:horizontal; */
}

.drag_container {
    z-index: 6;
   /*  cursor: move; 显示移动光标 */
}

.drag-handle {
    position: sticky; /* 改为粘性定位，使其跟随滚动 */
    top: 0; /* 相对于滚动容器顶部的偏移量 */
    left: 0; /* 保持在左侧 */
    width: 30px; /* 可根据需要调整手柄宽度 */
    height: 30px; /* 可根据需要调整手柄高度 */
    background-color: transparent;
    background: 
    linear-gradient(to right, #00ffbb 45%, transparent 45%, transparent 55%, #83a3c4 55%) center/100% 4px no-repeat,
    linear-gradient(to bottom, #5b9fe8 45%, transparent 45%, transparent 55%, #7bc0ae 55%) center/4px 100% no-repeat;
    cursor: move; /* 显示移动光标 */
    z-index: 100; /* 提高z-index确保在其他元素上方 */
    float: none ; /* 确保不会影响其他内容布局 */
}

/* 温度图表样式 */
#temperatureChartContainer {
    font-family: Arial, sans-serif;
    backdrop-filter: blur(5px);
    background-color: rgba(0, 0, 0, 0.85) !important;
    border: 2px solid #4CAF50 !important;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3) !important;
    border-radius: 12px !important;
    padding: 15px !important;
    transition: all 0.3s ease;
}

#temperatureChart {
    border: 1px solid #ddd;
    border-radius: 6px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

#temperatureChartContainer:hover {
    border-color: #45a049 !important;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4) !important;
    transform: translateY(-2px);
}

/* 温度输入框悬停效果 */
#arm_temp_dis {
    transition: all 0.2s ease;
    cursor: pointer;
}

#arm_temp_dis:hover {
    background-color: #f0f8ff;
    border-color: #4CAF50;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

#arm_temp_dis:active {
    transform: scale(0.98);
}

.container.collapsed {
    max-height: 0;
    padding: 0;
}



.my_target {
    width: 100vw;
    height: 100vh;
    background-color: lightblue;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center; 
    margin: 0;
    padding: 0;
    border: none;
    top: 0px;
    left: 0px;
    z-index: 1;
    position: fixed;
}


#edgeButton {
    transform: translateY(-50%); 
    position: fixed;
    top: 5px;
    left: 0;
    width: 540px;
    background-color:  #FFF;
    color: #FFF;
    text-align: center;
    padding: 1px;
    cursor: pointer;
    z-index: 100;
    opacity: 0.3; /* 设置透明度为30% */
}

.row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.row:last-child {
    margin-bottom: 0;
}

.row>* {
    margin-right: 10px;
}

.row>*:last-child {
    margin-right: 10px;
}

button {
    background-color: #007BFF;
    color: #fff;
    border: none;
    padding: 5px 30px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}


@media (hover: hover) {
    button:hover {
        background-color: #0056b3;
    }
}
/* 移动端用 active 代替 hover （点击时有效果）*/
button:active {
    background-color: #6a8a36;
}

textarea {
    resize: vertical; /* 仅允许垂直方向调整大小 */
    padding-bottom: 20px; /* 增加底部内边距 */
    overflow: auto;
    position: relative;
}

select,
input[type="text"],
input[type="number"] {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100px;
}

input[type="range"] {
    width: 100%;
}

.slider-container {
    display: flex;
    align-items: center;
}

.tab {
    display: none;
}
.tab-content {
    display: none;
    padding: 10px;
    border: 1px solid #ccc;
    margin-top: 10px;
}
.tab-button {
    padding: 1px 4px;
    border-radius: 4px;
    border: 1px solid #ccc;
    cursor: pointer;
    display: inline-block;

    background-color:  #007BFF;
    color:  #fff;
    cursor: pointer;
    transition: background-color 0.3s;
    transition: color 0.3s;
}

.tab-button.active {
    background-color: #8fc2f7;
    color:   #fff;
}

.checkbox_label {
    display: inline-flex;
    align-items: center;
    padding: 1px 4px;
    border-radius: 4px;
    border: 1px solid #ccc;
    cursor: pointer;
    color: gray;
}

.checkbox_label input[type="checkbox"] {
    margin-right: 10px;
}

.checkbox_label_selected {
    background-color: #6a8a36;
    border-color: blue;
    color: #fff;
}

form,
select,
.tab-content,
.tab-button,
label,
button,
.checkbox_label {
    -webkit-user-select: none;
    /* Chrome, Safari, and Opera */
    -moz-user-select: none;
    /* Firefox */
    -ms-user-select: none;
    /* Internet Explorer/Edge */
    user-select: none;
    /* Standard syntax */
}

canvas {
    border: 1px solid black;
}
#controlPanel {
    margin-top: 10px;
}

#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8); /* 半透明背景 */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999; /* 确保覆盖在所有内容之上 */
}

#loader {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 16px solid #f3f3f3;
    border-radius: 50%;
    border-top: 16px solid #3498db;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content label {
    display: block;
    padding: 8px 16px;
    cursor: pointer;
}

.dropdown-content label:hover {
    background-color: #f1f1f1;
}

.dropdown-content input {
    margin-right: 10px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.context-menu {
    display: none;
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
    z-index: 300;
}

.context-menu label {
    display: block;
    margin: 5px 0;
}

.status_container {
    position: fixed;
    top: 5px;
    right: 10px;
    z-index: 1;
    height: 200px;
    overflow: auto;
    display: none;
    resize: vertical;
    cursor: move; /* 添加移动光标 */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 添加阴影 */
}

.status_container table {
    border-collapse: collapse;
    width: 100%;
}

.status_container th, 
.status_container td {
    border: 1px solid transparent;
    padding: 0px;
    text-align: center;
    background-color: transparent;
}


#logContainer {
    position: fixed;
    top: 20px;
    right: 10px;
    width: 300px;
    height: 200px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    overflow-y: auto;
    padding: 10px;
    border-radius: 5px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    cursor: move;
    transition: width 0.3s, height 0.3s; /* 添加过渡效果 */
    resize:vertical ; /* 竖直方向可调整大小 */

}

#dropZone {
    width: 80%;
    height: 80%;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #aaa;
}

.highlight {
    border-color: #000;
    color: #000;
}


.tree ul {
    padding-left: 1px;
    list-style: none;
}

.tree li {
    display: flex;
    align-items: center;
    gap: 1px;
    padding: 1px 0;
}

.tree input[type="checkbox"] {
    margin: 0;
}

.tree label {
    cursor: pointer;
    margin: 0;
    min-width: 10px;
}

.point-count {
    color: #666;
    font-size: 0.9em;
    min-width: 10px;
    text-align: right;
}

.traj-btn {
    padding: 2px 8px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.traj-btn:hover {
    background-color: #45a049;
}


.json-tab {
    opacity: 0.6;
    transition: opacity 0.3s;
}
.active-tab {
    opacity: 1;
    font-weight: bold;
    background-color: rgba(0, 123, 255, 0.2);
}

/* 默认隐藏触屏选项 */
.touch-only {
    display: none;
}

/* 在触屏设备上显示 */
@media (hover: none) and (pointer: coarse), 
       (max-width: 768px) and (orientation: portrait) and (-webkit-min-device-pixel-ratio: 2) {
    .touch-only {
        display: block;
    }
}