.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  padding: 40px;
  box-sizing: border-box;
}

.modal-content {
  background-color: #1a1a1a;
  padding: 20px;
  border-radius: 8px;
  width: 100%;
  max-width: 1200px;
  color: #fff;
  font-family: sans-serif;
  position: relative;
}

.close-btn {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
  color: #fff;
}

#inventory-layout {
  display: flex;
  flex-direction: row;
  gap: 32px;
  align-items: flex-start;
  justify-content: center;
}

#bag-area {
  flex-shrink: 0;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(15, 58px);
  grid-auto-rows: 100px;
  gap: 6px;
}

.slot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 20px;
}

.slot-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 100px;
}

.slot {
  width: 65px;
  height: 100px;
  background-color: #222;
  border: 1px solid #555;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  padding: 4px 2px;
}

.slot-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  border-radius: 4px;
  background-color: transparent;
}

.slot-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slot-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
  font-size: 10px;
  color: #eee;
}

.slot-label {
  font-size: 10px;
  font-weight: normal;
  word-break: break-word;
}

.slot-count {
  font-size: 11px;
  font-weight: bold;
  color: #ccc;
}
