/* Inventory grid and item icon styles */
.inventory-grid {
  display: grid;
  grid-template-columns: repeat(4, 48px);
  grid-template-rows: repeat(4, 48px);
  gap: 1px;
  background: rgba(100,100,100,0.3);
  border-radius: 8px;
  padding: 8px;
}

#player-inventory-grid {
  grid-template-columns: repeat(8, 48px);
  grid-template-rows: repeat(8, 48px);
}

#chest-contents-grid {
  grid-template-columns: repeat(4, 48px);
  grid-template-rows: repeat(4, 48px);
}

.inventory-slot {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.08);
  border: 1px solid #888;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1em;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
  box-sizing: border-box;
}

.inventory-slot:hover {
  background: rgba(255,255,255,0.18);
}

.inventory-slot.selected {
  border: 2px solid yellow;
  box-sizing: border-box;
}

.item-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center;
}

.item-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  display: block;
}

.item-text {
  font-size: 0.8em;
  text-align: center;
  line-height: 1;
  word-break: break-word;
}