#header, #header-border-bottom, #hero, #grid-fadeout,
#code-snippets-header, #code-snippets-container, #footer {
  display: none !important;
}
/* Unified sans-serif font for all SVG diagram text */
#render svg text, #render svg tspan {
  font-family: "Source Sans Pro", -apple-system, BlinkMacSystemFont, sans-serif !important;
}
#container {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
}
#body {
  padding: 0 !important;
  min-height: 100vh;
}
#workstation {
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
}
.workstation-main {
  height: calc(100vh - 44px) !important;
}
#workstation-divider {
  cursor: col-resize;
  width: 6px !important;
  min-width: 6px !important;
  background: #2a2a2a !important;
  transition: background 0.15s;
}
#workstation-divider:hover {
  background: #6366f1 !important;
}

/* Theme toggle FAB */
#theme-fab {
  position: fixed; bottom: 20px; right: 20px; z-index: 900;
  width: 40px; height: 40px; border-radius: 50%;
  background: #2a2a2a; border: 1px solid #3a3a3a; color: #e5e5e5;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform 0.15s, background 0.15s;
}
#theme-fab:hover { transform: scale(1.1); background: #3a3a3a; }

/* AI Edit FAB */
#ai-fab {
  position: fixed; bottom: 20px; left: 20px; z-index: 900;
  padding: 10px 20px; border-radius: 12px;
  background: #6366f1; border: none; color: #fff;
  font-size: 14px; font-weight: 600; font-family: -apple-system, sans-serif;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(99,102,241,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
#ai-fab:hover { transform: scale(1.05); box-shadow: 0 6px 24px rgba(99,102,241,0.6); }

/* AI Overlay */
#ai-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(3px);
  display: flex; align-items: flex-end; justify-content: flex-start;
  padding: 20px;
}
#ai-overlay.ai-hidden { display: none; }

#ai-popup {
  background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 16px;
  width: 520px; max-width: 90vw; padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.ai-header {
  display: flex; justify-content: space-between; align-items: center;
  color: #e5e5e5; font-weight: 600; font-size: 14px;
}
.ai-header-actions {
  display: flex; align-items: center; gap: 8px;
}
.ai-header button {
  background: none; border: none; color: #888; font-size: 20px;
  cursor: pointer; padding: 0 4px;
}
.ai-header button:hover { color: #e5e5e5; }
.ai-undo-btn {
  font-size: 14px !important; padding: 4px 8px !important;
  border-radius: 6px; transition: background 0.15s;
}
.ai-undo-btn:hover { background: #2a2a2a; color: #f59e0b !important; }

#ai-prompt {
  width: 100%; min-height: 120px; resize: vertical;
  background: #0f0f0f; color: #e5e5e5; border: 1px solid #2a2a2a;
  border-radius: 10px; padding: 12px; font-size: 15px; line-height: 1.5;
  font-family: -apple-system, sans-serif; outline: none;
  box-sizing: border-box;
}
#ai-prompt:focus { border-color: #6366f1; }
#ai-prompt::placeholder { color: #555; }
#ai-prompt::-webkit-scrollbar { width: 6px; }
#ai-prompt::-webkit-scrollbar-track { background: transparent; }
#ai-prompt::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
#ai-prompt::-webkit-scrollbar-thumb:hover { background: #555; }

.ai-footer { display: flex; align-items: center; justify-content: space-between; }
.ai-footer-left { display: flex; align-items: center; gap: 10px; }
.ai-toggle-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 8px;
  background: #2a2a2a; border: 1px solid #3a3a3a; color: #888;
  font-size: 12px; font-weight: 500; cursor: pointer;
  font-family: -apple-system, sans-serif;
  transition: all 0.15s;
}
.ai-toggle-btn:hover { border-color: #555; color: #ccc; }
.ai-toggle-btn.ai-toggle-active {
  background: #312e81; border-color: #6366f1; color: #a5b4fc;
}
.ai-btn {
  padding: 8px 20px; border-radius: 10px; border: none;
  background: #6366f1; color: #fff; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: filter 0.15s;
}
.ai-btn:hover { filter: brightness(1.15); }
.ai-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ai-hidden { display: none !important; }

#ai-spinner {
  display: flex; align-items: center; gap: 8px; color: #888; font-size: 13px;
}
.ai-spin {
  width: 16px; height: 16px; border: 2px solid #2a2a2a;
  border-top-color: #6366f1; border-radius: 50%;
  animation: ai-rotate 0.7s linear infinite;
}
@keyframes ai-rotate { to { transform: rotate(360deg); } }
