@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fa/webfonts/poppins.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

* {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  font-family: 'Poppins', serif;
  font-weight: 400;
  font-style: normal;
}

/* ============================================ */
/* Base Layout Styles                           */
/* ============================================ */
body {
  width: 100vw;
  height: 100vh;
}

html,
body,
#blocklyDiv {
  border: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  width: 100%;
  background: transparent !important;
}

/* ============================================ */
/* Blockly Text and Workspace                   */
/* ============================================ */
.blocklyTreeLabel,
.blocklyText,
.blocklySvg,
.blocklyWorkspace {
  font-family: 'Poppins', serif;
  font-weight: 400;
  font-style: normal;
}

.blocklyToolboxDiv {
  padding: 0;
  margin: 0;
}

.blocklyToolboxDiv::-webkit-scrollbar-track {
  -webkit-box-shadow: inset 0 0 6px #ddd;
}

.blocklyToolboxDiv::-webkit-scrollbar {
  width: 5px;
}

.blocklyToolboxDiv::-webkit-scrollbar-thumb {
  border-radius: 10px;
  -webkit-box-shadow: inset 0 0 6px #ddd;
  background-color: rgb(121, 121, 121);
}

/* Makes our label white. */
.blocklyTreeLabel {
  color: #fff;
  word-wrap: break-word;
  white-space: normal;
  font-size: small;
  padding-top: 3px;
}

/* Adds padding around the group of categories and separators. */
.blocklyTreeRow {
  text-align: center;
  padding: 0;
  margin: 0;
  padding-bottom: 10px;
  padding-top: 10px;
  height: initial;
}

/* Changes color of the icon to white. */
.customIcon {
  color: #fff;
}

/* Stacks the icon on top of the label. */
.blocklyTreeRowContentContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  word-break: break-word;
  justify-content: center;
  width: 60px;
}

.blocklyDropDownDiv {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  display: none;
  border: 1px solid;
  border-color: #dadce0;
  background-color: #fff;
  border-radius: 2px;
  padding: 4px;
  box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.3);
}

.blocklyWidgetDiv .blocklyMenu {
  margin: 0 !important;
  padding: 0 !important;
  border: 0px !important;
}

.blocklyZoomReset {
  display: none;
}

/* Remove workspace border stroke - All modes */
.blocklyMainBackground {
  stroke: none !important;
  stroke-width: 0 !important;
}

/* ============================================ */
/* Search Button                                */
/* ============================================ */
#searchButton {
  position: absolute;
  bottom: 8px;
  right: 48px;
  z-index: 10000;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(30, 32, 35, 0.9);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

#searchButton:hover {
  background: rgba(40, 42, 45, 0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

#searchButton:active {
  background: rgba(50, 52, 55, 1);
}

#searchButton:focus {
  outline: none;
}

#searchButton i {
  font-size: 14px;
}

/* ============================================ */
/* Backpack Button                              */
/* ============================================ */
#backpackButton {
  position: absolute;
  bottom: 8px;
  right: 88px;
  z-index: 10000;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(30, 32, 35, 0.9);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

#backpackButton:hover {
  background: rgba(40, 42, 45, 0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

#backpackButton:active {
  background: rgba(50, 52, 55, 1);
}

#backpackButton:focus {
  outline: none;
}

#backpackButton i {
  font-size: 14px;
}

/* ============================================ */
/* Minimap Button                               */
/* ============================================ */
#minimapButton {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 10000;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(30, 32, 35, 0.9);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

#minimapButton:hover {
  background: rgba(40, 42, 45, 0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

#minimapButton:active {
  background: rgba(50, 52, 55, 1);
}

#minimapButton:focus {
  outline: none;
}

#minimapButton i {
  font-size: 14px;
}

/* Hide default Blockly backpack icon and minimap toggle */
.blocklyBackpack {
  display: none !important;
}

.blocklyMinimap__toggle {
  display: none !important;
}

/* ============================================ */
/* Search Popup                                 */
/* ============================================ */
#searchPopup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 1000;
  width: 90%;
  max-width: 95vw;
  min-width: 200px;
  max-height: 95vh;
  min-height: 200px;
  overflow: hidden;
  resize: both;
  backdrop-filter: blur(10px);
  flex-direction: column;
  container-type: inline-size;
}

#searchPopup.show {
  display: flex;
  flex-direction: column;
}

#searchOverlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

#searchOverlay.show {
  display: block;
}

.search-header {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.9),
    rgba(255, 255, 255, 0.6)
  );
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  user-select: none;
  border-radius: 12px 12px 0 0;
  flex-shrink: 0;
}

.search-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: -0.3px;
}

.close-popup {
  background: rgba(0, 0, 0, 0.05);
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 32px;
  height: 32px;
  line-height: 1;
  border-radius: 8px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.close-popup:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  transform: scale(1.05);
}

.close-popup:active {
  transform: scale(0.95);
}

.close-popup:focus {
  outline: none;
}

.search-content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.search-section {
  margin-bottom: 25px;
}

.search-section h4 {
  margin: 0 0 12px 0;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.search-input-container {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  width: 100%;
}

#searchInput {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
  background: white;
}

#searchInput:focus {
  outline: none;
  border-color: #4caf50;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

#searchInput:hover {
  border-color: #d1d5db;
}

.search-btn {
  flex-shrink: 0;
  padding: 12px 20px;
  background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  white-space: nowrap;
}

.search-btn:hover {
  background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4);
  transform: translateY(-1px);
}

.search-btn:active {
  transform: translateY(0);
}

.search-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.search-btn:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
  box-shadow: none;
}

.search-nav-buttons {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.search-nav-buttons button {
  flex: 1;
  padding: 10px 16px;
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(33, 150, 243, 0.3);
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.search-nav-buttons button:hover {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
  box-shadow: 0 4px 10px rgba(33, 150, 243, 0.4);
  transform: translateY(-1px);
}

.search-nav-buttons button:active {
  transform: translateY(0);
}

.search-nav-buttons button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

.search-nav-buttons button:disabled {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.search-results-info {
  margin-top: 5px;
  font-size: 12px;
  color: #666;
}

/* ============================================ */
/* List Container                               */
/* ============================================ */
.list-container {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  max-height: 100px;
  overflow-y: auto;
  background: white;
}

.list-container::-webkit-scrollbar {
  width: 8px;
}

.list-container::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.list-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.list-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.list-item {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.list-item:last-child {
  border-bottom: none;
}

.list-item:hover {
  background: linear-gradient(90deg, #f0fdf4 0%, #f9fafb 100%);
  transform: translateX(4px);
}

.list-item-name {
  font-weight: 500;
  color: #1f2937;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.list-item-count {
  font-size: 11px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 8px;
  border-radius: 12px;
  flex-shrink: 0;
  white-space: nowrap;
}

.count-text {
  margin-left: 2px;
}

.empty-list {
  padding: 20px;
  text-align: center;
  color: #999;
  font-size: 14px;
}

/* ============================================ */
/* Resize Handle                                */
/* ============================================ */
.resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 20px;
  height: 20px;
  cursor: se-resize;
  background: linear-gradient(
    135deg,
    transparent 0%,
    transparent 50%,
    #ccc 50%,
    #ccc 55%,
    transparent 55%,
    transparent 60%,
    #ccc 60%,
    #ccc 65%,
    transparent 65%
  );
  opacity: 0.5;
  transition: opacity 0.2s;
}

.resize-handle:hover {
  opacity: 1;
}

/* Override workspace search to make current focused block black */
path.blocklyPath.blockly-ws-search-current {
  fill: #000 !important;
}

/* ============================================ */
/* Mobile Responsive Adjustments                */
/* ============================================ */
@media screen and (max-width: 768px) {
  #searchPopup {
    width: 95%;
    max-height: 85vh;
    border-radius: 12px;
    resize: none !important;
  }

  .search-header {
    padding: 12px 15px !important;
    cursor: default;
  }

  .search-header h3 {
    font-size: 16px !important;
  }

  .search-content {
    padding: 15px !important;
  }

  .search-section {
    margin-bottom: 20px !important;
  }

  #searchInput {
    font-size: 16px !important;
    padding: 12px !important;
  }

  .search-btn {
    padding: 12px 16px !important;
    font-size: 14px !important;
  }

  .search-nav-buttons button {
    padding: 10px !important;
    font-size: 14px !important;
  }

  .list-container {
    max-height: 180px !important;
  }

  .list-item {
    padding: 12px !important;
  }

  .list-item-name {
    font-size: 14px !important;
  }

  .list-item-count {
    font-size: 11px !important;
  }

  .resize-handle {
    display: block;
    opacity: 0.8;
    width: 30px;
    height: 30px;
    background: linear-gradient(
      135deg,
      transparent 0%,
      transparent 45%,
      #4caf50 45%,
      #4caf50 50%,
      transparent 50%,
      transparent 55%,
      #4caf50 55%,
      #4caf50 60%,
      transparent 60%
    );
  }
}

@media screen and (max-width: 480px) {
  #searchPopup {
    width: 98%;
    max-height: 90vh;
    top: 5%;
    transform: translate(-50%, 0);
  }

  .search-input-container {
    flex-direction: column !important;
  }

  .search-btn {
    width: 100%;
  }

  .list-container {
    max-height: 150px !important;
  }
}

/* Stack button below input when popup is small */
@container (max-width: 300px) {
  .search-input-container {
    flex-direction: column !important;
  }

  .search-btn {
    width: 100% !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
  }

  .search-nav-buttons {
    flex-direction: column !important;
    gap: 6px !important;
  }

  .search-nav-buttons button {
    width: 100% !important;
    padding: 8px 12px !important;
    font-size: 12px !important;
  }

  .search-section h4 {
    font-size: 10px !important;
  }

  .search-results-info {
    font-size: 11px !important;
  }

  .count-text {
    display: none !important;
  }

  .search-header {
    padding: 10px 12px !important;
  }

  .search-header h3 {
    font-size: 12px !important;
  }

  #searchInput {
    font-size: 12px !important;
    padding: 10px 12px !important;
  }

  .list-item-name {
    font-size: 13px !important;
  }

  .list-item-count {
    font-size: 10px !important;
    padding: 2px 6px !important;
  }
}

/* ============================================ */
/* Dark Mode Styles - Auto-detect system theme */
/* ============================================ */
@media (prefers-color-scheme: dark) {
  html,
  body {
    background-color: #1e1e1e !important;
  }

  #blocklyDiv {
    background: #1e1e1e !important;
  }

  /* Search Button - Dark Mode */
  #searchButton {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(60, 63, 68, 0.95);
    color: #e8e8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  }

  #searchButton:hover {
    background: rgba(75, 78, 83, 0.98);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  }

  #searchButton:active {
    background: rgba(85, 88, 93, 1);
  }

  /* Backpack Button - Dark Mode */
  #backpackButton {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(60, 63, 68, 0.95);
    color: #e8e8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  }

  #backpackButton:hover {
    background: rgba(75, 78, 83, 0.98);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  }

  #backpackButton:active {
    background: rgba(85, 88, 93, 1);
  }

  /* Minimap Button - Dark Mode */
  #minimapButton {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(60, 63, 68, 0.95);
    color: #e8e8e8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  }

  #minimapButton:hover {
    background: rgba(75, 78, 83, 0.98);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  }

  #minimapButton:active {
    background: rgba(85, 88, 93, 1);
  }

  /* Search Popup - Dark Mode */
  #searchPopup {
    background: linear-gradient(135deg, #2d2d2d 0%, #252526 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
  }

  .search-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(
      to bottom,
      rgba(50, 50, 52, 0.9),
      rgba(45, 45, 47, 0.6)
    );
  }

  .search-header h3 {
    color: #e8e8e8;
  }

  .close-popup {
    background: rgba(255, 255, 255, 0.08);
    color: #b0b0b0;
  }

  .close-popup:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ff6b6b;
  }

  .search-section h4 {
    color: #9ca3af;
  }

  #searchInput {
    border: 2px solid #404040;
    background: #2a2a2a;
    color: #e8e8e8;
  }

  #searchInput:focus {
    border-color: #5cb85c;
    box-shadow: 0 0 0 3px rgba(92, 184, 92, 0.2);
  }

  #searchInput:hover {
    border-color: #505050;
  }

  #searchInput::placeholder {
    color: #888;
  }

  /* List containers - Dark Mode */
  .list-container {
    border: 2px solid #404040;
    background: #2a2a2a;
  }

  .list-container::-webkit-scrollbar-track {
    background: #2a2a2a;
  }

  .list-container::-webkit-scrollbar-thumb {
    background: #555;
  }

  .list-container::-webkit-scrollbar-thumb:hover {
    background: #666;
  }

  .list-item {
    border-bottom: 1px solid #3a3a3a;
  }

  .list-item:hover {
    background: linear-gradient(90deg, #2f4f2f 0%, #2d2d2d 100%);
  }

  .list-item-name {
    color: #e8e8e8;
  }

  .list-item-count {
    color: #9ca3af;
    background: #3a3a3a;
  }

  .empty-list {
    color: #666;
  }

  .search-results-info {
    color: #888;
  }

  /* Resize handle - Dark Mode */
  .resize-handle {
    background: linear-gradient(
      135deg,
      transparent 0%,
      transparent 50%,
      #555 50%,
      #555 55%,
      transparent 55%,
      transparent 60%,
      #555 60%,
      #555 65%,
      transparent 65%
    );
  }

  /* Mobile resize handle - Dark Mode */
  @media screen and (max-width: 768px) {
    .resize-handle {
      background: linear-gradient(
        135deg,
        transparent 0%,
        transparent 45%,
        #5cb85c 45%,
        #5cb85c 50%,
        transparent 50%,
        transparent 55%,
        #5cb85c 55%,
        #5cb85c 60%,
        transparent 60%
      );
    }
  }

  /* Override workspace search focused block - Dark Mode */
  path.blocklyPath.blockly-ws-search-current {
    fill: #ffdd57 !important;
  }

  /* Blockly scrollbar - Dark Mode */
  .blocklyScrollbarBackground {
    fill: #2d2d2d !important;
  }

  .blocklyScrollbarHandle {
    fill: #555 !important;
  }

  /* Blockly toolbox - Dark Mode */
  .blocklyToolboxDiv {
    background-color: #252526 !important;
  }

  .blocklyTreeRow {
    color: #ffffff !important;
  }

  .blocklyTreeRow:hover {
    background-color: #37373d !important;
  }

  .blocklyTreeSelected {
    background-color: #094771 !important;
  }

  /* Toolbox labels - Dark Mode - ensure white text */
  .blocklyTreeLabel {
    color: #ffffff !important;
  }

  .blocklyTreeRow:hover .blocklyTreeLabel {
    color: #ffffff !important;
  }

  .blocklyTreeSelected .blocklyTreeLabel {
    color: #ffffff !important;
  }

  /* Toolbox icons - Dark Mode */
  .customIcon {
    color: #ffffff !important;
  }

  .blocklyTreeRow:hover .customIcon {
    color: #ffffff !important;
  }

  .blocklyTreeSelected .customIcon {
    color: #ffffff !important;
  }

  /* Toolbox scrollbar - Dark Mode */
  .blocklyToolboxDiv::-webkit-scrollbar-track {
    -webkit-box-shadow: inset 0 0 6px #333 !important;
  }

  .blocklyToolboxDiv::-webkit-scrollbar-thumb {
    background-color: #555 !important;
  }

  /* New Blockly Toolbox Category styles - Dark Mode */
  .blocklyToolboxCategory {
    background-color: transparent !important;
    color: #ffffff !important;
  }

  .blocklyToolboxCategory:hover {
    background-color: #37373d !important;
  }

  .blocklyToolboxCategory[aria-selected='true'],
  .blocklyToolboxCategory.blocklyToolboxSelected {
    background-color: #094771 !important;
  }

  .blocklyToolboxCategory .blocklyTreeLabel {
    color: #ffffff !important;
  }

  .blocklyToolboxCategory:hover .blocklyTreeLabel {
    color: #ffffff !important;
  }

  .blocklyToolboxCategory[aria-selected='true'] .blocklyTreeLabel,
  .blocklyToolboxCategory.blocklyToolboxSelected .blocklyTreeLabel {
    color: #ffffff !important;
  }

  /* Toolbox category icons */
  .blocklyToolboxCategory .customIcon {
    color: #ffffff !important;
  }

  /* Toolbox contents container */
  .blocklyToolboxContents {
    background-color: #252526 !important;
  }

  /* Blockly flyout - Dark Mode */
  .blocklyFlyout {
    background-color: #2d2d2d !important;
  }

  .blocklyFlyoutBackground {
    fill: #2d2d2d !important;
  }

  /* Flyout scrollbar */
  .blocklyFlyoutScrollbar .blocklyScrollbarHandle {
    fill: #555 !important;
  }

  /* Blockly trashcan - Dark Mode */
  .blocklyTrash {
    filter: brightness(0.8);
  }

  /* Blockly zoom controls - Dark Mode */
  .blocklyZoom > image {
    filter: invert(0.85);
  }
}

/* Dark mode class for JavaScript toggle support */
body.dark-mode {
  background-color: #1e1e1e !important;
}

body.dark-mode #blocklyDiv {
  background: #1e1e1e !important;
}
