body {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

#contentPanel {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-color: #f0f0f0;
}

/* 左侧文件列表样式 */
#fileList {
  width: 200px;
  background-color: #f0f0f0;
  padding: 20px;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}

/* 中间编辑器区域 */
.editor-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: #f8f8f8;
  position: relative;
  overflow: hidden;
}

.editor-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 10px;
  height: 50px;
  box-sizing: border-box;
  flex-shrink: 0;
  background-color: #f8f8f8;
}

.split-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.panel-top {
  flex: 7;
  min-height: 100px;
  position: relative;
  display: flex;
  flex-direction: column;
}

.splitter {
  height: 8px;
  background: #ddd;
  cursor: row-resize;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.panel-bottom {
  flex: 3;
  min-height: 100px;
  position: relative;
  background-color: #fff;
  display: flex;
  flex-direction: column;
}

#editor-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.CodeMirror {
  flex: 1;
  height: auto !important;
}

.console-panel {
  height: 100%;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

/* 調整控制台區域樣式 */
.console-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 其他样式保持不变 */
#fileList h2 {
  margin-top: 0;
  font-size: 1.2em;
}

#fileList ul {
  list-style: none;
  padding: 0;
}

#fileList li {
  padding: 8px;
  margin: 4px 0;
  border-radius: 4px;
  cursor: pointer;
}

#fileList li:hover {
  background-color: #e0e0e0;
}

#fileList li.active {
  background-color: #4caf50;
  color: white;
}

#output {
  flex: 1;
  margin: 0;
  padding: 10px;
  overflow-y: auto;
}

#command {
  width: calc(100% - 100px);
  padding: 5px;
  margin-right: 10px;
}

.button {
  background-color: #4caf50;
  border: none;
  color: white;
  padding: 4px 8px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 14px;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 4px;
}

.button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 10px;
}

.toolbar-item {
  margin-right: 10px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

#deviceId {
  width: 150px;
  font-size: 14px;
  text-align: center;
}

.toolbar-button {
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 6px 12px;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
  position: relative;
  top: 0;
}

.toolbar-button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  pointer-events: none;
}

.toolbar-button:hover:not(:disabled) {
  background-color: #45a049;
  top: -3px;
  color: #ffffff;
  filter: brightness(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.toolbar-button:active:not(:disabled) {
  top: -2px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.terminal {
  width: 100%;
  height: 300px;
  background-color: #1e1e1e;
  color: #ffffff;
  font-family: monospace;
  padding: 10px;
  margin: 10px 0;
  overflow-y: auto;
  white-space: pre-wrap;
  outline: none;
  -webkit-user-select: text;
  user-select: text;
}

.terminal:focus {
  outline: none;
}

.toolbar-button {
  padding: 5px 10px !important;
  margin: 0 5px !important;
  height: 30px;
  font-size: 14px !important;
}

/* 添加新的文件列表分割面板樣式 */
.split-file-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.file-panel-top {
  flex: 1;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.file-panel-top .panel-header {
  flex-shrink: 0;
}

.file-panel-top .file-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.file-splitter {
  height: 8px;
  background-color: #ddd;
  cursor: row-resize;
  position: relative;
  flex-shrink: 0;
}

.file-splitter:hover {
  background-color: #bbb;
}

.file-splitter::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 30px;
  height: 2px;
  background-color: #999;
}

.file-panel-bottom {
  flex: 1;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.file-panel-bottom .panel-header {
  flex-shrink: 0;
  padding: 10px;
  border-bottom: 1px solid #ddd;
  background-color: #fff;
  z-index: 1;
}

.file-panel-bottom .current-path {
  flex-shrink: 0;
  padding: 8px 10px;
  color: #666;
  font-size: 0.9em;
  border-bottom: 1px solid #eee;
  background-color: #fff;
  z-index: 1;
}

.file-panel-bottom .file-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

/* 設置 CodeMirror 預設字型大小為 24px */
.cm-editor {
  font-size: 18px;
}

/* 設備資訊樣式 */
.info-section {
  padding: 0;
  margin: 0;
  font-family: monospace;
  background-color: #2d2d2d;
  display: flex;
  flex-direction: column;
}

.info-item {
  margin: 0;
  padding: 0;
  background-color: #2d2d2d;
  width: 100%;
  box-sizing: border-box;
  border-radius: 0;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2px 8px;
  min-height: 0;
  line-height: 0;
  width: 100%;
  box-sizing: border-box;
  font-size: 1.5em;
}

.info-label {
  color: #7cb7ff;
  font-weight: bold;
  margin-right: 10px;
  font-size: 0.85em;
}

.info-value {
  color: #ffffff;
  font-size: 0.85em;
  text-align: right;
}

/* 特定區塊的樣式 */
.info-item.network {
  border-left: 4px solid #4caf50;
}

.info-item.memory {
  border-left: 4px solid #ffc107;
}

.info-item.storage {
  border-left: 4px solid #2196f3;
}

.info-item.files {
  border-left: 4px solid #9c27b0;
}

/* 設備資訊面板樣式 */
.device-info-panel {
  width: 300px;
  background-color: #2d2d2d;
  color: #ffffff;
  border-left: 1px solid #333;
  display: flex;
  flex-direction: column;
}

.device-info-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  margin: 0;
  background-color: #2d2d2d;
}

.file-list {
  overflow-y: auto;
  height: calc(100% - 40px);
  padding: 10px;
}

.file-item {
  display: flex;
  align-items: center;
  padding: 8px;
  cursor: pointer;
  border-radius: 4px;
  margin-bottom: 4px;
  transition: background-color 0.2s;
}

.file-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.file-item.selected {
  background-color: #b2b4b6 !important;
  color: white;
}

.file-item.selected .file-size {
  color: rgba(255, 255, 255, 0.8);
}


.file-item[data-type="directory"]:hover {
  background-color: rgba(86, 156, 214, 0.2);
  transform: translateX(2px);
}

.file-item[data-type="directory"] i {
  color: #ecd272;
}

.file-item i {
  margin-right: 8px;
  color: #666;
}

.file-item.selected i {
  color: white;
}

.file-name {
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  color: #666;
  font-size: 0.9em;
  margin-left: 8px;
}

.empty-message {
  text-align: center;
  color: #666;
  padding: 20px;
  font-style: italic;
}

.file-item.loading {
  opacity: 0.6;
  cursor: wait;
  position: relative;
}

.file-item.loading::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid #ccc;
  border-top-color: #666;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 添加新的讀取中動畫效果 */
.loading-pulse {
  animation: pulse 1.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse {
  0% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.3);
  }
  100% {
    filter: brightness(1);
  }
}

/* Pop Panel 樣式 */
.pop-panel {
  position: fixed;
  bottom: -100px; /* 初始位置在畫面外 */
  right: 20px;
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 15px 25px;
  border-radius: 5px;
  transition: transform 0.3s ease-in-out;
  z-index: 1000;
}

.pop-panel.show {
  transform: translateY(-120px); /* 向上移動以顯示 */
}

.pop-panel.error {
  background-color: rgba(220, 53, 69, 0.9); /* 紅色背景 */
}

.pop-panel.success {
  background-color: rgba(40, 167, 69, 0.9); /* 綠色背景 */
}

/* 調整按鈕內圖示的間距 */
.toolbar-button i {
  margin-right: 5px;
  font-size: 14px;
}

/* 當按鈕處於載入狀態時的圖示動畫 */
.toolbar-button.loading-pulse i.fa-sync {
  animation: spin 1s linear infinite;
}

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

/* 調整按鈕內容的齊方式 */
.toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* 當前路徑顯示樣式 */
.current-path {
  font-family: monospace;
  color: #666;
  font-size: 0.9em;
  padding: 4px 0;
  margin-bottom: 8px;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 調整檔案列表上方間距 */
.file-panel-bottom h2 {
  margin-bottom: 4px;
}

/* 移除舊的頁籤樣式 */
.editor-tabs {
  display: none;
}

/* 新的頁籤面板樣式 */
.editor-tab-panel {
  background-color: #1e1e1e;
  border-bottom: 1px solid #2d2d2d;
}

.editor-tab-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  background-color: #1e1e1e;
  min-height: 32px;
}

.tab-item {
  display: flex;
  align-items: center;
  padding: 6px 16px;
  background-color: #252526;
  color: #969696;
  border-right: 1px solid #2d2d2d;
  cursor: pointer;
  user-select: none;
  position: relative;
  font-size: 14px;
  min-width: 120px;
  max-width: 200px;
  height: 32px;
  box-sizing: border-box;
  transition: background-color 0.2s ease;
}

.tab-item.active {
  background-color: #1e1e1e;
  color: #ffffff;
  border-bottom: 2px solid #007acc;
}

.tab-item:hover {
  background-color: #2a2d2e;
}

.tab-item .tab-close {
  margin-left: 8px;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  opacity: 0.7;
  font-size: 12px;
}

.tab-item .tab-close:hover {
  background-color: rgba(255, 255, 255, 0.12);
  opacity: 1;
}

.tab-item .filename {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  letter-spacing: 0.2px;
}

/* 美化滾動條 */
.editor-tab-list::-webkit-scrollbar {
  height: 2px;
}

.editor-tab-list::-webkit-scrollbar-track {
  background: #1e1e1e;
}

.editor-tab-list::-webkit-scrollbar-thumb {
  background: #424242;
  border-radius: 2px;
}

.editor-tab-list::-webkit-scrollbar-thumb:hover {
  background: #505050;
}

.device-info-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #333;
}

.device-info-header h2 {
  margin: 0;
  font-size: 1.2em;
}

.icon-button {
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  padding: 5px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.icon-button i {
  font-size: 1.5em;
  transition: transform 0.2s ease;
}

.icon-button:hover:not(:disabled) {
  background: none;
}

.icon-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.icon-button.spin i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.horizontal-split-container {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.panel-left {
  flex: 0 0 340px; /* 增加初始寬度 */
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.panel-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.horizontal-splitter {
  width: 4px;
  background-color: #ddd;
  cursor: col-resize;
  transition: background-color 0.3s;
  flex-shrink: 0;
}

.horizontal-splitter:hover {
  background-color: #999;
}

/* 調整編輯器區域樣式 */
.editor-header {
  padding: 5px;
  background-color: #f8f8f8;
  border-bottom: 1px solid #ddd;
}

.split-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.file-toolbar {
  padding: 8px;
  border-bottom: 1px solid #ddd;
  background-color: #f5f5f5;
  display: flex;
  gap: 8px;
}

.toolbar-btn {
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar-btn:hover {
  background-color: #f0f0f0;
}

.toolbar-btn i {
  font-size: 14px;
}

/* 确保文件列表区域可以正确滚动 */
.file-panel-top {
  display: flex;
  flex-direction: column;
}

.file-list {
  flex: 1;
  overflow-y: auto;
}

/* 添加通知样式 */
.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease-out;
  z-index: 1000;
  min-width: 200px;
  max-width: 400px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.notification.success {
  background-color: #4caf50;
  color: white;
}

.notification.error {
  background-color: #f44336;
  color: white;
}

.notification.info {
  background-color: #2196f3;
  color: white;
}

.notification-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  margin-left: auto;
}

.notification-close:hover {
  opacity: 0.8;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* 添加确认对话框样式 */
.custom-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1001;
}

.dialog-content {
  background-color: white;
  padding: 24px;
  border-radius: 8px;
  min-width: 300px;
  max-width: 400px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: dialogSlideIn 0.3s ease-out;
}

.dialog-title {
  margin: 0 0 16px 0;
  color: #333;
  font-size: 18px;
}

.dialog-message {
  margin: 0 0 24px 0;
  color: #666;
  line-height: 1.5;
}

.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.dialog-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.dialog-btn.cancel-btn {
  background-color: #f5f5f5;
  color: #333;
}

.dialog-btn.confirm-btn {
  background-color: #f44336;
  color: white;
}

.dialog-btn:hover {
  filter: brightness(0.95);
}

.dialog-btn:active {
  transform: translateY(1px);
}

@keyframes dialogSlideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* 修改開發板檔案面板的樣式 */
.file-panel-bottom .panel-header {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

.file-panel-bottom .panel-header h3 {
  margin: 0 0 10px 0;
}

.file-panel-bottom .toolbar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  background-color: #f5f5f5;
  border-radius: 4px;
}

.file-panel-bottom .toolbar-btn {
  padding: 6px 10px;
  background-color: transparent;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  transition: all 0.2s;
}

.file-panel-bottom .toolbar-btn i {
  font-size: 14px;
}

.file-panel-bottom .toolbar-btn:hover:not(:disabled) {
  background-color: #e0e0e0;
}

.file-panel-bottom .toolbar-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 調整當前路徑顯示的樣式 */
.current-path {
  padding: 8px 10px;
  color: #666;
  font-size: 0.9em;
  border-bottom: 1px solid #eee;
}

/* 統一檔案面板樣式 */
.file-panel-top,
.file-panel-bottom {
  flex: 1;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 統一面板標題區域樣式 */
.file-panel-top .panel-header,
.file-panel-bottom .panel-header {
  flex-shrink: 0;
  padding: 10px;
  border-bottom: 1px solid #ddd;
  background-color: #fff;
  z-index: 1;
}

.file-panel-top .panel-header h3,
.file-panel-bottom .panel-header h3 {
  margin: 0 0 10px 0;
}

/* 統一工具列樣式 */
.file-panel-top .toolbar,
.file-panel-bottom .toolbar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  background-color: #f5f5f5;
  border-radius: 4px;
}

/* 統一按鈕樣式 */
.file-panel-top .toolbar-btn,
.file-panel-bottom .toolbar-btn {
  padding: 6px 10px;
  background-color: transparent;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  transition: all 0.2s;
}

.file-panel-top .toolbar-btn i,
.file-panel-bottom .toolbar-btn i {
  font-size: 14px;
}

.file-panel-top .toolbar-btn:hover:not(:disabled),
.file-panel-bottom .toolbar-btn:hover:not(:disabled) {
  background-color: #e0e0e0;
}

.file-panel-top .toolbar-btn:disabled,
.file-panel-bottom .toolbar-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 統一檔案列表樣式 */
.file-panel-top .file-list,
.file-panel-bottom .file-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

/* 統一路徑顯示樣式 */
.current-path {
  flex-shrink: 0;
  padding: 8px 10px;
  color: #666;
  font-size: 0.9em;
  border-bottom: 1px solid #eee;
  background-color: #fff;
  z-index: 1;
}

/* 分隔條樣式 */
.file-splitter {
  height: 8px;
  background: #ddd;
  cursor: row-resize;
  flex-shrink: 0;
}

/* 統一按鈕樣式 */
.toolbar-btn {
  padding: 6px 10px;
  background-color: transparent;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  transition: all 0.2s;
}

.toolbar-btn i {
  font-size: 14px;
}

.toolbar-btn:hover:not(:disabled) {
  background-color: #e0e0e0;
}

.toolbar-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 移除舊的按鈕樣式 */
.toolbar-button {
  display: none; /* 或者完全移除這個樣式 */
}

/* 統一工具列樣式 */
.toolbar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  background-color: #f5f5f5;
  border-radius: 4px;
}

/* 確保��示和文字的間距一致 */
.toolbar-btn i {
  margin-right: 4px;
  font-size: 14px;
}

/* 確保文字大小一致 */
.toolbar-btn {
  font-size: 14px;
  line-height: 1;
}

/* 編輯器頂部工具列按鈕樣式 */
.editor-header .toolbar-button {
  background-color: #4caf50;
  color: white;
  border: none;
  padding: 6px 12px;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  margin: 4px 2px;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.editor-header .toolbar-button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.editor-header .toolbar-button:hover:not(:disabled) {
  background-color: #45a049;
  color: #ffffff;
  filter: brightness(1.1);
}

.editor-header .toolbar-button i {
  margin-right: 5px;
  font-size: 14px;
}

/* 檔案面板按鈕樣式 */
.file-panel-top .toolbar-btn,
.file-panel-bottom .toolbar-btn {
  padding: 6px 10px;
  background-color: transparent;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  transition: all 0.2s;
}

.file-panel-top .toolbar-btn i,
.file-panel-bottom .toolbar-btn i {
  font-size: 14px;
}

.file-panel-top .toolbar-btn:hover:not(:disabled),
.file-panel-bottom .toolbar-btn:hover:not(:disabled) {
  background-color: #e0e0e0;
}

.file-panel-top .toolbar-btn:disabled,
.file-panel-bottom .toolbar-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.board-files-toolbar {
  padding: 8px;
  border-bottom: 1px solid #dee2e6;
  background: #f8f9fa;
}

.board-files-toolbar .btn {
  margin-right: 8px;
}

/* 移除舊的上傳按鈕樣式 */
.toolbar-button#uploadFile {
  display: none;
}

/* 調整開發板檔案區域的工具列樣式 */
.file-panel-bottom .toolbar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  background-color: #f5f5f5;
  border-radius: 4px;
}

.file-panel-bottom .toolbar-btn {
  padding: 6px 10px;
  background-color: transparent;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  transition: all 0.2s;
}

.file-panel-bottom .toolbar-btn:hover:not(:disabled) {
  background-color: #e0e0e0;
}

.file-panel-bottom .toolbar-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 進度面板樣式 */
.progress-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #fff;
  border-radius: 8px;
  padding: 15px;
  width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(150%);
  transition: transform 0.3s ease-out;
  z-index: 1000;
}

.progress-panel.show {
  transform: translateY(0);
}

.progress-info {
  margin-bottom: 12px;
}

.progress-text {
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
}

.progress-numbers {
  font-size: 12px;
  color: #666;
}

.progress-bar-wrapper {
  margin-top: 8px;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background-color: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.progress-bar-fill {
  height: 100%;
  width: 0;
  background-color: #4caf50;
  transition: width 0.3s ease;
  border-radius: 3px;
}

.progress-percentage {
  text-align: right;
  font-size: 12px;
  color: #666;
}

/* 移除舊的進度條相關樣式 */
.progress-container,
.progress-bar,
.progress-text:not(.progress-panel *) {
  display: none;
}

/* 拖曳時的游標樣式 */
.resizing {
  cursor: row-resize !important;
  user-select: none;
}

/* 防止拖曳時選中文字 */
.file-panel-top *,
.file-panel-bottom * {
  user-select: none;
}

/* 拖曳時的視覺反饋 */
.file-splitter:active,
.file-splitter.dragging {
  background-color: #999;
}

/* 確保內容不會溢出 */
.panel-header {
  overflow: hidden;
  white-space: nowrap;
}

.current-path {
  padding: 5px 10px;
  background-color: #f9f9f9;
  border-bottom: 1px solid #ddd;
  font-size: 0.9em;
  color: #666;
}

/* 登入對話框樣式 */
.login-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.login-content {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    width: 300px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.login-content button {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.login-content button:hover {
    background-color: #45a049;
}

/* 用戶下拉選單樣式 */
.user-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 8px;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    background-color: #2d2d2d;
    min-width: 200px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 9999;
    border-radius: 4px;
    padding: 8px 0;
}

.dropdown-content.show {
    display: block !important;
}

.dropdown-item {
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    color: #ffffff;
    cursor: pointer;
    border: none;
    text-align: left;
    background: none;
    font-size: inherit;
}

.dropdown-item:hover {
    background-color: #3d3d3d;
}

#userDisplayName {
    cursor: default;
    font-weight: bold;
}

#dropdownLogoutBtn {
    display: flex;
    align-items: center;
}

#dropdownLogoutBtn i {
    margin-right: 8px;
}

.dropdown-divider {
    border-top: 1px solid #444;
    margin: 8px 0;
}

.dropdown-select {
    background-color: #3d3d3d;
    color: white;
    border: 1px solid #666;
    border-radius: 4px;
    padding: 4px 24px 4px 8px;
    width: 80px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    position: relative;
}

.dropdown-select option {
    background-color: #2d2d2d;
    color: white;
    padding: 8px;
}

.dropdown-select:hover {
    border-color: #888;
}

.dropdown-select:focus {
    outline: none;
    border-color: #888;
}

.font-size-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    cursor: default;
    position: relative;
}

.font-size-container:hover {
    background-color: transparent;
}

.dropdown-item label {
    color: #fff;
    margin-right: 8px;
    white-space: nowrap;
}

/* 防止點擊 select 時關閉下拉選單 */
.font-size-container, 
.font-size-container * {
    pointer-events: auto;
}

/* 確保下拉選單在面板內 */
.dropdown-content select {
    max-height: 200px;
}

/* 終端機樣式 */
.terminal {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    -webkit-user-modify: read-write-plaintext-only;
    -moz-user-modify: read-write-plaintext-only;
    -ms-user-modify: read-write-plaintext-only;
    user-modify: read-write-plaintext-only;
}

.terminal:focus {
    outline: none;
    caret-color: white;
}
