#open-bot-ui {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  background-color: #4A90D9;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 6px;
  cursor: pointer;
}

#open-bot-ui:hover {
  background-color: #357abd;
}
body { 
    margin: 0; 
    background: #0f1117; 
    font-family: monospace;
    color: #fff;
}
canvas { display: block; }

#login-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    background: #1a1d24;
    padding: 40px;
    border-radius: 8px;
    border: 2px solid #4A90D9;
}

#login-screen h1 {
    margin: 0 0 20px 0;
    color: #4A90D9;
}

#login-screen button {
    background: #4A90D9;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    font-family: monospace;
    margin: 10px;
}

#login-screen button:hover {
    background: #5a9de9;
}

#login-screen input {
    background: #0f1117;
    border: 2px solid #4A90D9;
    color: white;
    padding: 10px;
    font-size: 16px;
    font-family: monospace;
    border-radius: 4px;
    width: 250px;
}

.hidden { display: none; }

#bot-manager {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: #1a1d24;
    border: 2px solid #4A90D9;
    border-radius: 8px;
    padding: 20px;
    max-width: 300px;
    max-height: 80vh;
    overflow-y: auto;
    font-family: monospace;
    color: #fff;
    z-index: 1000;
}

.bot-panel h2 {
    margin: 0 0 15px 0;
    color: #4A90D9;
    font-size: 18px;
}

.bot-panel h3 {
    margin: 15px 0 10px 0;
    color: #4CAF50;
    font-size: 14px;
}

.bot-panel button {
    background: #4A90D9;
    color: white;
    border: none;
    padding: 8px 16px;
    margin: 5px 0;
    cursor: pointer;
    border-radius: 4px;
    font-family: monospace;
    width: 100%;
}

.bot-panel button:hover {
    background: #5a9de9;
}

.bot-item {
    background: #0f1117;
    border: 1px solid #4A90D9;
    border-radius: 4px;
    padding: 10px;
    margin: 8px 0;
    cursor: pointer;
}

.bot-item:hover {
    border-color: #5a9de9;
    background: #1a1d24;
}

.bot-item.selected {
    border-color: #4CAF50;
    background: #1a2e1a;
}

.bot-item .bot-name {
    font-weight: bold;
    color: #4CAF50;
}

.bot-item .bot-hp {
    color: #F5C842;
    font-size: 12px;
}

#script-select {
    width: 100%;
    background: #0f1117;
    border: 2px solid #4A90D9;
    color: white;
    padding: 8px;
    margin: 5px 0;
    border-radius: 4px;
    font-family: monospace;
}

#toggle-bot-ui {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4A90D9;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    font-family: monospace;
    z-index: 999;
}

#toggle-bot-ui:hover {
    background: #5a9de9;
}

#script-editor {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

#script-editor:not(.hidden) {
  display: flex;  /* ← Only show flex when NOT hidden */
}
.editor-panel {
  background: #1a1d24;
  border: 2px solid #4A90D9;
  border-radius: 8px;
  padding: 20px;
  width: 600px;
  max-height: 80vh;
}

#script-code {
  width: 100%;
  height: 400px;
  background: #0f1117;
  border: 2px solid #4A90D9;
  color: #4CAF50;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  padding: 10px;
  resize: vertical;
}

#open-editor-btn {
  position: fixed;
  top: 80px;
  right: 20px;
  background: #4A90D9;
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 4px;
  font-family: monospace;
  z-index: 999;
}