body {
  margin: 0;
  padding: 20px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fa;
}

/* 代码高亮样式调整 */
pre code.hljs {
  background: #000 !important;
  color: #fff !important;
  padding-left: 40px !important;
}

.line-numbers .line-numbers-rows {
  right: auto !important;
  left: 0 !important;
  border-right: 5px solid #555 !important;
  padding-right: 20px !important;
}

/* 增强代码高亮颜色鲜艳度 */
.hljs-keyword { color: #ff79c6 !important; }
.hljs-type { color: #8be9fd !important; }
.hljs-built_in { color: #8be9fd !important; }
.hljs-string { color: #f1fa8c !important; }
.hljs-comment { color: #6272a4 !important; }
.hljs-title.function_ { color: #50fa7b !important; }
.hljs-number { color: #bd93f9 !important; }


.container {
  display: flex;
  flex-direction: column;
  height: 90vh;
  gap: 15px;
}

.file-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#upload-btn {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

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

#file-name {
  font-size: 14px;
  color: #666;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.editor-container {
  display: flex;
  flex: 1;
  gap: 20px;
}

.editor, .preview {
  flex: 1;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  background: white;
}

textarea {
  width: 100%;
  height: 100%;
  border: none;
  resize: none;
  font-size: 16px;
  line-height: 1.6;
  outline: none;
  font-family: 'Consolas', monospace;
  margin-top: 10px;
}

#output {
  overflow-y: auto;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .container {
    flex-direction: column;
    height: auto;
  }
  
  .editor-container {
    flex-direction: column;
  }
  
  .editor, .preview {
    min-height: 400px;
  }
}
