#game-container {
  position: relative;

  display: flex;
  align-items: center;
  flex-direction: column;
  flex: 1 1 0;
  justify-content: center;
  justify-content: safe center;
  min-height: 0;

  background-color: gainsboro;
}

#info-card {
  display: flex;
  overflow: hidden;
  align-items: center;
  flex-direction: column;

  flex: 0 1 auto;
  margin-top: clamp(6px, 3dvh, 36px);
  margin-bottom: clamp(6px, 2.5dvh, 24px);
  padding: clamp(6px, 1.4dvh, 12px);

  border-radius: 8px;
  background-color: rgb(173, 173, 173);
  box-shadow: 0 3px 10px;
}

#image-container {
  display: flex;
  overflow: hidden;
  justify-content: center;

  /* shrinks first when the screen is short, so the guesses stay on screen */
  flex: 0 1 300px;
  width: min(300px, 100vw - 48px);
  min-height: 64px;
  margin-bottom: clamp(4px, 1dvh, 10px);

  border-radius: 8px;
  background-color: white;
}

#product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#product-info {
  font-size: clamp(18px, 2.8dvh, 24px);

  width: min(300px, 100vw - 48px);
}

#game-stats {
  font-size: clamp(20px, 3.5dvh, 30px);
  margin-bottom: clamp(4px, 1.4dvh, 12px);
}

#guesses-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;

  flex-shrink: 0;
  width: min(324px, 100vw - 16px);
  height: clamp(200px, 33dvh, 275px);
  padding: 3px;

  border-radius: 8px;
  background-color: transparent;
}

.guess-container {
  display: flex;
  overflow: hidden;
  flex: 1;
  flex-direction: row;

  margin-bottom: 5px;

  border-radius: 8px;
  background-color: gray;
  box-shadow: inset 0 0 5px;
}

.guess-value-container {
  font-size: clamp(22px, 3.6dvh, 28px);

  display: flex;
  overflow: hidden;
  align-items: center;
  flex: 2;
  justify-content: center;

  border-radius: 8px;
  background-color: gray;
  box-shadow: inset 0 0 5px;
}

/* the row you type in gets a bigger tap target than the history rows */
#input-container {
  flex: 1.5;
}

#text-input-container {
  font-size: 28px;

  display: flex;
  overflow: hidden;
  align-items: center;
  flex: 2;
  justify-content: center;

  border: 1px solid black;
  border-radius: 8px;
  background-color: gray;
}

.guess-value-container,
.guess-direction-container {
  animation: flipInX;
  animation-duration: 1s;
}

.guess-direction-container,
#button-container {
  font-size: 28px;
  font-weight: bold;

  display: flex;
  overflow: hidden;
  align-items: center;
  flex: 1;
  justify-content: center;

  margin-left: 5px;

  color: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  box-shadow: inset 0 0 5px;
}

.guess-win {
  background-color: rgb(1, 154, 1);
}

.guess-near {
  background-color: rgb(255, 196, 37);
}

.guess-far {
  background-color: rgb(255, 37, 37);
}

#warning-toast {
  position: absolute;
  z-index: 1;
  top: 50px;
  left: 0;
  right: 0;
  margin: 0 auto;

  font-size: 24px;
  width: 220px;
  padding: 18px;

  color: white;
  border-radius: 8px;
  background-color: rgb(0, 0, 0);
}

#input-label {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;

  height: 100%;

  border-right: 2px solid black;
  background-color: rgb(173, 173, 173);
}

#guess-input {
  font-family: "VT323", monospace;
  font-size: min(24px, 6.5vw);

  flex: 4;
  min-width: 0;
  height: 100%;
  padding-left: 6px;

  color: gainsboro;
  border: none;
  border-radius: 0 8px 8px 0;
  background-color: rgb(94, 94, 94);
}

#text-input-container:focus-within {
  outline: 2px solid rgb(0, 96, 169);
}

#guess-input:focus-visible {
  outline: none;
}

#guess-input::placeholder {
  font-size: inherit;

  color: gainsboro;
}

#guess-button {
  font-family: "VT323", monospace;
  font-size: 24px;

  width: 100%;
  height: 100%;

  color: rgb(227, 42, 54);
  border: none;
  background-color: rgb(173, 173, 173);
}

#guess-button.active:hover {
  cursor: pointer;

  background-color: rgba(0, 96, 169, 0.5);
}

#share-button,
#next-button {
  flex: 1 1 0;
  min-width: 0;
  padding: 0 4px;
  font-size: clamp(20px, 3.6dvh, 28px);
  white-space: nowrap;

  font-family: "VT323", monospace;

  display: flex;
  align-items: center;
  justify-content: center;

  color: white;
  border: none;
  border-radius: 32px;
  background-color: rgb(227, 42, 54);
}

#share-button:hover {
  background-color: rgba(227, 42, 54, 0.8);
}

#next-button {
  margin-left: 8px;
  cursor: pointer;
  background-color: rgb(0, 96, 169);
}

#next-button:hover {
  background-color: rgba(0, 96, 169, 0.8);
}

.share-icon {
  height: 80%;
  margin-left: 10px;
}

#share-toast {
  position: absolute;
  top: 16px;
  z-index: 1;

  width: min(300px, 100vw - 24px);
  padding: 18px;

  font-size: 24px;
  color: white;
  border-radius: 8px;
  background-color: rgb(0, 0, 0);
}
