.box-input-container {
  position: relative;
}

/* The single input field */
.box-input {
  font-size: 24px;
  width: 300px;
  height: 50px;
  border: 1px solid #ddd;
  letter-spacing: 30px; /* Spacing between each character */
  padding-left: 15px; /* Adjust to align with the box */
  text-indent: 10px; /* Adjust to align with the box */
  background: transparent;
  outline: none;
  caret-color: transparent; /* Hide caret */
}

.box-input-container::before {
  content: ""; /* Create a pseudo-element for box background */
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 300px;
  height: 50px;
  background-color: #ffffff;
  border: 1px solid #ddd;
  z-index: -1; /* Place behind input */
}

/* Create visual effect of individual boxes using pseudo-elements */
.box-input-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 300px;
  height: 50px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid #ddd;
  pointer-events: none; /* Prevent interaction */
}

.box-input-container::after > div {
  border-left: 1px solid #ddd; /* Box border between characters */
  border-right: 1px solid #ddd; /* Box border between characters */
  height: 100%;
}

.box-input-container::after > div:first-child {
  border-left: none; /* Remove left border for first box */
}

.box-input-container::after > div:last-child {
  border-right: none; /* Remove right border for last box */
}
