* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: #1a1a2e;
  border-bottom: 1px solid #333;
  height: 50px;
}

.nav-left, .nav-center, .nav-right {
  display: flex;
  gap: 8px;
  align-items: center;
}

#project-selector {
  padding: 6px 12px;
  border-radius: 4px;
  border: 1px solid #444;
  background: #2a2a3e;
  color: #fff;
  min-width: 200px;
}

.nav-btn {
  padding: 6px 14px;
  border-radius: 4px;
  border: 1px solid #444;
  background: #2a2a3e;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.nav-btn:hover {
  background: #3a3a4e;
}

.nav-btn.primary {
  background: #4a6cf7;
  border-color: #4a6cf7;
}

.nav-btn.primary:hover {
  background: #3a5ce7;
}

.nav-btn.success {
  background: #22c55e;
  border-color: #22c55e;
}

.nav-btn.success:hover {
  background: #16a34a;
}

.nav-btn.deploy {
  background: #f97316;
  border-color: #f97316;
}

.nav-btn.deploy:hover {
  background: #ea580c;
}

.device-btn {
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid #444;
  background: #2a2a3e;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
}

.device-btn:hover {
  background: #3a3a4e;
}

.device-btn.active {
  background: #4a6cf7;
  border-color: #4a6cf7;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.modal-content {
  background: #1a1a2e;
  padding: 24px;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-content h2 {
  margin: 0 0 16px 0;
  color: #fff;
}

.modal-content textarea {
  width: 100%;
  height: 300px;
  padding: 12px;
  border-radius: 4px;
  border: 1px solid #444;
  background: #2a2a3e;
  color: #fff;
  font-family: monospace;
  font-size: 13px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  justify-content: flex-end;
}

#upload-progress {
  padding: 12px;
  background: #2a2a3e;
  border-radius: 4px;
  margin-bottom: 12px;
  color: #fff;
}

#upload-status {
  max-height: 200px;
  overflow-y: auto;
}

.upload-item {
  padding: 6px 12px;
  background: #2a2a3e;
  border-radius: 4px;
  margin-bottom: 4px;
  font-size: 12px;
  color: #aaa;
  word-break: break-all;
}

/* GrapesJS customizations */
.gjs-one-bg {
  background-color: #1a1a2e;
}

.gjs-two-color {
  color: #fff;
}

.gjs-three-bg {
  background-color: #2a2a3e;
}

.gjs-four-color,
.gjs-four-color-h:hover {
  color: #4a6cf7;
}

/* Worker page controls */
.nav-divider {
  display: inline-block;
  width: 1px;
  height: 24px;
  background: rgba(255,255,255,.2);
  margin: 0 6px;
  vertical-align: middle;
}

.nav-select.worker,
.nav-btn.worker {
  border-color: #f5a623;
}

.nav-btn.worker {
  background: #f5a623;
  color: #1a1a2e;
  font-weight: 700;
}

.nav-btn.worker:hover {
  background: #e6951a;
}

.nav-select.worker {
  background: #2a2a3e;
  color: #f5a623;
}
