html {
  box-sizing: border-box;
  height: 100%;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

body {
  font-family: "Montserrat", sans-serif !important;
  margin: 0;
  padding: 40px 16px;
  
  height: 100%;
  width: 100%;
  
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #f8f9fa;
}

.main-content {
  display: flex;
  flex-direction: row;
  justify-content: center;
  width: 100%;
  gap: 24px;
}

canvas {
  background: white;
  border: 2px solid black;
  image-rendering: pixelated;
  cursor: crosshair;

  width: 100%;
  max-width: 560px;
  aspect-ratio: 1 / 1;
  height: auto;
  
  touch-action: none;
}

#prediction-toolbox {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 564px;
  margin-top: 16px;
  box-sizing: border-box;
}

button {
  font-family: "Montserrat", sans-serif !important;
  border: none;
  background: #007bff;
  color: white;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #0056b3;
}

.title {
  margin: 0;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: 1.5rem;
}

.bottom-text {
  font-size: 14px;
  margin: 2px;
  color: #999;
}

#git-tag {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: black !important;
  
  text-align: center;
  flex-wrap: wrap;
}

.prediction-panel {
  width: 100%;
  height: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#bar-notes {
  display: block;
}

.prediction-bars {
  width: 100%;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
  display: none;
  max-width: min(560px, 30vw);
}

.bar-container {
  width: 100%;
  height: 36px;
  gap: 6px;
  display: flex;
  flex-direction: row;
}

.bar-percentage {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bar {
  height: 100%;
  background-color: #007bff;
  border-radius: 4px;
  transition: width 0.3s;
  min-width: 5px;
}

.bar-label {
  width: 10px;
  display: flex;
  align-items: center;
  justify-content: start;
}

#result {
  margin: 0;
}

@media (max-width: 450px) {
  #prediction-toolbox {
    flex-direction: column;
    gap: 12px;
  }

  .git-tag-text {
    display: none;
  }

  #git-tag {
    width: 100%;
    justify-content: flex-start;
  }

  #git-tag img {
    width: 34px;
    height: 34px;
  }
}

@media (min-width: 800px) {
  #bar-notes {
    display: none;
  }

  .prediction-bars {
    display: flex;
  }
}
