body {
  display: flex;
  justify-content: center;
  align-items: top;
  padding: 40px 20px 40px 20px;
  min-height: 700px;
}

#wrapper1 {
  border: 1px solid rgba(0, 0, 0, 0);
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: fit-content;
}

#grid {
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 2px;
  column-gap: 2px;
  position: relative;
  border: 2px solid rgb(31, 31, 51);
  background-color: rgb(70, 70, 83);
  border-radius: 3px;
  width: 470px;
  height: 470px;
}
.box {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 1px;
  column-gap: 1px;
  background-color: rgb(157, 157, 176);
  aspect-ratio: 1/1;
}
.cell {
  overflow: hidden;
  display: flex;
  background-color: rgb(255, 255, 255);
  justify-content: center;
  align-items: center;
  aspect-ratio: 1/1;
}
.cell p {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  margin: 0px;
}

canvas {
  position: absolute;
  top: -1px;
  left: -1px;
  border: 1px solid rgba(255, 0, 0, 0);
}

#wrapper2 {
  position: relative;
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  margin: 30px 0px 0px 0px;
}

#wrapper2 button {
  user-select: none;
  font-family: Arial, Helvetica, sans-serif;
  margin: 0px 10px 0px 0px;
  font-size: 16px;
  height: 40px;
  padding: 0px 18px;
  border: none;
  border-radius: 1px;
  background-color: rgb(45, 45, 60);
  color: white;
}
#wrapper2 button:hover {
  background-color: rgb(74, 74, 96);
  cursor: pointer;
}
#wrapper2 button:active {
  background-color: rgb(109, 109, 135);
}

#gridDigitsInput {
  border: 1px solid rgb(51, 53, 63);
  height: 40px;
  flex: 1;
  border-radius: 5px;
  padding: 0px 12px;
  font-size: 16px;
}

#inputAlert {
  position: absolute;
  top: 36px;
  left: 120px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  display: none;
  color: rgb(189, 22, 22);
  user-select: none;
}

#patternsMetrics {
  position: relative;
  box-sizing: border-box;
  border: 1px solid rgb(158, 162, 181);
  border-radius: 2px;
  background-color: rgb(229, 232, 248);
  min-height: 545px;
  height: fit-content;
  width: 400px;
  margin-left: 43px;
  padding: 30px 30px 150px 30px;
  font-family: Arial, Helvetica, sans-serif;
}
#patternsMetricsHeading {
  font-weight: bold;
  width: 100%;
  text-align: center;
  margin: 0px 0px 15px 0px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgb(108, 108, 117);
}

#wrapper4 {
  font-size: 14px;
  border: 1px solid rgba(0, 0, 0, 0);
}
#gridInfoHeading {
  margin: 10px 0px 5px 0px;
  font-weight: bolder;
  font-size: 14px;
}
.gridInfo {
  margin: 3px 0px;
}

.patternInfo {
  position: relative;
}
.patternName {
  font-weight: bold;
  font-size: 14px;
  margin: 25px 0px 10px 0px;
}
.proximityBar {
  border: 1px solid rgb(108, 109, 115);
  border-radius: 15px;
  width: 100%;
  height: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}
.barProgress {
  width: 0%;
  background-color: rgb(243, 90, 105); /*rgb(81, 234, 157);*/
  height: 100%;
  transition: width 0.6s, background-color 1.6s;
}
.percentage {
  font-family: Arial, Helvetica, sans-serif;
  position: absolute;
  right: 0px;
  top: -12px;
  font-size: 14px;
}

.proximityMetricsWrapper {
  overflow: hidden;
  height: 0px;
  opacity: 0%;

  transition: height 0.6s, opacity 0.6s;
}
.proximityMetric {
  font-size: 14px;
  margin: 5px 0px 0px 0px;
}

#wrapper3 {
  position: absolute;
  bottom: 23px;
  width: 340px;
  border: 1px solid rgba(0, 0, 0, 0);
}
#wrapper3 label {
  font-size: 12px;
}

#visualizationToggle {
  margin-bottom: 1px;
  position: relative;
  top: 2px;
}

#analyzeButton {
  width: 100%;
  display: block;
  user-select: none;
  font-family: Arial, Helvetica, sans-serif;
  margin: 10px 0px 10px 0px;
  font-size: 16px;
  height: 40px;
  padding: 0px 18px;
  border: none;
  border-radius: 1px;
  background-color: rgb(45, 45, 60);
  color: white;
}
#analyzeButton:hover {
  background-color: rgb(74, 74, 96);
  cursor: pointer;
}
#analyzeButton:active {
  background-color: rgb(109, 109, 135);
}
#info {
  font-size: 12px;
  margin: 10px 0px 0px 0px;
  color: rgb(58, 58, 60);
}
#analysisAlert {
  position: absolute;
  bottom: -45px;
  left: 0px;
  text-align: center;
  width: 100%;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  display: none;
  user-select: none;
  color: rgb(189, 22, 22);
}

