/* === Base Layout === */
html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #242424;
  color: #f0f0f0;
  font-family: 'Courier New', Courier, monospace;
  min-height: 100vh;
  min-width: 100vw;
  padding: 0;
  margin: 0;
}

main.flex {
  display: flex;
  justify-content: space-around;
  width: 100%;
  min-height: 100vh;
}

.flex-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
  padding: 3em;
}

/* === Toolbar === */
#toolbar {
  position: sticky;
  background: #24242425;
  top: 0;
  left: 0;
  color: #fff;
  padding: 1em;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 0.5em;
  backdrop-filter: blur(50px);
}

.toolbar-title {
  margin-right: 1em;
  font-weight: bold;
  font-size: 1.1em;
}

#toolbar span {
  margin-left: 10px;
}

button {
  margin-left: 10px;
  font-family: inherit;
  font-size: 1em;
  background: #33333350;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.3em 0.8em;
  cursor: pointer;
  transition: background 0.15s;
}

button:hover, button:focus {
  background: #6e6e6e;
}

/* === Canvas === */
canvas {
  border: 2px solid #fff;
  background: #f0f0f0;
  display: block;
}
#canvas {
  z-index: 1;
}
#decisionBoundary {
  z-index: 10;
  pointer-events: none;
}

/* === Sidebar and Info === */
aside section {
  margin-bottom: 1.2em;
}
h4 {
  margin: 0.5em 0 0.5em 0;
  font-size: 1.1em;
  color: #ffd700;
}

progress {
  width: 90%;
  height: 1em;
  margin: 0.5em 0;
}

/* === Inputs === */
input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: auto;
  margin: 0;
  background-color: #242424;
}

input:not([type="image" i], [type="range" i], [type="checkbox" i], [type="radio" i]) {
  overflow: clip !important;
  margin: 0;
  background-color: transparent;
  padding: 0;
  color: inherit;
  border: transparent;
  font-family: inherit;
  font-size: inherit;
  border-bottom: #c2c2c2 1px solid;
}

/* === Layer Controls === */
#addLayerBtn {
  cursor: pointer;
  margin-left: 0.5em;
  color: #ffd700;
  font-weight: bold;
}

#hiddenLayersList {
  display: block;
  max-height: 150px;
  overflow-y: auto;
  scroll-behavior: smooth;
  margin-bottom: 0.5em;
}

/* === Misc === */
ul {
  margin: 0.5em;
}

/* === Floating prediction label for prediction mode === */
#predictionLabelDiv {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: none;
  transition: background 0.1s, color 0.1s;
}

#hiddenLayersList {
  display: block;
  max-height: 250px;
  overflow-y: auto;
  width: 250px;
  scroll-behavior: smooth;
  margin: 0.5em 0;
}

#hiddenLayersList input[type='number'] {
  width: 60px;
  margin-left: 10px
}

#hiddenLayersList .size-info {
  font-size: 0.8em;
  color: #aaa;
}

.removeLayerBtn {
  cursor: pointer;
  margin-left: 10px;
  color:rgb(199, 41, 41);
}

/* Floating prediction label for prediction mode */
#predictionLabelDiv {
  position: fixed;
  pointer-events: none;
  z-index: 1000;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: none;
  transition: background 0.1s, color 0.1s;
}

#logPanel {
  color: #fff;
  border-radius: 6px;
  padding: 0.5em;
  max-height: 70vh;
  overflow-y: auto;
  font-size: 0.95em;
  font-family: monospace;
  white-space: pre-wrap;
  width: 100%;
}
