body {
  margin: 0;
  font-family: sans-serif;
  background: #1c1c1c;
  color: white;
}

.container {
  display: flex;
  height: 100vh;
}

.legend-panel {
  width: 200px;
  background: #2a2a2a;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.legend {
  background: #3a3a3a;
  padding: 10px;
  margin: 5px 0;
  cursor: pointer;
  border-radius: 5px;
}

.legend.selected {
  background: #5a5aff;
}

.grid {
  border-collapse: collapse;
  margin: auto;
}

.grid td {
  width: 60px;
  height: 60px;
  border: 1px solid #888;
  text-align: center;
  vertical-align: middle;
  font-size: 24px;
  position: relative;
}

.grid .cell-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2px;
  width: 100%;
  height: 100%;
}

.cell-content img.icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;   
}

.cell-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2px;
  width: 100%;
  height: 100%;
  overflow: hidden;
}


.grid .cell-content span {
  font-size: 24px;
  line-height: 1;
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.2s ease;
}


.grid .safezone {
  border: 2px solid lime;
}

.grid .spice_blow {
  border: 2px solid gold;
}

.grid .cell {
  width: 60px;           /* fixed size */
  height: 60px;
  box-sizing: border-box;
  overflow: hidden;      /* prevents growth */
  position: relative;
}

.grid .cell:focus,
.grid .cell:active {
  outline: none;
  box-shadow: none;
}

.grid {
  table-layout: fixed;
  border-collapse: collapse;
}

.grid-label {
  width: 60px;
  height: 60px;
  text-align: center;
  vertical-align: middle;
  background: #333;
  color: #fff;
  font-weight: bold;
  border: 1px solid #888;
}
/* Add this to your style.css file */
.cell-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 2px;
}

.icon {
  margin: 1px;
  max-width: 100%;
  max-height: 100%;
  transition: transform 0.2s ease;
}

/* For safezone and spice_blow */
.safezone {
  background-color: rgba(0, 255, 0, 0.2);
}

.spice_blow {
  background-color: rgba(255, 215, 0, 0.2);
}
