*{
    margin: 0px;
    padding: 0px;
    font-family:system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    box-sizing: border-box;
}
:root {
    --color-primary:       #1a73e8;   /* main brand/action color */
    --color-primary-hover: #1669c1;
    --color-secondary:     #e91e63;   /* accent or supporting color */
    --color-background:    #ffffff;
    --color-surface:       #f5f5f5;   /* cards, panels, etc. */
    --color-surface-colored: #38b6ff2f; /* Colored surface for contrast */
    --color-border:        #cccccc;
    --color-text:          #393939;
    --color-muted:         #777777;
    --color-error:         #d32f2f;
    --color-success:       #388e3c;
    --color-warning:       #fbc02d;
    --color-button:        #3b668a; /* Button color */
    --color-button-hover:  #21394d; /* Button hover color */
}

p{
  white-space: pre-line;;
}

.row {
    display: flex;
    gap: 10px;
}
.title-container{
  display: flex;
  flex-direction: column;
  align-items: center;
}

.row-container {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: auto;
  gap: 20px; /* Space between columns */
  padding: 20px;
}

.center-items-horizontally {
  justify-content: center;
}
.center-items-vertically {
  align-items: center;
}

.outline {
  border: 1px solid #ccc;
  border-radius: 10px;
}

.column-container{
  flex: 1;
  padding: 10px;
  background-color: rgb(255, 255, 255);
  color: var(--color-text);
  position: relative;
}
.column-container.primary{
    flex: 2;
}
.column-container.secondary{
    margin: 2px;
    width: fit-content;
}
.row-item {
  border: 1px solid #ccc;
  padding: 10px;
  margin: 10px 0;
  height: auto;
  border-radius: 10px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;  
  justify-content:space-between;
}

#tool-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.eval-text {
  color:rgb(172, 172, 172);
  align-self: center;
  font-size: small;
  position: relative;
  padding-top: 5px;
  text-align: center;
}

.spinner-circle {
  width: 32px;
  height: 32px;
  border: 4px solid #333;
  border-top-color: #4a90d9;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

button {
    color: white;
    border: none;
    font-size: large;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    background-color: var(--color-button);
}

button:hover{
    background-color: var(--color-button-hover);
}

table.scrolldown {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  margin-top: 10px;
}

table.scrolldown thead,
table.scrolldown tbody {
  display: block;
}

table.scrolldown tbody {
  height: 200px;
  border-top: 2px solid black;
  overflow-y: auto;
  overflow-x: hidden;
}
tbody td, thead th {
  width: 100px;
  text-align: left;
}

    #toolbar {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      padding: 10px 0 8px;
    }

    .tool-btn {
      font-size: 13px;
      padding: 5px 11px;
      border-radius: 8px;
      cursor: pointer;
      border: 0.5px solid #bbb;
      background: transparent;
      color: #1a1a1a;
      transition: background 0.1s;
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }

    .tool-btn:hover { background: #e8e8e5; }
    .tool-btn:active { transform: scale(0.98); }

    .tool-btn.active {
      background: #e8e8e5;
      border-color: #888;
    }

    .sep {
      width: 0.5px;
      height: 28px;
      background: #ccc;
      margin: 0 2px;
    }

    #controls {
      display: flex;
      flex-wrap: wrap;
      gap: 16px;
      align-items: center;
      padding: 4px 0 10px;
    }

    .ctrl-group {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    label {
      font-size: 13px;
      color: #666;
    }

    input[type="color"] {
      width: 32px;
      height: 32px;
      padding: 2px;
      border-radius: 8px;
      border: 0.5px solid #bbb;
      cursor: pointer;
    }

    input[type="range"] {
      height: 4px;
      accent-color: #534ab7;
      cursor: pointer;
    }

    #swatchRow {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      align-items: center;
    }

    .swatch {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      border: 1.5px solid #bbb;
      cursor: pointer;
      flex-shrink: 0;
      transition: transform 0.1s;
    }

    .swatch:hover { transform: scale(1.15); }

    .swatch.active {
      outline: 2px solid #1a1a1a;
      outline-offset: 2px;
    }

    #canvasWrap {
      position: relative;
      border-radius: 12px;
      border: 0.5px solid #ccc;
      overflow: hidden;
      background: #fff;
      box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }

    #drawCanvas {
      display: block;
      width: 100%;
      touch-action: none;
      cursor: crosshair;
    }

    #statusBar {
      display: flex;
      gap: 16px;
      align-items: center;
      padding: 6px 0 0;
      font-size: 12px;
      color: #888;
    }

    span.out {
      font-size: 13px;
      min-width: 36px;
      color: #666;
    }
