@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;600&display=swap');@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;600&display=swap');@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;600&display=swap');@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;600&display=swap');@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;600&display=swap');@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;600&display=swap');@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;600&display=swap');@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;600&display=swap');@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;600&display=swap');@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;600&display=swap');@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;600&display=swap');@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;600&display=swap');@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;600&display=swap');:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: light dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #242424;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover {
  color: #535bf2;
}

body {
  margin: 0;
  display: flex;
  place-items: center;
  min-width: 320px;
  min-height: 100vh;
}

h1 {
  font-size: 3.2em;
  line-height: 1.1;
}

button {
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0.6em 1.2em;
  font-size: 1em;
  font-weight: 500;
  font-family: inherit;
  background-color: #1a1a1a;
  cursor: pointer;
  transition: border-color 0.25s;
}
button:hover {
  border-color: #646cff;
}
button:focus,
button:focus-visible {
  outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
  :root {
    color: #213547;
    background-color: #ffffff;
  }
  a:hover {
    color: #747bff;
  }
  button {
    background-color: #f9f9f9;
  }
}


:root {
  height: 100%;
  width: 100%;
  
  /* Dark theme is now DEFAULT */
  /* Base colors - Subtle dark gray palette */
  --bg: #2b2b2b;                    
  --logo-image: url("/logo-dark.png");
  --text: #b8b8b8;                  
  --text-muted: #808080;            
  --panel: #323232;                 
  --panel-darker: #252525;          
  --border: #4a4a4a;                
  --border-light: #555555;          
  
  --accent: #5f87af;                
  --accent-bright: #7ba3cc;         
  --accent-contrast: #ffffff;       
  
  --font-ui: "Roboto Mono", "SF Mono", "Consolas", "Monaco", "Courier New", monospace;
  --font-ui-normal: var(--font-ui);
  
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #323232;             
  --window-border-top: 1px solid #4a4a4a;     
  --window-border-left: 1px solid #4a4a4a;
  --window-border-right: 1px solid #4a4a4a;
  --window-border-bottom: 1px solid #4a4a4a;
  --window-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --window-radius: 0px;             
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  --title-bar-display: flex;
  --title-bar-bg: #2b2b2b;          
  --title-bar-color: #b8b8b8;       
  --title-bar-padding: 6px 10px;    
  --title-bar-font-weight: 400;     
  --title-bar-font-size: 11px;      
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: antialiased;
  --title-bar-font-smooth: auto;
  --title-bar-border-bottom: 1px solid #4a4a4a;  
  
  --close-btn-bg: transparent;
  --close-btn-color: #808080;       
  --close-btn-font-size: 12px;
  --close-btn-hover-bg: rgba(255, 255, 255, 0.08);
  --close-btn-hover-color: #b8b8b8;
  
  --window-body-padding: 12px;
  --window-body-font-size: 12px;
  --window-body-padding-right: 12px;
  
  --radius: 0px;                    
  --filter-blur: none;
  
  --selection-bg: #5f87af;          
  --selection-text: #ffffff;
  --hover-bg: rgba(95, 135, 175, 0.15);  
  --active-bg: rgba(95, 135, 175, 0.25);
  --separator: #4a4a4a;             
  
  --tab-bg: #2b2b2b;
  --tab-bg-active: #323232;
  --tab-border-top: 1px solid #4a4a4a;
  --tab-border-left: 1px solid #4a4a4a;
  --tab-border-right: 1px solid #4a4a4a;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #b8b8b8;
  --tab-font: "Roboto Mono";
  --tab-font-size: 12px;
  --tab-padding: 6px 14px;
  
  --panel-bg: #323232;
  --panel-border: 1px solid #4a4a4a;
  --panel-border-top: 1px solid #4a4a4a;
  --panel-border-left: 1px solid #4a4a4a;
  --panel-border-right: 1px solid #4a4a4a;
  --panel-border-bottom: 1px solid #4a4a4a;
  
  --button-bg: #3a3a3a;
  --button-text: #b8b8b8;
  --button-border-top: 1px solid #4a4a4a;
  --button-border-left: 1px solid #4a4a4a;
  --button-border-bottom: 1px solid #4a4a4a;
  --button-border-right: 1px solid #4a4a4a;
  --button-shadow: none;
  --button-radius: 0px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #4a4a4a;
  --scrollbar-track: #2b2b2b;

  --tree-font: var(--font-ui);       
  --tree-font-size: 12px;
  --tree-text: #b8b8b8;
  --tree-line-color: #4a4a4a;        
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: transparent;
  --tree-expand-border: 1px solid #4a4a4a;
  --tree-expand-size: 11px;
  --tree-expand-icon-size: 11px;
  
  --tree-selection-bg: #5f87af;      
  --tree-selection-text: #ffffff;
  
  --tree-icon-size: 14px;
  --tree-padding-left: 16px;
  --tree-branch-offset: 10px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 1px solid #4a4a4a;
  --node-bg: rgba(35, 35, 35, 0.6);
  --node-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --node-corner-lines: block;      
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  --edge-stroke: #4a4a4a;          
  --edge-width: 1.5;
  --edge-filter: none;
  --edge-hover-stroke: #00ff88;    
  --edge-dash: 5,5;
  --edge-marker: url(#arrowhead-dark);
  --edge-opacity: 0.8;
  
  --hover-overlay-bg: rgba(95, 135, 175, 0.25);
  --hover-overlay-color: #ffffff;
  --hover-text-blur: none;

  --model-width: 30vh;
  
  --slider-track-height: 2px;
  --slider-track-border: none;
  --slider-track-bg: #4a4a4a;
  
  --slider-thumb-size: 12px;
  --slider-thumb-bg: #5f87af;
  --slider-thumb-border: 1px solid #4a4a4a;
  --slider-thumb-radius: 2px;
  --slider-thumb-margin: -6px;

  --mode-bg: rgba(42, 42, 42, 0.8);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 80px;
  --mode-height: 36px;
  --mode-width-disabled: 80px;
  --mode-height-disabled: 36px;
  --mode-padding: 8px 12px;
  --mode-border: 1px solid #4a4a4a;
  --mode-radius: 0px;
  --mode-font: var(--font-ui);
  --mode-font-size: 11px;
  --mode-font-size-disabled: 11px;
  --mode-color: #b8b8b8;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.4);
  --mode-box-shadow: none;

  --toggle-width: 80px;
  --toggle-height: 40px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #5f87af;        
  --toggle-off-bg: #2a2a2a;       
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 1px solid #4a4a4a;
  --toggle-radius: 4px;
  --toggle-text-display: flex;     
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 500;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #808080;

  
}

/* Neon theme (moved from default) */

html[data-theme="neon"] {
  --bg: #39FF14;
  --text: #0b0c0f;
  --panel: #ffffff;
  --border: #000000;
  --accent: #39FF14;
  --logo-image: url("/logo2.png");

  --font-ui: "MS Sans Serif", system-ui, sans-serif;

  --window-width: 310px;
  --window-height: 700px;
  --window-bg: white;
  --window-border-top: 2px solid #fff;
  --window-border-left: 2px solid #fff;
  --window-border-right: 2px solid #666;
  --window-border-bottom: 2px solid #666;
  --window-box-shadow: inset -1px -1px 0 #999, inset 1px 1px 0 #ccc;
  --window-radius: 0px;
  --window-margin: 20px;
  --window-margin-right: 100px;
  
  --title-bar-display: flex;
  --title-bar-bg: #000082;
  --title-bar-color: white;
  --title-bar-padding: 4px 8px;
  --title-bar-font-weight: bold;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: pixelated;
  --title-bar-font-smoothing: none;
  --title-bar-font-smooth: never;
  
  --close-btn-bg: transparent;
  --close-btn-color: white;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(255,255,255,0.2);
  
  --window-body-padding: 10px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 17px;
  
  --radius: 0px;
  --filter-blur: blur(4px);

  --tab-bg: #c0c0c0;
  --tab-bg-active: #c0c0c0;
  --tab-border-top: 2px solid #fff;
  --tab-border-left: 2px solid #fff;
  --tab-border-right: 2px solid #808080;
  --tab-border-bottom: 1px solid #fff;
  --tab-text: black;
  --tab-font: var(--font-ui-normal);
  --tab-font-size: 12px;
  --tab-padding: 4px 8px;
  
  --panel-bg: #fff;
  --panel-border: 2px solid #808080;
  --panel-border-top: 2px solid #808080;
  --panel-border-left: 2px solid #808080;
  --panel-border-right: 2px solid #808080;
  --panel-border-bottom: 2px solid #808080;
  
  --button-bg: linear-gradient(#dcdcdc, #c0c0c0);
  --button-text: #000000;
  --button-border-top: 2px solid #ffffff;
  --button-border-left: 2px solid #ffffff;
  --button-border-bottom: 2px solid #808080;
  --button-border-right: 2px solid #808080;
  --button-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  --button-radius: 2px;
  
  --scrollbar-width: 12px;
  --scrollbar-thumb: #bfbfbf;
  --scrollbar-track: #f1f1f1;

  --tree-font: "Courier New", monospace;
  --tree-font-size: 14px;
  --tree-text: black;
  --tree-line-color: #999;
  --tree-line-style: dashed;
  --tree-line-width: 1px;
  
  --tree-expand-bg: white;
  --tree-expand-border: 1px solid black;
  --tree-expand-size: 13px;
  --tree-expand-icon-size: 14px;
  
  --tree-selection-bg: #0060df;      
  --tree-selection-text: white;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 20px;
  --tree-branch-offset: 12px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: url("/static.png");
  --node-frame-overlay: url("/monitor.png");
  --node-frame-display: block;
  --node-border: none;
  --node-bg: transparent;
  --node-box-shadow: none;
  --node-corner-lines: none;
  
  --image-width: 225px;
  --image-height: 225px;
  --image-fit: fill;
  
  --edge-stroke: black;
  --edge-width: 4;
  --edge-filter: url(#blurFilter);
  --edge-hover-stroke: red;
  --edge-dash: none;
  --edge-marker: none;
  --edge-opacity: 1;
  
  --hover-overlay-bg: rgba(0, 0, 0, 0.6);
  --hover-overlay-color: white;
  --hover-text-blur: url(#text-blur);

  --model-width: 30vh;
  
  --slider-track-height: 4px;
  --slider-track-border: 2px dashed #333;
  --slider-track-bg: transparent;
  
  --slider-thumb-size: 16px;
  --slider-thumb-bg: #000000;
  --slider-thumb-border: none;
  --slider-thumb-radius: 0px;
  --slider-thumb-margin: -9px;

  --mode-bg: url("/key.png");
  --mode-bg-size: cover;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 85px;
  --mode-height: 85px;
  --mode-width-disabled: 90px;
  --mode-height-disabled: 90px;
  --mode-padding: 10px;
  --mode-border: none;
  --mode-radius: 15px;
  --mode-font: "Arial Narrow", Arial, sans-serif;
  --mode-font-size: 24px;
  --mode-font-size-disabled: 28px;
  --mode-color: #111;
  --mode-text-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
  --mode-filter: brightness(95%);
  --mode-filter-disabled: blur(1px);
  --mode-box-shadow: none;

  --toggle-width: 121px;
  --toggle-height: 160px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: url("/toggle-on.png");
  --toggle-off-bg: url("/toggle-off.png");
  --toggle-bg-size: cover;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: none;
  --toggle-radius: 0px;
  --toggle-text-display: none;
  --toggle-padding: 0;
}

html[data-theme="light"] {
  --bg: #fcfefc;
  --logo-image: url("/logo2.png");
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #ffffff;
  --window-border-top: 1px solid #e3e3e7;
  --window-border-left: 1px solid #e3e3e7;
  --window-border-right: 1px solid #e3e3e7;
  --window-border-bottom: 1px solid #e3e3e7;
  --window-box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  --window-radius: 12px;
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  /* Title bar tokens - Light has clean title bar */
  --title-bar-display: flex;
  --title-bar-bg: #f8f9fa;
  --title-bar-color: #0b0c0f;
  --title-bar-padding: 12px 16px;
  --title-bar-font-weight: 600;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: auto;
  --title-bar-font-smooth: auto;
  
  /* Close button tokens */
  --close-btn-bg: transparent;
  --close-btn-color: #5f6368;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(0,0,0,0.05);
  
  /* Window body tokens */
  --window-body-padding: 20px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 20px;
  
  /* General effects */
  --radius: 12px;
  --filter-blur: none;


  --tab-bg: #f0f0f0;
  --tab-bg-active: #ffffff;
  --tab-border-top: 1px solid #e0e0e0;
  --tab-border-left: 1px solid #e0e0e0;
  --tab-border-right: 1px solid #e0e0e0;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #333333;
  --tab-font: "Roboto Mono";
  --tab-font-size: 13px;
  --tab-padding: 4px;
  
  /* Panel/Button tokens - Light */
  --panel-bg: #ffffff;
  --panel-border: 1px solid #e0e0e0;
  --panel-border-top: 1px solid #e0e0e0;
  --panel-border-left: 1px solid #e0e0e0;
  --panel-border-right: 1px solid #e0e0e0;
  --panel-border-bottom: 1px solid #e0e0e0;
  
  --button-bg: #f5f5f5;
  --button-text: #333333;
  --button-border-top: 1px solid #d0d0d0;
  --button-border-left: 1px solid #d0d0d0;
  --button-border-bottom: 1px solid #d0d0d0;
  --button-border-right: 1px solid #d0d0d0;
  --button-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --button-radius: 4px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #c0c0c0;
  --scrollbar-track: #f5f5f5;
  /*Ascii*/
  --tree-font: "Roboto Mono";
  --tree-font-size: 13px;
  --tree-text: #333333;
  --tree-line-color: #d0d0d0;
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: #f5f5f5;
  --tree-expand-border: 1px solid #d0d0d0;
  --tree-expand-size: 12px;
  --tree-expand-icon-size: 12px;
  
  --tree-selection-bg: #e3f2fd;     /* Light blue */
  --tree-selection-text: #1976d2;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 18px;
  --tree-branch-offset: 10px;


    /* Node Editor tokens - Light (AI detection boxes with neon colors) */
  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 3px solid;
  --node-bg: transparent;
  --node-box-shadow: 0 0 15px currentColor, inset 0 0 10px rgba(255,255,255,0.1);
  --node-corner-lines: block;      /* Show corner brackets */
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  /* Edge tokens - Light (thin neon pink/green) */
  --edge-stroke: #00ff88;          /* Neon green default */
  --edge-width: 2;
  --edge-filter: drop-shadow(0 0 4px currentColor);
  --edge-hover-stroke: #ff0080;    /* Hot pink on hover */
  --edge-dash: none;
  --edge-marker: url(#arrowhead);
  --edge-opacity: 0.9;
  
  /* Hover overlay - Light */
  --hover-overlay-bg: rgba(255, 255, 255, 0.85);
  --hover-overlay-color: #1976d2;
  --hover-text-blur: none;


    /* 3D Model / Slider tokens - Light (clean modern) */
  --model-width: 30vh;
  
  --slider-track-height: 6px;
  --slider-track-border: none;
  --slider-track-bg: #e0e0e0;
  
  --slider-thumb-size: 18px;
  --slider-thumb-bg: #1976d2;
  --slider-thumb-border: 2px solid #ffffff;
  --slider-thumb-radius: 50%;
  --slider-thumb-margin: -8px;


    /* Mode button tokens - Light (clean pill buttons with gradients) */
  --mode-bg: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 100px;
  --mode-height: 46px;
  --mode-width-disabled: 100px;
  --mode-height-disabled: 46px;
  --mode-padding: 12px 20px;
  --mode-border: 2px solid #e0e0e0;
  --mode-radius: 24px;
  --mode-font: "Roboto Mono";
  --mode-font-size: 14px;
  --mode-font-size-disabled: 14px;
  --mode-color: #333333;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.5);
  --mode-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);


    /* Toggle tokens - Light (minimalist switch) */
  --toggle-width: 80px;
  --toggle-height: 42px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #4caf50;        /* Green when ON */
  --toggle-off-bg: #e0e0e0;       /* Gray when OFF */
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 2px solid #d0d0d0;
  --toggle-radius: 24px;
  --toggle-text-display: flex;     /* Show GPU ON/OFF text */
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 600;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #999999;
}

/* Fonts */

@font-face {
font-family: "MS Sans Serif";
src: url("/pixel-sans-serif.woff") format("woff");
}

@font-face {
font-family: "MS Sans Serif-normal";
src: url("/ms-sans-serif-2.otf.woff2") format("woff");
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  margin: 0;
  align-items: stretch;
  justify-content: flex-start;
  background-color: var(--bg);
}

.main {
  display: flex;
  width: 100%;
  flex: 1;
  flex-direction: row;
  margin-top: 50px;
  gap: 16px;
}

.sub-main {
  position: relative;
  height: 85vh;
  width: 90vw;
  margin: 16px auto; 
  display: flex;
  justify-content: center; 
  
}

.right-panel {
  display: flex;
  flex-direction: column;
  width: 350px;
  height: 85vh;
  margin: 16px;
  gap: 60px;
  overflow-y: auto;
  flex-shrink: 0;
}

.edit-mode-holder {
  position: relative;
  top: 0;        /* CHANGED: Remove offset */
  left: 0;       /* CHANGED: Remove offset */
  z-index: 10000;
  flex-shrink: 0;
  padding: 16px;
  background-color: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  justify-content: center;
  
}



:root {
  height: 100%;
  width: 100%;
  
  /* Dark theme is now DEFAULT */
  /* Base colors - Subtle dark gray palette */
  --bg: #2b2b2b;                    
  --logo-image: url("/logo-dark.png");
  --text: #b8b8b8;                  
  --text-muted: #808080;            
  --panel: #323232;                 
  --panel-darker: #252525;          
  --border: #4a4a4a;                
  --border-light: #555555;          
  
  --accent: #5f87af;                
  --accent-bright: #7ba3cc;         
  --accent-contrast: #ffffff;       
  
  --font-ui: "Roboto Mono", "SF Mono", "Consolas", "Monaco", "Courier New", monospace;
  --font-ui-normal: var(--font-ui);
  
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #323232;             
  --window-border-top: 1px solid #4a4a4a;     
  --window-border-left: 1px solid #4a4a4a;
  --window-border-right: 1px solid #4a4a4a;
  --window-border-bottom: 1px solid #4a4a4a;
  --window-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --window-radius: 0px;             
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  --title-bar-display: flex;
  --title-bar-bg: #2b2b2b;          
  --title-bar-color: #b8b8b8;       
  --title-bar-padding: 6px 10px;    
  --title-bar-font-weight: 400;     
  --title-bar-font-size: 11px;      
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: antialiased;
  --title-bar-font-smooth: auto;
  --title-bar-border-bottom: 1px solid #4a4a4a;  
  
  --close-btn-bg: transparent;
  --close-btn-color: #808080;       
  --close-btn-font-size: 12px;
  --close-btn-hover-bg: rgba(255, 255, 255, 0.08);
  --close-btn-hover-color: #b8b8b8;
  
  --window-body-padding: 12px;
  --window-body-font-size: 12px;
  --window-body-padding-right: 12px;
  
  --radius: 0px;                    
  --filter-blur: none;
  
  --selection-bg: #5f87af;          
  --selection-text: #ffffff;
  --hover-bg: rgba(95, 135, 175, 0.15);  
  --active-bg: rgba(95, 135, 175, 0.25);
  --separator: #4a4a4a;             
  
  --tab-bg: #2b2b2b;
  --tab-bg-active: #323232;
  --tab-border-top: 1px solid #4a4a4a;
  --tab-border-left: 1px solid #4a4a4a;
  --tab-border-right: 1px solid #4a4a4a;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #b8b8b8;
  --tab-font: "Roboto Mono";
  --tab-font-size: 12px;
  --tab-padding: 6px 14px;
  
  --panel-bg: #323232;
  --panel-border: 1px solid #4a4a4a;
  --panel-border-top: 1px solid #4a4a4a;
  --panel-border-left: 1px solid #4a4a4a;
  --panel-border-right: 1px solid #4a4a4a;
  --panel-border-bottom: 1px solid #4a4a4a;
  
  --button-bg: #3a3a3a;
  --button-text: #b8b8b8;
  --button-border-top: 1px solid #4a4a4a;
  --button-border-left: 1px solid #4a4a4a;
  --button-border-bottom: 1px solid #4a4a4a;
  --button-border-right: 1px solid #4a4a4a;
  --button-shadow: none;
  --button-radius: 0px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #4a4a4a;
  --scrollbar-track: #2b2b2b;

  --tree-font: var(--font-ui);       
  --tree-font-size: 12px;
  --tree-text: #b8b8b8;
  --tree-line-color: #4a4a4a;        
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: transparent;
  --tree-expand-border: 1px solid #4a4a4a;
  --tree-expand-size: 11px;
  --tree-expand-icon-size: 11px;
  
  --tree-selection-bg: #5f87af;      
  --tree-selection-text: #ffffff;
  
  --tree-icon-size: 14px;
  --tree-padding-left: 16px;
  --tree-branch-offset: 10px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 1px solid #4a4a4a;
  --node-bg: rgba(35, 35, 35, 0.6);
  --node-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --node-corner-lines: block;      
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  --edge-stroke: #4a4a4a;          
  --edge-width: 1.5;
  --edge-filter: none;
  --edge-hover-stroke: #00ff88;    
  --edge-dash: 5,5;
  --edge-marker: url(#arrowhead-dark);
  --edge-opacity: 0.8;
  
  --hover-overlay-bg: rgba(95, 135, 175, 0.25);
  --hover-overlay-color: #ffffff;
  --hover-text-blur: none;

  --model-width: 30vh;
  
  --slider-track-height: 2px;
  --slider-track-border: none;
  --slider-track-bg: #4a4a4a;
  
  --slider-thumb-size: 12px;
  --slider-thumb-bg: #5f87af;
  --slider-thumb-border: 1px solid #4a4a4a;
  --slider-thumb-radius: 2px;
  --slider-thumb-margin: -6px;

  --mode-bg: rgba(42, 42, 42, 0.8);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 80px;
  --mode-height: 36px;
  --mode-width-disabled: 80px;
  --mode-height-disabled: 36px;
  --mode-padding: 8px 12px;
  --mode-border: 1px solid #4a4a4a;
  --mode-radius: 0px;
  --mode-font: var(--font-ui);
  --mode-font-size: 11px;
  --mode-font-size-disabled: 11px;
  --mode-color: #b8b8b8;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.4);
  --mode-box-shadow: none;

  --toggle-width: 80px;
  --toggle-height: 40px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #5f87af;        
  --toggle-off-bg: #2a2a2a;       
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 1px solid #4a4a4a;
  --toggle-radius: 4px;
  --toggle-text-display: flex;     
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 500;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #808080;

  
}

/* Neon theme (moved from default) */

html[data-theme="neon"] {
  --bg: #39FF14;
  --text: #0b0c0f;
  --panel: #ffffff;
  --border: #000000;
  --accent: #39FF14;
  --logo-image: url("/logo2.png");

  --font-ui: "MS Sans Serif", system-ui, sans-serif;

  --window-width: 310px;
  --window-height: 700px;
  --window-bg: white;
  --window-border-top: 2px solid #fff;
  --window-border-left: 2px solid #fff;
  --window-border-right: 2px solid #666;
  --window-border-bottom: 2px solid #666;
  --window-box-shadow: inset -1px -1px 0 #999, inset 1px 1px 0 #ccc;
  --window-radius: 0px;
  --window-margin: 20px;
  --window-margin-right: 100px;
  
  --title-bar-display: flex;
  --title-bar-bg: #000082;
  --title-bar-color: white;
  --title-bar-padding: 4px 8px;
  --title-bar-font-weight: bold;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: pixelated;
  --title-bar-font-smoothing: none;
  --title-bar-font-smooth: never;
  
  --close-btn-bg: transparent;
  --close-btn-color: white;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(255,255,255,0.2);
  
  --window-body-padding: 10px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 17px;
  
  --radius: 0px;
  --filter-blur: blur(4px);

  --tab-bg: #c0c0c0;
  --tab-bg-active: #c0c0c0;
  --tab-border-top: 2px solid #fff;
  --tab-border-left: 2px solid #fff;
  --tab-border-right: 2px solid #808080;
  --tab-border-bottom: 1px solid #fff;
  --tab-text: black;
  --tab-font: var(--font-ui-normal);
  --tab-font-size: 12px;
  --tab-padding: 4px 8px;
  
  --panel-bg: #fff;
  --panel-border: 2px solid #808080;
  --panel-border-top: 2px solid #808080;
  --panel-border-left: 2px solid #808080;
  --panel-border-right: 2px solid #808080;
  --panel-border-bottom: 2px solid #808080;
  
  --button-bg: linear-gradient(#dcdcdc, #c0c0c0);
  --button-text: #000000;
  --button-border-top: 2px solid #ffffff;
  --button-border-left: 2px solid #ffffff;
  --button-border-bottom: 2px solid #808080;
  --button-border-right: 2px solid #808080;
  --button-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  --button-radius: 2px;
  
  --scrollbar-width: 12px;
  --scrollbar-thumb: #bfbfbf;
  --scrollbar-track: #f1f1f1;

  --tree-font: "Courier New", monospace;
  --tree-font-size: 14px;
  --tree-text: black;
  --tree-line-color: #999;
  --tree-line-style: dashed;
  --tree-line-width: 1px;
  
  --tree-expand-bg: white;
  --tree-expand-border: 1px solid black;
  --tree-expand-size: 13px;
  --tree-expand-icon-size: 14px;
  
  --tree-selection-bg: #0060df;      
  --tree-selection-text: white;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 20px;
  --tree-branch-offset: 12px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: url("/static.png");
  --node-frame-overlay: url("/monitor.png");
  --node-frame-display: block;
  --node-border: none;
  --node-bg: transparent;
  --node-box-shadow: none;
  --node-corner-lines: none;
  
  --image-width: 225px;
  --image-height: 225px;
  --image-fit: fill;
  
  --edge-stroke: black;
  --edge-width: 4;
  --edge-filter: url(#blurFilter);
  --edge-hover-stroke: red;
  --edge-dash: none;
  --edge-marker: none;
  --edge-opacity: 1;
  
  --hover-overlay-bg: rgba(0, 0, 0, 0.6);
  --hover-overlay-color: white;
  --hover-text-blur: url(#text-blur);

  --model-width: 30vh;
  
  --slider-track-height: 4px;
  --slider-track-border: 2px dashed #333;
  --slider-track-bg: transparent;
  
  --slider-thumb-size: 16px;
  --slider-thumb-bg: #000000;
  --slider-thumb-border: none;
  --slider-thumb-radius: 0px;
  --slider-thumb-margin: -9px;

  --mode-bg: url("/key.png");
  --mode-bg-size: cover;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 85px;
  --mode-height: 85px;
  --mode-width-disabled: 90px;
  --mode-height-disabled: 90px;
  --mode-padding: 10px;
  --mode-border: none;
  --mode-radius: 15px;
  --mode-font: "Arial Narrow", Arial, sans-serif;
  --mode-font-size: 24px;
  --mode-font-size-disabled: 28px;
  --mode-color: #111;
  --mode-text-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
  --mode-filter: brightness(95%);
  --mode-filter-disabled: blur(1px);
  --mode-box-shadow: none;

  --toggle-width: 121px;
  --toggle-height: 160px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: url("/toggle-on.png");
  --toggle-off-bg: url("/toggle-off.png");
  --toggle-bg-size: cover;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: none;
  --toggle-radius: 0px;
  --toggle-text-display: none;
  --toggle-padding: 0;
}

html[data-theme="light"] {
  --bg: #fcfefc;
  --logo-image: url("/logo2.png");
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #ffffff;
  --window-border-top: 1px solid #e3e3e7;
  --window-border-left: 1px solid #e3e3e7;
  --window-border-right: 1px solid #e3e3e7;
  --window-border-bottom: 1px solid #e3e3e7;
  --window-box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  --window-radius: 12px;
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  /* Title bar tokens - Light has clean title bar */
  --title-bar-display: flex;
  --title-bar-bg: #f8f9fa;
  --title-bar-color: #0b0c0f;
  --title-bar-padding: 12px 16px;
  --title-bar-font-weight: 600;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: auto;
  --title-bar-font-smooth: auto;
  
  /* Close button tokens */
  --close-btn-bg: transparent;
  --close-btn-color: #5f6368;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(0,0,0,0.05);
  
  /* Window body tokens */
  --window-body-padding: 20px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 20px;
  
  /* General effects */
  --radius: 12px;
  --filter-blur: none;


  --tab-bg: #f0f0f0;
  --tab-bg-active: #ffffff;
  --tab-border-top: 1px solid #e0e0e0;
  --tab-border-left: 1px solid #e0e0e0;
  --tab-border-right: 1px solid #e0e0e0;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #333333;
  --tab-font: "Roboto Mono";
  --tab-font-size: 13px;
  --tab-padding: 4px;
  
  /* Panel/Button tokens - Light */
  --panel-bg: #ffffff;
  --panel-border: 1px solid #e0e0e0;
  --panel-border-top: 1px solid #e0e0e0;
  --panel-border-left: 1px solid #e0e0e0;
  --panel-border-right: 1px solid #e0e0e0;
  --panel-border-bottom: 1px solid #e0e0e0;
  
  --button-bg: #f5f5f5;
  --button-text: #333333;
  --button-border-top: 1px solid #d0d0d0;
  --button-border-left: 1px solid #d0d0d0;
  --button-border-bottom: 1px solid #d0d0d0;
  --button-border-right: 1px solid #d0d0d0;
  --button-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --button-radius: 4px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #c0c0c0;
  --scrollbar-track: #f5f5f5;
  /*Ascii*/
  --tree-font: "Roboto Mono";
  --tree-font-size: 13px;
  --tree-text: #333333;
  --tree-line-color: #d0d0d0;
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: #f5f5f5;
  --tree-expand-border: 1px solid #d0d0d0;
  --tree-expand-size: 12px;
  --tree-expand-icon-size: 12px;
  
  --tree-selection-bg: #e3f2fd;     /* Light blue */
  --tree-selection-text: #1976d2;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 18px;
  --tree-branch-offset: 10px;


    /* Node Editor tokens - Light (AI detection boxes with neon colors) */
  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 3px solid;
  --node-bg: transparent;
  --node-box-shadow: 0 0 15px currentColor, inset 0 0 10px rgba(255,255,255,0.1);
  --node-corner-lines: block;      /* Show corner brackets */
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  /* Edge tokens - Light (thin neon pink/green) */
  --edge-stroke: #00ff88;          /* Neon green default */
  --edge-width: 2;
  --edge-filter: drop-shadow(0 0 4px currentColor);
  --edge-hover-stroke: #ff0080;    /* Hot pink on hover */
  --edge-dash: none;
  --edge-marker: url(#arrowhead);
  --edge-opacity: 0.9;
  
  /* Hover overlay - Light */
  --hover-overlay-bg: rgba(255, 255, 255, 0.85);
  --hover-overlay-color: #1976d2;
  --hover-text-blur: none;


    /* 3D Model / Slider tokens - Light (clean modern) */
  --model-width: 30vh;
  
  --slider-track-height: 6px;
  --slider-track-border: none;
  --slider-track-bg: #e0e0e0;
  
  --slider-thumb-size: 18px;
  --slider-thumb-bg: #1976d2;
  --slider-thumb-border: 2px solid #ffffff;
  --slider-thumb-radius: 50%;
  --slider-thumb-margin: -8px;


    /* Mode button tokens - Light (clean pill buttons with gradients) */
  --mode-bg: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 100px;
  --mode-height: 46px;
  --mode-width-disabled: 100px;
  --mode-height-disabled: 46px;
  --mode-padding: 12px 20px;
  --mode-border: 2px solid #e0e0e0;
  --mode-radius: 24px;
  --mode-font: "Roboto Mono";
  --mode-font-size: 14px;
  --mode-font-size-disabled: 14px;
  --mode-color: #333333;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.5);
  --mode-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);


    /* Toggle tokens - Light (minimalist switch) */
  --toggle-width: 80px;
  --toggle-height: 42px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #4caf50;        /* Green when ON */
  --toggle-off-bg: #e0e0e0;       /* Gray when OFF */
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 2px solid #d0d0d0;
  --toggle-radius: 24px;
  --toggle-text-display: flex;     /* Show GPU ON/OFF text */
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 600;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #999999;
}

/* Fonts */

@font-face {
font-family: "MS Sans Serif";
src: url("/pixel-sans-serif.woff") format("woff");
}

@font-face {
font-family: "MS Sans Serif-normal";
src: url("/ms-sans-serif-2.otf.woff2") format("woff");
}

#editor {
  position: absolute;
  width: 100%;
  height: 100%;
  font-family: var(--tree-font);
  overflow: hidden;
  z-index: 5;
  pointer-events: none;
}

#edges {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.editor-holder {
  width: 100%;
  height: 100%;
}

.edge-line {
  stroke: var(--edge-stroke);
  stroke-width: var(--edge-width);
  filter: var(--edge-filter);
  stroke-dasharray: var(--edge-dash);
  marker-end: var(--edge-marker);
  opacity: var(--edge-opacity);
  pointer-events: stroke;
  transition: stroke 0.2s ease, filter 0.2s ease;
  cursor: pointer;
}

.edge-line:hover {
  stroke: var(--edge-hover-stroke);
}

html[data-theme="light"] .node:nth-child(4n+1) { --node-color: #00ff88; }

html[data-theme="light"] .node:nth-child(4n+2) { --node-color: #ff0080; }

html[data-theme="light"] .node:nth-child(4n+3) { --node-color: #00d4ff; }

html[data-theme="light"] .node:nth-child(4n+4) { --node-color: #ffff00; }

.frame-container {
  position: relative;
  width: var(--node-width);
  height: var(--node-height);
  display: flex;
  align-items: center;
  justify-content: center;
}

.node {
  position: absolute;
  z-index: 1;
  user-select: none;
  color: var(--tree-text);
  pointer-events: all; /* ← critical: overrides #editor pointer-events: none */
}

.zoom-container {
  transform-origin: top left;
  transition: transform 0.1s ease;
}

/* ── Hover handles ── */

.node-handles {
  position: absolute;
  top: -36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  /* padding-bottom bridges the gap so hover doesn't drop */
  padding-bottom: 8px;
}

.node:hover .node-handles {
  opacity: 1;
  pointer-events: all;
}

.node-handle {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: rgba(20, 20, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ccc;
  user-select: none;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  backdrop-filter: blur(4px);
}

.node-handle:hover {
  background: rgba(50, 50, 50, 0.95);
  color: #fff;
  transform: scale(1.15);
}

.node-handle--move {
  cursor: grab;
}

.node-handle--move:active {
  cursor: grabbing;
}

.node-handle--link {
  color: #00ff88;
  border-color: rgba(0, 255, 136, 0.3);
  cursor: pointer;
}

.node-handle--link.node-handle--active {
  background: rgba(0, 255, 136, 0.2);
  color: #00ff88;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.4);
}

.node-handle--edit {
  color: #88aaff;
  border-color: rgba(136, 170, 255, 0.3);
  cursor: pointer;
}

.node-handle--edit.node-handle--active {
  background: rgba(136, 170, 255, 0.2);
  color: #88aaff;
  box-shadow: 0 0 8px rgba(136, 170, 255, 0.4);
}

/* ── Node states ── */

.node--connecting {
  outline: 2px solid rgba(0, 255, 136, 0.6);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.25);
}

.node--linkable {
  outline: 1px dashed rgba(0, 255, 136, 0.3);
  cursor: crosshair;
}

.node--editing {
  outline: 2px solid rgba(136, 170, 255, 0.6);
  box-shadow: 0 0 12px rgba(136, 170, 255, 0.2);
}

/* ── Image wrapper ── */

.canvas-slot {
  pointer-events: auto;
  z-index: 2;
}

.static {
  width: var(--image-width);
  height: var(--image-height);
  background: var(--node-frame-bg);
  cursor: pointer;
  pointer-events: auto;
  z-index: 2;
}

.main-image,
.frame-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: var(--image-fit);
  pointer-events: none;
}

.main-image { z-index: 1; }

.frame-overlay {
  z-index: 2;
  content: var(--node-frame-overlay);
  display: var(--node-frame-display);
}

html[data-theme="light"] .frame-overlay,
html[data-theme="dark"] .frame-overlay {
  display: none;
}

.image-wrapper {
  position: relative;
  width: var(--image-width);
  height: var(--image-height);
  background: var(--node-bg);
  border: var(--node-border);
  border-radius: var(--radius);
  box-shadow: var(--node-box-shadow);
  overflow: hidden;
}

html[data-theme="light"] .image-wrapper {
  border-color: var(--node-color);
  color: var(--node-color);
}

html[data-theme="dark"] .image-wrapper::before,
html[data-theme="dark"] .image-wrapper::after,
html[data-theme="light"] .image-wrapper::before,
html[data-theme="light"] .image-wrapper::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  z-index: 4;
  pointer-events: none;
}

html[data-theme="dark"] .image-wrapper::before {
  top: 0; left: 0;
  border-right: none; border-bottom: none;
}

html[data-theme="dark"] .image-wrapper::after {
  bottom: 0; right: 0;
  border-left: none; border-top: none;
}

html[data-theme="light"] .image-wrapper::before {
  top: -3px; left: -3px;
  border-right: none; border-bottom: none;
  border-color: var(--node-color);
}

html[data-theme="light"] .image-wrapper::after {
  bottom: -3px; right: -3px;
  border-left: none; border-top: none;
  border-color: var(--node-color);
}

.hover-overlay {
  position: absolute;
  top: 0; left: 0;
  width: var(--image-width);
  height: var(--image-height);
  background: var(--hover-overlay-bg);
  color: var(--hover-overlay-color);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: var(--radius);
  z-index: 2;
  backdrop-filter: blur(4px);
}

.hover-overlay p {
  filter: var(--hover-text-blur);
  text-align: center;
  font-weight: 600;
  font-family: var(--font-ui);
  font-size: 14px;
}

.image-wrapper:hover .hover-overlay {
  opacity: 1;
}

.clickable-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}

.clickable-overlay ellipse {
  pointer-events: auto;
  cursor: pointer;
}

.static {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.static-placeholder {
  color: var(--tree-text, #666);
  font-size: 11px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.4;
  pointer-events: none;
  font-family: var(--font-ui);
  line-height: 1.4;
  filter: blur(0.8px);
}

:root {
  height: 100%;
  width: 100%;
  
  /* Dark theme is now DEFAULT */
  /* Base colors - Subtle dark gray palette */
  --bg: #2b2b2b;                    
  --logo-image: url("/logo-dark.png");
  --text: #b8b8b8;                  
  --text-muted: #808080;            
  --panel: #323232;                 
  --panel-darker: #252525;          
  --border: #4a4a4a;                
  --border-light: #555555;          
  
  --accent: #5f87af;                
  --accent-bright: #7ba3cc;         
  --accent-contrast: #ffffff;       
  
  --font-ui: "Roboto Mono", "SF Mono", "Consolas", "Monaco", "Courier New", monospace;
  --font-ui-normal: var(--font-ui);
  
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #323232;             
  --window-border-top: 1px solid #4a4a4a;     
  --window-border-left: 1px solid #4a4a4a;
  --window-border-right: 1px solid #4a4a4a;
  --window-border-bottom: 1px solid #4a4a4a;
  --window-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --window-radius: 0px;             
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  --title-bar-display: flex;
  --title-bar-bg: #2b2b2b;          
  --title-bar-color: #b8b8b8;       
  --title-bar-padding: 6px 10px;    
  --title-bar-font-weight: 400;     
  --title-bar-font-size: 11px;      
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: antialiased;
  --title-bar-font-smooth: auto;
  --title-bar-border-bottom: 1px solid #4a4a4a;  
  
  --close-btn-bg: transparent;
  --close-btn-color: #808080;       
  --close-btn-font-size: 12px;
  --close-btn-hover-bg: rgba(255, 255, 255, 0.08);
  --close-btn-hover-color: #b8b8b8;
  
  --window-body-padding: 12px;
  --window-body-font-size: 12px;
  --window-body-padding-right: 12px;
  
  --radius: 0px;                    
  --filter-blur: none;
  
  --selection-bg: #5f87af;          
  --selection-text: #ffffff;
  --hover-bg: rgba(95, 135, 175, 0.15);  
  --active-bg: rgba(95, 135, 175, 0.25);
  --separator: #4a4a4a;             
  
  --tab-bg: #2b2b2b;
  --tab-bg-active: #323232;
  --tab-border-top: 1px solid #4a4a4a;
  --tab-border-left: 1px solid #4a4a4a;
  --tab-border-right: 1px solid #4a4a4a;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #b8b8b8;
  --tab-font: "Roboto Mono";
  --tab-font-size: 12px;
  --tab-padding: 6px 14px;
  
  --panel-bg: #323232;
  --panel-border: 1px solid #4a4a4a;
  --panel-border-top: 1px solid #4a4a4a;
  --panel-border-left: 1px solid #4a4a4a;
  --panel-border-right: 1px solid #4a4a4a;
  --panel-border-bottom: 1px solid #4a4a4a;
  
  --button-bg: #3a3a3a;
  --button-text: #b8b8b8;
  --button-border-top: 1px solid #4a4a4a;
  --button-border-left: 1px solid #4a4a4a;
  --button-border-bottom: 1px solid #4a4a4a;
  --button-border-right: 1px solid #4a4a4a;
  --button-shadow: none;
  --button-radius: 0px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #4a4a4a;
  --scrollbar-track: #2b2b2b;

  --tree-font: var(--font-ui);       
  --tree-font-size: 12px;
  --tree-text: #b8b8b8;
  --tree-line-color: #4a4a4a;        
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: transparent;
  --tree-expand-border: 1px solid #4a4a4a;
  --tree-expand-size: 11px;
  --tree-expand-icon-size: 11px;
  
  --tree-selection-bg: #5f87af;      
  --tree-selection-text: #ffffff;
  
  --tree-icon-size: 14px;
  --tree-padding-left: 16px;
  --tree-branch-offset: 10px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 1px solid #4a4a4a;
  --node-bg: rgba(35, 35, 35, 0.6);
  --node-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --node-corner-lines: block;      
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  --edge-stroke: #4a4a4a;          
  --edge-width: 1.5;
  --edge-filter: none;
  --edge-hover-stroke: #00ff88;    
  --edge-dash: 5,5;
  --edge-marker: url(#arrowhead-dark);
  --edge-opacity: 0.8;
  
  --hover-overlay-bg: rgba(95, 135, 175, 0.25);
  --hover-overlay-color: #ffffff;
  --hover-text-blur: none;

  --model-width: 30vh;
  
  --slider-track-height: 2px;
  --slider-track-border: none;
  --slider-track-bg: #4a4a4a;
  
  --slider-thumb-size: 12px;
  --slider-thumb-bg: #5f87af;
  --slider-thumb-border: 1px solid #4a4a4a;
  --slider-thumb-radius: 2px;
  --slider-thumb-margin: -6px;

  --mode-bg: rgba(42, 42, 42, 0.8);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 80px;
  --mode-height: 36px;
  --mode-width-disabled: 80px;
  --mode-height-disabled: 36px;
  --mode-padding: 8px 12px;
  --mode-border: 1px solid #4a4a4a;
  --mode-radius: 0px;
  --mode-font: var(--font-ui);
  --mode-font-size: 11px;
  --mode-font-size-disabled: 11px;
  --mode-color: #b8b8b8;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.4);
  --mode-box-shadow: none;

  --toggle-width: 80px;
  --toggle-height: 40px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #5f87af;        
  --toggle-off-bg: #2a2a2a;       
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 1px solid #4a4a4a;
  --toggle-radius: 4px;
  --toggle-text-display: flex;     
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 500;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #808080;

  
}

/* Neon theme (moved from default) */

html[data-theme="neon"] {
  --bg: #39FF14;
  --text: #0b0c0f;
  --panel: #ffffff;
  --border: #000000;
  --accent: #39FF14;
  --logo-image: url("/logo2.png");

  --font-ui: "MS Sans Serif", system-ui, sans-serif;

  --window-width: 310px;
  --window-height: 700px;
  --window-bg: white;
  --window-border-top: 2px solid #fff;
  --window-border-left: 2px solid #fff;
  --window-border-right: 2px solid #666;
  --window-border-bottom: 2px solid #666;
  --window-box-shadow: inset -1px -1px 0 #999, inset 1px 1px 0 #ccc;
  --window-radius: 0px;
  --window-margin: 20px;
  --window-margin-right: 100px;
  
  --title-bar-display: flex;
  --title-bar-bg: #000082;
  --title-bar-color: white;
  --title-bar-padding: 4px 8px;
  --title-bar-font-weight: bold;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: pixelated;
  --title-bar-font-smoothing: none;
  --title-bar-font-smooth: never;
  
  --close-btn-bg: transparent;
  --close-btn-color: white;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(255,255,255,0.2);
  
  --window-body-padding: 10px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 17px;
  
  --radius: 0px;
  --filter-blur: blur(4px);

  --tab-bg: #c0c0c0;
  --tab-bg-active: #c0c0c0;
  --tab-border-top: 2px solid #fff;
  --tab-border-left: 2px solid #fff;
  --tab-border-right: 2px solid #808080;
  --tab-border-bottom: 1px solid #fff;
  --tab-text: black;
  --tab-font: var(--font-ui-normal);
  --tab-font-size: 12px;
  --tab-padding: 4px 8px;
  
  --panel-bg: #fff;
  --panel-border: 2px solid #808080;
  --panel-border-top: 2px solid #808080;
  --panel-border-left: 2px solid #808080;
  --panel-border-right: 2px solid #808080;
  --panel-border-bottom: 2px solid #808080;
  
  --button-bg: linear-gradient(#dcdcdc, #c0c0c0);
  --button-text: #000000;
  --button-border-top: 2px solid #ffffff;
  --button-border-left: 2px solid #ffffff;
  --button-border-bottom: 2px solid #808080;
  --button-border-right: 2px solid #808080;
  --button-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  --button-radius: 2px;
  
  --scrollbar-width: 12px;
  --scrollbar-thumb: #bfbfbf;
  --scrollbar-track: #f1f1f1;

  --tree-font: "Courier New", monospace;
  --tree-font-size: 14px;
  --tree-text: black;
  --tree-line-color: #999;
  --tree-line-style: dashed;
  --tree-line-width: 1px;
  
  --tree-expand-bg: white;
  --tree-expand-border: 1px solid black;
  --tree-expand-size: 13px;
  --tree-expand-icon-size: 14px;
  
  --tree-selection-bg: #0060df;      
  --tree-selection-text: white;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 20px;
  --tree-branch-offset: 12px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: url("/static.png");
  --node-frame-overlay: url("/monitor.png");
  --node-frame-display: block;
  --node-border: none;
  --node-bg: transparent;
  --node-box-shadow: none;
  --node-corner-lines: none;
  
  --image-width: 225px;
  --image-height: 225px;
  --image-fit: fill;
  
  --edge-stroke: black;
  --edge-width: 4;
  --edge-filter: url(#blurFilter);
  --edge-hover-stroke: red;
  --edge-dash: none;
  --edge-marker: none;
  --edge-opacity: 1;
  
  --hover-overlay-bg: rgba(0, 0, 0, 0.6);
  --hover-overlay-color: white;
  --hover-text-blur: url(#text-blur);

  --model-width: 30vh;
  
  --slider-track-height: 4px;
  --slider-track-border: 2px dashed #333;
  --slider-track-bg: transparent;
  
  --slider-thumb-size: 16px;
  --slider-thumb-bg: #000000;
  --slider-thumb-border: none;
  --slider-thumb-radius: 0px;
  --slider-thumb-margin: -9px;

  --mode-bg: url("/key.png");
  --mode-bg-size: cover;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 85px;
  --mode-height: 85px;
  --mode-width-disabled: 90px;
  --mode-height-disabled: 90px;
  --mode-padding: 10px;
  --mode-border: none;
  --mode-radius: 15px;
  --mode-font: "Arial Narrow", Arial, sans-serif;
  --mode-font-size: 24px;
  --mode-font-size-disabled: 28px;
  --mode-color: #111;
  --mode-text-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
  --mode-filter: brightness(95%);
  --mode-filter-disabled: blur(1px);
  --mode-box-shadow: none;

  --toggle-width: 121px;
  --toggle-height: 160px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: url("/toggle-on.png");
  --toggle-off-bg: url("/toggle-off.png");
  --toggle-bg-size: cover;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: none;
  --toggle-radius: 0px;
  --toggle-text-display: none;
  --toggle-padding: 0;
}

html[data-theme="light"] {
  --bg: #fcfefc;
  --logo-image: url("/logo2.png");
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #ffffff;
  --window-border-top: 1px solid #e3e3e7;
  --window-border-left: 1px solid #e3e3e7;
  --window-border-right: 1px solid #e3e3e7;
  --window-border-bottom: 1px solid #e3e3e7;
  --window-box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  --window-radius: 12px;
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  /* Title bar tokens - Light has clean title bar */
  --title-bar-display: flex;
  --title-bar-bg: #f8f9fa;
  --title-bar-color: #0b0c0f;
  --title-bar-padding: 12px 16px;
  --title-bar-font-weight: 600;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: auto;
  --title-bar-font-smooth: auto;
  
  /* Close button tokens */
  --close-btn-bg: transparent;
  --close-btn-color: #5f6368;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(0,0,0,0.05);
  
  /* Window body tokens */
  --window-body-padding: 20px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 20px;
  
  /* General effects */
  --radius: 12px;
  --filter-blur: none;


  --tab-bg: #f0f0f0;
  --tab-bg-active: #ffffff;
  --tab-border-top: 1px solid #e0e0e0;
  --tab-border-left: 1px solid #e0e0e0;
  --tab-border-right: 1px solid #e0e0e0;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #333333;
  --tab-font: "Roboto Mono";
  --tab-font-size: 13px;
  --tab-padding: 4px;
  
  /* Panel/Button tokens - Light */
  --panel-bg: #ffffff;
  --panel-border: 1px solid #e0e0e0;
  --panel-border-top: 1px solid #e0e0e0;
  --panel-border-left: 1px solid #e0e0e0;
  --panel-border-right: 1px solid #e0e0e0;
  --panel-border-bottom: 1px solid #e0e0e0;
  
  --button-bg: #f5f5f5;
  --button-text: #333333;
  --button-border-top: 1px solid #d0d0d0;
  --button-border-left: 1px solid #d0d0d0;
  --button-border-bottom: 1px solid #d0d0d0;
  --button-border-right: 1px solid #d0d0d0;
  --button-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --button-radius: 4px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #c0c0c0;
  --scrollbar-track: #f5f5f5;
  /*Ascii*/
  --tree-font: "Roboto Mono";
  --tree-font-size: 13px;
  --tree-text: #333333;
  --tree-line-color: #d0d0d0;
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: #f5f5f5;
  --tree-expand-border: 1px solid #d0d0d0;
  --tree-expand-size: 12px;
  --tree-expand-icon-size: 12px;
  
  --tree-selection-bg: #e3f2fd;     /* Light blue */
  --tree-selection-text: #1976d2;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 18px;
  --tree-branch-offset: 10px;


    /* Node Editor tokens - Light (AI detection boxes with neon colors) */
  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 3px solid;
  --node-bg: transparent;
  --node-box-shadow: 0 0 15px currentColor, inset 0 0 10px rgba(255,255,255,0.1);
  --node-corner-lines: block;      /* Show corner brackets */
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  /* Edge tokens - Light (thin neon pink/green) */
  --edge-stroke: #00ff88;          /* Neon green default */
  --edge-width: 2;
  --edge-filter: drop-shadow(0 0 4px currentColor);
  --edge-hover-stroke: #ff0080;    /* Hot pink on hover */
  --edge-dash: none;
  --edge-marker: url(#arrowhead);
  --edge-opacity: 0.9;
  
  /* Hover overlay - Light */
  --hover-overlay-bg: rgba(255, 255, 255, 0.85);
  --hover-overlay-color: #1976d2;
  --hover-text-blur: none;


    /* 3D Model / Slider tokens - Light (clean modern) */
  --model-width: 30vh;
  
  --slider-track-height: 6px;
  --slider-track-border: none;
  --slider-track-bg: #e0e0e0;
  
  --slider-thumb-size: 18px;
  --slider-thumb-bg: #1976d2;
  --slider-thumb-border: 2px solid #ffffff;
  --slider-thumb-radius: 50%;
  --slider-thumb-margin: -8px;


    /* Mode button tokens - Light (clean pill buttons with gradients) */
  --mode-bg: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 100px;
  --mode-height: 46px;
  --mode-width-disabled: 100px;
  --mode-height-disabled: 46px;
  --mode-padding: 12px 20px;
  --mode-border: 2px solid #e0e0e0;
  --mode-radius: 24px;
  --mode-font: "Roboto Mono";
  --mode-font-size: 14px;
  --mode-font-size-disabled: 14px;
  --mode-color: #333333;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.5);
  --mode-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);


    /* Toggle tokens - Light (minimalist switch) */
  --toggle-width: 80px;
  --toggle-height: 42px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #4caf50;        /* Green when ON */
  --toggle-off-bg: #e0e0e0;       /* Gray when OFF */
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 2px solid #d0d0d0;
  --toggle-radius: 24px;
  --toggle-text-display: flex;     /* Show GPU ON/OFF text */
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 600;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #999999;
}

/* Fonts */

@font-face {
font-family: "MS Sans Serif";
src: url("/pixel-sans-serif.woff") format("woff");
}

@font-face {
font-family: "MS Sans Serif-normal";
src: url("/ms-sans-serif-2.otf.woff2") format("woff");
}

.tabs {
  display: flex;
  align-items: flex-end;
  gap: 2px;
}

.tab {
  padding: var(--tab-padding);
  background: var(--tab-bg);
  border-top: var(--tab-border-top);
  border-left: var(--tab-border-left);
  border-right: var(--tab-border-right);
  border-bottom: var(--tab-border-bottom);
  border-radius: var(--radius) var(--radius) 0 0;
  cursor: pointer;
  font-family: "Roboto Mono";
  font-size: var(--tab-font-size);
  color: var(--tab-text);
  transition: background-color 0.15s ease;
}

.tab:hover {
  background: var(--hover-bg, var(--tab-bg));
}

.tab.active {
  background: var(--tab-bg-active);
  border-top: var(--tab-border-top);
  border-left: var(--tab-border-left);
  border-right: var(--tab-border-right);
  border-bottom: 1px solid var(--tab-bg-active);
  position: relative;
  top: 1px;
}

/* Dark mode: light blue accent on active tab */

html[data-theme="dark"] .tab.active {
  border-bottom: 2px solid var(--accent);
  top: 0;
}

.panel-border {
  margin-left: 1px;
  border-top: 4px solid var(--panel-bg);
  border-bottom: var(--panel-border-bottom);
  border-left: var(--panel-border-left);
  border-right: var(--panel-border-right);
  background: var(--panel-bg);
  width: 100%;
  height: 70%;
  padding: 1px 3px 2px;
}

.panel {
  background: var(--panel-bg);
  border-top: var(--panel-border-top);
  border-left: var(--panel-border-left);
  border-right: var(--panel-border-right);
  border-bottom: var(--panel-border-bottom);
  width: 97%;
  height: 241px;
  padding-left: 2px;
  overflow-y: scroll;
  overflow-x: hidden;
}

.panel button {
  color: var(--button-text);
  background: var(--button-bg);
  padding: 5px 12px;
  margin: 6px;
  cursor: pointer;
  user-select: none;
  width: 100%;
  font-family: var(--button-font);
  font-size: var(--window-body-font-size);
  
  border-top: var(--button-border-top);
  border-left: var(--button-border-left);
  border-bottom: var(--button-border-bottom);
  border-right: var(--button-border-right);
  border-radius: var(--button-radius);
  box-shadow: var(--button-shadow);
  
  transition: all 0.1s ease;
}

.panel button:hover {
  background: var(--hover-bg, var(--button-bg));
}

.panel button:active:not(:disabled) {
  filter: brightness(0.9);
  transform: translateY(1px);
  box-shadow: inset 0 2px 0 rgba(0, 0, 0, 0.18);
}

/* Neon mode: flip borders on active */

html[data-theme="neon"] .panel button:active:not(:disabled) {
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-bottom: 2px solid #ffffff;
  border-right: 2px solid #ffffff;
}

/* Dark mode: blue accent on active */

html[data-theme="dark"] .panel button:active:not(:disabled) {
  background: var(--active-bg);
  border-color: var(--accent);
}

.panel button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.3);
}

.panel button:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent);
}

/* Scrollbar styling */

.panel::-webkit-scrollbar {
  width: var(--scrollbar-width);
}

.panel::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border: 1px solid var(--panel-bg);
  border-radius: 0;
}

.panel::-webkit-scrollbar-thumb:hover {
  background: var(--border);
}

.panel::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

/* Dark mode: slimmer scrollbar with accent */

html[data-theme="dark"] .panel::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}


:root {
  height: 100%;
  width: 100%;
  
  /* Dark theme is now DEFAULT */
  /* Base colors - Subtle dark gray palette */
  --bg: #2b2b2b;                    
  --logo-image: url("/logo-dark.png");
  --text: #b8b8b8;                  
  --text-muted: #808080;            
  --panel: #323232;                 
  --panel-darker: #252525;          
  --border: #4a4a4a;                
  --border-light: #555555;          
  
  --accent: #5f87af;                
  --accent-bright: #7ba3cc;         
  --accent-contrast: #ffffff;       
  
  --font-ui: "Roboto Mono", "SF Mono", "Consolas", "Monaco", "Courier New", monospace;
  --font-ui-normal: var(--font-ui);
  
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #323232;             
  --window-border-top: 1px solid #4a4a4a;     
  --window-border-left: 1px solid #4a4a4a;
  --window-border-right: 1px solid #4a4a4a;
  --window-border-bottom: 1px solid #4a4a4a;
  --window-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --window-radius: 0px;             
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  --title-bar-display: flex;
  --title-bar-bg: #2b2b2b;          
  --title-bar-color: #b8b8b8;       
  --title-bar-padding: 6px 10px;    
  --title-bar-font-weight: 400;     
  --title-bar-font-size: 11px;      
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: antialiased;
  --title-bar-font-smooth: auto;
  --title-bar-border-bottom: 1px solid #4a4a4a;  
  
  --close-btn-bg: transparent;
  --close-btn-color: #808080;       
  --close-btn-font-size: 12px;
  --close-btn-hover-bg: rgba(255, 255, 255, 0.08);
  --close-btn-hover-color: #b8b8b8;
  
  --window-body-padding: 12px;
  --window-body-font-size: 12px;
  --window-body-padding-right: 12px;
  
  --radius: 0px;                    
  --filter-blur: none;
  
  --selection-bg: #5f87af;          
  --selection-text: #ffffff;
  --hover-bg: rgba(95, 135, 175, 0.15);  
  --active-bg: rgba(95, 135, 175, 0.25);
  --separator: #4a4a4a;             
  
  --tab-bg: #2b2b2b;
  --tab-bg-active: #323232;
  --tab-border-top: 1px solid #4a4a4a;
  --tab-border-left: 1px solid #4a4a4a;
  --tab-border-right: 1px solid #4a4a4a;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #b8b8b8;
  --tab-font: "Roboto Mono";
  --tab-font-size: 12px;
  --tab-padding: 6px 14px;
  
  --panel-bg: #323232;
  --panel-border: 1px solid #4a4a4a;
  --panel-border-top: 1px solid #4a4a4a;
  --panel-border-left: 1px solid #4a4a4a;
  --panel-border-right: 1px solid #4a4a4a;
  --panel-border-bottom: 1px solid #4a4a4a;
  
  --button-bg: #3a3a3a;
  --button-text: #b8b8b8;
  --button-border-top: 1px solid #4a4a4a;
  --button-border-left: 1px solid #4a4a4a;
  --button-border-bottom: 1px solid #4a4a4a;
  --button-border-right: 1px solid #4a4a4a;
  --button-shadow: none;
  --button-radius: 0px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #4a4a4a;
  --scrollbar-track: #2b2b2b;

  --tree-font: var(--font-ui);       
  --tree-font-size: 12px;
  --tree-text: #b8b8b8;
  --tree-line-color: #4a4a4a;        
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: transparent;
  --tree-expand-border: 1px solid #4a4a4a;
  --tree-expand-size: 11px;
  --tree-expand-icon-size: 11px;
  
  --tree-selection-bg: #5f87af;      
  --tree-selection-text: #ffffff;
  
  --tree-icon-size: 14px;
  --tree-padding-left: 16px;
  --tree-branch-offset: 10px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 1px solid #4a4a4a;
  --node-bg: rgba(35, 35, 35, 0.6);
  --node-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --node-corner-lines: block;      
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  --edge-stroke: #4a4a4a;          
  --edge-width: 1.5;
  --edge-filter: none;
  --edge-hover-stroke: #00ff88;    
  --edge-dash: 5,5;
  --edge-marker: url(#arrowhead-dark);
  --edge-opacity: 0.8;
  
  --hover-overlay-bg: rgba(95, 135, 175, 0.25);
  --hover-overlay-color: #ffffff;
  --hover-text-blur: none;

  --model-width: 30vh;
  
  --slider-track-height: 2px;
  --slider-track-border: none;
  --slider-track-bg: #4a4a4a;
  
  --slider-thumb-size: 12px;
  --slider-thumb-bg: #5f87af;
  --slider-thumb-border: 1px solid #4a4a4a;
  --slider-thumb-radius: 2px;
  --slider-thumb-margin: -6px;

  --mode-bg: rgba(42, 42, 42, 0.8);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 80px;
  --mode-height: 36px;
  --mode-width-disabled: 80px;
  --mode-height-disabled: 36px;
  --mode-padding: 8px 12px;
  --mode-border: 1px solid #4a4a4a;
  --mode-radius: 0px;
  --mode-font: var(--font-ui);
  --mode-font-size: 11px;
  --mode-font-size-disabled: 11px;
  --mode-color: #b8b8b8;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.4);
  --mode-box-shadow: none;

  --toggle-width: 80px;
  --toggle-height: 40px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #5f87af;        
  --toggle-off-bg: #2a2a2a;       
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 1px solid #4a4a4a;
  --toggle-radius: 4px;
  --toggle-text-display: flex;     
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 500;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #808080;

  
}

/* Neon theme (moved from default) */

html[data-theme="neon"] {
  --bg: #39FF14;
  --text: #0b0c0f;
  --panel: #ffffff;
  --border: #000000;
  --accent: #39FF14;
  --logo-image: url("/logo2.png");

  --font-ui: "MS Sans Serif", system-ui, sans-serif;

  --window-width: 310px;
  --window-height: 700px;
  --window-bg: white;
  --window-border-top: 2px solid #fff;
  --window-border-left: 2px solid #fff;
  --window-border-right: 2px solid #666;
  --window-border-bottom: 2px solid #666;
  --window-box-shadow: inset -1px -1px 0 #999, inset 1px 1px 0 #ccc;
  --window-radius: 0px;
  --window-margin: 20px;
  --window-margin-right: 100px;
  
  --title-bar-display: flex;
  --title-bar-bg: #000082;
  --title-bar-color: white;
  --title-bar-padding: 4px 8px;
  --title-bar-font-weight: bold;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: pixelated;
  --title-bar-font-smoothing: none;
  --title-bar-font-smooth: never;
  
  --close-btn-bg: transparent;
  --close-btn-color: white;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(255,255,255,0.2);
  
  --window-body-padding: 10px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 17px;
  
  --radius: 0px;
  --filter-blur: blur(4px);

  --tab-bg: #c0c0c0;
  --tab-bg-active: #c0c0c0;
  --tab-border-top: 2px solid #fff;
  --tab-border-left: 2px solid #fff;
  --tab-border-right: 2px solid #808080;
  --tab-border-bottom: 1px solid #fff;
  --tab-text: black;
  --tab-font: var(--font-ui-normal);
  --tab-font-size: 12px;
  --tab-padding: 4px 8px;
  
  --panel-bg: #fff;
  --panel-border: 2px solid #808080;
  --panel-border-top: 2px solid #808080;
  --panel-border-left: 2px solid #808080;
  --panel-border-right: 2px solid #808080;
  --panel-border-bottom: 2px solid #808080;
  
  --button-bg: linear-gradient(#dcdcdc, #c0c0c0);
  --button-text: #000000;
  --button-border-top: 2px solid #ffffff;
  --button-border-left: 2px solid #ffffff;
  --button-border-bottom: 2px solid #808080;
  --button-border-right: 2px solid #808080;
  --button-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  --button-radius: 2px;
  
  --scrollbar-width: 12px;
  --scrollbar-thumb: #bfbfbf;
  --scrollbar-track: #f1f1f1;

  --tree-font: "Courier New", monospace;
  --tree-font-size: 14px;
  --tree-text: black;
  --tree-line-color: #999;
  --tree-line-style: dashed;
  --tree-line-width: 1px;
  
  --tree-expand-bg: white;
  --tree-expand-border: 1px solid black;
  --tree-expand-size: 13px;
  --tree-expand-icon-size: 14px;
  
  --tree-selection-bg: #0060df;      
  --tree-selection-text: white;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 20px;
  --tree-branch-offset: 12px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: url("/static.png");
  --node-frame-overlay: url("/monitor.png");
  --node-frame-display: block;
  --node-border: none;
  --node-bg: transparent;
  --node-box-shadow: none;
  --node-corner-lines: none;
  
  --image-width: 225px;
  --image-height: 225px;
  --image-fit: fill;
  
  --edge-stroke: black;
  --edge-width: 4;
  --edge-filter: url(#blurFilter);
  --edge-hover-stroke: red;
  --edge-dash: none;
  --edge-marker: none;
  --edge-opacity: 1;
  
  --hover-overlay-bg: rgba(0, 0, 0, 0.6);
  --hover-overlay-color: white;
  --hover-text-blur: url(#text-blur);

  --model-width: 30vh;
  
  --slider-track-height: 4px;
  --slider-track-border: 2px dashed #333;
  --slider-track-bg: transparent;
  
  --slider-thumb-size: 16px;
  --slider-thumb-bg: #000000;
  --slider-thumb-border: none;
  --slider-thumb-radius: 0px;
  --slider-thumb-margin: -9px;

  --mode-bg: url("/key.png");
  --mode-bg-size: cover;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 85px;
  --mode-height: 85px;
  --mode-width-disabled: 90px;
  --mode-height-disabled: 90px;
  --mode-padding: 10px;
  --mode-border: none;
  --mode-radius: 15px;
  --mode-font: "Arial Narrow", Arial, sans-serif;
  --mode-font-size: 24px;
  --mode-font-size-disabled: 28px;
  --mode-color: #111;
  --mode-text-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
  --mode-filter: brightness(95%);
  --mode-filter-disabled: blur(1px);
  --mode-box-shadow: none;

  --toggle-width: 121px;
  --toggle-height: 160px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: url("/toggle-on.png");
  --toggle-off-bg: url("/toggle-off.png");
  --toggle-bg-size: cover;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: none;
  --toggle-radius: 0px;
  --toggle-text-display: none;
  --toggle-padding: 0;
}

html[data-theme="light"] {
  --bg: #fcfefc;
  --logo-image: url("/logo2.png");
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #ffffff;
  --window-border-top: 1px solid #e3e3e7;
  --window-border-left: 1px solid #e3e3e7;
  --window-border-right: 1px solid #e3e3e7;
  --window-border-bottom: 1px solid #e3e3e7;
  --window-box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  --window-radius: 12px;
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  /* Title bar tokens - Light has clean title bar */
  --title-bar-display: flex;
  --title-bar-bg: #f8f9fa;
  --title-bar-color: #0b0c0f;
  --title-bar-padding: 12px 16px;
  --title-bar-font-weight: 600;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: auto;
  --title-bar-font-smooth: auto;
  
  /* Close button tokens */
  --close-btn-bg: transparent;
  --close-btn-color: #5f6368;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(0,0,0,0.05);
  
  /* Window body tokens */
  --window-body-padding: 20px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 20px;
  
  /* General effects */
  --radius: 12px;
  --filter-blur: none;


  --tab-bg: #f0f0f0;
  --tab-bg-active: #ffffff;
  --tab-border-top: 1px solid #e0e0e0;
  --tab-border-left: 1px solid #e0e0e0;
  --tab-border-right: 1px solid #e0e0e0;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #333333;
  --tab-font: "Roboto Mono";
  --tab-font-size: 13px;
  --tab-padding: 4px;
  
  /* Panel/Button tokens - Light */
  --panel-bg: #ffffff;
  --panel-border: 1px solid #e0e0e0;
  --panel-border-top: 1px solid #e0e0e0;
  --panel-border-left: 1px solid #e0e0e0;
  --panel-border-right: 1px solid #e0e0e0;
  --panel-border-bottom: 1px solid #e0e0e0;
  
  --button-bg: #f5f5f5;
  --button-text: #333333;
  --button-border-top: 1px solid #d0d0d0;
  --button-border-left: 1px solid #d0d0d0;
  --button-border-bottom: 1px solid #d0d0d0;
  --button-border-right: 1px solid #d0d0d0;
  --button-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --button-radius: 4px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #c0c0c0;
  --scrollbar-track: #f5f5f5;
  /*Ascii*/
  --tree-font: "Roboto Mono";
  --tree-font-size: 13px;
  --tree-text: #333333;
  --tree-line-color: #d0d0d0;
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: #f5f5f5;
  --tree-expand-border: 1px solid #d0d0d0;
  --tree-expand-size: 12px;
  --tree-expand-icon-size: 12px;
  
  --tree-selection-bg: #e3f2fd;     /* Light blue */
  --tree-selection-text: #1976d2;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 18px;
  --tree-branch-offset: 10px;


    /* Node Editor tokens - Light (AI detection boxes with neon colors) */
  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 3px solid;
  --node-bg: transparent;
  --node-box-shadow: 0 0 15px currentColor, inset 0 0 10px rgba(255,255,255,0.1);
  --node-corner-lines: block;      /* Show corner brackets */
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  /* Edge tokens - Light (thin neon pink/green) */
  --edge-stroke: #00ff88;          /* Neon green default */
  --edge-width: 2;
  --edge-filter: drop-shadow(0 0 4px currentColor);
  --edge-hover-stroke: #ff0080;    /* Hot pink on hover */
  --edge-dash: none;
  --edge-marker: url(#arrowhead);
  --edge-opacity: 0.9;
  
  /* Hover overlay - Light */
  --hover-overlay-bg: rgba(255, 255, 255, 0.85);
  --hover-overlay-color: #1976d2;
  --hover-text-blur: none;


    /* 3D Model / Slider tokens - Light (clean modern) */
  --model-width: 30vh;
  
  --slider-track-height: 6px;
  --slider-track-border: none;
  --slider-track-bg: #e0e0e0;
  
  --slider-thumb-size: 18px;
  --slider-thumb-bg: #1976d2;
  --slider-thumb-border: 2px solid #ffffff;
  --slider-thumb-radius: 50%;
  --slider-thumb-margin: -8px;


    /* Mode button tokens - Light (clean pill buttons with gradients) */
  --mode-bg: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 100px;
  --mode-height: 46px;
  --mode-width-disabled: 100px;
  --mode-height-disabled: 46px;
  --mode-padding: 12px 20px;
  --mode-border: 2px solid #e0e0e0;
  --mode-radius: 24px;
  --mode-font: "Roboto Mono";
  --mode-font-size: 14px;
  --mode-font-size-disabled: 14px;
  --mode-color: #333333;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.5);
  --mode-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);


    /* Toggle tokens - Light (minimalist switch) */
  --toggle-width: 80px;
  --toggle-height: 42px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #4caf50;        /* Green when ON */
  --toggle-off-bg: #e0e0e0;       /* Gray when OFF */
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 2px solid #d0d0d0;
  --toggle-radius: 24px;
  --toggle-text-display: flex;     /* Show GPU ON/OFF text */
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 600;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #999999;
}

/* Fonts */

@font-face {
font-family: "MS Sans Serif";
src: url("/pixel-sans-serif.woff") format("woff");
}

@font-face {
font-family: "MS Sans Serif-normal";
src: url("/ms-sans-serif-2.otf.woff2") format("woff");
}

.window {
  width: var(--window-width);
  height: var(--window-height);
  background: var(--window-bg);
  border-top: var(--window-border-top);
  border-left: var(--window-border-left);
  border-right: var(--window-border-right);
  border-bottom: var(--window-border-bottom);
  box-shadow: var(--window-box-shadow);
  border-radius: var(--window-radius);
  margin: var(--window-margin);
  margin-right: var(--window-margin-right);
}

.title-bar {
  display: var(--title-bar-display);
  justify-content: space-between;
  align-items: center;
  background: var(--title-bar-bg);
  color: var(--title-bar-color);
  padding: var(--title-bar-padding);
  font-weight: var(--title-bar-font-weight);
  font-size: var(--title-bar-font-size);
  font-family: var(--font-ui);
  border-radius: var(--window-radius) var(--window-radius) 0 0;
  
  /* Add border-bottom support */
  border-bottom: var(--title-bar-border-bottom, none);
  
  /* Pixel perfect rendering for neon mode */
  image-rendering: var(--title-bar-image-rendering);
  -webkit-font-smoothing: var(--title-bar-font-smoothing);
  -moz-osx-font-smoothing: var(--title-bar-font-smoothing);

}

.close-btn {
  background: var(--close-btn-bg);
  border: none;
  color: var(--close-btn-color);
  font-size: var(--close-btn-font-size);
  cursor: pointer;
  line-height: 1;
  border-radius: 4px;
  padding: 4px 8px;
  transition: background-color 0.15s ease;
}

.close-btn:hover {
  background: var(--close-btn-hover-bg);
}

.window-body {
  padding: var(--window-body-padding);
  font-size: var(--window-body-font-size);
  padding-right: var(--window-body-padding-right);
  color: var(--text);
  font-family: var(--font-ui);
}

/* Dark mode specific adjustments */

html[data-theme="dark"] .window-body {
  /* Add extra top padding when title bar is hidden */
  padding-top: calc(var(--window-body-padding) + 8px);
}

:root {
  height: 100%;
  width: 100%;
  
  /* Dark theme is now DEFAULT */
  /* Base colors - Subtle dark gray palette */
  --bg: #2b2b2b;                    
  --logo-image: url("/logo-dark.png");
  --text: #b8b8b8;                  
  --text-muted: #808080;            
  --panel: #323232;                 
  --panel-darker: #252525;          
  --border: #4a4a4a;                
  --border-light: #555555;          
  
  --accent: #5f87af;                
  --accent-bright: #7ba3cc;         
  --accent-contrast: #ffffff;       
  
  --font-ui: "Roboto Mono", "SF Mono", "Consolas", "Monaco", "Courier New", monospace;
  --font-ui-normal: var(--font-ui);
  
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #323232;             
  --window-border-top: 1px solid #4a4a4a;     
  --window-border-left: 1px solid #4a4a4a;
  --window-border-right: 1px solid #4a4a4a;
  --window-border-bottom: 1px solid #4a4a4a;
  --window-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --window-radius: 0px;             
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  --title-bar-display: flex;
  --title-bar-bg: #2b2b2b;          
  --title-bar-color: #b8b8b8;       
  --title-bar-padding: 6px 10px;    
  --title-bar-font-weight: 400;     
  --title-bar-font-size: 11px;      
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: antialiased;
  --title-bar-font-smooth: auto;
  --title-bar-border-bottom: 1px solid #4a4a4a;  
  
  --close-btn-bg: transparent;
  --close-btn-color: #808080;       
  --close-btn-font-size: 12px;
  --close-btn-hover-bg: rgba(255, 255, 255, 0.08);
  --close-btn-hover-color: #b8b8b8;
  
  --window-body-padding: 12px;
  --window-body-font-size: 12px;
  --window-body-padding-right: 12px;
  
  --radius: 0px;                    
  --filter-blur: none;
  
  --selection-bg: #5f87af;          
  --selection-text: #ffffff;
  --hover-bg: rgba(95, 135, 175, 0.15);  
  --active-bg: rgba(95, 135, 175, 0.25);
  --separator: #4a4a4a;             
  
  --tab-bg: #2b2b2b;
  --tab-bg-active: #323232;
  --tab-border-top: 1px solid #4a4a4a;
  --tab-border-left: 1px solid #4a4a4a;
  --tab-border-right: 1px solid #4a4a4a;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #b8b8b8;
  --tab-font: "Roboto Mono";
  --tab-font-size: 12px;
  --tab-padding: 6px 14px;
  
  --panel-bg: #323232;
  --panel-border: 1px solid #4a4a4a;
  --panel-border-top: 1px solid #4a4a4a;
  --panel-border-left: 1px solid #4a4a4a;
  --panel-border-right: 1px solid #4a4a4a;
  --panel-border-bottom: 1px solid #4a4a4a;
  
  --button-bg: #3a3a3a;
  --button-text: #b8b8b8;
  --button-border-top: 1px solid #4a4a4a;
  --button-border-left: 1px solid #4a4a4a;
  --button-border-bottom: 1px solid #4a4a4a;
  --button-border-right: 1px solid #4a4a4a;
  --button-shadow: none;
  --button-radius: 0px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #4a4a4a;
  --scrollbar-track: #2b2b2b;

  --tree-font: var(--font-ui);       
  --tree-font-size: 12px;
  --tree-text: #b8b8b8;
  --tree-line-color: #4a4a4a;        
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: transparent;
  --tree-expand-border: 1px solid #4a4a4a;
  --tree-expand-size: 11px;
  --tree-expand-icon-size: 11px;
  
  --tree-selection-bg: #5f87af;      
  --tree-selection-text: #ffffff;
  
  --tree-icon-size: 14px;
  --tree-padding-left: 16px;
  --tree-branch-offset: 10px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 1px solid #4a4a4a;
  --node-bg: rgba(35, 35, 35, 0.6);
  --node-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --node-corner-lines: block;      
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  --edge-stroke: #4a4a4a;          
  --edge-width: 1.5;
  --edge-filter: none;
  --edge-hover-stroke: #00ff88;    
  --edge-dash: 5,5;
  --edge-marker: url(#arrowhead-dark);
  --edge-opacity: 0.8;
  
  --hover-overlay-bg: rgba(95, 135, 175, 0.25);
  --hover-overlay-color: #ffffff;
  --hover-text-blur: none;

  --model-width: 30vh;
  
  --slider-track-height: 2px;
  --slider-track-border: none;
  --slider-track-bg: #4a4a4a;
  
  --slider-thumb-size: 12px;
  --slider-thumb-bg: #5f87af;
  --slider-thumb-border: 1px solid #4a4a4a;
  --slider-thumb-radius: 2px;
  --slider-thumb-margin: -6px;

  --mode-bg: rgba(42, 42, 42, 0.8);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 80px;
  --mode-height: 36px;
  --mode-width-disabled: 80px;
  --mode-height-disabled: 36px;
  --mode-padding: 8px 12px;
  --mode-border: 1px solid #4a4a4a;
  --mode-radius: 0px;
  --mode-font: var(--font-ui);
  --mode-font-size: 11px;
  --mode-font-size-disabled: 11px;
  --mode-color: #b8b8b8;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.4);
  --mode-box-shadow: none;

  --toggle-width: 80px;
  --toggle-height: 40px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #5f87af;        
  --toggle-off-bg: #2a2a2a;       
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 1px solid #4a4a4a;
  --toggle-radius: 4px;
  --toggle-text-display: flex;     
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 500;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #808080;

  
}

/* Neon theme (moved from default) */

html[data-theme="neon"] {
  --bg: #39FF14;
  --text: #0b0c0f;
  --panel: #ffffff;
  --border: #000000;
  --accent: #39FF14;
  --logo-image: url("/logo2.png");

  --font-ui: "MS Sans Serif", system-ui, sans-serif;

  --window-width: 310px;
  --window-height: 700px;
  --window-bg: white;
  --window-border-top: 2px solid #fff;
  --window-border-left: 2px solid #fff;
  --window-border-right: 2px solid #666;
  --window-border-bottom: 2px solid #666;
  --window-box-shadow: inset -1px -1px 0 #999, inset 1px 1px 0 #ccc;
  --window-radius: 0px;
  --window-margin: 20px;
  --window-margin-right: 100px;
  
  --title-bar-display: flex;
  --title-bar-bg: #000082;
  --title-bar-color: white;
  --title-bar-padding: 4px 8px;
  --title-bar-font-weight: bold;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: pixelated;
  --title-bar-font-smoothing: none;
  --title-bar-font-smooth: never;
  
  --close-btn-bg: transparent;
  --close-btn-color: white;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(255,255,255,0.2);
  
  --window-body-padding: 10px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 17px;
  
  --radius: 0px;
  --filter-blur: blur(4px);

  --tab-bg: #c0c0c0;
  --tab-bg-active: #c0c0c0;
  --tab-border-top: 2px solid #fff;
  --tab-border-left: 2px solid #fff;
  --tab-border-right: 2px solid #808080;
  --tab-border-bottom: 1px solid #fff;
  --tab-text: black;
  --tab-font: var(--font-ui-normal);
  --tab-font-size: 12px;
  --tab-padding: 4px 8px;
  
  --panel-bg: #fff;
  --panel-border: 2px solid #808080;
  --panel-border-top: 2px solid #808080;
  --panel-border-left: 2px solid #808080;
  --panel-border-right: 2px solid #808080;
  --panel-border-bottom: 2px solid #808080;
  
  --button-bg: linear-gradient(#dcdcdc, #c0c0c0);
  --button-text: #000000;
  --button-border-top: 2px solid #ffffff;
  --button-border-left: 2px solid #ffffff;
  --button-border-bottom: 2px solid #808080;
  --button-border-right: 2px solid #808080;
  --button-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  --button-radius: 2px;
  
  --scrollbar-width: 12px;
  --scrollbar-thumb: #bfbfbf;
  --scrollbar-track: #f1f1f1;

  --tree-font: "Courier New", monospace;
  --tree-font-size: 14px;
  --tree-text: black;
  --tree-line-color: #999;
  --tree-line-style: dashed;
  --tree-line-width: 1px;
  
  --tree-expand-bg: white;
  --tree-expand-border: 1px solid black;
  --tree-expand-size: 13px;
  --tree-expand-icon-size: 14px;
  
  --tree-selection-bg: #0060df;      
  --tree-selection-text: white;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 20px;
  --tree-branch-offset: 12px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: url("/static.png");
  --node-frame-overlay: url("/monitor.png");
  --node-frame-display: block;
  --node-border: none;
  --node-bg: transparent;
  --node-box-shadow: none;
  --node-corner-lines: none;
  
  --image-width: 225px;
  --image-height: 225px;
  --image-fit: fill;
  
  --edge-stroke: black;
  --edge-width: 4;
  --edge-filter: url(#blurFilter);
  --edge-hover-stroke: red;
  --edge-dash: none;
  --edge-marker: none;
  --edge-opacity: 1;
  
  --hover-overlay-bg: rgba(0, 0, 0, 0.6);
  --hover-overlay-color: white;
  --hover-text-blur: url(#text-blur);

  --model-width: 30vh;
  
  --slider-track-height: 4px;
  --slider-track-border: 2px dashed #333;
  --slider-track-bg: transparent;
  
  --slider-thumb-size: 16px;
  --slider-thumb-bg: #000000;
  --slider-thumb-border: none;
  --slider-thumb-radius: 0px;
  --slider-thumb-margin: -9px;

  --mode-bg: url("/key.png");
  --mode-bg-size: cover;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 85px;
  --mode-height: 85px;
  --mode-width-disabled: 90px;
  --mode-height-disabled: 90px;
  --mode-padding: 10px;
  --mode-border: none;
  --mode-radius: 15px;
  --mode-font: "Arial Narrow", Arial, sans-serif;
  --mode-font-size: 24px;
  --mode-font-size-disabled: 28px;
  --mode-color: #111;
  --mode-text-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
  --mode-filter: brightness(95%);
  --mode-filter-disabled: blur(1px);
  --mode-box-shadow: none;

  --toggle-width: 121px;
  --toggle-height: 160px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: url("/toggle-on.png");
  --toggle-off-bg: url("/toggle-off.png");
  --toggle-bg-size: cover;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: none;
  --toggle-radius: 0px;
  --toggle-text-display: none;
  --toggle-padding: 0;
}

html[data-theme="light"] {
  --bg: #fcfefc;
  --logo-image: url("/logo2.png");
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #ffffff;
  --window-border-top: 1px solid #e3e3e7;
  --window-border-left: 1px solid #e3e3e7;
  --window-border-right: 1px solid #e3e3e7;
  --window-border-bottom: 1px solid #e3e3e7;
  --window-box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  --window-radius: 12px;
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  /* Title bar tokens - Light has clean title bar */
  --title-bar-display: flex;
  --title-bar-bg: #f8f9fa;
  --title-bar-color: #0b0c0f;
  --title-bar-padding: 12px 16px;
  --title-bar-font-weight: 600;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: auto;
  --title-bar-font-smooth: auto;
  
  /* Close button tokens */
  --close-btn-bg: transparent;
  --close-btn-color: #5f6368;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(0,0,0,0.05);
  
  /* Window body tokens */
  --window-body-padding: 20px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 20px;
  
  /* General effects */
  --radius: 12px;
  --filter-blur: none;


  --tab-bg: #f0f0f0;
  --tab-bg-active: #ffffff;
  --tab-border-top: 1px solid #e0e0e0;
  --tab-border-left: 1px solid #e0e0e0;
  --tab-border-right: 1px solid #e0e0e0;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #333333;
  --tab-font: "Roboto Mono";
  --tab-font-size: 13px;
  --tab-padding: 4px;
  
  /* Panel/Button tokens - Light */
  --panel-bg: #ffffff;
  --panel-border: 1px solid #e0e0e0;
  --panel-border-top: 1px solid #e0e0e0;
  --panel-border-left: 1px solid #e0e0e0;
  --panel-border-right: 1px solid #e0e0e0;
  --panel-border-bottom: 1px solid #e0e0e0;
  
  --button-bg: #f5f5f5;
  --button-text: #333333;
  --button-border-top: 1px solid #d0d0d0;
  --button-border-left: 1px solid #d0d0d0;
  --button-border-bottom: 1px solid #d0d0d0;
  --button-border-right: 1px solid #d0d0d0;
  --button-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --button-radius: 4px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #c0c0c0;
  --scrollbar-track: #f5f5f5;
  /*Ascii*/
  --tree-font: "Roboto Mono";
  --tree-font-size: 13px;
  --tree-text: #333333;
  --tree-line-color: #d0d0d0;
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: #f5f5f5;
  --tree-expand-border: 1px solid #d0d0d0;
  --tree-expand-size: 12px;
  --tree-expand-icon-size: 12px;
  
  --tree-selection-bg: #e3f2fd;     /* Light blue */
  --tree-selection-text: #1976d2;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 18px;
  --tree-branch-offset: 10px;


    /* Node Editor tokens - Light (AI detection boxes with neon colors) */
  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 3px solid;
  --node-bg: transparent;
  --node-box-shadow: 0 0 15px currentColor, inset 0 0 10px rgba(255,255,255,0.1);
  --node-corner-lines: block;      /* Show corner brackets */
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  /* Edge tokens - Light (thin neon pink/green) */
  --edge-stroke: #00ff88;          /* Neon green default */
  --edge-width: 2;
  --edge-filter: drop-shadow(0 0 4px currentColor);
  --edge-hover-stroke: #ff0080;    /* Hot pink on hover */
  --edge-dash: none;
  --edge-marker: url(#arrowhead);
  --edge-opacity: 0.9;
  
  /* Hover overlay - Light */
  --hover-overlay-bg: rgba(255, 255, 255, 0.85);
  --hover-overlay-color: #1976d2;
  --hover-text-blur: none;


    /* 3D Model / Slider tokens - Light (clean modern) */
  --model-width: 30vh;
  
  --slider-track-height: 6px;
  --slider-track-border: none;
  --slider-track-bg: #e0e0e0;
  
  --slider-thumb-size: 18px;
  --slider-thumb-bg: #1976d2;
  --slider-thumb-border: 2px solid #ffffff;
  --slider-thumb-radius: 50%;
  --slider-thumb-margin: -8px;


    /* Mode button tokens - Light (clean pill buttons with gradients) */
  --mode-bg: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 100px;
  --mode-height: 46px;
  --mode-width-disabled: 100px;
  --mode-height-disabled: 46px;
  --mode-padding: 12px 20px;
  --mode-border: 2px solid #e0e0e0;
  --mode-radius: 24px;
  --mode-font: "Roboto Mono";
  --mode-font-size: 14px;
  --mode-font-size-disabled: 14px;
  --mode-color: #333333;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.5);
  --mode-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);


    /* Toggle tokens - Light (minimalist switch) */
  --toggle-width: 80px;
  --toggle-height: 42px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #4caf50;        /* Green when ON */
  --toggle-off-bg: #e0e0e0;       /* Gray when OFF */
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 2px solid #d0d0d0;
  --toggle-radius: 24px;
  --toggle-text-display: flex;     /* Show GPU ON/OFF text */
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 600;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #999999;
}

/* Fonts */

@font-face {
font-family: "MS Sans Serif";
src: url("/pixel-sans-serif.woff") format("woff");
}

@font-face {
font-family: "MS Sans Serif-normal";
src: url("/ms-sans-serif-2.otf.woff2") format("woff");
}

.ascii {
  font-family: var(--tree-font);
  white-space: pre;
  color: var(--tree-text);
  font-size: var(--tree-font-size);
  display: flex;
  flex-direction: column;
  padding-top: 4px;
}

.tree-row {
  display: flex;
  position: relative;
  flex-direction: column;
  padding-left: var(--tree-padding-left);
}

.tree-row.selected .tree-branch {
  background-color: var(--tree-selection-bg);
  color: var(--tree-selection-text);
}

.tree-branch {
  display: flex;
  flex-direction: row;
  align-items: center;
  position: relative;
  padding: 2px 4px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.tree-branch:hover:not(.selected .tree-branch) {
  background-color: var(--hover-bg);
}

/* Horizontal connector line */

.tree-branch::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--tree-branch-offset));
  top: 50%;
  width: var(--tree-branch-offset);
  height: var(--tree-line-width);
  background: var(--tree-line-color);
  transform: translateY(-50%);
}

/* Dashed style for neon mode */

html[data-theme="neon"] .tree-branch::before {
  background: repeating-linear-gradient(
    to right,
    var(--tree-line-color),
    var(--tree-line-color) 2px,
    transparent 2px,
    transparent 4px
  );
}

.expand-icon {
  width: var(--tree-expand-size);
  height: var(--tree-expand-size);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: var(--tree-expand-border);
  background: var(--tree-expand-bg);
  font-size: var(--tree-expand-icon-size);
  margin-right: 5px;
  cursor: pointer;
  line-height: 1;
  user-select: none;
  position: relative;
  flex-shrink: 0;
  border-radius: var(--radius);
}

/* Connector after expand icon */

.expand-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  width: 9px;
  height: var(--tree-line-width);
  background: var(--tree-line-color);
  transform: translateY(-50%);
}

/* Dashed style for neon mode */

html[data-theme="neon"] .expand-icon::after {
  background: repeating-linear-gradient(
    to right,
    var(--tree-line-color),
    var(--tree-line-color) 2px,
    transparent 2px,
    transparent 4px
  );
}

.icon {
  width: var(--tree-icon-size);
  height: var(--tree-icon-size);
  margin-right: 6px;
  margin-left: 4px;
  flex-shrink: 0;
}

.label {
  margin-right: 8px;
  font-family: var(--tree-font);
}

/* Vertical line for tree structure */

.tree-row::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 8px;
  width: var(--tree-line-width);
  background: var(--tree-line-color);
}

/* Dashed vertical line for neon mode */

html[data-theme="neon"] .tree-row::before {
  border-left: var(--tree-line-width) dashed var(--tree-line-color);
  background: none;
}

/* Solid vertical line for light/dark modes */

html[data-theme="light"] .tree-row::before,
html[data-theme="dark"] .tree-row::before {
  border-left: var(--tree-line-width) solid var(--tree-line-color);
  background: none;
}

/* Cap the vertical line for last child */

.tree-row:last-child::before {
  height: 12px;
}.nf {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 12px;
  z-index: inherit;
}

.nf-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.nf-grid4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.nf-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  color: var(--text-muted);
}

.nf-input {
  background: var(--panel-darker);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px;
  outline: none;
}

.nf-input:focus {
  border-color: var(--accent);
}

.nf-inputError {
  border-color: #e53e3e !important;
}

.nf-inputError:focus {
  border-color: #e53e3e !important;
  box-shadow: 0 0 0 2px rgba(229, 62, 62, 0.2);
}

.nf-error {
  color: #e53e3e;
  font-size: 11px;
  line-height: 1.3;
  margin-top: -2px;
}

.nf-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--separator);
}

.nf-sectionHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: var(--text);
}

.nf-param {
  padding: 10px;
  background: var(--panel-darker);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.nf-actions {
  justify-content: center;
  margin-top: 10px;
}

.nf-btn {
  background: var(--button-bg);
  color: var(--button-text);
  border-top: var(--button-border-top);
  border-left: var(--button-border-left);
  border-right: var(--button-border-right);
  border-bottom: var(--button-border-bottom);
  padding: 6px 10px;
  cursor: pointer;
}

.nf-btn:hover {
  background: var(--hover-bg);
}

.nf-btnDanger {
  border-color: var(--border-light);
  color: var(--text);
}

/* Code editor wrapper */
.ce-wrap {
  border: 1px solid var(--border);
  background: var(--panel-darker);
  min-height: 160px;
  max-height: 300px;
  overflow-y: auto;
}

/* react-simple-code-editor renders a <textarea> and a <pre> */
.ce-textarea,
.ce-pre {
  font-family: var(--font-ui);
  font-size: 12px;
}

.ce-pre {
  margin: 0;
}

.nf-spinner {
  width: 14px;
  height: 14px;
  display: inline-block;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  animation: nf-spin 0.7s linear infinite;
  vertical-align: -2px;
}

@keyframes nf-spin {
  to {
    transform: rotate(360deg);
  }
}


:root {
  height: 100%;
  width: 100%;
  
  /* Dark theme is now DEFAULT */
  /* Base colors - Subtle dark gray palette */
  --bg: #2b2b2b;                    
  --logo-image: url("/logo-dark.png");
  --text: #b8b8b8;                  
  --text-muted: #808080;            
  --panel: #323232;                 
  --panel-darker: #252525;          
  --border: #4a4a4a;                
  --border-light: #555555;          
  
  --accent: #5f87af;                
  --accent-bright: #7ba3cc;         
  --accent-contrast: #ffffff;       
  
  --font-ui: "Roboto Mono", "SF Mono", "Consolas", "Monaco", "Courier New", monospace;
  --font-ui-normal: var(--font-ui);
  
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #323232;             
  --window-border-top: 1px solid #4a4a4a;     
  --window-border-left: 1px solid #4a4a4a;
  --window-border-right: 1px solid #4a4a4a;
  --window-border-bottom: 1px solid #4a4a4a;
  --window-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --window-radius: 0px;             
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  --title-bar-display: flex;
  --title-bar-bg: #2b2b2b;          
  --title-bar-color: #b8b8b8;       
  --title-bar-padding: 6px 10px;    
  --title-bar-font-weight: 400;     
  --title-bar-font-size: 11px;      
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: antialiased;
  --title-bar-font-smooth: auto;
  --title-bar-border-bottom: 1px solid #4a4a4a;  
  
  --close-btn-bg: transparent;
  --close-btn-color: #808080;       
  --close-btn-font-size: 12px;
  --close-btn-hover-bg: rgba(255, 255, 255, 0.08);
  --close-btn-hover-color: #b8b8b8;
  
  --window-body-padding: 12px;
  --window-body-font-size: 12px;
  --window-body-padding-right: 12px;
  
  --radius: 0px;                    
  --filter-blur: none;
  
  --selection-bg: #5f87af;          
  --selection-text: #ffffff;
  --hover-bg: rgba(95, 135, 175, 0.15);  
  --active-bg: rgba(95, 135, 175, 0.25);
  --separator: #4a4a4a;             
  
  --tab-bg: #2b2b2b;
  --tab-bg-active: #323232;
  --tab-border-top: 1px solid #4a4a4a;
  --tab-border-left: 1px solid #4a4a4a;
  --tab-border-right: 1px solid #4a4a4a;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #b8b8b8;
  --tab-font: "Roboto Mono";
  --tab-font-size: 12px;
  --tab-padding: 6px 14px;
  
  --panel-bg: #323232;
  --panel-border: 1px solid #4a4a4a;
  --panel-border-top: 1px solid #4a4a4a;
  --panel-border-left: 1px solid #4a4a4a;
  --panel-border-right: 1px solid #4a4a4a;
  --panel-border-bottom: 1px solid #4a4a4a;
  
  --button-bg: #3a3a3a;
  --button-text: #b8b8b8;
  --button-border-top: 1px solid #4a4a4a;
  --button-border-left: 1px solid #4a4a4a;
  --button-border-bottom: 1px solid #4a4a4a;
  --button-border-right: 1px solid #4a4a4a;
  --button-shadow: none;
  --button-radius: 0px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #4a4a4a;
  --scrollbar-track: #2b2b2b;

  --tree-font: var(--font-ui);       
  --tree-font-size: 12px;
  --tree-text: #b8b8b8;
  --tree-line-color: #4a4a4a;        
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: transparent;
  --tree-expand-border: 1px solid #4a4a4a;
  --tree-expand-size: 11px;
  --tree-expand-icon-size: 11px;
  
  --tree-selection-bg: #5f87af;      
  --tree-selection-text: #ffffff;
  
  --tree-icon-size: 14px;
  --tree-padding-left: 16px;
  --tree-branch-offset: 10px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 1px solid #4a4a4a;
  --node-bg: rgba(35, 35, 35, 0.6);
  --node-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --node-corner-lines: block;      
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  --edge-stroke: #4a4a4a;          
  --edge-width: 1.5;
  --edge-filter: none;
  --edge-hover-stroke: #00ff88;    
  --edge-dash: 5,5;
  --edge-marker: url(#arrowhead-dark);
  --edge-opacity: 0.8;
  
  --hover-overlay-bg: rgba(95, 135, 175, 0.25);
  --hover-overlay-color: #ffffff;
  --hover-text-blur: none;

  --model-width: 30vh;
  
  --slider-track-height: 2px;
  --slider-track-border: none;
  --slider-track-bg: #4a4a4a;
  
  --slider-thumb-size: 12px;
  --slider-thumb-bg: #5f87af;
  --slider-thumb-border: 1px solid #4a4a4a;
  --slider-thumb-radius: 2px;
  --slider-thumb-margin: -6px;

  --mode-bg: rgba(42, 42, 42, 0.8);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 80px;
  --mode-height: 36px;
  --mode-width-disabled: 80px;
  --mode-height-disabled: 36px;
  --mode-padding: 8px 12px;
  --mode-border: 1px solid #4a4a4a;
  --mode-radius: 0px;
  --mode-font: var(--font-ui);
  --mode-font-size: 11px;
  --mode-font-size-disabled: 11px;
  --mode-color: #b8b8b8;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.4);
  --mode-box-shadow: none;

  --toggle-width: 80px;
  --toggle-height: 40px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #5f87af;        
  --toggle-off-bg: #2a2a2a;       
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 1px solid #4a4a4a;
  --toggle-radius: 4px;
  --toggle-text-display: flex;     
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 500;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #808080;

  
}

/* Neon theme (moved from default) */

html[data-theme="neon"] {
  --bg: #39FF14;
  --text: #0b0c0f;
  --panel: #ffffff;
  --border: #000000;
  --accent: #39FF14;
  --logo-image: url("/logo2.png");

  --font-ui: "MS Sans Serif", system-ui, sans-serif;

  --window-width: 310px;
  --window-height: 700px;
  --window-bg: white;
  --window-border-top: 2px solid #fff;
  --window-border-left: 2px solid #fff;
  --window-border-right: 2px solid #666;
  --window-border-bottom: 2px solid #666;
  --window-box-shadow: inset -1px -1px 0 #999, inset 1px 1px 0 #ccc;
  --window-radius: 0px;
  --window-margin: 20px;
  --window-margin-right: 100px;
  
  --title-bar-display: flex;
  --title-bar-bg: #000082;
  --title-bar-color: white;
  --title-bar-padding: 4px 8px;
  --title-bar-font-weight: bold;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: pixelated;
  --title-bar-font-smoothing: none;
  --title-bar-font-smooth: never;
  
  --close-btn-bg: transparent;
  --close-btn-color: white;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(255,255,255,0.2);
  
  --window-body-padding: 10px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 17px;
  
  --radius: 0px;
  --filter-blur: blur(4px);

  --tab-bg: #c0c0c0;
  --tab-bg-active: #c0c0c0;
  --tab-border-top: 2px solid #fff;
  --tab-border-left: 2px solid #fff;
  --tab-border-right: 2px solid #808080;
  --tab-border-bottom: 1px solid #fff;
  --tab-text: black;
  --tab-font: var(--font-ui-normal);
  --tab-font-size: 12px;
  --tab-padding: 4px 8px;
  
  --panel-bg: #fff;
  --panel-border: 2px solid #808080;
  --panel-border-top: 2px solid #808080;
  --panel-border-left: 2px solid #808080;
  --panel-border-right: 2px solid #808080;
  --panel-border-bottom: 2px solid #808080;
  
  --button-bg: linear-gradient(#dcdcdc, #c0c0c0);
  --button-text: #000000;
  --button-border-top: 2px solid #ffffff;
  --button-border-left: 2px solid #ffffff;
  --button-border-bottom: 2px solid #808080;
  --button-border-right: 2px solid #808080;
  --button-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  --button-radius: 2px;
  
  --scrollbar-width: 12px;
  --scrollbar-thumb: #bfbfbf;
  --scrollbar-track: #f1f1f1;

  --tree-font: "Courier New", monospace;
  --tree-font-size: 14px;
  --tree-text: black;
  --tree-line-color: #999;
  --tree-line-style: dashed;
  --tree-line-width: 1px;
  
  --tree-expand-bg: white;
  --tree-expand-border: 1px solid black;
  --tree-expand-size: 13px;
  --tree-expand-icon-size: 14px;
  
  --tree-selection-bg: #0060df;      
  --tree-selection-text: white;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 20px;
  --tree-branch-offset: 12px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: url("/static.png");
  --node-frame-overlay: url("/monitor.png");
  --node-frame-display: block;
  --node-border: none;
  --node-bg: transparent;
  --node-box-shadow: none;
  --node-corner-lines: none;
  
  --image-width: 225px;
  --image-height: 225px;
  --image-fit: fill;
  
  --edge-stroke: black;
  --edge-width: 4;
  --edge-filter: url(#blurFilter);
  --edge-hover-stroke: red;
  --edge-dash: none;
  --edge-marker: none;
  --edge-opacity: 1;
  
  --hover-overlay-bg: rgba(0, 0, 0, 0.6);
  --hover-overlay-color: white;
  --hover-text-blur: url(#text-blur);

  --model-width: 30vh;
  
  --slider-track-height: 4px;
  --slider-track-border: 2px dashed #333;
  --slider-track-bg: transparent;
  
  --slider-thumb-size: 16px;
  --slider-thumb-bg: #000000;
  --slider-thumb-border: none;
  --slider-thumb-radius: 0px;
  --slider-thumb-margin: -9px;

  --mode-bg: url("/key.png");
  --mode-bg-size: cover;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 85px;
  --mode-height: 85px;
  --mode-width-disabled: 90px;
  --mode-height-disabled: 90px;
  --mode-padding: 10px;
  --mode-border: none;
  --mode-radius: 15px;
  --mode-font: "Arial Narrow", Arial, sans-serif;
  --mode-font-size: 24px;
  --mode-font-size-disabled: 28px;
  --mode-color: #111;
  --mode-text-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
  --mode-filter: brightness(95%);
  --mode-filter-disabled: blur(1px);
  --mode-box-shadow: none;

  --toggle-width: 121px;
  --toggle-height: 160px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: url("/toggle-on.png");
  --toggle-off-bg: url("/toggle-off.png");
  --toggle-bg-size: cover;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: none;
  --toggle-radius: 0px;
  --toggle-text-display: none;
  --toggle-padding: 0;
}

html[data-theme="light"] {
  --bg: #fcfefc;
  --logo-image: url("/logo2.png");
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #ffffff;
  --window-border-top: 1px solid #e3e3e7;
  --window-border-left: 1px solid #e3e3e7;
  --window-border-right: 1px solid #e3e3e7;
  --window-border-bottom: 1px solid #e3e3e7;
  --window-box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  --window-radius: 12px;
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  /* Title bar tokens - Light has clean title bar */
  --title-bar-display: flex;
  --title-bar-bg: #f8f9fa;
  --title-bar-color: #0b0c0f;
  --title-bar-padding: 12px 16px;
  --title-bar-font-weight: 600;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: auto;
  --title-bar-font-smooth: auto;
  
  /* Close button tokens */
  --close-btn-bg: transparent;
  --close-btn-color: #5f6368;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(0,0,0,0.05);
  
  /* Window body tokens */
  --window-body-padding: 20px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 20px;
  
  /* General effects */
  --radius: 12px;
  --filter-blur: none;


  --tab-bg: #f0f0f0;
  --tab-bg-active: #ffffff;
  --tab-border-top: 1px solid #e0e0e0;
  --tab-border-left: 1px solid #e0e0e0;
  --tab-border-right: 1px solid #e0e0e0;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #333333;
  --tab-font: "Roboto Mono";
  --tab-font-size: 13px;
  --tab-padding: 4px;
  
  /* Panel/Button tokens - Light */
  --panel-bg: #ffffff;
  --panel-border: 1px solid #e0e0e0;
  --panel-border-top: 1px solid #e0e0e0;
  --panel-border-left: 1px solid #e0e0e0;
  --panel-border-right: 1px solid #e0e0e0;
  --panel-border-bottom: 1px solid #e0e0e0;
  
  --button-bg: #f5f5f5;
  --button-text: #333333;
  --button-border-top: 1px solid #d0d0d0;
  --button-border-left: 1px solid #d0d0d0;
  --button-border-bottom: 1px solid #d0d0d0;
  --button-border-right: 1px solid #d0d0d0;
  --button-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --button-radius: 4px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #c0c0c0;
  --scrollbar-track: #f5f5f5;
  /*Ascii*/
  --tree-font: "Roboto Mono";
  --tree-font-size: 13px;
  --tree-text: #333333;
  --tree-line-color: #d0d0d0;
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: #f5f5f5;
  --tree-expand-border: 1px solid #d0d0d0;
  --tree-expand-size: 12px;
  --tree-expand-icon-size: 12px;
  
  --tree-selection-bg: #e3f2fd;     /* Light blue */
  --tree-selection-text: #1976d2;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 18px;
  --tree-branch-offset: 10px;


    /* Node Editor tokens - Light (AI detection boxes with neon colors) */
  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 3px solid;
  --node-bg: transparent;
  --node-box-shadow: 0 0 15px currentColor, inset 0 0 10px rgba(255,255,255,0.1);
  --node-corner-lines: block;      /* Show corner brackets */
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  /* Edge tokens - Light (thin neon pink/green) */
  --edge-stroke: #00ff88;          /* Neon green default */
  --edge-width: 2;
  --edge-filter: drop-shadow(0 0 4px currentColor);
  --edge-hover-stroke: #ff0080;    /* Hot pink on hover */
  --edge-dash: none;
  --edge-marker: url(#arrowhead);
  --edge-opacity: 0.9;
  
  /* Hover overlay - Light */
  --hover-overlay-bg: rgba(255, 255, 255, 0.85);
  --hover-overlay-color: #1976d2;
  --hover-text-blur: none;


    /* 3D Model / Slider tokens - Light (clean modern) */
  --model-width: 30vh;
  
  --slider-track-height: 6px;
  --slider-track-border: none;
  --slider-track-bg: #e0e0e0;
  
  --slider-thumb-size: 18px;
  --slider-thumb-bg: #1976d2;
  --slider-thumb-border: 2px solid #ffffff;
  --slider-thumb-radius: 50%;
  --slider-thumb-margin: -8px;


    /* Mode button tokens - Light (clean pill buttons with gradients) */
  --mode-bg: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 100px;
  --mode-height: 46px;
  --mode-width-disabled: 100px;
  --mode-height-disabled: 46px;
  --mode-padding: 12px 20px;
  --mode-border: 2px solid #e0e0e0;
  --mode-radius: 24px;
  --mode-font: "Roboto Mono";
  --mode-font-size: 14px;
  --mode-font-size-disabled: 14px;
  --mode-color: #333333;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.5);
  --mode-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);


    /* Toggle tokens - Light (minimalist switch) */
  --toggle-width: 80px;
  --toggle-height: 42px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #4caf50;        /* Green when ON */
  --toggle-off-bg: #e0e0e0;       /* Gray when OFF */
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 2px solid #d0d0d0;
  --toggle-radius: 24px;
  --toggle-text-display: flex;     /* Show GPU ON/OFF text */
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 600;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #999999;
}

/* Fonts */

@font-face {
font-family: "MS Sans Serif";
src: url("/pixel-sans-serif.woff") format("woff");
}

@font-face {
font-family: "MS Sans Serif-normal";
src: url("/ms-sans-serif-2.otf.woff2") format("woff");
}

.model {
  width: var(--model-width);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.model input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
  cursor: pointer;
}

/* Track (WebKit) */

.model input[type="range"]::-webkit-slider-runnable-track {
  height: var(--slider-track-height);
  border-top: var(--slider-track-border);
  background: var(--slider-track-bg);
  border-radius: var(--radius);
}

/* Track (Firefox) */

.model input[type="range"]::-moz-range-track {
  height: var(--slider-track-height);
  border-top: var(--slider-track-border);
  background: var(--slider-track-bg);
  border-radius: var(--radius);
}

/* Thumb (WebKit) */

.model input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: var(--slider-thumb-size);
  width: var(--slider-thumb-size);
  background: var(--slider-thumb-bg);
  border: var(--slider-thumb-border);
  border-radius: var(--slider-thumb-radius);
  cursor: pointer;
  margin-top: var(--slider-thumb-margin);
  transition: all 0.15s ease;
}

/* Thumb (Firefox) */

.model input[type="range"]::-moz-range-thumb {
  height: var(--slider-thumb-size);
  width: var(--slider-thumb-size);
  background: var(--slider-thumb-bg);
  border: var(--slider-thumb-border);
  border-radius: var(--slider-thumb-radius);
  cursor: pointer;
  transition: all 0.15s ease;
}

/* Hover states */

.model input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.model input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.1);
}

/* Active states */

.model input[type="range"]::-webkit-slider-thumb:active {
  transform: scale(0.95);
}

.model input[type="range"]::-moz-range-thumb:active {
  transform: scale(0.95);
}

/* Light theme: glow effect on thumb */

html[data-theme="light"] .model input[type="range"]::-webkit-slider-thumb {
  box-shadow: 0 0 8px rgba(25, 118, 210, 0.6);
}

html[data-theme="light"] .model input[type="range"]::-moz-range-thumb {
  box-shadow: 0 0 8px rgba(25, 118, 210, 0.6);
}

/* Dark theme: accent glow on hover */

html[data-theme="dark"] .model input[type="range"]::-webkit-slider-thumb:hover {
  box-shadow: 0 0 6px var(--accent);
}

html[data-theme="dark"] .model input[type="range"]::-moz-range-thumb:hover {
  box-shadow: 0 0 6px var(--accent);
}.slider {
  display: flex;
  flex-direction: row;
}

.slider input {
  margin: 15px;
}/**
 * prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML
 * Based on https://github.com/chriskempson/tomorrow-theme
 * @author Rose Pritchard
 */

code[class*="language-"],
pre[class*="language-"] {
	color: #ccc;
	background: none;
	font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
	font-size: 1em;
	text-align: left;
	white-space: pre;
	word-spacing: normal;
	word-break: normal;
	word-wrap: normal;
	line-height: 1.5;

	-moz-tab-size: 4;
	-o-tab-size: 4;
	tab-size: 4;

	-webkit-hyphens: none;
	-moz-hyphens: none;
	-ms-hyphens: none;
	hyphens: none;

}

/* Code blocks */
pre[class*="language-"] {
	padding: 1em;
	margin: .5em 0;
	overflow: auto;
}

:not(pre) > code[class*="language-"],
pre[class*="language-"] {
	background: #2d2d2d;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
	padding: .1em;
	border-radius: .3em;
	white-space: normal;
}

.token.comment,
.token.block-comment,
.token.prolog,
.token.doctype,
.token.cdata {
	color: #999;
}

.token.punctuation {
	color: #ccc;
}

.token.tag,
.token.attr-name,
.token.namespace,
.token.deleted {
	color: #e2777a;
}

.token.function-name {
	color: #6196cc;
}

.token.boolean,
.token.number,
.token.function {
	color: #f08d49;
}

.token.property,
.token.class-name,
.token.constant,
.token.symbol {
	color: #f8c555;
}

.token.selector,
.token.important,
.token.atrule,
.token.keyword,
.token.builtin {
	color: #cc99cd;
}

.token.string,
.token.char,
.token.attr-value,
.token.regex,
.token.variable {
	color: #7ec699;
}

.token.operator,
.token.entity,
.token.url {
	color: #67cdcc;
}

.token.important,
.token.bold {
	font-weight: bold;
}
.token.italic {
	font-style: italic;
}

.token.entity {
	cursor: help;
}

.token.inserted {
	color: green;
}


:root {
  height: 100%;
  width: 100%;
  
  /* Dark theme is now DEFAULT */
  /* Base colors - Subtle dark gray palette */
  --bg: #2b2b2b;                    
  --logo-image: url("/logo-dark.png");
  --text: #b8b8b8;                  
  --text-muted: #808080;            
  --panel: #323232;                 
  --panel-darker: #252525;          
  --border: #4a4a4a;                
  --border-light: #555555;          
  
  --accent: #5f87af;                
  --accent-bright: #7ba3cc;         
  --accent-contrast: #ffffff;       
  
  --font-ui: "Roboto Mono", "SF Mono", "Consolas", "Monaco", "Courier New", monospace;
  --font-ui-normal: var(--font-ui);
  
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #323232;             
  --window-border-top: 1px solid #4a4a4a;     
  --window-border-left: 1px solid #4a4a4a;
  --window-border-right: 1px solid #4a4a4a;
  --window-border-bottom: 1px solid #4a4a4a;
  --window-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --window-radius: 0px;             
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  --title-bar-display: flex;
  --title-bar-bg: #2b2b2b;          
  --title-bar-color: #b8b8b8;       
  --title-bar-padding: 6px 10px;    
  --title-bar-font-weight: 400;     
  --title-bar-font-size: 11px;      
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: antialiased;
  --title-bar-font-smooth: auto;
  --title-bar-border-bottom: 1px solid #4a4a4a;  
  
  --close-btn-bg: transparent;
  --close-btn-color: #808080;       
  --close-btn-font-size: 12px;
  --close-btn-hover-bg: rgba(255, 255, 255, 0.08);
  --close-btn-hover-color: #b8b8b8;
  
  --window-body-padding: 12px;
  --window-body-font-size: 12px;
  --window-body-padding-right: 12px;
  
  --radius: 0px;                    
  --filter-blur: none;
  
  --selection-bg: #5f87af;          
  --selection-text: #ffffff;
  --hover-bg: rgba(95, 135, 175, 0.15);  
  --active-bg: rgba(95, 135, 175, 0.25);
  --separator: #4a4a4a;             
  
  --tab-bg: #2b2b2b;
  --tab-bg-active: #323232;
  --tab-border-top: 1px solid #4a4a4a;
  --tab-border-left: 1px solid #4a4a4a;
  --tab-border-right: 1px solid #4a4a4a;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #b8b8b8;
  --tab-font: "Roboto Mono";
  --tab-font-size: 12px;
  --tab-padding: 6px 14px;
  
  --panel-bg: #323232;
  --panel-border: 1px solid #4a4a4a;
  --panel-border-top: 1px solid #4a4a4a;
  --panel-border-left: 1px solid #4a4a4a;
  --panel-border-right: 1px solid #4a4a4a;
  --panel-border-bottom: 1px solid #4a4a4a;
  
  --button-bg: #3a3a3a;
  --button-text: #b8b8b8;
  --button-border-top: 1px solid #4a4a4a;
  --button-border-left: 1px solid #4a4a4a;
  --button-border-bottom: 1px solid #4a4a4a;
  --button-border-right: 1px solid #4a4a4a;
  --button-shadow: none;
  --button-radius: 0px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #4a4a4a;
  --scrollbar-track: #2b2b2b;

  --tree-font: var(--font-ui);       
  --tree-font-size: 12px;
  --tree-text: #b8b8b8;
  --tree-line-color: #4a4a4a;        
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: transparent;
  --tree-expand-border: 1px solid #4a4a4a;
  --tree-expand-size: 11px;
  --tree-expand-icon-size: 11px;
  
  --tree-selection-bg: #5f87af;      
  --tree-selection-text: #ffffff;
  
  --tree-icon-size: 14px;
  --tree-padding-left: 16px;
  --tree-branch-offset: 10px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 1px solid #4a4a4a;
  --node-bg: rgba(35, 35, 35, 0.6);
  --node-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --node-corner-lines: block;      
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  --edge-stroke: #4a4a4a;          
  --edge-width: 1.5;
  --edge-filter: none;
  --edge-hover-stroke: #00ff88;    
  --edge-dash: 5,5;
  --edge-marker: url(#arrowhead-dark);
  --edge-opacity: 0.8;
  
  --hover-overlay-bg: rgba(95, 135, 175, 0.25);
  --hover-overlay-color: #ffffff;
  --hover-text-blur: none;

  --model-width: 30vh;
  
  --slider-track-height: 2px;
  --slider-track-border: none;
  --slider-track-bg: #4a4a4a;
  
  --slider-thumb-size: 12px;
  --slider-thumb-bg: #5f87af;
  --slider-thumb-border: 1px solid #4a4a4a;
  --slider-thumb-radius: 2px;
  --slider-thumb-margin: -6px;

  --mode-bg: rgba(42, 42, 42, 0.8);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 80px;
  --mode-height: 36px;
  --mode-width-disabled: 80px;
  --mode-height-disabled: 36px;
  --mode-padding: 8px 12px;
  --mode-border: 1px solid #4a4a4a;
  --mode-radius: 0px;
  --mode-font: var(--font-ui);
  --mode-font-size: 11px;
  --mode-font-size-disabled: 11px;
  --mode-color: #b8b8b8;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.4);
  --mode-box-shadow: none;

  --toggle-width: 80px;
  --toggle-height: 40px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #5f87af;        
  --toggle-off-bg: #2a2a2a;       
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 1px solid #4a4a4a;
  --toggle-radius: 4px;
  --toggle-text-display: flex;     
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 500;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #808080;

  
}

/* Neon theme (moved from default) */

html[data-theme="neon"] {
  --bg: #39FF14;
  --text: #0b0c0f;
  --panel: #ffffff;
  --border: #000000;
  --accent: #39FF14;
  --logo-image: url("/logo2.png");

  --font-ui: "MS Sans Serif", system-ui, sans-serif;

  --window-width: 310px;
  --window-height: 700px;
  --window-bg: white;
  --window-border-top: 2px solid #fff;
  --window-border-left: 2px solid #fff;
  --window-border-right: 2px solid #666;
  --window-border-bottom: 2px solid #666;
  --window-box-shadow: inset -1px -1px 0 #999, inset 1px 1px 0 #ccc;
  --window-radius: 0px;
  --window-margin: 20px;
  --window-margin-right: 100px;
  
  --title-bar-display: flex;
  --title-bar-bg: #000082;
  --title-bar-color: white;
  --title-bar-padding: 4px 8px;
  --title-bar-font-weight: bold;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: pixelated;
  --title-bar-font-smoothing: none;
  --title-bar-font-smooth: never;
  
  --close-btn-bg: transparent;
  --close-btn-color: white;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(255,255,255,0.2);
  
  --window-body-padding: 10px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 17px;
  
  --radius: 0px;
  --filter-blur: blur(4px);

  --tab-bg: #c0c0c0;
  --tab-bg-active: #c0c0c0;
  --tab-border-top: 2px solid #fff;
  --tab-border-left: 2px solid #fff;
  --tab-border-right: 2px solid #808080;
  --tab-border-bottom: 1px solid #fff;
  --tab-text: black;
  --tab-font: var(--font-ui-normal);
  --tab-font-size: 12px;
  --tab-padding: 4px 8px;
  
  --panel-bg: #fff;
  --panel-border: 2px solid #808080;
  --panel-border-top: 2px solid #808080;
  --panel-border-left: 2px solid #808080;
  --panel-border-right: 2px solid #808080;
  --panel-border-bottom: 2px solid #808080;
  
  --button-bg: linear-gradient(#dcdcdc, #c0c0c0);
  --button-text: #000000;
  --button-border-top: 2px solid #ffffff;
  --button-border-left: 2px solid #ffffff;
  --button-border-bottom: 2px solid #808080;
  --button-border-right: 2px solid #808080;
  --button-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  --button-radius: 2px;
  
  --scrollbar-width: 12px;
  --scrollbar-thumb: #bfbfbf;
  --scrollbar-track: #f1f1f1;

  --tree-font: "Courier New", monospace;
  --tree-font-size: 14px;
  --tree-text: black;
  --tree-line-color: #999;
  --tree-line-style: dashed;
  --tree-line-width: 1px;
  
  --tree-expand-bg: white;
  --tree-expand-border: 1px solid black;
  --tree-expand-size: 13px;
  --tree-expand-icon-size: 14px;
  
  --tree-selection-bg: #0060df;      
  --tree-selection-text: white;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 20px;
  --tree-branch-offset: 12px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: url("/static.png");
  --node-frame-overlay: url("/monitor.png");
  --node-frame-display: block;
  --node-border: none;
  --node-bg: transparent;
  --node-box-shadow: none;
  --node-corner-lines: none;
  
  --image-width: 225px;
  --image-height: 225px;
  --image-fit: fill;
  
  --edge-stroke: black;
  --edge-width: 4;
  --edge-filter: url(#blurFilter);
  --edge-hover-stroke: red;
  --edge-dash: none;
  --edge-marker: none;
  --edge-opacity: 1;
  
  --hover-overlay-bg: rgba(0, 0, 0, 0.6);
  --hover-overlay-color: white;
  --hover-text-blur: url(#text-blur);

  --model-width: 30vh;
  
  --slider-track-height: 4px;
  --slider-track-border: 2px dashed #333;
  --slider-track-bg: transparent;
  
  --slider-thumb-size: 16px;
  --slider-thumb-bg: #000000;
  --slider-thumb-border: none;
  --slider-thumb-radius: 0px;
  --slider-thumb-margin: -9px;

  --mode-bg: url("/key.png");
  --mode-bg-size: cover;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 85px;
  --mode-height: 85px;
  --mode-width-disabled: 90px;
  --mode-height-disabled: 90px;
  --mode-padding: 10px;
  --mode-border: none;
  --mode-radius: 15px;
  --mode-font: "Arial Narrow", Arial, sans-serif;
  --mode-font-size: 24px;
  --mode-font-size-disabled: 28px;
  --mode-color: #111;
  --mode-text-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
  --mode-filter: brightness(95%);
  --mode-filter-disabled: blur(1px);
  --mode-box-shadow: none;

  --toggle-width: 121px;
  --toggle-height: 160px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: url("/toggle-on.png");
  --toggle-off-bg: url("/toggle-off.png");
  --toggle-bg-size: cover;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: none;
  --toggle-radius: 0px;
  --toggle-text-display: none;
  --toggle-padding: 0;
}

html[data-theme="light"] {
  --bg: #fcfefc;
  --logo-image: url("/logo2.png");
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #ffffff;
  --window-border-top: 1px solid #e3e3e7;
  --window-border-left: 1px solid #e3e3e7;
  --window-border-right: 1px solid #e3e3e7;
  --window-border-bottom: 1px solid #e3e3e7;
  --window-box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  --window-radius: 12px;
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  /* Title bar tokens - Light has clean title bar */
  --title-bar-display: flex;
  --title-bar-bg: #f8f9fa;
  --title-bar-color: #0b0c0f;
  --title-bar-padding: 12px 16px;
  --title-bar-font-weight: 600;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: auto;
  --title-bar-font-smooth: auto;
  
  /* Close button tokens */
  --close-btn-bg: transparent;
  --close-btn-color: #5f6368;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(0,0,0,0.05);
  
  /* Window body tokens */
  --window-body-padding: 20px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 20px;
  
  /* General effects */
  --radius: 12px;
  --filter-blur: none;


  --tab-bg: #f0f0f0;
  --tab-bg-active: #ffffff;
  --tab-border-top: 1px solid #e0e0e0;
  --tab-border-left: 1px solid #e0e0e0;
  --tab-border-right: 1px solid #e0e0e0;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #333333;
  --tab-font: "Roboto Mono";
  --tab-font-size: 13px;
  --tab-padding: 4px;
  
  /* Panel/Button tokens - Light */
  --panel-bg: #ffffff;
  --panel-border: 1px solid #e0e0e0;
  --panel-border-top: 1px solid #e0e0e0;
  --panel-border-left: 1px solid #e0e0e0;
  --panel-border-right: 1px solid #e0e0e0;
  --panel-border-bottom: 1px solid #e0e0e0;
  
  --button-bg: #f5f5f5;
  --button-text: #333333;
  --button-border-top: 1px solid #d0d0d0;
  --button-border-left: 1px solid #d0d0d0;
  --button-border-bottom: 1px solid #d0d0d0;
  --button-border-right: 1px solid #d0d0d0;
  --button-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --button-radius: 4px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #c0c0c0;
  --scrollbar-track: #f5f5f5;
  /*Ascii*/
  --tree-font: "Roboto Mono";
  --tree-font-size: 13px;
  --tree-text: #333333;
  --tree-line-color: #d0d0d0;
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: #f5f5f5;
  --tree-expand-border: 1px solid #d0d0d0;
  --tree-expand-size: 12px;
  --tree-expand-icon-size: 12px;
  
  --tree-selection-bg: #e3f2fd;     /* Light blue */
  --tree-selection-text: #1976d2;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 18px;
  --tree-branch-offset: 10px;


    /* Node Editor tokens - Light (AI detection boxes with neon colors) */
  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 3px solid;
  --node-bg: transparent;
  --node-box-shadow: 0 0 15px currentColor, inset 0 0 10px rgba(255,255,255,0.1);
  --node-corner-lines: block;      /* Show corner brackets */
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  /* Edge tokens - Light (thin neon pink/green) */
  --edge-stroke: #00ff88;          /* Neon green default */
  --edge-width: 2;
  --edge-filter: drop-shadow(0 0 4px currentColor);
  --edge-hover-stroke: #ff0080;    /* Hot pink on hover */
  --edge-dash: none;
  --edge-marker: url(#arrowhead);
  --edge-opacity: 0.9;
  
  /* Hover overlay - Light */
  --hover-overlay-bg: rgba(255, 255, 255, 0.85);
  --hover-overlay-color: #1976d2;
  --hover-text-blur: none;


    /* 3D Model / Slider tokens - Light (clean modern) */
  --model-width: 30vh;
  
  --slider-track-height: 6px;
  --slider-track-border: none;
  --slider-track-bg: #e0e0e0;
  
  --slider-thumb-size: 18px;
  --slider-thumb-bg: #1976d2;
  --slider-thumb-border: 2px solid #ffffff;
  --slider-thumb-radius: 50%;
  --slider-thumb-margin: -8px;


    /* Mode button tokens - Light (clean pill buttons with gradients) */
  --mode-bg: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 100px;
  --mode-height: 46px;
  --mode-width-disabled: 100px;
  --mode-height-disabled: 46px;
  --mode-padding: 12px 20px;
  --mode-border: 2px solid #e0e0e0;
  --mode-radius: 24px;
  --mode-font: "Roboto Mono";
  --mode-font-size: 14px;
  --mode-font-size-disabled: 14px;
  --mode-color: #333333;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.5);
  --mode-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);


    /* Toggle tokens - Light (minimalist switch) */
  --toggle-width: 80px;
  --toggle-height: 42px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #4caf50;        /* Green when ON */
  --toggle-off-bg: #e0e0e0;       /* Gray when OFF */
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 2px solid #d0d0d0;
  --toggle-radius: 24px;
  --toggle-text-display: flex;     /* Show GPU ON/OFF text */
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 600;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #999999;
}

/* Fonts */

@font-face {
font-family: "MS Sans Serif";
src: url("/pixel-sans-serif.woff") format("woff");
}

@font-face {
font-family: "MS Sans Serif-normal";
src: url("/ms-sans-serif-2.otf.woff2") format("woff");
}

.code-viewer {
  overflow: auto;
  max-height: 500px;
  width: 100%;
  min-width: 0;
  background: var(--window-bg);
  border-top: var(--window-border-top);
  border-left: var(--window-border-left);
  border-right: var(--window-border-right);
  border-bottom: var(--window-border-bottom);
  box-shadow: var(--window-box-shadow);
  border-radius: var(--window-radius);
  z-index: 10001;
}

.codePre{
  margin: 0;
  padding: 12px;
  white-space: pre-wrap; 
}

.code-col{
  flex: 0 0 clamp(320px, 38vw, 520px);  
  min-width: 0;
  overflow: hidden;
  z-index: 9999;
}

:root {
  height: 100%;
  width: 100%;
  
  /* Dark theme is now DEFAULT */
  /* Base colors - Subtle dark gray palette */
  --bg: #2b2b2b;                    
  --logo-image: url("/logo-dark.png");
  --text: #b8b8b8;                  
  --text-muted: #808080;            
  --panel: #323232;                 
  --panel-darker: #252525;          
  --border: #4a4a4a;                
  --border-light: #555555;          
  
  --accent: #5f87af;                
  --accent-bright: #7ba3cc;         
  --accent-contrast: #ffffff;       
  
  --font-ui: "Roboto Mono", "SF Mono", "Consolas", "Monaco", "Courier New", monospace;
  --font-ui-normal: var(--font-ui);
  
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #323232;             
  --window-border-top: 1px solid #4a4a4a;     
  --window-border-left: 1px solid #4a4a4a;
  --window-border-right: 1px solid #4a4a4a;
  --window-border-bottom: 1px solid #4a4a4a;
  --window-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --window-radius: 0px;             
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  --title-bar-display: flex;
  --title-bar-bg: #2b2b2b;          
  --title-bar-color: #b8b8b8;       
  --title-bar-padding: 6px 10px;    
  --title-bar-font-weight: 400;     
  --title-bar-font-size: 11px;      
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: antialiased;
  --title-bar-font-smooth: auto;
  --title-bar-border-bottom: 1px solid #4a4a4a;  
  
  --close-btn-bg: transparent;
  --close-btn-color: #808080;       
  --close-btn-font-size: 12px;
  --close-btn-hover-bg: rgba(255, 255, 255, 0.08);
  --close-btn-hover-color: #b8b8b8;
  
  --window-body-padding: 12px;
  --window-body-font-size: 12px;
  --window-body-padding-right: 12px;
  
  --radius: 0px;                    
  --filter-blur: none;
  
  --selection-bg: #5f87af;          
  --selection-text: #ffffff;
  --hover-bg: rgba(95, 135, 175, 0.15);  
  --active-bg: rgba(95, 135, 175, 0.25);
  --separator: #4a4a4a;             
  
  --tab-bg: #2b2b2b;
  --tab-bg-active: #323232;
  --tab-border-top: 1px solid #4a4a4a;
  --tab-border-left: 1px solid #4a4a4a;
  --tab-border-right: 1px solid #4a4a4a;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #b8b8b8;
  --tab-font: "Roboto Mono";
  --tab-font-size: 12px;
  --tab-padding: 6px 14px;
  
  --panel-bg: #323232;
  --panel-border: 1px solid #4a4a4a;
  --panel-border-top: 1px solid #4a4a4a;
  --panel-border-left: 1px solid #4a4a4a;
  --panel-border-right: 1px solid #4a4a4a;
  --panel-border-bottom: 1px solid #4a4a4a;
  
  --button-bg: #3a3a3a;
  --button-text: #b8b8b8;
  --button-border-top: 1px solid #4a4a4a;
  --button-border-left: 1px solid #4a4a4a;
  --button-border-bottom: 1px solid #4a4a4a;
  --button-border-right: 1px solid #4a4a4a;
  --button-shadow: none;
  --button-radius: 0px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #4a4a4a;
  --scrollbar-track: #2b2b2b;

  --tree-font: var(--font-ui);       
  --tree-font-size: 12px;
  --tree-text: #b8b8b8;
  --tree-line-color: #4a4a4a;        
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: transparent;
  --tree-expand-border: 1px solid #4a4a4a;
  --tree-expand-size: 11px;
  --tree-expand-icon-size: 11px;
  
  --tree-selection-bg: #5f87af;      
  --tree-selection-text: #ffffff;
  
  --tree-icon-size: 14px;
  --tree-padding-left: 16px;
  --tree-branch-offset: 10px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 1px solid #4a4a4a;
  --node-bg: rgba(35, 35, 35, 0.6);
  --node-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --node-corner-lines: block;      
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  --edge-stroke: #4a4a4a;          
  --edge-width: 1.5;
  --edge-filter: none;
  --edge-hover-stroke: #00ff88;    
  --edge-dash: 5,5;
  --edge-marker: url(#arrowhead-dark);
  --edge-opacity: 0.8;
  
  --hover-overlay-bg: rgba(95, 135, 175, 0.25);
  --hover-overlay-color: #ffffff;
  --hover-text-blur: none;

  --model-width: 30vh;
  
  --slider-track-height: 2px;
  --slider-track-border: none;
  --slider-track-bg: #4a4a4a;
  
  --slider-thumb-size: 12px;
  --slider-thumb-bg: #5f87af;
  --slider-thumb-border: 1px solid #4a4a4a;
  --slider-thumb-radius: 2px;
  --slider-thumb-margin: -6px;

  --mode-bg: rgba(42, 42, 42, 0.8);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 80px;
  --mode-height: 36px;
  --mode-width-disabled: 80px;
  --mode-height-disabled: 36px;
  --mode-padding: 8px 12px;
  --mode-border: 1px solid #4a4a4a;
  --mode-radius: 0px;
  --mode-font: var(--font-ui);
  --mode-font-size: 11px;
  --mode-font-size-disabled: 11px;
  --mode-color: #b8b8b8;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.4);
  --mode-box-shadow: none;

  --toggle-width: 80px;
  --toggle-height: 40px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #5f87af;        
  --toggle-off-bg: #2a2a2a;       
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 1px solid #4a4a4a;
  --toggle-radius: 4px;
  --toggle-text-display: flex;     
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 500;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #808080;

  
}

/* Neon theme (moved from default) */

html[data-theme="neon"] {
  --bg: #39FF14;
  --text: #0b0c0f;
  --panel: #ffffff;
  --border: #000000;
  --accent: #39FF14;
  --logo-image: url("/logo2.png");

  --font-ui: "MS Sans Serif", system-ui, sans-serif;

  --window-width: 310px;
  --window-height: 700px;
  --window-bg: white;
  --window-border-top: 2px solid #fff;
  --window-border-left: 2px solid #fff;
  --window-border-right: 2px solid #666;
  --window-border-bottom: 2px solid #666;
  --window-box-shadow: inset -1px -1px 0 #999, inset 1px 1px 0 #ccc;
  --window-radius: 0px;
  --window-margin: 20px;
  --window-margin-right: 100px;
  
  --title-bar-display: flex;
  --title-bar-bg: #000082;
  --title-bar-color: white;
  --title-bar-padding: 4px 8px;
  --title-bar-font-weight: bold;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: pixelated;
  --title-bar-font-smoothing: none;
  --title-bar-font-smooth: never;
  
  --close-btn-bg: transparent;
  --close-btn-color: white;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(255,255,255,0.2);
  
  --window-body-padding: 10px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 17px;
  
  --radius: 0px;
  --filter-blur: blur(4px);

  --tab-bg: #c0c0c0;
  --tab-bg-active: #c0c0c0;
  --tab-border-top: 2px solid #fff;
  --tab-border-left: 2px solid #fff;
  --tab-border-right: 2px solid #808080;
  --tab-border-bottom: 1px solid #fff;
  --tab-text: black;
  --tab-font: var(--font-ui-normal);
  --tab-font-size: 12px;
  --tab-padding: 4px 8px;
  
  --panel-bg: #fff;
  --panel-border: 2px solid #808080;
  --panel-border-top: 2px solid #808080;
  --panel-border-left: 2px solid #808080;
  --panel-border-right: 2px solid #808080;
  --panel-border-bottom: 2px solid #808080;
  
  --button-bg: linear-gradient(#dcdcdc, #c0c0c0);
  --button-text: #000000;
  --button-border-top: 2px solid #ffffff;
  --button-border-left: 2px solid #ffffff;
  --button-border-bottom: 2px solid #808080;
  --button-border-right: 2px solid #808080;
  --button-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  --button-radius: 2px;
  
  --scrollbar-width: 12px;
  --scrollbar-thumb: #bfbfbf;
  --scrollbar-track: #f1f1f1;

  --tree-font: "Courier New", monospace;
  --tree-font-size: 14px;
  --tree-text: black;
  --tree-line-color: #999;
  --tree-line-style: dashed;
  --tree-line-width: 1px;
  
  --tree-expand-bg: white;
  --tree-expand-border: 1px solid black;
  --tree-expand-size: 13px;
  --tree-expand-icon-size: 14px;
  
  --tree-selection-bg: #0060df;      
  --tree-selection-text: white;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 20px;
  --tree-branch-offset: 12px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: url("/static.png");
  --node-frame-overlay: url("/monitor.png");
  --node-frame-display: block;
  --node-border: none;
  --node-bg: transparent;
  --node-box-shadow: none;
  --node-corner-lines: none;
  
  --image-width: 225px;
  --image-height: 225px;
  --image-fit: fill;
  
  --edge-stroke: black;
  --edge-width: 4;
  --edge-filter: url(#blurFilter);
  --edge-hover-stroke: red;
  --edge-dash: none;
  --edge-marker: none;
  --edge-opacity: 1;
  
  --hover-overlay-bg: rgba(0, 0, 0, 0.6);
  --hover-overlay-color: white;
  --hover-text-blur: url(#text-blur);

  --model-width: 30vh;
  
  --slider-track-height: 4px;
  --slider-track-border: 2px dashed #333;
  --slider-track-bg: transparent;
  
  --slider-thumb-size: 16px;
  --slider-thumb-bg: #000000;
  --slider-thumb-border: none;
  --slider-thumb-radius: 0px;
  --slider-thumb-margin: -9px;

  --mode-bg: url("/key.png");
  --mode-bg-size: cover;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 85px;
  --mode-height: 85px;
  --mode-width-disabled: 90px;
  --mode-height-disabled: 90px;
  --mode-padding: 10px;
  --mode-border: none;
  --mode-radius: 15px;
  --mode-font: "Arial Narrow", Arial, sans-serif;
  --mode-font-size: 24px;
  --mode-font-size-disabled: 28px;
  --mode-color: #111;
  --mode-text-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
  --mode-filter: brightness(95%);
  --mode-filter-disabled: blur(1px);
  --mode-box-shadow: none;

  --toggle-width: 121px;
  --toggle-height: 160px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: url("/toggle-on.png");
  --toggle-off-bg: url("/toggle-off.png");
  --toggle-bg-size: cover;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: none;
  --toggle-radius: 0px;
  --toggle-text-display: none;
  --toggle-padding: 0;
}

html[data-theme="light"] {
  --bg: #fcfefc;
  --logo-image: url("/logo2.png");
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #ffffff;
  --window-border-top: 1px solid #e3e3e7;
  --window-border-left: 1px solid #e3e3e7;
  --window-border-right: 1px solid #e3e3e7;
  --window-border-bottom: 1px solid #e3e3e7;
  --window-box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  --window-radius: 12px;
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  /* Title bar tokens - Light has clean title bar */
  --title-bar-display: flex;
  --title-bar-bg: #f8f9fa;
  --title-bar-color: #0b0c0f;
  --title-bar-padding: 12px 16px;
  --title-bar-font-weight: 600;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: auto;
  --title-bar-font-smooth: auto;
  
  /* Close button tokens */
  --close-btn-bg: transparent;
  --close-btn-color: #5f6368;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(0,0,0,0.05);
  
  /* Window body tokens */
  --window-body-padding: 20px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 20px;
  
  /* General effects */
  --radius: 12px;
  --filter-blur: none;


  --tab-bg: #f0f0f0;
  --tab-bg-active: #ffffff;
  --tab-border-top: 1px solid #e0e0e0;
  --tab-border-left: 1px solid #e0e0e0;
  --tab-border-right: 1px solid #e0e0e0;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #333333;
  --tab-font: "Roboto Mono";
  --tab-font-size: 13px;
  --tab-padding: 4px;
  
  /* Panel/Button tokens - Light */
  --panel-bg: #ffffff;
  --panel-border: 1px solid #e0e0e0;
  --panel-border-top: 1px solid #e0e0e0;
  --panel-border-left: 1px solid #e0e0e0;
  --panel-border-right: 1px solid #e0e0e0;
  --panel-border-bottom: 1px solid #e0e0e0;
  
  --button-bg: #f5f5f5;
  --button-text: #333333;
  --button-border-top: 1px solid #d0d0d0;
  --button-border-left: 1px solid #d0d0d0;
  --button-border-bottom: 1px solid #d0d0d0;
  --button-border-right: 1px solid #d0d0d0;
  --button-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --button-radius: 4px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #c0c0c0;
  --scrollbar-track: #f5f5f5;
  /*Ascii*/
  --tree-font: "Roboto Mono";
  --tree-font-size: 13px;
  --tree-text: #333333;
  --tree-line-color: #d0d0d0;
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: #f5f5f5;
  --tree-expand-border: 1px solid #d0d0d0;
  --tree-expand-size: 12px;
  --tree-expand-icon-size: 12px;
  
  --tree-selection-bg: #e3f2fd;     /* Light blue */
  --tree-selection-text: #1976d2;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 18px;
  --tree-branch-offset: 10px;


    /* Node Editor tokens - Light (AI detection boxes with neon colors) */
  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 3px solid;
  --node-bg: transparent;
  --node-box-shadow: 0 0 15px currentColor, inset 0 0 10px rgba(255,255,255,0.1);
  --node-corner-lines: block;      /* Show corner brackets */
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  /* Edge tokens - Light (thin neon pink/green) */
  --edge-stroke: #00ff88;          /* Neon green default */
  --edge-width: 2;
  --edge-filter: drop-shadow(0 0 4px currentColor);
  --edge-hover-stroke: #ff0080;    /* Hot pink on hover */
  --edge-dash: none;
  --edge-marker: url(#arrowhead);
  --edge-opacity: 0.9;
  
  /* Hover overlay - Light */
  --hover-overlay-bg: rgba(255, 255, 255, 0.85);
  --hover-overlay-color: #1976d2;
  --hover-text-blur: none;


    /* 3D Model / Slider tokens - Light (clean modern) */
  --model-width: 30vh;
  
  --slider-track-height: 6px;
  --slider-track-border: none;
  --slider-track-bg: #e0e0e0;
  
  --slider-thumb-size: 18px;
  --slider-thumb-bg: #1976d2;
  --slider-thumb-border: 2px solid #ffffff;
  --slider-thumb-radius: 50%;
  --slider-thumb-margin: -8px;


    /* Mode button tokens - Light (clean pill buttons with gradients) */
  --mode-bg: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 100px;
  --mode-height: 46px;
  --mode-width-disabled: 100px;
  --mode-height-disabled: 46px;
  --mode-padding: 12px 20px;
  --mode-border: 2px solid #e0e0e0;
  --mode-radius: 24px;
  --mode-font: "Roboto Mono";
  --mode-font-size: 14px;
  --mode-font-size-disabled: 14px;
  --mode-color: #333333;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.5);
  --mode-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);


    /* Toggle tokens - Light (minimalist switch) */
  --toggle-width: 80px;
  --toggle-height: 42px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #4caf50;        /* Green when ON */
  --toggle-off-bg: #e0e0e0;       /* Gray when OFF */
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 2px solid #d0d0d0;
  --toggle-radius: 24px;
  --toggle-text-display: flex;     /* Show GPU ON/OFF text */
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 600;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #999999;
}

/* Fonts */

@font-face {
font-family: "MS Sans Serif";
src: url("/pixel-sans-serif.woff") format("woff");
}

@font-face {
font-family: "MS Sans Serif-normal";
src: url("/ms-sans-serif-2.otf.woff2") format("woff");
}

.editor {
  display: flex;
  flex-direction: row;
}

.visualizer {
  display: flex;
  flex-direction: column;
}

.menu h1 {
  text-align: center;
}

.menu {
  width: 26.5vh;
  height: 50vh;
  display: flex;
  flex-direction: column;
  border: 2px dashed #333;
  padding: 16px;
  margin: 16px;
  margin-left: 0px;
}

/* Default/Neon logo */

.logo {
  width: 280px; 
  height: 280px;
  background-image: url("/logo2.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* Dark theme - override with specific URL */

html[data-theme="dark"] .logo {
  background-image: url("/logo-dark.png");
}

/* Light theme - same as neon */

html[data-theme="light"] .logo {
  background-image: url("/logo2.png");
}

.menu-parent {
  display: flex;
  flex-direction: column;
}

.menu-content {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.menu-content h1, h2, pre, div { 
  font-family: monospace; 
  font-size: 1em; 
  line-height: 1.1; 
  -webkit-text-size-adjust: none; 
}

.menu-content h1 {
  font-size: 1.5em;
}

.menu-content h2 {
  font-size: 1.25em;
}

.vc-btn {
  text-decoration: underline;
  user-select: none;
  cursor: pointer;
}

.vc-btn:active {
  color: var(--accent-bright);
}.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
}

.store-state {
  padding: 2rem;
  text-align: center;
  opacity: 0.5;
}

.store-error { color: #ff4444; }

.store-card {
  display: flex;
  flex-direction: column;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
  cursor: pointer;
}

.store-card:hover {
  border-color: #555;
  transform: translateY(-2px);
}

.store-thumb-wrap {
  width: 100%;
  aspect-ratio: 1;
  background: #0a0a0a;
  overflow: hidden;
}

.store-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.store-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.65rem 0.75rem;
  flex: 1;
}

.store-breadcrumb {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #aaa;
  text-transform: uppercase;
}

.store-sep { opacity: 0.4; }

.store-desc {
  font-size: 0.75rem;
  color: #888;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.store-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 0.4rem;
  border-top: 1px solid #1e1e1e;
}

.store-author {
  font-size: 0.68rem;
  color: #666;
}

.store-version {
  font-size: 0.65rem;
  color: #444;
  font-family: monospace;
}.fd-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.fd-panel {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  width: min(680px, 92vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fd-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid #1e1e1e;
  flex-shrink: 0;
}

.fd-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid #2a2a2a;
}

.fd-header-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.fd-breadcrumb {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ccc;
}

.fd-sep { opacity: 0.35; }

.fd-author {
  font-size: 0.7rem;
  color: #555;
}

.fd-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fd-install-btn {
  padding: 0.4rem 1rem;
  background: #fff;
  color: #000;
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.fd-install-btn:disabled { opacity: 0.5; cursor: default; }
.fd-install-btn.fd-installed { background: #1a1a1a; color: #555; border: 1px solid #2a2a2a; }

.fd-close-btn {
  background: none;
  border: none;
  color: #555;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.fd-close-btn:hover { color: #ccc; }

.fd-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1;
  font-size: 0.82rem;
  line-height: 1.7;
  color: #aaa;
}

.fd-body h1 { font-size: 1rem; color: #eee; margin: 0 0 0.5rem; }
.fd-body h2 { font-size: 0.85rem; color: #ccc; margin: 1.2rem 0 0.4rem; text-transform: uppercase; letter-spacing: 0.05em; }
.fd-body p  { margin: 0.2rem 0; }
.fd-table-row { display: block; font-family: monospace; font-size: 0.75rem; color: #666; }
.fd-loading, .fd-error { opacity: 0.5; font-style: italic; }
.fd-error { color: #ff4444; }

.fd-body table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.78rem;
  margin: 0.75rem 0;
}

.fd-body th,
.fd-body td {
  border: 1px solid #2a2a2a;
  padding: 0.4rem 0.75rem;
  text-align: left;
}

.fd-body th {
  background: #1a1a1a;
  color: #ccc;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.7rem;
}

.fd-body tr:nth-child(even) td {
  background: #0d0d0d;
}

.fd-body code {
  background: #1a1a1a;
  padding: 0.1em 0.4em;
  border-radius: 3px;
  font-size: 0.78rem;
  color: #e0e0e0;
}

.fd-body pre {
  background: #0d0d0d;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  overflow-x: auto;
}

:root {
  height: 100%;
  width: 100%;
  
  /* Dark theme is now DEFAULT */
  /* Base colors - Subtle dark gray palette */
  --bg: #2b2b2b;                    
  --logo-image: url("/logo-dark.png");
  --text: #b8b8b8;                  
  --text-muted: #808080;            
  --panel: #323232;                 
  --panel-darker: #252525;          
  --border: #4a4a4a;                
  --border-light: #555555;          
  
  --accent: #5f87af;                
  --accent-bright: #7ba3cc;         
  --accent-contrast: #ffffff;       
  
  --font-ui: "Roboto Mono", "SF Mono", "Consolas", "Monaco", "Courier New", monospace;
  --font-ui-normal: var(--font-ui);
  
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #323232;             
  --window-border-top: 1px solid #4a4a4a;     
  --window-border-left: 1px solid #4a4a4a;
  --window-border-right: 1px solid #4a4a4a;
  --window-border-bottom: 1px solid #4a4a4a;
  --window-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --window-radius: 0px;             
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  --title-bar-display: flex;
  --title-bar-bg: #2b2b2b;          
  --title-bar-color: #b8b8b8;       
  --title-bar-padding: 6px 10px;    
  --title-bar-font-weight: 400;     
  --title-bar-font-size: 11px;      
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: antialiased;
  --title-bar-font-smooth: auto;
  --title-bar-border-bottom: 1px solid #4a4a4a;  
  
  --close-btn-bg: transparent;
  --close-btn-color: #808080;       
  --close-btn-font-size: 12px;
  --close-btn-hover-bg: rgba(255, 255, 255, 0.08);
  --close-btn-hover-color: #b8b8b8;
  
  --window-body-padding: 12px;
  --window-body-font-size: 12px;
  --window-body-padding-right: 12px;
  
  --radius: 0px;                    
  --filter-blur: none;
  
  --selection-bg: #5f87af;          
  --selection-text: #ffffff;
  --hover-bg: rgba(95, 135, 175, 0.15);  
  --active-bg: rgba(95, 135, 175, 0.25);
  --separator: #4a4a4a;             
  
  --tab-bg: #2b2b2b;
  --tab-bg-active: #323232;
  --tab-border-top: 1px solid #4a4a4a;
  --tab-border-left: 1px solid #4a4a4a;
  --tab-border-right: 1px solid #4a4a4a;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #b8b8b8;
  --tab-font: "Roboto Mono";
  --tab-font-size: 12px;
  --tab-padding: 6px 14px;
  
  --panel-bg: #323232;
  --panel-border: 1px solid #4a4a4a;
  --panel-border-top: 1px solid #4a4a4a;
  --panel-border-left: 1px solid #4a4a4a;
  --panel-border-right: 1px solid #4a4a4a;
  --panel-border-bottom: 1px solid #4a4a4a;
  
  --button-bg: #3a3a3a;
  --button-text: #b8b8b8;
  --button-border-top: 1px solid #4a4a4a;
  --button-border-left: 1px solid #4a4a4a;
  --button-border-bottom: 1px solid #4a4a4a;
  --button-border-right: 1px solid #4a4a4a;
  --button-shadow: none;
  --button-radius: 0px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #4a4a4a;
  --scrollbar-track: #2b2b2b;

  --tree-font: var(--font-ui);       
  --tree-font-size: 12px;
  --tree-text: #b8b8b8;
  --tree-line-color: #4a4a4a;        
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: transparent;
  --tree-expand-border: 1px solid #4a4a4a;
  --tree-expand-size: 11px;
  --tree-expand-icon-size: 11px;
  
  --tree-selection-bg: #5f87af;      
  --tree-selection-text: #ffffff;
  
  --tree-icon-size: 14px;
  --tree-padding-left: 16px;
  --tree-branch-offset: 10px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 1px solid #4a4a4a;
  --node-bg: rgba(35, 35, 35, 0.6);
  --node-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --node-corner-lines: block;      
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  --edge-stroke: #4a4a4a;          
  --edge-width: 1.5;
  --edge-filter: none;
  --edge-hover-stroke: #00ff88;    
  --edge-dash: 5,5;
  --edge-marker: url(#arrowhead-dark);
  --edge-opacity: 0.8;
  
  --hover-overlay-bg: rgba(95, 135, 175, 0.25);
  --hover-overlay-color: #ffffff;
  --hover-text-blur: none;

  --model-width: 30vh;
  
  --slider-track-height: 2px;
  --slider-track-border: none;
  --slider-track-bg: #4a4a4a;
  
  --slider-thumb-size: 12px;
  --slider-thumb-bg: #5f87af;
  --slider-thumb-border: 1px solid #4a4a4a;
  --slider-thumb-radius: 2px;
  --slider-thumb-margin: -6px;

  --mode-bg: rgba(42, 42, 42, 0.8);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 80px;
  --mode-height: 36px;
  --mode-width-disabled: 80px;
  --mode-height-disabled: 36px;
  --mode-padding: 8px 12px;
  --mode-border: 1px solid #4a4a4a;
  --mode-radius: 0px;
  --mode-font: var(--font-ui);
  --mode-font-size: 11px;
  --mode-font-size-disabled: 11px;
  --mode-color: #b8b8b8;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.4);
  --mode-box-shadow: none;

  --toggle-width: 80px;
  --toggle-height: 40px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #5f87af;        
  --toggle-off-bg: #2a2a2a;       
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 1px solid #4a4a4a;
  --toggle-radius: 4px;
  --toggle-text-display: flex;     
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 500;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #808080;

  
}

/* Neon theme (moved from default) */

html[data-theme="neon"] {
  --bg: #39FF14;
  --text: #0b0c0f;
  --panel: #ffffff;
  --border: #000000;
  --accent: #39FF14;
  --logo-image: url("/logo2.png");

  --font-ui: "MS Sans Serif", system-ui, sans-serif;

  --window-width: 310px;
  --window-height: 700px;
  --window-bg: white;
  --window-border-top: 2px solid #fff;
  --window-border-left: 2px solid #fff;
  --window-border-right: 2px solid #666;
  --window-border-bottom: 2px solid #666;
  --window-box-shadow: inset -1px -1px 0 #999, inset 1px 1px 0 #ccc;
  --window-radius: 0px;
  --window-margin: 20px;
  --window-margin-right: 100px;
  
  --title-bar-display: flex;
  --title-bar-bg: #000082;
  --title-bar-color: white;
  --title-bar-padding: 4px 8px;
  --title-bar-font-weight: bold;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: pixelated;
  --title-bar-font-smoothing: none;
  --title-bar-font-smooth: never;
  
  --close-btn-bg: transparent;
  --close-btn-color: white;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(255,255,255,0.2);
  
  --window-body-padding: 10px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 17px;
  
  --radius: 0px;
  --filter-blur: blur(4px);

  --tab-bg: #c0c0c0;
  --tab-bg-active: #c0c0c0;
  --tab-border-top: 2px solid #fff;
  --tab-border-left: 2px solid #fff;
  --tab-border-right: 2px solid #808080;
  --tab-border-bottom: 1px solid #fff;
  --tab-text: black;
  --tab-font: var(--font-ui-normal);
  --tab-font-size: 12px;
  --tab-padding: 4px 8px;
  
  --panel-bg: #fff;
  --panel-border: 2px solid #808080;
  --panel-border-top: 2px solid #808080;
  --panel-border-left: 2px solid #808080;
  --panel-border-right: 2px solid #808080;
  --panel-border-bottom: 2px solid #808080;
  
  --button-bg: linear-gradient(#dcdcdc, #c0c0c0);
  --button-text: #000000;
  --button-border-top: 2px solid #ffffff;
  --button-border-left: 2px solid #ffffff;
  --button-border-bottom: 2px solid #808080;
  --button-border-right: 2px solid #808080;
  --button-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  --button-radius: 2px;
  
  --scrollbar-width: 12px;
  --scrollbar-thumb: #bfbfbf;
  --scrollbar-track: #f1f1f1;

  --tree-font: "Courier New", monospace;
  --tree-font-size: 14px;
  --tree-text: black;
  --tree-line-color: #999;
  --tree-line-style: dashed;
  --tree-line-width: 1px;
  
  --tree-expand-bg: white;
  --tree-expand-border: 1px solid black;
  --tree-expand-size: 13px;
  --tree-expand-icon-size: 14px;
  
  --tree-selection-bg: #0060df;      
  --tree-selection-text: white;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 20px;
  --tree-branch-offset: 12px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: url("/static.png");
  --node-frame-overlay: url("/monitor.png");
  --node-frame-display: block;
  --node-border: none;
  --node-bg: transparent;
  --node-box-shadow: none;
  --node-corner-lines: none;
  
  --image-width: 225px;
  --image-height: 225px;
  --image-fit: fill;
  
  --edge-stroke: black;
  --edge-width: 4;
  --edge-filter: url(#blurFilter);
  --edge-hover-stroke: red;
  --edge-dash: none;
  --edge-marker: none;
  --edge-opacity: 1;
  
  --hover-overlay-bg: rgba(0, 0, 0, 0.6);
  --hover-overlay-color: white;
  --hover-text-blur: url(#text-blur);

  --model-width: 30vh;
  
  --slider-track-height: 4px;
  --slider-track-border: 2px dashed #333;
  --slider-track-bg: transparent;
  
  --slider-thumb-size: 16px;
  --slider-thumb-bg: #000000;
  --slider-thumb-border: none;
  --slider-thumb-radius: 0px;
  --slider-thumb-margin: -9px;

  --mode-bg: url("/key.png");
  --mode-bg-size: cover;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 85px;
  --mode-height: 85px;
  --mode-width-disabled: 90px;
  --mode-height-disabled: 90px;
  --mode-padding: 10px;
  --mode-border: none;
  --mode-radius: 15px;
  --mode-font: "Arial Narrow", Arial, sans-serif;
  --mode-font-size: 24px;
  --mode-font-size-disabled: 28px;
  --mode-color: #111;
  --mode-text-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
  --mode-filter: brightness(95%);
  --mode-filter-disabled: blur(1px);
  --mode-box-shadow: none;

  --toggle-width: 121px;
  --toggle-height: 160px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: url("/toggle-on.png");
  --toggle-off-bg: url("/toggle-off.png");
  --toggle-bg-size: cover;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: none;
  --toggle-radius: 0px;
  --toggle-text-display: none;
  --toggle-padding: 0;
}

html[data-theme="light"] {
  --bg: #fcfefc;
  --logo-image: url("/logo2.png");
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #ffffff;
  --window-border-top: 1px solid #e3e3e7;
  --window-border-left: 1px solid #e3e3e7;
  --window-border-right: 1px solid #e3e3e7;
  --window-border-bottom: 1px solid #e3e3e7;
  --window-box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  --window-radius: 12px;
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  /* Title bar tokens - Light has clean title bar */
  --title-bar-display: flex;
  --title-bar-bg: #f8f9fa;
  --title-bar-color: #0b0c0f;
  --title-bar-padding: 12px 16px;
  --title-bar-font-weight: 600;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: auto;
  --title-bar-font-smooth: auto;
  
  /* Close button tokens */
  --close-btn-bg: transparent;
  --close-btn-color: #5f6368;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(0,0,0,0.05);
  
  /* Window body tokens */
  --window-body-padding: 20px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 20px;
  
  /* General effects */
  --radius: 12px;
  --filter-blur: none;


  --tab-bg: #f0f0f0;
  --tab-bg-active: #ffffff;
  --tab-border-top: 1px solid #e0e0e0;
  --tab-border-left: 1px solid #e0e0e0;
  --tab-border-right: 1px solid #e0e0e0;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #333333;
  --tab-font: "Roboto Mono";
  --tab-font-size: 13px;
  --tab-padding: 4px;
  
  /* Panel/Button tokens - Light */
  --panel-bg: #ffffff;
  --panel-border: 1px solid #e0e0e0;
  --panel-border-top: 1px solid #e0e0e0;
  --panel-border-left: 1px solid #e0e0e0;
  --panel-border-right: 1px solid #e0e0e0;
  --panel-border-bottom: 1px solid #e0e0e0;
  
  --button-bg: #f5f5f5;
  --button-text: #333333;
  --button-border-top: 1px solid #d0d0d0;
  --button-border-left: 1px solid #d0d0d0;
  --button-border-bottom: 1px solid #d0d0d0;
  --button-border-right: 1px solid #d0d0d0;
  --button-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --button-radius: 4px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #c0c0c0;
  --scrollbar-track: #f5f5f5;
  /*Ascii*/
  --tree-font: "Roboto Mono";
  --tree-font-size: 13px;
  --tree-text: #333333;
  --tree-line-color: #d0d0d0;
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: #f5f5f5;
  --tree-expand-border: 1px solid #d0d0d0;
  --tree-expand-size: 12px;
  --tree-expand-icon-size: 12px;
  
  --tree-selection-bg: #e3f2fd;     /* Light blue */
  --tree-selection-text: #1976d2;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 18px;
  --tree-branch-offset: 10px;


    /* Node Editor tokens - Light (AI detection boxes with neon colors) */
  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 3px solid;
  --node-bg: transparent;
  --node-box-shadow: 0 0 15px currentColor, inset 0 0 10px rgba(255,255,255,0.1);
  --node-corner-lines: block;      /* Show corner brackets */
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  /* Edge tokens - Light (thin neon pink/green) */
  --edge-stroke: #00ff88;          /* Neon green default */
  --edge-width: 2;
  --edge-filter: drop-shadow(0 0 4px currentColor);
  --edge-hover-stroke: #ff0080;    /* Hot pink on hover */
  --edge-dash: none;
  --edge-marker: url(#arrowhead);
  --edge-opacity: 0.9;
  
  /* Hover overlay - Light */
  --hover-overlay-bg: rgba(255, 255, 255, 0.85);
  --hover-overlay-color: #1976d2;
  --hover-text-blur: none;


    /* 3D Model / Slider tokens - Light (clean modern) */
  --model-width: 30vh;
  
  --slider-track-height: 6px;
  --slider-track-border: none;
  --slider-track-bg: #e0e0e0;
  
  --slider-thumb-size: 18px;
  --slider-thumb-bg: #1976d2;
  --slider-thumb-border: 2px solid #ffffff;
  --slider-thumb-radius: 50%;
  --slider-thumb-margin: -8px;


    /* Mode button tokens - Light (clean pill buttons with gradients) */
  --mode-bg: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 100px;
  --mode-height: 46px;
  --mode-width-disabled: 100px;
  --mode-height-disabled: 46px;
  --mode-padding: 12px 20px;
  --mode-border: 2px solid #e0e0e0;
  --mode-radius: 24px;
  --mode-font: "Roboto Mono";
  --mode-font-size: 14px;
  --mode-font-size-disabled: 14px;
  --mode-color: #333333;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.5);
  --mode-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);


    /* Toggle tokens - Light (minimalist switch) */
  --toggle-width: 80px;
  --toggle-height: 42px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #4caf50;        /* Green when ON */
  --toggle-off-bg: #e0e0e0;       /* Gray when OFF */
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 2px solid #d0d0d0;
  --toggle-radius: 24px;
  --toggle-text-display: flex;     /* Show GPU ON/OFF text */
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 600;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #999999;
}

/* Fonts */

@font-face {
font-family: "MS Sans Serif";
src: url("/pixel-sans-serif.woff") format("woff");
}

@font-face {
font-family: "MS Sans Serif-normal";
src: url("/ms-sans-serif-2.otf.woff2") format("woff");
}

.overlay-uploader {
    filter: blur(1.75px);
    color: "white";
    text-align: "center";
}

:root {
  height: 100%;
  width: 100%;
  
  /* Dark theme is now DEFAULT */
  /* Base colors - Subtle dark gray palette */
  --bg: #2b2b2b;                    
  --logo-image: url("/logo-dark.png");
  --text: #b8b8b8;                  
  --text-muted: #808080;            
  --panel: #323232;                 
  --panel-darker: #252525;          
  --border: #4a4a4a;                
  --border-light: #555555;          
  
  --accent: #5f87af;                
  --accent-bright: #7ba3cc;         
  --accent-contrast: #ffffff;       
  
  --font-ui: "Roboto Mono", "SF Mono", "Consolas", "Monaco", "Courier New", monospace;
  --font-ui-normal: var(--font-ui);
  
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #323232;             
  --window-border-top: 1px solid #4a4a4a;     
  --window-border-left: 1px solid #4a4a4a;
  --window-border-right: 1px solid #4a4a4a;
  --window-border-bottom: 1px solid #4a4a4a;
  --window-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --window-radius: 0px;             
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  --title-bar-display: flex;
  --title-bar-bg: #2b2b2b;          
  --title-bar-color: #b8b8b8;       
  --title-bar-padding: 6px 10px;    
  --title-bar-font-weight: 400;     
  --title-bar-font-size: 11px;      
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: antialiased;
  --title-bar-font-smooth: auto;
  --title-bar-border-bottom: 1px solid #4a4a4a;  
  
  --close-btn-bg: transparent;
  --close-btn-color: #808080;       
  --close-btn-font-size: 12px;
  --close-btn-hover-bg: rgba(255, 255, 255, 0.08);
  --close-btn-hover-color: #b8b8b8;
  
  --window-body-padding: 12px;
  --window-body-font-size: 12px;
  --window-body-padding-right: 12px;
  
  --radius: 0px;                    
  --filter-blur: none;
  
  --selection-bg: #5f87af;          
  --selection-text: #ffffff;
  --hover-bg: rgba(95, 135, 175, 0.15);  
  --active-bg: rgba(95, 135, 175, 0.25);
  --separator: #4a4a4a;             
  
  --tab-bg: #2b2b2b;
  --tab-bg-active: #323232;
  --tab-border-top: 1px solid #4a4a4a;
  --tab-border-left: 1px solid #4a4a4a;
  --tab-border-right: 1px solid #4a4a4a;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #b8b8b8;
  --tab-font: "Roboto Mono";
  --tab-font-size: 12px;
  --tab-padding: 6px 14px;
  
  --panel-bg: #323232;
  --panel-border: 1px solid #4a4a4a;
  --panel-border-top: 1px solid #4a4a4a;
  --panel-border-left: 1px solid #4a4a4a;
  --panel-border-right: 1px solid #4a4a4a;
  --panel-border-bottom: 1px solid #4a4a4a;
  
  --button-bg: #3a3a3a;
  --button-text: #b8b8b8;
  --button-border-top: 1px solid #4a4a4a;
  --button-border-left: 1px solid #4a4a4a;
  --button-border-bottom: 1px solid #4a4a4a;
  --button-border-right: 1px solid #4a4a4a;
  --button-shadow: none;
  --button-radius: 0px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #4a4a4a;
  --scrollbar-track: #2b2b2b;

  --tree-font: var(--font-ui);       
  --tree-font-size: 12px;
  --tree-text: #b8b8b8;
  --tree-line-color: #4a4a4a;        
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: transparent;
  --tree-expand-border: 1px solid #4a4a4a;
  --tree-expand-size: 11px;
  --tree-expand-icon-size: 11px;
  
  --tree-selection-bg: #5f87af;      
  --tree-selection-text: #ffffff;
  
  --tree-icon-size: 14px;
  --tree-padding-left: 16px;
  --tree-branch-offset: 10px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 1px solid #4a4a4a;
  --node-bg: rgba(35, 35, 35, 0.6);
  --node-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --node-corner-lines: block;      
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  --edge-stroke: #4a4a4a;          
  --edge-width: 1.5;
  --edge-filter: none;
  --edge-hover-stroke: #00ff88;    
  --edge-dash: 5,5;
  --edge-marker: url(#arrowhead-dark);
  --edge-opacity: 0.8;
  
  --hover-overlay-bg: rgba(95, 135, 175, 0.25);
  --hover-overlay-color: #ffffff;
  --hover-text-blur: none;

  --model-width: 30vh;
  
  --slider-track-height: 2px;
  --slider-track-border: none;
  --slider-track-bg: #4a4a4a;
  
  --slider-thumb-size: 12px;
  --slider-thumb-bg: #5f87af;
  --slider-thumb-border: 1px solid #4a4a4a;
  --slider-thumb-radius: 2px;
  --slider-thumb-margin: -6px;

  --mode-bg: rgba(42, 42, 42, 0.8);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 80px;
  --mode-height: 36px;
  --mode-width-disabled: 80px;
  --mode-height-disabled: 36px;
  --mode-padding: 8px 12px;
  --mode-border: 1px solid #4a4a4a;
  --mode-radius: 0px;
  --mode-font: var(--font-ui);
  --mode-font-size: 11px;
  --mode-font-size-disabled: 11px;
  --mode-color: #b8b8b8;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.4);
  --mode-box-shadow: none;

  --toggle-width: 80px;
  --toggle-height: 40px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #5f87af;        
  --toggle-off-bg: #2a2a2a;       
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 1px solid #4a4a4a;
  --toggle-radius: 4px;
  --toggle-text-display: flex;     
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 500;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #808080;

  
}

/* Neon theme (moved from default) */

html[data-theme="neon"] {
  --bg: #39FF14;
  --text: #0b0c0f;
  --panel: #ffffff;
  --border: #000000;
  --accent: #39FF14;
  --logo-image: url("/logo2.png");

  --font-ui: "MS Sans Serif", system-ui, sans-serif;

  --window-width: 310px;
  --window-height: 700px;
  --window-bg: white;
  --window-border-top: 2px solid #fff;
  --window-border-left: 2px solid #fff;
  --window-border-right: 2px solid #666;
  --window-border-bottom: 2px solid #666;
  --window-box-shadow: inset -1px -1px 0 #999, inset 1px 1px 0 #ccc;
  --window-radius: 0px;
  --window-margin: 20px;
  --window-margin-right: 100px;
  
  --title-bar-display: flex;
  --title-bar-bg: #000082;
  --title-bar-color: white;
  --title-bar-padding: 4px 8px;
  --title-bar-font-weight: bold;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: pixelated;
  --title-bar-font-smoothing: none;
  --title-bar-font-smooth: never;
  
  --close-btn-bg: transparent;
  --close-btn-color: white;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(255,255,255,0.2);
  
  --window-body-padding: 10px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 17px;
  
  --radius: 0px;
  --filter-blur: blur(4px);

  --tab-bg: #c0c0c0;
  --tab-bg-active: #c0c0c0;
  --tab-border-top: 2px solid #fff;
  --tab-border-left: 2px solid #fff;
  --tab-border-right: 2px solid #808080;
  --tab-border-bottom: 1px solid #fff;
  --tab-text: black;
  --tab-font: var(--font-ui-normal);
  --tab-font-size: 12px;
  --tab-padding: 4px 8px;
  
  --panel-bg: #fff;
  --panel-border: 2px solid #808080;
  --panel-border-top: 2px solid #808080;
  --panel-border-left: 2px solid #808080;
  --panel-border-right: 2px solid #808080;
  --panel-border-bottom: 2px solid #808080;
  
  --button-bg: linear-gradient(#dcdcdc, #c0c0c0);
  --button-text: #000000;
  --button-border-top: 2px solid #ffffff;
  --button-border-left: 2px solid #ffffff;
  --button-border-bottom: 2px solid #808080;
  --button-border-right: 2px solid #808080;
  --button-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  --button-radius: 2px;
  
  --scrollbar-width: 12px;
  --scrollbar-thumb: #bfbfbf;
  --scrollbar-track: #f1f1f1;

  --tree-font: "Courier New", monospace;
  --tree-font-size: 14px;
  --tree-text: black;
  --tree-line-color: #999;
  --tree-line-style: dashed;
  --tree-line-width: 1px;
  
  --tree-expand-bg: white;
  --tree-expand-border: 1px solid black;
  --tree-expand-size: 13px;
  --tree-expand-icon-size: 14px;
  
  --tree-selection-bg: #0060df;      
  --tree-selection-text: white;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 20px;
  --tree-branch-offset: 12px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: url("/static.png");
  --node-frame-overlay: url("/monitor.png");
  --node-frame-display: block;
  --node-border: none;
  --node-bg: transparent;
  --node-box-shadow: none;
  --node-corner-lines: none;
  
  --image-width: 225px;
  --image-height: 225px;
  --image-fit: fill;
  
  --edge-stroke: black;
  --edge-width: 4;
  --edge-filter: url(#blurFilter);
  --edge-hover-stroke: red;
  --edge-dash: none;
  --edge-marker: none;
  --edge-opacity: 1;
  
  --hover-overlay-bg: rgba(0, 0, 0, 0.6);
  --hover-overlay-color: white;
  --hover-text-blur: url(#text-blur);

  --model-width: 30vh;
  
  --slider-track-height: 4px;
  --slider-track-border: 2px dashed #333;
  --slider-track-bg: transparent;
  
  --slider-thumb-size: 16px;
  --slider-thumb-bg: #000000;
  --slider-thumb-border: none;
  --slider-thumb-radius: 0px;
  --slider-thumb-margin: -9px;

  --mode-bg: url("/key.png");
  --mode-bg-size: cover;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 85px;
  --mode-height: 85px;
  --mode-width-disabled: 90px;
  --mode-height-disabled: 90px;
  --mode-padding: 10px;
  --mode-border: none;
  --mode-radius: 15px;
  --mode-font: "Arial Narrow", Arial, sans-serif;
  --mode-font-size: 24px;
  --mode-font-size-disabled: 28px;
  --mode-color: #111;
  --mode-text-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
  --mode-filter: brightness(95%);
  --mode-filter-disabled: blur(1px);
  --mode-box-shadow: none;

  --toggle-width: 121px;
  --toggle-height: 160px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: url("/toggle-on.png");
  --toggle-off-bg: url("/toggle-off.png");
  --toggle-bg-size: cover;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: none;
  --toggle-radius: 0px;
  --toggle-text-display: none;
  --toggle-padding: 0;
}

html[data-theme="light"] {
  --bg: #fcfefc;
  --logo-image: url("/logo2.png");
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #ffffff;
  --window-border-top: 1px solid #e3e3e7;
  --window-border-left: 1px solid #e3e3e7;
  --window-border-right: 1px solid #e3e3e7;
  --window-border-bottom: 1px solid #e3e3e7;
  --window-box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  --window-radius: 12px;
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  /* Title bar tokens - Light has clean title bar */
  --title-bar-display: flex;
  --title-bar-bg: #f8f9fa;
  --title-bar-color: #0b0c0f;
  --title-bar-padding: 12px 16px;
  --title-bar-font-weight: 600;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: auto;
  --title-bar-font-smooth: auto;
  
  /* Close button tokens */
  --close-btn-bg: transparent;
  --close-btn-color: #5f6368;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(0,0,0,0.05);
  
  /* Window body tokens */
  --window-body-padding: 20px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 20px;
  
  /* General effects */
  --radius: 12px;
  --filter-blur: none;


  --tab-bg: #f0f0f0;
  --tab-bg-active: #ffffff;
  --tab-border-top: 1px solid #e0e0e0;
  --tab-border-left: 1px solid #e0e0e0;
  --tab-border-right: 1px solid #e0e0e0;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #333333;
  --tab-font: "Roboto Mono";
  --tab-font-size: 13px;
  --tab-padding: 4px;
  
  /* Panel/Button tokens - Light */
  --panel-bg: #ffffff;
  --panel-border: 1px solid #e0e0e0;
  --panel-border-top: 1px solid #e0e0e0;
  --panel-border-left: 1px solid #e0e0e0;
  --panel-border-right: 1px solid #e0e0e0;
  --panel-border-bottom: 1px solid #e0e0e0;
  
  --button-bg: #f5f5f5;
  --button-text: #333333;
  --button-border-top: 1px solid #d0d0d0;
  --button-border-left: 1px solid #d0d0d0;
  --button-border-bottom: 1px solid #d0d0d0;
  --button-border-right: 1px solid #d0d0d0;
  --button-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --button-radius: 4px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #c0c0c0;
  --scrollbar-track: #f5f5f5;
  /*Ascii*/
  --tree-font: "Roboto Mono";
  --tree-font-size: 13px;
  --tree-text: #333333;
  --tree-line-color: #d0d0d0;
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: #f5f5f5;
  --tree-expand-border: 1px solid #d0d0d0;
  --tree-expand-size: 12px;
  --tree-expand-icon-size: 12px;
  
  --tree-selection-bg: #e3f2fd;     /* Light blue */
  --tree-selection-text: #1976d2;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 18px;
  --tree-branch-offset: 10px;


    /* Node Editor tokens - Light (AI detection boxes with neon colors) */
  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 3px solid;
  --node-bg: transparent;
  --node-box-shadow: 0 0 15px currentColor, inset 0 0 10px rgba(255,255,255,0.1);
  --node-corner-lines: block;      /* Show corner brackets */
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  /* Edge tokens - Light (thin neon pink/green) */
  --edge-stroke: #00ff88;          /* Neon green default */
  --edge-width: 2;
  --edge-filter: drop-shadow(0 0 4px currentColor);
  --edge-hover-stroke: #ff0080;    /* Hot pink on hover */
  --edge-dash: none;
  --edge-marker: url(#arrowhead);
  --edge-opacity: 0.9;
  
  /* Hover overlay - Light */
  --hover-overlay-bg: rgba(255, 255, 255, 0.85);
  --hover-overlay-color: #1976d2;
  --hover-text-blur: none;


    /* 3D Model / Slider tokens - Light (clean modern) */
  --model-width: 30vh;
  
  --slider-track-height: 6px;
  --slider-track-border: none;
  --slider-track-bg: #e0e0e0;
  
  --slider-thumb-size: 18px;
  --slider-thumb-bg: #1976d2;
  --slider-thumb-border: 2px solid #ffffff;
  --slider-thumb-radius: 50%;
  --slider-thumb-margin: -8px;


    /* Mode button tokens - Light (clean pill buttons with gradients) */
  --mode-bg: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 100px;
  --mode-height: 46px;
  --mode-width-disabled: 100px;
  --mode-height-disabled: 46px;
  --mode-padding: 12px 20px;
  --mode-border: 2px solid #e0e0e0;
  --mode-radius: 24px;
  --mode-font: "Roboto Mono";
  --mode-font-size: 14px;
  --mode-font-size-disabled: 14px;
  --mode-color: #333333;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.5);
  --mode-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);


    /* Toggle tokens - Light (minimalist switch) */
  --toggle-width: 80px;
  --toggle-height: 42px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #4caf50;        /* Green when ON */
  --toggle-off-bg: #e0e0e0;       /* Gray when OFF */
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 2px solid #d0d0d0;
  --toggle-radius: 24px;
  --toggle-text-display: flex;     /* Show GPU ON/OFF text */
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 600;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #999999;
}

/* Fonts */

@font-face {
font-family: "MS Sans Serif";
src: url("/pixel-sans-serif.woff") format("woff");
}

@font-face {
font-family: "MS Sans Serif-normal";
src: url("/ms-sans-serif-2.otf.woff2") format("woff");
}

.content-wrapper {
  position: absolute; /* fill parent */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3 /* behind nodes */
}

.content {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.overlay,
.overlay-static {
  position: absolute;
  top: 0;
  left: 50%;             
  transform: translateX(-50%);
  cursor: pointer;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: 8px;
  z-index: 6;
}

.overlay-static {
  opacity: 1;
  width: 600px;
  height: 400px;
}

.overlay:hover {
  opacity: 1;
}

.breaking-news {
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  background: white;
  width: 100%;
  height: 50px;
  z-index: 1000;
  overflow: hidden; /* Ensures text stays within container */
}

.breaking-logo {
  height: 40px;
  margin: 0 10px;
}

.marquee-wrapper {
  flex: 1;              /* Fill remaining width */
  overflow: hidden;     /* Clip overflow so it doesn’t expand page width */
  white-space: nowrap;
  position: relative;
  width: 100%;
  height: 100%
}

.marquee-track {
  display: inline-block;
  white-space: nowrap;
  position: absolute;
  animation: scroll 9s linear infinite;
  font-size: 40px;
  filter: url(#text-blur);
  padding-right: 2rem;
}


@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}


:root {
  height: 100%;
  width: 100%;
  
  /* Dark theme is now DEFAULT */
  /* Base colors - Subtle dark gray palette */
  --bg: #2b2b2b;                    
  --logo-image: url("/logo-dark.png");
  --text: #b8b8b8;                  
  --text-muted: #808080;            
  --panel: #323232;                 
  --panel-darker: #252525;          
  --border: #4a4a4a;                
  --border-light: #555555;          
  
  --accent: #5f87af;                
  --accent-bright: #7ba3cc;         
  --accent-contrast: #ffffff;       
  
  --font-ui: "Roboto Mono", "SF Mono", "Consolas", "Monaco", "Courier New", monospace;
  --font-ui-normal: var(--font-ui);
  
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #323232;             
  --window-border-top: 1px solid #4a4a4a;     
  --window-border-left: 1px solid #4a4a4a;
  --window-border-right: 1px solid #4a4a4a;
  --window-border-bottom: 1px solid #4a4a4a;
  --window-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --window-radius: 0px;             
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  --title-bar-display: flex;
  --title-bar-bg: #2b2b2b;          
  --title-bar-color: #b8b8b8;       
  --title-bar-padding: 6px 10px;    
  --title-bar-font-weight: 400;     
  --title-bar-font-size: 11px;      
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: antialiased;
  --title-bar-font-smooth: auto;
  --title-bar-border-bottom: 1px solid #4a4a4a;  
  
  --close-btn-bg: transparent;
  --close-btn-color: #808080;       
  --close-btn-font-size: 12px;
  --close-btn-hover-bg: rgba(255, 255, 255, 0.08);
  --close-btn-hover-color: #b8b8b8;
  
  --window-body-padding: 12px;
  --window-body-font-size: 12px;
  --window-body-padding-right: 12px;
  
  --radius: 0px;                    
  --filter-blur: none;
  
  --selection-bg: #5f87af;          
  --selection-text: #ffffff;
  --hover-bg: rgba(95, 135, 175, 0.15);  
  --active-bg: rgba(95, 135, 175, 0.25);
  --separator: #4a4a4a;             
  
  --tab-bg: #2b2b2b;
  --tab-bg-active: #323232;
  --tab-border-top: 1px solid #4a4a4a;
  --tab-border-left: 1px solid #4a4a4a;
  --tab-border-right: 1px solid #4a4a4a;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #b8b8b8;
  --tab-font: "Roboto Mono";
  --tab-font-size: 12px;
  --tab-padding: 6px 14px;
  
  --panel-bg: #323232;
  --panel-border: 1px solid #4a4a4a;
  --panel-border-top: 1px solid #4a4a4a;
  --panel-border-left: 1px solid #4a4a4a;
  --panel-border-right: 1px solid #4a4a4a;
  --panel-border-bottom: 1px solid #4a4a4a;
  
  --button-bg: #3a3a3a;
  --button-text: #b8b8b8;
  --button-border-top: 1px solid #4a4a4a;
  --button-border-left: 1px solid #4a4a4a;
  --button-border-bottom: 1px solid #4a4a4a;
  --button-border-right: 1px solid #4a4a4a;
  --button-shadow: none;
  --button-radius: 0px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #4a4a4a;
  --scrollbar-track: #2b2b2b;

  --tree-font: var(--font-ui);       
  --tree-font-size: 12px;
  --tree-text: #b8b8b8;
  --tree-line-color: #4a4a4a;        
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: transparent;
  --tree-expand-border: 1px solid #4a4a4a;
  --tree-expand-size: 11px;
  --tree-expand-icon-size: 11px;
  
  --tree-selection-bg: #5f87af;      
  --tree-selection-text: #ffffff;
  
  --tree-icon-size: 14px;
  --tree-padding-left: 16px;
  --tree-branch-offset: 10px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 1px solid #4a4a4a;
  --node-bg: rgba(35, 35, 35, 0.6);
  --node-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --node-corner-lines: block;      
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  --edge-stroke: #4a4a4a;          
  --edge-width: 1.5;
  --edge-filter: none;
  --edge-hover-stroke: #00ff88;    
  --edge-dash: 5,5;
  --edge-marker: url(#arrowhead-dark);
  --edge-opacity: 0.8;
  
  --hover-overlay-bg: rgba(95, 135, 175, 0.25);
  --hover-overlay-color: #ffffff;
  --hover-text-blur: none;

  --model-width: 30vh;
  
  --slider-track-height: 2px;
  --slider-track-border: none;
  --slider-track-bg: #4a4a4a;
  
  --slider-thumb-size: 12px;
  --slider-thumb-bg: #5f87af;
  --slider-thumb-border: 1px solid #4a4a4a;
  --slider-thumb-radius: 2px;
  --slider-thumb-margin: -6px;

  --mode-bg: rgba(42, 42, 42, 0.8);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 80px;
  --mode-height: 36px;
  --mode-width-disabled: 80px;
  --mode-height-disabled: 36px;
  --mode-padding: 8px 12px;
  --mode-border: 1px solid #4a4a4a;
  --mode-radius: 0px;
  --mode-font: var(--font-ui);
  --mode-font-size: 11px;
  --mode-font-size-disabled: 11px;
  --mode-color: #b8b8b8;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.4);
  --mode-box-shadow: none;

  --toggle-width: 80px;
  --toggle-height: 40px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #5f87af;        
  --toggle-off-bg: #2a2a2a;       
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 1px solid #4a4a4a;
  --toggle-radius: 4px;
  --toggle-text-display: flex;     
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 500;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #808080;

  
}

/* Neon theme (moved from default) */

html[data-theme="neon"] {
  --bg: #39FF14;
  --text: #0b0c0f;
  --panel: #ffffff;
  --border: #000000;
  --accent: #39FF14;
  --logo-image: url("/logo2.png");

  --font-ui: "MS Sans Serif", system-ui, sans-serif;

  --window-width: 310px;
  --window-height: 700px;
  --window-bg: white;
  --window-border-top: 2px solid #fff;
  --window-border-left: 2px solid #fff;
  --window-border-right: 2px solid #666;
  --window-border-bottom: 2px solid #666;
  --window-box-shadow: inset -1px -1px 0 #999, inset 1px 1px 0 #ccc;
  --window-radius: 0px;
  --window-margin: 20px;
  --window-margin-right: 100px;
  
  --title-bar-display: flex;
  --title-bar-bg: #000082;
  --title-bar-color: white;
  --title-bar-padding: 4px 8px;
  --title-bar-font-weight: bold;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: pixelated;
  --title-bar-font-smoothing: none;
  --title-bar-font-smooth: never;
  
  --close-btn-bg: transparent;
  --close-btn-color: white;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(255,255,255,0.2);
  
  --window-body-padding: 10px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 17px;
  
  --radius: 0px;
  --filter-blur: blur(4px);

  --tab-bg: #c0c0c0;
  --tab-bg-active: #c0c0c0;
  --tab-border-top: 2px solid #fff;
  --tab-border-left: 2px solid #fff;
  --tab-border-right: 2px solid #808080;
  --tab-border-bottom: 1px solid #fff;
  --tab-text: black;
  --tab-font: var(--font-ui-normal);
  --tab-font-size: 12px;
  --tab-padding: 4px 8px;
  
  --panel-bg: #fff;
  --panel-border: 2px solid #808080;
  --panel-border-top: 2px solid #808080;
  --panel-border-left: 2px solid #808080;
  --panel-border-right: 2px solid #808080;
  --panel-border-bottom: 2px solid #808080;
  
  --button-bg: linear-gradient(#dcdcdc, #c0c0c0);
  --button-text: #000000;
  --button-border-top: 2px solid #ffffff;
  --button-border-left: 2px solid #ffffff;
  --button-border-bottom: 2px solid #808080;
  --button-border-right: 2px solid #808080;
  --button-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  --button-radius: 2px;
  
  --scrollbar-width: 12px;
  --scrollbar-thumb: #bfbfbf;
  --scrollbar-track: #f1f1f1;

  --tree-font: "Courier New", monospace;
  --tree-font-size: 14px;
  --tree-text: black;
  --tree-line-color: #999;
  --tree-line-style: dashed;
  --tree-line-width: 1px;
  
  --tree-expand-bg: white;
  --tree-expand-border: 1px solid black;
  --tree-expand-size: 13px;
  --tree-expand-icon-size: 14px;
  
  --tree-selection-bg: #0060df;      
  --tree-selection-text: white;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 20px;
  --tree-branch-offset: 12px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: url("/static.png");
  --node-frame-overlay: url("/monitor.png");
  --node-frame-display: block;
  --node-border: none;
  --node-bg: transparent;
  --node-box-shadow: none;
  --node-corner-lines: none;
  
  --image-width: 225px;
  --image-height: 225px;
  --image-fit: fill;
  
  --edge-stroke: black;
  --edge-width: 4;
  --edge-filter: url(#blurFilter);
  --edge-hover-stroke: red;
  --edge-dash: none;
  --edge-marker: none;
  --edge-opacity: 1;
  
  --hover-overlay-bg: rgba(0, 0, 0, 0.6);
  --hover-overlay-color: white;
  --hover-text-blur: url(#text-blur);

  --model-width: 30vh;
  
  --slider-track-height: 4px;
  --slider-track-border: 2px dashed #333;
  --slider-track-bg: transparent;
  
  --slider-thumb-size: 16px;
  --slider-thumb-bg: #000000;
  --slider-thumb-border: none;
  --slider-thumb-radius: 0px;
  --slider-thumb-margin: -9px;

  --mode-bg: url("/key.png");
  --mode-bg-size: cover;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 85px;
  --mode-height: 85px;
  --mode-width-disabled: 90px;
  --mode-height-disabled: 90px;
  --mode-padding: 10px;
  --mode-border: none;
  --mode-radius: 15px;
  --mode-font: "Arial Narrow", Arial, sans-serif;
  --mode-font-size: 24px;
  --mode-font-size-disabled: 28px;
  --mode-color: #111;
  --mode-text-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
  --mode-filter: brightness(95%);
  --mode-filter-disabled: blur(1px);
  --mode-box-shadow: none;

  --toggle-width: 121px;
  --toggle-height: 160px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: url("/toggle-on.png");
  --toggle-off-bg: url("/toggle-off.png");
  --toggle-bg-size: cover;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: none;
  --toggle-radius: 0px;
  --toggle-text-display: none;
  --toggle-padding: 0;
}

html[data-theme="light"] {
  --bg: #fcfefc;
  --logo-image: url("/logo2.png");
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #ffffff;
  --window-border-top: 1px solid #e3e3e7;
  --window-border-left: 1px solid #e3e3e7;
  --window-border-right: 1px solid #e3e3e7;
  --window-border-bottom: 1px solid #e3e3e7;
  --window-box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  --window-radius: 12px;
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  /* Title bar tokens - Light has clean title bar */
  --title-bar-display: flex;
  --title-bar-bg: #f8f9fa;
  --title-bar-color: #0b0c0f;
  --title-bar-padding: 12px 16px;
  --title-bar-font-weight: 600;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: auto;
  --title-bar-font-smooth: auto;
  
  /* Close button tokens */
  --close-btn-bg: transparent;
  --close-btn-color: #5f6368;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(0,0,0,0.05);
  
  /* Window body tokens */
  --window-body-padding: 20px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 20px;
  
  /* General effects */
  --radius: 12px;
  --filter-blur: none;


  --tab-bg: #f0f0f0;
  --tab-bg-active: #ffffff;
  --tab-border-top: 1px solid #e0e0e0;
  --tab-border-left: 1px solid #e0e0e0;
  --tab-border-right: 1px solid #e0e0e0;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #333333;
  --tab-font: "Roboto Mono";
  --tab-font-size: 13px;
  --tab-padding: 4px;
  
  /* Panel/Button tokens - Light */
  --panel-bg: #ffffff;
  --panel-border: 1px solid #e0e0e0;
  --panel-border-top: 1px solid #e0e0e0;
  --panel-border-left: 1px solid #e0e0e0;
  --panel-border-right: 1px solid #e0e0e0;
  --panel-border-bottom: 1px solid #e0e0e0;
  
  --button-bg: #f5f5f5;
  --button-text: #333333;
  --button-border-top: 1px solid #d0d0d0;
  --button-border-left: 1px solid #d0d0d0;
  --button-border-bottom: 1px solid #d0d0d0;
  --button-border-right: 1px solid #d0d0d0;
  --button-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --button-radius: 4px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #c0c0c0;
  --scrollbar-track: #f5f5f5;
  /*Ascii*/
  --tree-font: "Roboto Mono";
  --tree-font-size: 13px;
  --tree-text: #333333;
  --tree-line-color: #d0d0d0;
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: #f5f5f5;
  --tree-expand-border: 1px solid #d0d0d0;
  --tree-expand-size: 12px;
  --tree-expand-icon-size: 12px;
  
  --tree-selection-bg: #e3f2fd;     /* Light blue */
  --tree-selection-text: #1976d2;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 18px;
  --tree-branch-offset: 10px;


    /* Node Editor tokens - Light (AI detection boxes with neon colors) */
  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 3px solid;
  --node-bg: transparent;
  --node-box-shadow: 0 0 15px currentColor, inset 0 0 10px rgba(255,255,255,0.1);
  --node-corner-lines: block;      /* Show corner brackets */
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  /* Edge tokens - Light (thin neon pink/green) */
  --edge-stroke: #00ff88;          /* Neon green default */
  --edge-width: 2;
  --edge-filter: drop-shadow(0 0 4px currentColor);
  --edge-hover-stroke: #ff0080;    /* Hot pink on hover */
  --edge-dash: none;
  --edge-marker: url(#arrowhead);
  --edge-opacity: 0.9;
  
  /* Hover overlay - Light */
  --hover-overlay-bg: rgba(255, 255, 255, 0.85);
  --hover-overlay-color: #1976d2;
  --hover-text-blur: none;


    /* 3D Model / Slider tokens - Light (clean modern) */
  --model-width: 30vh;
  
  --slider-track-height: 6px;
  --slider-track-border: none;
  --slider-track-bg: #e0e0e0;
  
  --slider-thumb-size: 18px;
  --slider-thumb-bg: #1976d2;
  --slider-thumb-border: 2px solid #ffffff;
  --slider-thumb-radius: 50%;
  --slider-thumb-margin: -8px;


    /* Mode button tokens - Light (clean pill buttons with gradients) */
  --mode-bg: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 100px;
  --mode-height: 46px;
  --mode-width-disabled: 100px;
  --mode-height-disabled: 46px;
  --mode-padding: 12px 20px;
  --mode-border: 2px solid #e0e0e0;
  --mode-radius: 24px;
  --mode-font: "Roboto Mono";
  --mode-font-size: 14px;
  --mode-font-size-disabled: 14px;
  --mode-color: #333333;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.5);
  --mode-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);


    /* Toggle tokens - Light (minimalist switch) */
  --toggle-width: 80px;
  --toggle-height: 42px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #4caf50;        /* Green when ON */
  --toggle-off-bg: #e0e0e0;       /* Gray when OFF */
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 2px solid #d0d0d0;
  --toggle-radius: 24px;
  --toggle-text-display: flex;     /* Show GPU ON/OFF text */
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 600;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #999999;
}

/* Fonts */

@font-face {
font-family: "MS Sans Serif";
src: url("/pixel-sans-serif.woff") format("woff");
}

@font-face {
font-family: "MS Sans Serif-normal";
src: url("/ms-sans-serif-2.otf.woff2") format("woff");
}

.topbar {
  display: flex;
  align-items: center;
  background: #c0c0c0;
  border-bottom: 2px solid #fff;
  padding: 2px 4px;
  height: 28px;
  box-shadow: inset -1px -1px #808080, inset 1px 1px #fff;
  position: fixed;  /* detach from body flexbox */
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;    /* make sure it’s on top of .main */
}

.menu-wrapper {
  position: relative; /* anchor point for dropdown */
}

.menu-button {
  padding: 2px 10px;
  margin-right: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  user-select: none;
}

.menu-button:hover,
.menu-button.active {
  border: 2px inset #808080;
  background: #000080;
  color: #fff;
}

.dropdown {
  position: absolute;
  top: 100%;   /* directly below button */
  left: 0;
  background: #c0c0c0;
  border: 2px solid #808080;
  box-shadow: 2px 2px #404040;
  min-width: 150px;
  z-index: 10000;
  color: black;
}

.dropdown-item {
  padding: 4px 8px;
  cursor: pointer;
  user-select: none;
}

.dropdown-item:hover {
  background: #000080;
  color: #fff;
}
.theme-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #c0c0c0;
  border: 2px solid #808080;
  box-shadow: 2px 2px #404040;
  min-width: 150px;
  z-index: 10000;
  color: black;
  margin-top: 2px;
}

.theme-dropdown .dropdown-item {
  padding: 4px 8px;
  cursor: pointer;
  user-select: none;
  font-family: "Roboto Mono";
  font-size: 11px;
}

.theme-dropdown .dropdown-item:hover {
  background: #000080;
  color: #fff;
}

:root {
  height: 100%;
  width: 100%;
  
  /* Dark theme is now DEFAULT */
  /* Base colors - Subtle dark gray palette */
  --bg: #2b2b2b;                    
  --logo-image: url("/logo-dark.png");
  --text: #b8b8b8;                  
  --text-muted: #808080;            
  --panel: #323232;                 
  --panel-darker: #252525;          
  --border: #4a4a4a;                
  --border-light: #555555;          
  
  --accent: #5f87af;                
  --accent-bright: #7ba3cc;         
  --accent-contrast: #ffffff;       
  
  --font-ui: "Roboto Mono", "SF Mono", "Consolas", "Monaco", "Courier New", monospace;
  --font-ui-normal: var(--font-ui);
  
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #323232;             
  --window-border-top: 1px solid #4a4a4a;     
  --window-border-left: 1px solid #4a4a4a;
  --window-border-right: 1px solid #4a4a4a;
  --window-border-bottom: 1px solid #4a4a4a;
  --window-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --window-radius: 0px;             
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  --title-bar-display: flex;
  --title-bar-bg: #2b2b2b;          
  --title-bar-color: #b8b8b8;       
  --title-bar-padding: 6px 10px;    
  --title-bar-font-weight: 400;     
  --title-bar-font-size: 11px;      
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: antialiased;
  --title-bar-font-smooth: auto;
  --title-bar-border-bottom: 1px solid #4a4a4a;  
  
  --close-btn-bg: transparent;
  --close-btn-color: #808080;       
  --close-btn-font-size: 12px;
  --close-btn-hover-bg: rgba(255, 255, 255, 0.08);
  --close-btn-hover-color: #b8b8b8;
  
  --window-body-padding: 12px;
  --window-body-font-size: 12px;
  --window-body-padding-right: 12px;
  
  --radius: 0px;                    
  --filter-blur: none;
  
  --selection-bg: #5f87af;          
  --selection-text: #ffffff;
  --hover-bg: rgba(95, 135, 175, 0.15);  
  --active-bg: rgba(95, 135, 175, 0.25);
  --separator: #4a4a4a;             
  
  --tab-bg: #2b2b2b;
  --tab-bg-active: #323232;
  --tab-border-top: 1px solid #4a4a4a;
  --tab-border-left: 1px solid #4a4a4a;
  --tab-border-right: 1px solid #4a4a4a;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #b8b8b8;
  --tab-font: "Roboto Mono";
  --tab-font-size: 12px;
  --tab-padding: 6px 14px;
  
  --panel-bg: #323232;
  --panel-border: 1px solid #4a4a4a;
  --panel-border-top: 1px solid #4a4a4a;
  --panel-border-left: 1px solid #4a4a4a;
  --panel-border-right: 1px solid #4a4a4a;
  --panel-border-bottom: 1px solid #4a4a4a;
  
  --button-bg: #3a3a3a;
  --button-text: #b8b8b8;
  --button-border-top: 1px solid #4a4a4a;
  --button-border-left: 1px solid #4a4a4a;
  --button-border-bottom: 1px solid #4a4a4a;
  --button-border-right: 1px solid #4a4a4a;
  --button-shadow: none;
  --button-radius: 0px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #4a4a4a;
  --scrollbar-track: #2b2b2b;

  --tree-font: var(--font-ui);       
  --tree-font-size: 12px;
  --tree-text: #b8b8b8;
  --tree-line-color: #4a4a4a;        
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: transparent;
  --tree-expand-border: 1px solid #4a4a4a;
  --tree-expand-size: 11px;
  --tree-expand-icon-size: 11px;
  
  --tree-selection-bg: #5f87af;      
  --tree-selection-text: #ffffff;
  
  --tree-icon-size: 14px;
  --tree-padding-left: 16px;
  --tree-branch-offset: 10px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 1px solid #4a4a4a;
  --node-bg: rgba(35, 35, 35, 0.6);
  --node-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --node-corner-lines: block;      
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  --edge-stroke: #4a4a4a;          
  --edge-width: 1.5;
  --edge-filter: none;
  --edge-hover-stroke: #00ff88;    
  --edge-dash: 5,5;
  --edge-marker: url(#arrowhead-dark);
  --edge-opacity: 0.8;
  
  --hover-overlay-bg: rgba(95, 135, 175, 0.25);
  --hover-overlay-color: #ffffff;
  --hover-text-blur: none;

  --model-width: 30vh;
  
  --slider-track-height: 2px;
  --slider-track-border: none;
  --slider-track-bg: #4a4a4a;
  
  --slider-thumb-size: 12px;
  --slider-thumb-bg: #5f87af;
  --slider-thumb-border: 1px solid #4a4a4a;
  --slider-thumb-radius: 2px;
  --slider-thumb-margin: -6px;

  --mode-bg: rgba(42, 42, 42, 0.8);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 80px;
  --mode-height: 36px;
  --mode-width-disabled: 80px;
  --mode-height-disabled: 36px;
  --mode-padding: 8px 12px;
  --mode-border: 1px solid #4a4a4a;
  --mode-radius: 0px;
  --mode-font: var(--font-ui);
  --mode-font-size: 11px;
  --mode-font-size-disabled: 11px;
  --mode-color: #b8b8b8;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.4);
  --mode-box-shadow: none;

  --toggle-width: 80px;
  --toggle-height: 40px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #5f87af;        
  --toggle-off-bg: #2a2a2a;       
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 1px solid #4a4a4a;
  --toggle-radius: 4px;
  --toggle-text-display: flex;     
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 500;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #808080;

  
}

/* Neon theme (moved from default) */

html[data-theme="neon"] {
  --bg: #39FF14;
  --text: #0b0c0f;
  --panel: #ffffff;
  --border: #000000;
  --accent: #39FF14;
  --logo-image: url("/logo2.png");

  --font-ui: "MS Sans Serif", system-ui, sans-serif;

  --window-width: 310px;
  --window-height: 700px;
  --window-bg: white;
  --window-border-top: 2px solid #fff;
  --window-border-left: 2px solid #fff;
  --window-border-right: 2px solid #666;
  --window-border-bottom: 2px solid #666;
  --window-box-shadow: inset -1px -1px 0 #999, inset 1px 1px 0 #ccc;
  --window-radius: 0px;
  --window-margin: 20px;
  --window-margin-right: 100px;
  
  --title-bar-display: flex;
  --title-bar-bg: #000082;
  --title-bar-color: white;
  --title-bar-padding: 4px 8px;
  --title-bar-font-weight: bold;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: pixelated;
  --title-bar-font-smoothing: none;
  --title-bar-font-smooth: never;
  
  --close-btn-bg: transparent;
  --close-btn-color: white;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(255,255,255,0.2);
  
  --window-body-padding: 10px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 17px;
  
  --radius: 0px;
  --filter-blur: blur(4px);

  --tab-bg: #c0c0c0;
  --tab-bg-active: #c0c0c0;
  --tab-border-top: 2px solid #fff;
  --tab-border-left: 2px solid #fff;
  --tab-border-right: 2px solid #808080;
  --tab-border-bottom: 1px solid #fff;
  --tab-text: black;
  --tab-font: var(--font-ui-normal);
  --tab-font-size: 12px;
  --tab-padding: 4px 8px;
  
  --panel-bg: #fff;
  --panel-border: 2px solid #808080;
  --panel-border-top: 2px solid #808080;
  --panel-border-left: 2px solid #808080;
  --panel-border-right: 2px solid #808080;
  --panel-border-bottom: 2px solid #808080;
  
  --button-bg: linear-gradient(#dcdcdc, #c0c0c0);
  --button-text: #000000;
  --button-border-top: 2px solid #ffffff;
  --button-border-left: 2px solid #ffffff;
  --button-border-bottom: 2px solid #808080;
  --button-border-right: 2px solid #808080;
  --button-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  --button-radius: 2px;
  
  --scrollbar-width: 12px;
  --scrollbar-thumb: #bfbfbf;
  --scrollbar-track: #f1f1f1;

  --tree-font: "Courier New", monospace;
  --tree-font-size: 14px;
  --tree-text: black;
  --tree-line-color: #999;
  --tree-line-style: dashed;
  --tree-line-width: 1px;
  
  --tree-expand-bg: white;
  --tree-expand-border: 1px solid black;
  --tree-expand-size: 13px;
  --tree-expand-icon-size: 14px;
  
  --tree-selection-bg: #0060df;      
  --tree-selection-text: white;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 20px;
  --tree-branch-offset: 12px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: url("/static.png");
  --node-frame-overlay: url("/monitor.png");
  --node-frame-display: block;
  --node-border: none;
  --node-bg: transparent;
  --node-box-shadow: none;
  --node-corner-lines: none;
  
  --image-width: 225px;
  --image-height: 225px;
  --image-fit: fill;
  
  --edge-stroke: black;
  --edge-width: 4;
  --edge-filter: url(#blurFilter);
  --edge-hover-stroke: red;
  --edge-dash: none;
  --edge-marker: none;
  --edge-opacity: 1;
  
  --hover-overlay-bg: rgba(0, 0, 0, 0.6);
  --hover-overlay-color: white;
  --hover-text-blur: url(#text-blur);

  --model-width: 30vh;
  
  --slider-track-height: 4px;
  --slider-track-border: 2px dashed #333;
  --slider-track-bg: transparent;
  
  --slider-thumb-size: 16px;
  --slider-thumb-bg: #000000;
  --slider-thumb-border: none;
  --slider-thumb-radius: 0px;
  --slider-thumb-margin: -9px;

  --mode-bg: url("/key.png");
  --mode-bg-size: cover;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 85px;
  --mode-height: 85px;
  --mode-width-disabled: 90px;
  --mode-height-disabled: 90px;
  --mode-padding: 10px;
  --mode-border: none;
  --mode-radius: 15px;
  --mode-font: "Arial Narrow", Arial, sans-serif;
  --mode-font-size: 24px;
  --mode-font-size-disabled: 28px;
  --mode-color: #111;
  --mode-text-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
  --mode-filter: brightness(95%);
  --mode-filter-disabled: blur(1px);
  --mode-box-shadow: none;

  --toggle-width: 121px;
  --toggle-height: 160px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: url("/toggle-on.png");
  --toggle-off-bg: url("/toggle-off.png");
  --toggle-bg-size: cover;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: none;
  --toggle-radius: 0px;
  --toggle-text-display: none;
  --toggle-padding: 0;
}

html[data-theme="light"] {
  --bg: #fcfefc;
  --logo-image: url("/logo2.png");
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #ffffff;
  --window-border-top: 1px solid #e3e3e7;
  --window-border-left: 1px solid #e3e3e7;
  --window-border-right: 1px solid #e3e3e7;
  --window-border-bottom: 1px solid #e3e3e7;
  --window-box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  --window-radius: 12px;
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  /* Title bar tokens - Light has clean title bar */
  --title-bar-display: flex;
  --title-bar-bg: #f8f9fa;
  --title-bar-color: #0b0c0f;
  --title-bar-padding: 12px 16px;
  --title-bar-font-weight: 600;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: auto;
  --title-bar-font-smooth: auto;
  
  /* Close button tokens */
  --close-btn-bg: transparent;
  --close-btn-color: #5f6368;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(0,0,0,0.05);
  
  /* Window body tokens */
  --window-body-padding: 20px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 20px;
  
  /* General effects */
  --radius: 12px;
  --filter-blur: none;


  --tab-bg: #f0f0f0;
  --tab-bg-active: #ffffff;
  --tab-border-top: 1px solid #e0e0e0;
  --tab-border-left: 1px solid #e0e0e0;
  --tab-border-right: 1px solid #e0e0e0;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #333333;
  --tab-font: "Roboto Mono";
  --tab-font-size: 13px;
  --tab-padding: 4px;
  
  /* Panel/Button tokens - Light */
  --panel-bg: #ffffff;
  --panel-border: 1px solid #e0e0e0;
  --panel-border-top: 1px solid #e0e0e0;
  --panel-border-left: 1px solid #e0e0e0;
  --panel-border-right: 1px solid #e0e0e0;
  --panel-border-bottom: 1px solid #e0e0e0;
  
  --button-bg: #f5f5f5;
  --button-text: #333333;
  --button-border-top: 1px solid #d0d0d0;
  --button-border-left: 1px solid #d0d0d0;
  --button-border-bottom: 1px solid #d0d0d0;
  --button-border-right: 1px solid #d0d0d0;
  --button-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --button-radius: 4px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #c0c0c0;
  --scrollbar-track: #f5f5f5;
  /*Ascii*/
  --tree-font: "Roboto Mono";
  --tree-font-size: 13px;
  --tree-text: #333333;
  --tree-line-color: #d0d0d0;
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: #f5f5f5;
  --tree-expand-border: 1px solid #d0d0d0;
  --tree-expand-size: 12px;
  --tree-expand-icon-size: 12px;
  
  --tree-selection-bg: #e3f2fd;     /* Light blue */
  --tree-selection-text: #1976d2;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 18px;
  --tree-branch-offset: 10px;


    /* Node Editor tokens - Light (AI detection boxes with neon colors) */
  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 3px solid;
  --node-bg: transparent;
  --node-box-shadow: 0 0 15px currentColor, inset 0 0 10px rgba(255,255,255,0.1);
  --node-corner-lines: block;      /* Show corner brackets */
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  /* Edge tokens - Light (thin neon pink/green) */
  --edge-stroke: #00ff88;          /* Neon green default */
  --edge-width: 2;
  --edge-filter: drop-shadow(0 0 4px currentColor);
  --edge-hover-stroke: #ff0080;    /* Hot pink on hover */
  --edge-dash: none;
  --edge-marker: url(#arrowhead);
  --edge-opacity: 0.9;
  
  /* Hover overlay - Light */
  --hover-overlay-bg: rgba(255, 255, 255, 0.85);
  --hover-overlay-color: #1976d2;
  --hover-text-blur: none;


    /* 3D Model / Slider tokens - Light (clean modern) */
  --model-width: 30vh;
  
  --slider-track-height: 6px;
  --slider-track-border: none;
  --slider-track-bg: #e0e0e0;
  
  --slider-thumb-size: 18px;
  --slider-thumb-bg: #1976d2;
  --slider-thumb-border: 2px solid #ffffff;
  --slider-thumb-radius: 50%;
  --slider-thumb-margin: -8px;


    /* Mode button tokens - Light (clean pill buttons with gradients) */
  --mode-bg: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 100px;
  --mode-height: 46px;
  --mode-width-disabled: 100px;
  --mode-height-disabled: 46px;
  --mode-padding: 12px 20px;
  --mode-border: 2px solid #e0e0e0;
  --mode-radius: 24px;
  --mode-font: "Roboto Mono";
  --mode-font-size: 14px;
  --mode-font-size-disabled: 14px;
  --mode-color: #333333;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.5);
  --mode-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);


    /* Toggle tokens - Light (minimalist switch) */
  --toggle-width: 80px;
  --toggle-height: 42px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #4caf50;        /* Green when ON */
  --toggle-off-bg: #e0e0e0;       /* Gray when OFF */
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 2px solid #d0d0d0;
  --toggle-radius: 24px;
  --toggle-text-display: flex;     /* Show GPU ON/OFF text */
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 600;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #999999;
}

/* Fonts */

@font-face {
font-family: "MS Sans Serif";
src: url("/pixel-sans-serif.woff") format("woff");
}

@font-face {
font-family: "MS Sans Serif-normal";
src: url("/ms-sans-serif-2.otf.woff2") format("woff");
}

.edit-mode {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.mode-wrapper {
  width: fit-content;  /* Shrink to button size */
}

.mode,
.mode-disabled {
  position: relative;
  box-sizing: border-box;
  padding: var(--mode-padding);
  cursor: pointer;
  font-family: var(--mode-font);
  font-stretch: condensed;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
  color: var(--mode-color);
  text-shadow: var(--mode-text-shadow);
  background: var(--mode-bg);
  background-repeat: var(--mode-bg-repeat);
  background-position: var(--mode-bg-position);
  background-size: var(--mode-bg-size);
  border: var(--mode-border);
  border-radius: var(--mode-radius);
  box-shadow: var(--mode-box-shadow);
  transition: all 0.15s ease;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 500;
}

/* Disabled state - matches hover appearance */

.mode-disabled {
  height: var(--mode-height-disabled);
  width: var(--mode-width-disabled);
  font-size: var(--mode-font-size-disabled);
  cursor: pointer;
  
  /* Apply same styling as hover */
  transform: translateY(-2px);
  filter: brightness(105%);
  opacity: 1;
}

/* Active state */

.mode {
  height: var(--mode-height);
  width: var(--mode-width);
  font-size: var(--mode-font-size);
  filter: var(--mode-filter);
  opacity: 1;
}

/* Hover state */

.mode:hover {
  transform: translateY(-2px);
  filter: brightness(105%);
}

.mode:active {
  transform: translateY(0);
  filter: brightness(90%);
}

/* Light theme: disabled matches hover */

html[data-theme="light"] .mode-disabled {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
}

html[data-theme="light"] .mode:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
}

html[data-theme="light"] .mode:active {
  border-color: var(--accent);
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

/* Dark theme: disabled matches hover */

html[data-theme="dark"] .mode-disabled {
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(95, 135, 175, 0.4);
  background: rgba(50, 50, 50, 0.9);
}

html[data-theme="dark"] .mode:hover {
  border-color: var(--accent);
  box-shadow: 0 0 8px rgba(95, 135, 175, 0.4);
  background: rgba(50, 50, 50, 0.9);
}

html[data-theme="dark"] .mode:active {
  background: rgba(35, 35, 35, 0.9);
  transform: translateY(1px);
}

/* Neon theme: disabled matches hover */

html[data-theme="neon"] .mode-disabled {
  filter: brightness(100%) blur(0.5px);
}

html[data-theme="neon"] .mode:hover {
  filter: brightness(100%) blur(0.5px);
}

html[data-theme="neon"] .mode:active {
  border-color: var(--accent);
  filter: brightness(85%);
}


:root {
  height: 100%;
  width: 100%;
  
  /* Dark theme is now DEFAULT */
  /* Base colors - Subtle dark gray palette */
  --bg: #2b2b2b;                    
  --logo-image: url("/logo-dark.png");
  --text: #b8b8b8;                  
  --text-muted: #808080;            
  --panel: #323232;                 
  --panel-darker: #252525;          
  --border: #4a4a4a;                
  --border-light: #555555;          
  
  --accent: #5f87af;                
  --accent-bright: #7ba3cc;         
  --accent-contrast: #ffffff;       
  
  --font-ui: "Roboto Mono", "SF Mono", "Consolas", "Monaco", "Courier New", monospace;
  --font-ui-normal: var(--font-ui);
  
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #323232;             
  --window-border-top: 1px solid #4a4a4a;     
  --window-border-left: 1px solid #4a4a4a;
  --window-border-right: 1px solid #4a4a4a;
  --window-border-bottom: 1px solid #4a4a4a;
  --window-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --window-radius: 0px;             
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  --title-bar-display: flex;
  --title-bar-bg: #2b2b2b;          
  --title-bar-color: #b8b8b8;       
  --title-bar-padding: 6px 10px;    
  --title-bar-font-weight: 400;     
  --title-bar-font-size: 11px;      
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: antialiased;
  --title-bar-font-smooth: auto;
  --title-bar-border-bottom: 1px solid #4a4a4a;  
  
  --close-btn-bg: transparent;
  --close-btn-color: #808080;       
  --close-btn-font-size: 12px;
  --close-btn-hover-bg: rgba(255, 255, 255, 0.08);
  --close-btn-hover-color: #b8b8b8;
  
  --window-body-padding: 12px;
  --window-body-font-size: 12px;
  --window-body-padding-right: 12px;
  
  --radius: 0px;                    
  --filter-blur: none;
  
  --selection-bg: #5f87af;          
  --selection-text: #ffffff;
  --hover-bg: rgba(95, 135, 175, 0.15);  
  --active-bg: rgba(95, 135, 175, 0.25);
  --separator: #4a4a4a;             
  
  --tab-bg: #2b2b2b;
  --tab-bg-active: #323232;
  --tab-border-top: 1px solid #4a4a4a;
  --tab-border-left: 1px solid #4a4a4a;
  --tab-border-right: 1px solid #4a4a4a;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #b8b8b8;
  --tab-font: "Roboto Mono";
  --tab-font-size: 12px;
  --tab-padding: 6px 14px;
  
  --panel-bg: #323232;
  --panel-border: 1px solid #4a4a4a;
  --panel-border-top: 1px solid #4a4a4a;
  --panel-border-left: 1px solid #4a4a4a;
  --panel-border-right: 1px solid #4a4a4a;
  --panel-border-bottom: 1px solid #4a4a4a;
  
  --button-bg: #3a3a3a;
  --button-text: #b8b8b8;
  --button-border-top: 1px solid #4a4a4a;
  --button-border-left: 1px solid #4a4a4a;
  --button-border-bottom: 1px solid #4a4a4a;
  --button-border-right: 1px solid #4a4a4a;
  --button-shadow: none;
  --button-radius: 0px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #4a4a4a;
  --scrollbar-track: #2b2b2b;

  --tree-font: var(--font-ui);       
  --tree-font-size: 12px;
  --tree-text: #b8b8b8;
  --tree-line-color: #4a4a4a;        
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: transparent;
  --tree-expand-border: 1px solid #4a4a4a;
  --tree-expand-size: 11px;
  --tree-expand-icon-size: 11px;
  
  --tree-selection-bg: #5f87af;      
  --tree-selection-text: #ffffff;
  
  --tree-icon-size: 14px;
  --tree-padding-left: 16px;
  --tree-branch-offset: 10px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 1px solid #4a4a4a;
  --node-bg: rgba(35, 35, 35, 0.6);
  --node-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  --node-corner-lines: block;      
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  --edge-stroke: #4a4a4a;          
  --edge-width: 1.5;
  --edge-filter: none;
  --edge-hover-stroke: #00ff88;    
  --edge-dash: 5,5;
  --edge-marker: url(#arrowhead-dark);
  --edge-opacity: 0.8;
  
  --hover-overlay-bg: rgba(95, 135, 175, 0.25);
  --hover-overlay-color: #ffffff;
  --hover-text-blur: none;

  --model-width: 30vh;
  
  --slider-track-height: 2px;
  --slider-track-border: none;
  --slider-track-bg: #4a4a4a;
  
  --slider-thumb-size: 12px;
  --slider-thumb-bg: #5f87af;
  --slider-thumb-border: 1px solid #4a4a4a;
  --slider-thumb-radius: 2px;
  --slider-thumb-margin: -6px;

  --mode-bg: rgba(42, 42, 42, 0.8);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 80px;
  --mode-height: 36px;
  --mode-width-disabled: 80px;
  --mode-height-disabled: 36px;
  --mode-padding: 8px 12px;
  --mode-border: 1px solid #4a4a4a;
  --mode-radius: 0px;
  --mode-font: var(--font-ui);
  --mode-font-size: 11px;
  --mode-font-size-disabled: 11px;
  --mode-color: #b8b8b8;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.4);
  --mode-box-shadow: none;

  --toggle-width: 80px;
  --toggle-height: 40px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #5f87af;        
  --toggle-off-bg: #2a2a2a;       
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 1px solid #4a4a4a;
  --toggle-radius: 4px;
  --toggle-text-display: flex;     
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 500;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #808080;

  
}

/* Neon theme (moved from default) */

html[data-theme="neon"] {
  --bg: #39FF14;
  --text: #0b0c0f;
  --panel: #ffffff;
  --border: #000000;
  --accent: #39FF14;
  --logo-image: url("/logo2.png");

  --font-ui: "MS Sans Serif", system-ui, sans-serif;

  --window-width: 310px;
  --window-height: 700px;
  --window-bg: white;
  --window-border-top: 2px solid #fff;
  --window-border-left: 2px solid #fff;
  --window-border-right: 2px solid #666;
  --window-border-bottom: 2px solid #666;
  --window-box-shadow: inset -1px -1px 0 #999, inset 1px 1px 0 #ccc;
  --window-radius: 0px;
  --window-margin: 20px;
  --window-margin-right: 100px;
  
  --title-bar-display: flex;
  --title-bar-bg: #000082;
  --title-bar-color: white;
  --title-bar-padding: 4px 8px;
  --title-bar-font-weight: bold;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: pixelated;
  --title-bar-font-smoothing: none;
  --title-bar-font-smooth: never;
  
  --close-btn-bg: transparent;
  --close-btn-color: white;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(255,255,255,0.2);
  
  --window-body-padding: 10px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 17px;
  
  --radius: 0px;
  --filter-blur: blur(4px);

  --tab-bg: #c0c0c0;
  --tab-bg-active: #c0c0c0;
  --tab-border-top: 2px solid #fff;
  --tab-border-left: 2px solid #fff;
  --tab-border-right: 2px solid #808080;
  --tab-border-bottom: 1px solid #fff;
  --tab-text: black;
  --tab-font: var(--font-ui-normal);
  --tab-font-size: 12px;
  --tab-padding: 4px 8px;
  
  --panel-bg: #fff;
  --panel-border: 2px solid #808080;
  --panel-border-top: 2px solid #808080;
  --panel-border-left: 2px solid #808080;
  --panel-border-right: 2px solid #808080;
  --panel-border-bottom: 2px solid #808080;
  
  --button-bg: linear-gradient(#dcdcdc, #c0c0c0);
  --button-text: #000000;
  --button-border-top: 2px solid #ffffff;
  --button-border-left: 2px solid #ffffff;
  --button-border-bottom: 2px solid #808080;
  --button-border-right: 2px solid #808080;
  --button-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  --button-radius: 2px;
  
  --scrollbar-width: 12px;
  --scrollbar-thumb: #bfbfbf;
  --scrollbar-track: #f1f1f1;

  --tree-font: "Courier New", monospace;
  --tree-font-size: 14px;
  --tree-text: black;
  --tree-line-color: #999;
  --tree-line-style: dashed;
  --tree-line-width: 1px;
  
  --tree-expand-bg: white;
  --tree-expand-border: 1px solid black;
  --tree-expand-size: 13px;
  --tree-expand-icon-size: 14px;
  
  --tree-selection-bg: #0060df;      
  --tree-selection-text: white;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 20px;
  --tree-branch-offset: 12px;

  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: url("/static.png");
  --node-frame-overlay: url("/monitor.png");
  --node-frame-display: block;
  --node-border: none;
  --node-bg: transparent;
  --node-box-shadow: none;
  --node-corner-lines: none;
  
  --image-width: 225px;
  --image-height: 225px;
  --image-fit: fill;
  
  --edge-stroke: black;
  --edge-width: 4;
  --edge-filter: url(#blurFilter);
  --edge-hover-stroke: red;
  --edge-dash: none;
  --edge-marker: none;
  --edge-opacity: 1;
  
  --hover-overlay-bg: rgba(0, 0, 0, 0.6);
  --hover-overlay-color: white;
  --hover-text-blur: url(#text-blur);

  --model-width: 30vh;
  
  --slider-track-height: 4px;
  --slider-track-border: 2px dashed #333;
  --slider-track-bg: transparent;
  
  --slider-thumb-size: 16px;
  --slider-thumb-bg: #000000;
  --slider-thumb-border: none;
  --slider-thumb-radius: 0px;
  --slider-thumb-margin: -9px;

  --mode-bg: url("/key.png");
  --mode-bg-size: cover;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 85px;
  --mode-height: 85px;
  --mode-width-disabled: 90px;
  --mode-height-disabled: 90px;
  --mode-padding: 10px;
  --mode-border: none;
  --mode-radius: 15px;
  --mode-font: "Arial Narrow", Arial, sans-serif;
  --mode-font-size: 24px;
  --mode-font-size-disabled: 28px;
  --mode-color: #111;
  --mode-text-shadow: 0 0 3px rgba(0, 0, 0, 0.6);
  --mode-filter: brightness(95%);
  --mode-filter-disabled: blur(1px);
  --mode-box-shadow: none;

  --toggle-width: 121px;
  --toggle-height: 160px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: url("/toggle-on.png");
  --toggle-off-bg: url("/toggle-off.png");
  --toggle-bg-size: cover;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: none;
  --toggle-radius: 0px;
  --toggle-text-display: none;
  --toggle-padding: 0;
}

html[data-theme="light"] {
  --bg: #fcfefc;
  --logo-image: url("/logo2.png");
  --window-width: 310px;
  --window-height: 700px;
  --window-bg: #ffffff;
  --window-border-top: 1px solid #e3e3e7;
  --window-border-left: 1px solid #e3e3e7;
  --window-border-right: 1px solid #e3e3e7;
  --window-border-bottom: 1px solid #e3e3e7;
  --window-box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  --window-radius: 12px;
  --window-margin: 20px;
  --window-margin-right: 20px;
  
  /* Title bar tokens - Light has clean title bar */
  --title-bar-display: flex;
  --title-bar-bg: #f8f9fa;
  --title-bar-color: #0b0c0f;
  --title-bar-padding: 12px 16px;
  --title-bar-font-weight: 600;
  --title-bar-font-size: 14px;
  --title-bar-image-rendering: auto;
  --title-bar-font-smoothing: auto;
  --title-bar-font-smooth: auto;
  
  /* Close button tokens */
  --close-btn-bg: transparent;
  --close-btn-color: #5f6368;
  --close-btn-font-size: 16px;
  --close-btn-hover-bg: rgba(0,0,0,0.05);
  
  /* Window body tokens */
  --window-body-padding: 20px;
  --window-body-font-size: 14px;
  --window-body-padding-right: 20px;
  
  /* General effects */
  --radius: 12px;
  --filter-blur: none;


  --tab-bg: #f0f0f0;
  --tab-bg-active: #ffffff;
  --tab-border-top: 1px solid #e0e0e0;
  --tab-border-left: 1px solid #e0e0e0;
  --tab-border-right: 1px solid #e0e0e0;
  --tab-border-bottom: 1px solid transparent;
  --tab-text: #333333;
  --tab-font: "Roboto Mono";
  --tab-font-size: 13px;
  --tab-padding: 4px;
  
  /* Panel/Button tokens - Light */
  --panel-bg: #ffffff;
  --panel-border: 1px solid #e0e0e0;
  --panel-border-top: 1px solid #e0e0e0;
  --panel-border-left: 1px solid #e0e0e0;
  --panel-border-right: 1px solid #e0e0e0;
  --panel-border-bottom: 1px solid #e0e0e0;
  
  --button-bg: #f5f5f5;
  --button-text: #333333;
  --button-border-top: 1px solid #d0d0d0;
  --button-border-left: 1px solid #d0d0d0;
  --button-border-bottom: 1px solid #d0d0d0;
  --button-border-right: 1px solid #d0d0d0;
  --button-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  --button-radius: 4px;
  --button-font: "Roboto Mono";
  
  --scrollbar-width: 8px;
  --scrollbar-thumb: #c0c0c0;
  --scrollbar-track: #f5f5f5;
  /*Ascii*/
  --tree-font: "Roboto Mono";
  --tree-font-size: 13px;
  --tree-text: #333333;
  --tree-line-color: #d0d0d0;
  --tree-line-style: solid;
  --tree-line-width: 1px;
  
  --tree-expand-bg: #f5f5f5;
  --tree-expand-border: 1px solid #d0d0d0;
  --tree-expand-size: 12px;
  --tree-expand-icon-size: 12px;
  
  --tree-selection-bg: #e3f2fd;     /* Light blue */
  --tree-selection-text: #1976d2;
  
  --tree-icon-size: 16px;
  --tree-padding-left: 18px;
  --tree-branch-offset: 10px;


    /* Node Editor tokens - Light (AI detection boxes with neon colors) */
  --node-width: 250px;
  --node-height: 250px;
  --node-frame-bg: none;
  --node-frame-overlay: none;
  --node-frame-display: none;
  --node-border: 3px solid;
  --node-bg: transparent;
  --node-box-shadow: 0 0 15px currentColor, inset 0 0 10px rgba(255,255,255,0.1);
  --node-corner-lines: block;      /* Show corner brackets */
  
  --image-width: 220px;
  --image-height: 220px;
  --image-fit: cover;
  
  /* Edge tokens - Light (thin neon pink/green) */
  --edge-stroke: #00ff88;          /* Neon green default */
  --edge-width: 2;
  --edge-filter: drop-shadow(0 0 4px currentColor);
  --edge-hover-stroke: #ff0080;    /* Hot pink on hover */
  --edge-dash: none;
  --edge-marker: url(#arrowhead);
  --edge-opacity: 0.9;
  
  /* Hover overlay - Light */
  --hover-overlay-bg: rgba(255, 255, 255, 0.85);
  --hover-overlay-color: #1976d2;
  --hover-text-blur: none;


    /* 3D Model / Slider tokens - Light (clean modern) */
  --model-width: 30vh;
  
  --slider-track-height: 6px;
  --slider-track-border: none;
  --slider-track-bg: #e0e0e0;
  
  --slider-thumb-size: 18px;
  --slider-thumb-bg: #1976d2;
  --slider-thumb-border: 2px solid #ffffff;
  --slider-thumb-radius: 50%;
  --slider-thumb-margin: -8px;


    /* Mode button tokens - Light (clean pill buttons with gradients) */
  --mode-bg: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
  --mode-bg-size: auto;
  --mode-bg-repeat: no-repeat;
  --mode-bg-position: center;
  --mode-width: 100px;
  --mode-height: 46px;
  --mode-width-disabled: 100px;
  --mode-height-disabled: 46px;
  --mode-padding: 12px 20px;
  --mode-border: 2px solid #e0e0e0;
  --mode-radius: 24px;
  --mode-font: "Roboto Mono";
  --mode-font-size: 14px;
  --mode-font-size-disabled: 14px;
  --mode-color: #333333;
  --mode-text-shadow: none;
  --mode-filter: none;
  --mode-filter-disabled: opacity(0.5);
  --mode-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);


    /* Toggle tokens - Light (minimalist switch) */
  --toggle-width: 80px;
  --toggle-height: 42px;
  --toggle-margin-top: 50px;
  --toggle-on-bg: #4caf50;        /* Green when ON */
  --toggle-off-bg: #e0e0e0;       /* Gray when OFF */
  --toggle-bg-size: auto;
  --toggle-bg-position: center;
  --toggle-bg-repeat: no-repeat;
  --toggle-border: 2px solid #d0d0d0;
  --toggle-radius: 24px;
  --toggle-text-display: flex;     /* Show GPU ON/OFF text */
  --toggle-padding: 8px 12px;
  --toggle-font-size: 15px;
  --toggle-font-weight: 600;
  --toggle-text-color-on: #ffffff;
  --toggle-text-color-off: #999999;
}

/* Fonts */

@font-face {
font-family: "MS Sans Serif";
src: url("/pixel-sans-serif.woff") format("woff");
}

@font-face {
font-family: "MS Sans Serif-normal";
src: url("/ms-sans-serif-2.otf.woff2") format("woff");
}

.toggle-on,
.toggle-off {
  margin-top: var(--toggle-margin-top);
  width: var(--toggle-width);
  height: var(--toggle-height);
  border: var(--toggle-border);
  border-radius: var(--toggle-radius);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  user-select: none;
  /* Common properties for text-based toggles */
  display: var(--toggle-text-display);
  align-items: center;
  justify-content: center;
  padding: var(--toggle-padding);
  font-family: "Roboto Mono";
  font-size: var(--toggle-font-size);
  font-weight: var(--toggle-font-weight);
}

/* NEON theme - image-based, must come first and be specific */

html[data-theme="neon"] .toggle-on {
  background-image: var(--toggle-on-bg) !important;
  background-size: var(--toggle-bg-size) !important;
  background-position: var(--toggle-bg-position) !important;
  background-repeat: var(--toggle-bg-repeat) !important;
  background-color: transparent !important;
  display: block !important;
  padding: 0 !important;
}

html[data-theme="neon"] .toggle-off {
  background-image: var(--toggle-off-bg) !important;
  background-size: var(--toggle-bg-size) !important;
  background-position: var(--toggle-bg-position) !important;
  background-repeat: var(--toggle-bg-repeat) !important;
  background-color: transparent !important;
  display: block !important;
  padding: 0 !important;
}

/* Hide text for neon */

html[data-theme="neon"] .toggle-on::after,
html[data-theme="neon"] .toggle-off::after {
  display: none !important;
}

/* LIGHT/DARK themes - color-based with text */

html[data-theme="light"] .toggle-on,
html[data-theme="dark"] .toggle-on {
  background-image: none;
  background-color: var(--toggle-on-bg);
  color: var(--toggle-text-color-on);
}

html[data-theme="light"] .toggle-off,
html[data-theme="dark"] .toggle-off {
  background-image: none;
  background-color: var(--toggle-off-bg);
  color: var(--toggle-text-color-off);
}

/* Show GPU ON/OFF text for light/dark themes */

html[data-theme="light"] .toggle-on::after,
html[data-theme="dark"] .toggle-on::after {
  content: "GPU ON";
}

html[data-theme="light"] .toggle-off::after,
html[data-theme="dark"] .toggle-off::after {
  content: "GPU OFF";
}

/* Hover effects */

.toggle-on:hover,
.toggle-off:hover {
  transform: scale(1.05);
  filter: brightness(110%);
}

.toggle-on:active,
.toggle-off:active {
  transform: scale(0.98);
  filter: brightness(95%);
}

/* Light theme shadows */

html[data-theme="light"] .toggle-on,
html[data-theme="light"] .toggle-off {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

html[data-theme="light"] .toggle-on:hover {
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

html[data-theme="light"] .toggle-off:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Dark theme glows */

html[data-theme="dark"] .toggle-on {
  box-shadow: 0 0 8px rgba(95, 135, 175, 0.4);
}

html[data-theme="dark"] .toggle-on:hover {
  box-shadow: 0 0 12px rgba(95, 135, 175, 0.6);
}

html[data-theme="dark"] .toggle-off:hover {
  border-color: var(--accent);
}.gh-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #2f2f2f;
  background: #111;
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
  height: 40px;
  top: 10px;
}

.gh-btn__icon {
  display: inline-flex;
  top: 10px;
}

.gh-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  top: 10px;
}

.gh-user__avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  top: 10px;
}

.gh-user__name {
  font-weight: 600;
  top: 10px;
}

.gh-user__logout {
  margin-left: 8px;
  top: 10px;
  margin-right: 10px;
}