body {
  font-family: sans-serif;
  font-size: 16px;
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1 {
  text-align: center;
  margin-top: 0.3em;
  margin-bottom: 0.3em;
}

.upload-info {
  text-align: center;
  margin-top: 0em;
  margin-bottom: 0em;
}

.middle-part {
  max-width: 1000px;
  min-width: 291px;
  margin-left: auto;
  margin-right: auto;
}

.shadow-border {
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 6px, rgba(0, 0, 0, 0.23) 0px 1px 6px;
  border-radius: 7px;
  padding: 16px;
}

.all-board-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

.board-container {
  height: 260px;
  width: 260px;
  flex-shrink: 0;
  border-style: solid;
  border-color: rgb(100, 164, 224);
  background-color: rgb(241, 241, 241);
  margin: 1em;
  background-size: contain;
  background-repeat: no-repeat;
  overflow: hidden;
}

.board-container-navigate {
  width: 260px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}

.navigate-space {
  height: 36px;
  width: 260px;
  justify-content: center;
  line-height: 36px;
  display: flex;
}

.navigate-number {
  width: 24px;
  color: #696969;
}

#navigate-number-left {
  text-align: right;
}

#navigate-number-right {
  text-align: left;
}

.navigate-slash {
  font-size: x-large;
  padding-left: 3px;
  padding-right: 3px;
  color: #696969;
}

.drop-zone {
  width: 242px;
  height: 242px;
  margin: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Quicksand", sans-serif;
  font-weight: 500;
  cursor: pointer;
  color: #cccccc;
}

.drop-zone__prompt {
  font-size: 20px;
}

.drop-border {
  border: 4px dashed #696969;
  border-radius: 10px;
}

.drop-zone--over {
  border: 4px solid #696969;
  border-radius: 10px;
}

.drop-zone__input {
  display: none;
}

.drop-zone__thumb {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-size: cover;
  position: relative;
}

.image-border {
  height: 256px;
  width: 256px;
  overflow: hidden;
  border: 2px solid #000000
}

#image-board, #detected-board {
  margin-top: auto;
  margin-bottom: auto;
}

#image-board.result-on-new-row, #detected-board.result-on-new-row {
  margin-top: 16px;
}

#result-board {
  height: 330px;
  border-color: transparent;
  background: none;
}

.piece-417db {
  touch-action: none;
}

.spare-pieces-7492f {
  padding-left: 0px !important;
  text-align: center;
}

.message {
  border: solid;
  border-width: 2px;
  border-radius: 3px;
  max-width: 850px;
  position: relative;
  padding: 3px;
  margin-bottom: 10px;
  margin-left: auto;
  margin-right: auto;
}

.messge-text {
  font-size: 1.1em;
}

.message.error {
  border-color: #b30000;
  background-color: #fcb8b8;
}

.message.warning {
  border-color: #be9200;
  background-color: #ffedb1;
}

.message.success {
  border-color: #108a00;
  background-color: #c4eebe;
}

.message.info {
  border-color: #0460d8;
  background-color: #cbe1ff;
}

.close-message-button {
  border: none;
  background-color: transparent;
  position: absolute;
  top: 1px;
  right: 3px;
}

#fen-div {
  display: flex;
  justify-content: center;
}

#fen-with-copy {
  border: solid #696969;
  border-width: 2px;
  border-radius: 3px;
  width: 550px;
  position: relative;
  display: flex;
}

#fen {
  height: 30px;
  font-size: 1.1em;
  border: none;
  background-color: transparent;
  resize: none;
  outline: none;
  flex: 1;
}

#copy-fen-button {
  border: none;
  background-color: transparent;
  margin: auto;
  display: flex;
}

button:enabled {
  cursor: pointer;
}

.buttons-row {
  margin-top: 4px;
  display: flex;
  gap: 4px;
  justify-content: center;
}

.simple-button {
  border-style: solid;
  border-width: 1px;
  border-color: #808080;
  border-radius: 3px;
  background-color: #f0f0f0;
  font-size: 1em;
  padding: 4px;
  width: fit-content;
  display: inline-block;
  margin-bottom: 4px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.simple-button:hover {
  background-color: #d3d3d3;
}

.simple-button svg {
  width: 1em;
  height: 1em;
}

.simple-button svg path {
  fill: #000000
}

.submenu-links {
  list-style-type: none;
  background-color: #fdfdfd;
  border-radius: 3px;
  position: absolute;
  right: 0;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 6px, rgba(0, 0, 0, 0.23) 0px 1px 6px;
}

.submenu-on-top {
  bottom: 100%
}

.submenu-on-bottom {
  top: 100%
}

.submenu-links li {
  padding: 4px;
}

.submenu-links li:hover {
  background-color: #f0f0f0;
}

.menu-open-with {
  display: inline-block;
  text-align: left;
  position: relative;
}

.submenu-link {
  text-wrap: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.arrow-button {
  border: none;
  background-color: transparent;
}

.arrow-button svg polygon {
  fill: #696969
}

.arrow-button:hover svg polygon {
  fill: #242424;
}

.arrow-button:disabled svg polygon {
  fill: #b8b8b8
}

a.simple-text, a.simple-text:hover, a.simple-text:focus, a.simple-text:active {
  text-decoration: none;
  color: inherit;
}

button svg path {
  fill: #696969
}

button:hover svg path {
  fill: #242424;
}

#board-crop img {
  position: relative;
}

.hidden {
  display: none;
}

#detected-chessboard-text {
  padding-top: 112px;
  font-family: "Quicksand", sans-serif;
  font-weight: 500;
  font-size: 20px;
  color: #cccccc;
}

.main-content {
  flex: 1;
  padding: 8px;
}

footer {
  border-top: 1px solid #ddd;
  background-color: #f6f6f6;
  font-size: small;
  padding: 8px;
  text-align: center;
  vertical-align: middle;
  color: gray;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 4px solid #696969;
  border-bottom-color: transparent;
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

.incorrect-recognition-button-div {
  margin-top: 10px;
  margin-bottom: 10px;
  display: flex;
  justify-content: flex-end
}

#report-incorrect-recognition-button {
  font-size: small;
  font-style: italic;
  color: #696969;
  cursor: pointer;
}

#report-incorrect-recognition-button:hover {
    text-decoration: underline;
}

#incorrect-result-form-div {
  max-width: 540px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  padding: 5px;
  border: solid rgba(0, 0, 0, 0.23);
  border-width: 1px;
  border-radius: 7px;
}

#incorrect-result-form {
  margin: 10px;
  text-align: left;
}

#comment-text-area {
  width: 100%;
  margin-bottom: 10px;
  margin-top: 3px;
  resize: vertical;
  box-sizing: border-box;
  font-family: sans-serif;
  font-size: 1rem;
}

#button-holder {
  text-align: center;
}

#button-holder input[type=submit]:enabled {
    cursor: pointer;
}

#button-holder input[type=button]:enabled {
    cursor: pointer;
}

@keyframes rotation {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

#message-short {
  visibility: hidden;
  min-width: 250px;
  background-color: #333;
  text-align: center;
  padding: 16px;
  position: fixed;
  z-index: 1;
  top: 30px;
  border: solid;
  border-width: 2px;
  border-radius: 3px;
  border-color: #0460d8;
  background-color: #cbe1ff;
}

#message-short[position="right"] {
  right: 30px;
}

#message-short[position="middle"] {
  left: 50%;
  transform: translate(-50%, 0);
}

#message-short.show {
  visibility: visible;
  -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
  animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@-webkit-keyframes fadein {
  from {
    top: 0;
    opacity: 0;
  }

  to {
    top: 30px;
    opacity: 1;
  }
}

@keyframes fadein {
  from {
    top: 0;
    opacity: 0;
  }

  to {
    top: 30px;
    opacity: 1;
  }
}

@-webkit-keyframes fadeout {
  from {
    top: 30px;
    opacity: 1;
  }

  to {
    top: 0;
    opacity: 0;
  }
}

@keyframes fadeout {
  from {
    top: 30px;
    opacity: 1;
  }

  to {
    top: 0;
    opacity: 0;
  }
}
