/* public/styles.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --cell-size: 16px;
}

body {
  background-color: #f5f5f0;
  background-image: linear-gradient(#b4b4b466 1px, #0000 1px), linear-gradient(90deg, #b4b4b466 1px, #0000 1px);
  background-size: var(--cell-size) var(--cell-size);
  overflow: hidden;
}

canvas {
  position: fixed;
  pointer-events: none;
  top: 0;
  left: 0;
}

#ui {
  position: fixed;
  z-index: 10;
  width: 100%;
  height: 100%;
  font-family: monospace;
  top: 0;
  left: 0;
}

#ui * {
  pointer-events: auto;
}

#online-count {
  position: absolute;
  color: #1e50c880;
  letter-spacing: .08em;
  pointer-events: none;
  font-size: 11px;
  top: 12px;
  left: 12px;
}

#panel-toggle {
  position: absolute;
  cursor: pointer;
  display: flex;
  background: #f5f5f0eb;
  border: 1px solid #1e50c859;
  justify-content: center;
  align-items:  center;
  width: 28px;
  height: 28px;
  bottom: 16px;
  right: 16px;
}

#panel-toggle:hover {
  background: #1e50c814;
}

#panel-toggle svg {
  width: 12px;
  height: 12px;
}

#panel {
  position: absolute;
  transform-origin: bottom right;
  background: #f5f5f0f7;
  border: 1px solid #1e50c840;
  width: 148px;
  padding: 12px;
  transition: opacity .15s, transform .15s;
  bottom: 52px;
  right: 16px;
}

#panel.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(.95);
}

.panel-section {
  margin-bottom: 12px;
}

.panel-section:last-child {
  margin-bottom: 0;
}

.panel-label {
  letter-spacing: .1em;
  color: #1e50c880;
  text-transform: uppercase;
  margin-bottom: 6px;
  font-size: 9px;
}

.panel-label .kbd {
  color: #1e50c84d;
  margin-left: 4px;
  font-size: 8px;
}

.tool-row {
  display: flex;
  gap: 5px;
}

.tool-btn {
  letter-spacing: .08em;
  color: #1e50c8b3;
  cursor: pointer;
  text-transform: uppercase;
  background: none;
  border: 1px solid #1e50c840;
  flex: 1;
  height: 26px;
  font-family: monospace;
  font-size: 9px;
}

.tool-btn:hover {
  background: #1e50c814;
}

.tool-btn.active {
  color: #1e50c8;
  background: #1e50c81f;
  border-color: #1e50c880;
}

.color-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.color-swatch {
  cursor: pointer;
  border: 1px solid #0000;
  width: 18px;
  height: 18px;
  transition: transform .1s;
}

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

.color-swatch.active {
  border-color: #1e50c8b3;
}

.size-row {
  display: flex;
  align-items:  center;
  gap: 5px;
}

.size-btn {
  cursor: pointer;
  display: flex;
  background: none;
  border: 1px solid #1e50c840;
  justify-content: center;
  align-items:  center;
  transition: background .1s;
}

.size-btn:hover {
  background: #1e50c814;
}

.size-btn.active {
  background: #1e50c81f;
  border-color: #1e50c880;
}

.size-dot {
  background: #1e50c8bf;
}

.clear-btn {
  letter-spacing: .08em;
  color: #c81e1e99;
  cursor: pointer;
  text-transform: uppercase;
  background: none;
  border: 1px solid #c81e1e4d;
  width: 100%;
  height: 24px;
  font-family: monospace;
  font-size: 9px;
}

.clear-btn:hover {
  background: #c81e1e0f;
}

.clear-btn.confirming {
  color: #c81e1e;
  background: #c81e1e1f;
}
