* {
  box-sizing: border-box;
}
body {
  font-family: sans-serif;
  margin: 0;
  background: #e9ecef; 
}

header {
  background: #495057;
  color: #fff;
  padding: 1rem;
  text-align: center;
}

#mainContainer {
  display: flex;
  flex-direction: row;  
  gap: 1rem;
  padding: 1rem;
  justify-content: center; 
}

#palette-column{
  display: flex;
  flex-direction: column;
  gap: 1rem;
  
  flex: 0 0 auto; 
}
#tileset-column{
  display: flex;
  flex-direction: column;
  gap: 1rem;
  
  flex: 0 0 auto; 
}
#tilemap-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  
  flex: 0 0 auto; 
}


section {
  background: #fff;
  padding: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}
section h2 {
  margin-top: 0;
}


.row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}


canvas {
  border: 1px solid #333;
  margin-top: 0.5rem;
}

#tileEditorCanvas {
  width: 256px;      
  height: 256px;     
  image-rendering: pixelated;
  image-rendering: crisp-edges; 
}

.color-box {
  width: 40px;
  height: 40px;
  display: inline-block;
  margin: 4px;
  border: 2px solid #000; 
  cursor: pointer;
}

.shade-box {
  width: 14px;
  height: 14px;
  display: inline-block;
  margin: 4px;
  border: 2px solid #000; 
  cursor: pointer;
}

.draw-color-box {
  width: 32px;
  height: 32px;
  display: inline-block;
  margin: 4px;
  border: 2px solid #000;
  cursor: pointer;
  box-sizing: border-box; 
}
.draw-color-box.selected {
  border: 4px solid #f00; 
}


.shade-box.selected {
  border: 4px solid blue;
}
