/* Python 面板 Z0 层 - 左上角，与原 .python-panel 一致 */
#main-panel {
  position: fixed;
  left: 20px;
  top: 20px;
  width: min(80vw, 1200px);
  max-width: 1200px;
  z-index: 2;
  background: rgba(20, 20, 40, 0.94);
  border: 2px solid #ffcc33;
  border-radius: 12px;
  color: #fff5cc;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

#panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  height: 40px;
  background: rgba(0,0,0,0.5);
  border-bottom: 1px solid #ffcc33;
  cursor: move;
  user-select: none;
  flex-shrink: 0;
}
#panel-title {
  font-weight: bold;
}
#toggle-panel-btn {
  background: none;
  border: none;
  color: #ffcc33;
  font-size: 18px;
  cursor: pointer;
}

#code-input {
  margin: 10px;
  padding: 10px;
  background: #0a0a1a;
  border: 1px solid #ffcc33;
  color: #9eff9e;
  font-family: 'Fira Code', monospace;
  font-size: 24px;
  min-height: 200px;
  resize: vertical;
  box-sizing: border-box;
}

#button-bar {
  display: flex;
  gap: 12px;
  padding: 0 10px 10px 10px;
}
#button-bar button {
  padding: 8px 20px;
  border: none;
  color: white;
  font-weight: bold;
  cursor: pointer;
  border-radius: 8px;
  font-size: 14px;
}
#exec-btn       { background: #2c8c2c; }
#clear-code-btn { background: #dc2626; }

#log-output {
  margin: 0 10px 10px 10px;
  height: 150px;
  background: #0a0a1a;
  border: 1px solid #ffcc33;
  color: #ffaaaa;
  font-family: monospace;
  font-size: 14px;
  overflow-y: auto;
  padding: 8px;
  white-space: pre-wrap;
}

/* 折叠状态 */
#main-panel.collapsed {
  height: 40px !important;
}
#main-panel.collapsed #code-input,
#main-panel.collapsed #button-bar,
#main-panel.collapsed #log-output {
  display: none !important;
}
