body {
  --background: hsl(0, 0%, 100%);
  --backgroundLowOp: hsla(0, 0%, 100%, 0.733);
  --foreground: hsl(0, 0%, 0%);

  --midColor: hsl(0, 0%, 50%);
  --hoverColor: hsl(240, 100%, 25%);

  --inputBGColor: hsl(0, 0%, 88%);

  --columns: 10;
}

body.nightMode {
  --background: hsl(260, 9%, 10%);
  --backgroundLowOp: hsla(260, 9%, 10%, 0.9);
  --foreground: hsl(260, 4%, 74%);

  --midColor: hsl(260, 4%, 30%);
  --hoverColor: hsl(240, 50%, 50%);

  --inputBGColor: hsl(260, 9%, 15%);
}

body {
  background-color: var(--background);
  color: var(--foreground);
}

#board {
  display: grid;
  grid-template-columns: repeat(var(--columns), 1fr);
  grid-auto-rows: 1fr;
  border: 1px solid var(--midColor);
  resize: both;
  overflow: auto;
  gap: 2px;
  padding: 2px;
}


.item {
  border: 1px solid var(--midColor);
  padding: 2px;
  user-select: none;
  text-align: center;
  justify-content: center;
  display: flex;
  flex-direction: column;
  margin: 1px;
}

.item:hover {
  border: 2px solid var(--hoverColor);
  margin: 0;
}

.item > div {
  position: relative;
  background-size: cover;
  width: 32px;
  height: 32px;
  font-size: 1.2em;
  pointer-events: none;
  margin: auto;
  text-align: right;
  border: 1px solid var(--midColor);
  font-weight: bold;
  font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
}

.item > div > span {
  position: absolute;
  right: 0;
  bottom: 0;
  border: 1px solid var(--midColor);
  background-color: var(--backgroundLowOp);
}


input {
  color: var(--foreground);
  background-color: var(--buttonBGColor);
}

.searchHide {
  opacity: 0.2;
}

.addRemoveBtn {
  width: 20px;
}

#colorsPicker {
  padding-left: 10px;
  border-left: 1px solid var(--midColor);
}

.colorsPickerRow > label {
  display: inline-block;
  width: 30px;
  text-align: center;
}

.hidden {
  display: none;
}

#controls > div {
  margin-top: 5px;
  margin-bottom: 5px;
  width: fit-content;
}