html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: sans-serif;
}

#blocklyDiv {
  width: 100%;
  height: 100%;
}

/* Make the sidebar wider and improve spacing */
.blocklyToolboxDiv {
  width: 100px !important; /* was 72px */
  background: #f0f4ff !important;
  border-right: 2px solid #b6c6e3;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Each category circle in sidebar */
.blocklyTreeRow {
  width: 80px !important; /* was 56px */
  height: 50px !important;
  margin: 8px 0 !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: background 0.2s, border 0.2s;
  border: 2px solid transparent !important;
  cursor: pointer;
  position: relative;
  padding: 0 4px !important;
}


/* Selected category highlight */
.blocklyTreeRow[aria-selected="true"] {
  border: 2px solid #4f46e5 !important;
  background: #e0e7ff !important;
  box-shadow: 0 2px 6px #a5b4fc55;
}



/* Sidebar category text label */
.blocklyTreeLabel {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  text-transform: capitalize;
  letter-spacing: 0.5px;
  font-size: 0.75rem !important; /* smaller text */
  font-weight: bold !important;
  color: #222 !important;
  text-align: center !important;
  width: 100%;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1.1 !important;
  white-space: normal !important; /* allow multi-line */
  word-break: break-word !important;
  text-shadow: 0 1px 2px #fff8;
}

/* Flyout (area where blocks appear) */
.blocklyFlyout {
  background: #f3f6fd !important;
}

/* Hide scrollbars */
.blocklyScrollbarHorizontal,
.blocklyScrollbarVertical {
  display: none !important;
}

/* ===== Optional: Color tint for each top-level category ===== */

/* Structure */
.blocklyTreeRow[aria-level="1"]:has(.blocklyTreeLabel:contains("Structure")) {
  background-color: #e0f2ff !important;
}

/* Style */
.blocklyTreeRow[aria-level="1"]:has(.blocklyTreeLabel:contains("Style")) {
  background-color: #dcfce7 !important;
}

/* Motion */
.blocklyTreeRow[aria-level="1"]:has(.blocklyTreeLabel:contains("Motion")) {
  background-color: #fef9c3 !important;
}
