/* ==============model train start===================== */
:root {
    --user-model-title-height: 18px;
    --error-color: #f94d4d;
    --copy-color:#8a965f;
    --starting-color: #ff9500;
    --start-color: #2fbc52;
    --stop-color: #ff8282;
    --edit-color: rgb(24 144 255);
    --train-view-height: 484px;
    --train-view-title_height: 32px;
    --train-view-loss-height: 200px;
    --train-view-content-height: calc(var(--train-view-height) - var(--train-view-title_height) - var(--train-view-loss-height));
}
.user-model, .user-material {
    display: none;           /* 默认隐藏 */
    width: 100%;             /* 宽度占满父容器 */
    height: 90%;            /* 高度占满父容器 */
    box-sizing: border-box;  /* 包括内边距和边框 */
    background-color: white;  /* 背景颜色 */
    padding: 52px 20px 20px 42px;
    z-index: 1;
    justify-content: center;
    align-items: center;
    position: relative; /* 设置为相对定位 */
    font-size: 12px;
}


.user-model-head, .user-material-head {
    width: 100%;
    height: 44px;
    /* margin-top: 32px; */
    padding-top: 32px;
    /* background-color: red; */
    padding-top: 6px;
    padding-left: 20px;
    position: relative;

}

.user-model-head span, .user-material-head span {
    font-size: var(--user-model-title-height);
    font-weight: 600;
}

.user-model-head span::before, .user-material-head span::before{
    content: ''; /* 生成空内容 */
    position: absolute;
    left: 0;
    top: 18px;
    transform: translateY(-50%);
    width: 5px; /* 竖线宽度 */
    height: var(--user-model-title-height); /* 竖线高度，可根据需要调整 */
    background-color: rgb(0, 0, 0); /* 竖线颜色 */
}

.model-modules-nav, .material-nav{
    margin-top: 0.5rem;
    
    /* background-color: var(--rechage-color2); */
    color: rgb(179, 179, 179);
    height: 64px;
    border-bottom: #aaa 1px solid;
    margin-bottom: 2rem;
}

.model-modules-nav button, .material-nav button {
    width: 150px;
    height: 48px;
    margin-right: 1rem;
    font-size: 1.2rem;
    border-radius: 5px;
    border: #888 1px solid;
}

.model-modules-nav-not-active, .material-nav-not-active {
    color: rgb(33, 33, 33) !important;
    background-color: white;
}

/* .model-modules-nav button:hover {
    background-color: var(--rechage-color2);
    color: rgb(255, 255, 255) !important;
} */


.model-modules-nav-active,  .material-nav-active{
    background-color: var(--rechage-color2);
    color: rgb(255, 255, 255) !important;
}

.model-modules-nav a, .material-nav a {
    margin-top: 10px;
    float: right;
}

.model-module, .material {
    display: flex; /* 启用 Flexbox */
}

.train-form {
    height: 820px;
    margin-right: 16px;
}

.train-view {
    flex: 1; /* 左侧占据剩余空间 */
    height: var(--train-view-height);
    border: 1px solid #ccc;     /* 可选：添加边框以便观察 */
    border-radius: 5px;
}

.train-view-title {
    background-color: hsl(221.25deg 32% 90.2%);
    color: rgb(0, 0, 0);
    font-size: 14px;
    height: var(--train-view-title_height);
    padding: 5px 20px;
    border-radius: 5px;
}


.train-view-content {
    height: var(--train-view-content-height);
    overflow-y: scroll;
    padding: 10px;              /* 可选：内边距 */
}

.train-loss {
    height: var(--train-view-loss-height);
    /* background-color: #2fbc52; */
    padding: 0px 20px;
}


.train-loss canvas {
    /* margin-left: auto !important; */
    /* margin-right: auto !important; */
}

.train-datasets {
    border-radius: 10px;
    border: 1px solid gray;
    width: 100%;
    height: 160px;
    padding-left: 24px;
    padding-right: 24px;
    box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}


.train-dataset-upload {
    width: 100%;
    height: 100px;
    /* background-color: #67c23a; */
    padding-top: 12px;
}



.train-dataset-upload select {
    margin-left: 12px;
    margin-right: 12px;
    width: 180px !important;
    height: 28px !important;
}




.train-dataset-upload input {
    margin-left: 12px;
    margin-right: 12px;
    width: 320px;
}

.train-dataset-upload input[type="file"]::file-selector-button {
    background-color: white;
    color: black;
    border: 1px #888 solid;
    width: 180px !important;
    height: 24px !important;
    border-radius: 5px;
    cursor: pointer;
}


.train-dataset-upload-btn{
    width: 72px !important;
    height: 24px !important;
    background-color: #539c2e !important;
    color: white !important;
    float: right;
}


.train-dataset-sel {
    width: 100%;
    padding-top: 10px;
    height: 160px;
}

.train-dataset-sel button {
    display: inline-flex;
    align-items: center;
    padding: 10px 10px;
    background-color: var(--error-color) !important;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.train-dataset-sel button img {
    width: 16px;
    height: 16px;
    margin-right: 10px;
    margin-left: 10px;
}

#sel-datasets label {
    margin-left: 6px;
    margin-right: 6px;
}


.train-args {
    width: 100%;
    height: 300px;
    /* background-color: #67c23a; */
    padding: 20px 0px;
}

.train-args-tile {
    font-size: 16px;
}

.train-args-list {
    width: 100%;
    /* height: 240px; */
    border: 1px rgb(184, 184, 184) solid;
    margin-top: 20px;
}

.train-args-list .train-args-row {
    padding: 12px 10px;
    height: 60px;
}

.train-args-list .train-args-row:nth-child(odd) {
    background-color: hsl(0deg 0% 94.9%);
}

.train-args-list .train-args-row:nth-child(even) {
    /* background-color: white; */
}

.train-btn-box-mid {
    width: 400px;
    height: 100%;
    margin-left: calc(50% - 200px);
}

.train-btn-box-mid button {
    background-color: hsl(269.79deg 70.44% 60.2%) !important;
    display: inline-flex;
    align-items: center;
    padding: 10px 10px;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    height: 36px !important;
}

.train-btn-box-mid button img {
    width: 16px;
    height: 16px;
    margin-left: 10px;
    margin-right: 5px;
}

/* 暂时屏蔽 */
/* .train-form div {
    padding: 10px;
    margin-top: 20px;
    border: 1px solid gray;
    margin-right: 10px;
    border-radius: 5px;
    box-shadow: 1px 5px 7px rgba(0, 0, 0, 0.1);
} */

.train-form input[type="text"], .train-form select{
    height: 32px;
    width: 6rem;
    font-size: 12px;
    padding: 3px 5px 3px 5px; 
    border-radius: 5px;
}

.train-form button{
    height: 28px;
    width: 6rem;
    background-color: var(--rechage-color2);
    color: rgb(250, 250, 250);
    border-radius: 5px;
}

.train-btn-box button{
    /* float: right;  */
    margin-left: 3rem;
}
/* ==============model train end===================== */


/* ==============develop model start===================== */

.user-develop {
    position: relative;
}

.develop-model-container {
    padding: 0px;
    width: 100%;
}

.develop-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 10px;
    background-color: rgb(255 149 0);
    color: white;
    border: none;
    cursor: pointer;
    margin-bottom: 20px;
    border-radius: 5px;
    width: 130px;
    font-size: 14px;
    height: 26px;
    text-align: center;
}

.develop-btn img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

.develop-btn:hover {
    background-color: rgb(255, 81, 0);
}

.model-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    height: 400px;
    border-radius: 5px;
    /* border: 1px solid gray; */
    padding: 14px 0px;
    overflow-y: scroll;
}

.model-card {
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 15px;
    width: 300px;
    height: 180px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.model-card-info {
    width: 100%;
    height: 48px;
    display: flex;
    /* background-color: #67c23a; */
}

.model-card-icon {
    width: 48px;
    height: 48px;
    /* background-color: #f56c6c; */
}

.model-card-icon img {
    width: 100%;
    height: 100%;
    border: gray 1px solid;
    border-radius: 5px;
    object-fit: cover;
    object-position: center;
}

.model-card-detail {
    flex: 1;
    /* background-color: #f7f5f5; */
    padding: 3px 15px;
}

.model-card-detail span {
    width: 100px;
    height: 20px;
    display: block;
    background-color: hsl(0deg 0% 90.2%);
    color: hsl(0deg 0% 50.59%);
    text-align: center;
    padding: 2px 0px;
    border-radius: 3px;
}

.model-card .model-name {
    font-weight: bold;
    margin-bottom: 10px;
}

.model-status{
    font-weight: 600;
}

.model-card .model-status {
    margin-bottom: 10px;
}

.model-status-container {
    display: flex;
    margin-top: 20px;
    padding: 5px;
}

.model-actions {
    margin-top: 15px;
}

.model-card .model-actions button {
    margin-right: 0px;
    padding: 5px 5px;
    cursor: pointer;
}

.develop {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.develop-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 0px;
    border: 1px solid #888;
    width: 36%;
}

.develop-content-title {
    width: 100%;
    height: 40px;
    padding: 10px 5px;
    background-color: rgb(236 236 236);
}

.develop-content .close {
    color: #aaa;
    float: right;
    font-size: 16px;
    font-weight: bold;
    height: 100%;
    width: 24px;
}

.develop-content .close:hover,
.develop-content .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.develop-content form {
    width: 100%;
    padding: 32px 32px 0px 32px;
    font-size: 14px;
}

.develop-content form label {
    margin-bottom: 5px;
    margin-right: 10px;
    width: 100px;
}

.develop-content form input {
    padding: 8px;
    width: calc(100% - 120px);
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.develop-content form button {
    background-color: rgb(0 87 255);
    color: white;
    width: 120px;
    height: 32px;
    margin-left: calc(50% - 60px);
}

.develop-content form button:hover {
    background-color: rgb(87, 143, 255);
}

.model-card .status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 10px;
    margin-top: 3px;
    /* margin-bottom: auto; */
}


.copy-develop-btn {
    display: inline-flex;
    align-items: center;
    /* padding: 10px 10px; */
    background-color: #8a965f;
    color: white;
    border-radius: 5px;
    font-size: 12px;
    height: 24px;
    
}

.copy-develop-btn img {
    margin-right: 8px;
    width: 14px;
    height: 14px;
}

.toggle-develop-btn .delete-develop-btn {
    height: 24px !important;
    border-radius: 5px;
    font-size: 12px;
    /* padding: 10px 10px; */
}

.delete-develop-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 10px;
    /* padding: 10px 10px; */
    background-color: var(--error-color);
    color: white;
    border-radius: 5px;
    height: 24px !important;
    margin-top: 2px !important;
    font-size: 12px;
    width: 64px;
    margin-left: 10px;
}

.toggle-develop-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 10px;
    width: 64px;
    height: 24px !important;
    border-radius: 5px;
    font-size: 12px;
    margin-left: 10px;
    margin-right: 15px;
}


.toggle-develop-btn img{
    width: 14px;
    height: 14px;
    margin-right: 5px;
}

.delete-develop-btn img {
    width: 14px;
    height: 14px;
    margin-right: 5px;
}

.published {
    background: var(--stop-color);
    color: white;
}

.unpublished {
    background: var(--start-color);
    color: white;
}

.publishing {
    background: var(--starting-color);
    color: white;
}

/* ==============develop model end===================== */



/* ==============modal manager start===================== */
/* 
#addModelBtn {
    margin-top: 16px;
    width: 80px;
    height: 32px;
    border-radius: 5px;
    background: var(--rechage-color2);
    color: white;
} */

.modal-container {
    width: 100%;
    margin: 0 auto;
}

.modal-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.modal-container th, .modal-container td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.modal-container th {
    background-color: #f2f2f2;
}

.modal-manager {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-manager-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 0px;
    border: 1px solid #888;
    width: 30%;
}

.modal-content-title {
    width: 100%;
    height: 40px;
    padding: 10px 5px;
    font-size: 16px;
    background-color: rgb(236 236 236);
}

.modal-manager .close {
    color: #aaa;
    float: right;
    font-size: 16px;
    font-weight: bold;
    height: 100%;
    width: 24px;
}

.modal-manager .close:hover,
.modal-manager .close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.modal-container table button {
    color: var(--rechage-color2);
}



.modal-manager form {
    width: 100%;
    padding: 32px 32px 0px 32px;
    font-size: 14px;
}

.modal-manager-row {
    width: 100%;
    height:  32px;
    display: flex;
    margin-bottom: 16px;
}

.modal-manager-row label {
    width: 100px;
    display: block;
    text-align: center;
    height: 32px;
    line-height: 32px;
}

.modal-manager-row input[type="text"] {
    width: calc(100% - 160px);
    /* padding: 8px; */
    /* margin-top: 10px; */
    /* margin-bottom: 10px; */
    /* box-sizing: border-box; */
    /* display: inline-block; */
    border-radius: 5px;
    flex: 1;
}


.modal-manager-row input[type="checkbox"] {
    /* padding: 8px; */
    /* margin-left: 16px; */
    margin-top: 8px;
    margin-left: 16px;
    border-radius: 8px;
    height: 16px;
    width: 16px;
}






.modal-manager-row select {
    width: 120px;
    /* padding: 8px; */
    border-radius: 5px;
    height: 24px;
    font-size: 12px;
    padding: 0px 5px;
    /* margin-top: 12px; */
    /* margin-left: 16px; */
}

.modal-manager-row button {
    margin-left: calc(50% - 50px);
    width: 100px;
    background-color: var(--edit-color);
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.modal-manager form button:hover {
    background-color: var(--rechage-color);
}

.hide-eyes, 
.show-eyes{
    width: 24px;
    height: 24px;
    background-size: 24px 24px;
    float: right;
}


.hide-eyes {
    background-image: url('../images/hide.png');
}

.show-eyes {
    background-image: url('../images/show.png');
}

.editBtn {
    color: var(--edit-color);
}


.deleteBtn {
    color: var(--error-color);
}
/* ==============modal manager end===================== */


  /* ==============modal upload start===================== */
  .upload-container{
    width: 100%;
  }
  
  /* 文件拖放区域 */
  .file-drop-area {
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    padding: 2.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    background-color: white;
  }
  
  .file-drop-area:hover {
    border-color: #165DFF;
  }
  
  .file-drop-area.file-drop-active {
    border-color: #165DFF;
    background-color: rgba(22, 93, 255, 0.05);
  }
  
  .file-drop-icon {
    font-size: 3rem;
    color: #9ca3af;
    margin-bottom: 1rem;
  }
  
  .file-drop-title {
    font-size: 1.125rem;
    font-weight: medium;
    margin-bottom: 0.5rem;
  }
  
  .file-drop-or {
    color: #6b7280;
    font-size: 0.875rem;
    margin-bottom: 1rem;
  }
  
  .file-drop-button {
    background-color: #165DFF;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: medium;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .file-drop-button:hover {
    background-color: #0b45d4;
  }
  
  .file-drop-button input {
    display: none;
  }
  
  .file-drop-note {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 1rem;
  }
  
  /* 上传队列样式 */
  .upload-queue {
    margin-bottom: 2rem;
  }
  
  .upload-queue-empty {
    padding: 2.5rem;
    text-align: center;
    color: #6b7280;
    background-color: white;
    border-radius: 0.5rem;
  }
  
  .upload-queue-empty i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
  }
  
  /* 上传项样式 */
  .upload-item {
    padding: 1.5rem;
    background-color: white;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
  }
  
  .upload-item:hover {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  
  .upload-item-header {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
  }
  
  .upload-item-icon {
    width: 2.5rem;
    height: 2.5rem;
    background-color: #f3f4f6;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    flex-shrink: 0;
  }
  
  .upload-item-info {
    flex-grow: 1;
  }
  
  .upload-item-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
  }
  
  .upload-item-filename {
    font-weight: medium;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .upload-item-filesize {
    font-size: 0.875rem;
    color: #6b7280;
  }
  
  .upload-item-progress {
    height: 0.5rem;
    background-color: #e5e7eb;
    border-radius: 0.25rem;
    overflow: hidden;
    margin-bottom: 0.75rem;
  }
  
  .upload-item-progress-bar {
    height: 100%;
    background-color: #165DFF;
    transition: width 0.3s ease;
  }
  
  .upload-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .upload-item-status {
    font-size: 0.875rem;
  }
  
  .upload-item-status.pending {
    color: #6b7280;
  }
  
  .upload-item-status.uploading {
    color: #165DFF;
  }
  
  .upload-item-status.paused {
    color: #FF7D00;
  }
  
  .upload-item-status.completed {
    color: #00B42A;
  }
  
  .upload-item-status.failed {
    color: #F53F3F;
  }
  
  .upload-item-actions {
    display: flex;
    gap: 0.75rem;
  }
  
  .upload-item-action {
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .upload-item-action:hover {
    color: #165DFF;
  }
  
  .upload-item-action.pause:hover,
  .upload-item-action.resume:hover {
    color: #165DFF;
  }
  
  .upload-item-action.cancel:hover {
    color: #F53F3F;
  }
  
  /* 上传设置样式 */
  .upload-settings {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  }
  
  .upload-settings-title {
    font-size: 1.125rem;
    font-weight: medium;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
  }
  
  .upload-settings-title i {
    color: #165DFF;
    margin-right: 0.5rem;
  }
  
  .upload-settings-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  @media (min-width: 768px) {
    .upload-settings-fields {
      grid-template-columns: 1fr 1fr;
    }
  }
  
  .upload-settings-field {
    display: flex;
    flex-direction: column;
  }
  
  .upload-settings-label {
    font-size: 0.875rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
  }
  
  .upload-settings-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    background-color: white;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%234b5563'%3E%3Cpath fill-rule='evenodd' d='M10 3a1 1 0 01.707.293l3 3a1 1 0 01-1.414 1.414L10 5.414 7.707 7.707a1 1 0 01-1.414-1.414l3-3A1 1 0 0110 3zm-3.707 9.293a1 1 0 011.414 0L10 14.586l2.293-2.293a1 1 0 011.414 1.414l-3 3a1 1 0 01-1.414 0l-3-3a1 1 0 010-1.414z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .upload-settings-select:hover {
    border-color: #9ca3af;
  }
  
  .upload-settings-select:focus {
    outline: none;
    border-color: #165DFF;
    box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.2);
  }
  
  /* 速度指示器 */
  .speed-indicator {
    height: 2px;
    background: linear-gradient(90deg, rgba(22,93,255,0) 0%, rgba(22,93,255,0.3) 50%, rgba(22,93,255,0) 100%);
    position: relative;
    overflow: hidden;
    margin-top: 0.5rem;
  }
  
  .speed-wave {
    position: absolute;
    height: 100%;
    width: 50%;
    background: linear-gradient(90deg, rgba(22,93,255,0) 0%, rgba(22,93,255,0.7) 50%, rgba(22,93,255,0) 100%);
    animation: wave 2s infinite linear;
  }
  
  @keyframes wave {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(200%); }
  }
  
  /* 预计时间和速度显示 */
  .upload-item-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.5rem;
  }
  

  
  /* 动画效果 */
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .animate-fadeIn {
    animation: fadeIn 0.3s ease forwards;
  }

  /* ==============modal upload end===================== */