* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  justify-items: center;
  align-items: center;
  background: linear-gradient(135deg, rgb(89, 0, 255), violet, blue);
  width: 100vw;
  min-height: 100vh;
  /*overflow: hidden;*/
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(0.8rem, 1.5vw, 1.2rem);
}

header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 4rem;
  background-color: rgba(151, 57, 112, 0.3);
  margin-bottom: 0.5rem;
}

main {
  display: flex 1 1 300px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 0.5rem;
  max-width: 80vw;
  width: 100%;

}

#startpic,
#endpic {
  position: absolute;
  top: 25%
}

#game_container {
  display: flex;
  flex-direction: column;
  flex: 1 1 100%;
}
#numofpics{
  padding: 3px;
  font-size: 1rem;
  border-radius: 3px;
  border: none;
  background-color: rgba(167, 112, 144, 0.3);
}

#canvas_container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-height: 100%;
  flex: 1 1 100%;
  position: relative;
}

#loading {
  position: absolute;
  top: 25%;
  color: black;
  /*background-color: rgba(238, 219, 230, 0.5);*/
  border-radius: 5px;
}

.hidden {
  visibility: hidden;
}

.visible {
  visibility: visible;

}

#canvas {
  display: block;
  max-width: 100%;
  width: 95vmin;
  aspect-ratio: 3/2;
  border-radius: 10px;
}

#quiz_buttons {
  display: inline-flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

h2,
h3 {
  margin: 0.5rem;
}

p {
  padding: 0.4rem;
}

button {
  width: fit-content;
  min-width: 6rem;
  height: 2.5rem;
  margin: 0.3rem;
  background: linear-gradient(rgb(241, 237, 213), gold, rgb(241, 237, 213));
  border: 2px solid yellow;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  color: blue;
}

.notselectable {
  user-select: none;
}

#infotext {
  position: absolute;
  background-color: rgba(238, 219, 230, 0.5);
  width: fit-content;
  align-self: center;
  padding: 0.8rem;
  bottom: 1rem;
  border-radius: 0.5rem;
}

.circle {
  margin: 7px auto;
  width: 80px;
  height: 80px;
  border: 8px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  border-top-color: yellow;
  animation: spin 1s linear infinite;

}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

@media (max-width: 1400px) {
  main {
    max-width: 100vw;
  }

  #game-container {
    display: flex;
    flex-direction: row;
    flex: 1 1 100%;
  }

}
@media (max-width: 1000px) {
  #startpic{
    top: 5%
  }
#numofpics{
  font-size: 0.8rem;
}
}
@media (max-width: 400px) {
h2,h3,p{
  padding: 2px;
}
#infotext{
padding: 5px;
bottom: 5px;}
}