body {
  background-color: #333;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  color: white;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
}
canvas {
  border: 2px solid white;
}
.controls {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: center;
}
.shape-button, .none-button, .retake-button, #startButton {
  padding: 5px;
  border: 2px solid #fff;
  border-radius: 0;
  background-color: #555;
  cursor: pointer;
  box-shadow: 2px 2px 0px 0px rgba(0,0,0,0.75);
  image-rendering: pixelated;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.1s ease-in-out;
  color: white;
  font-weight: bold;
}
.shape-button, .none-button {
  width: 40px;
  height: 40px;
}
.shape-button:hover, .none-button:hover, .retake-button:hover, #startButton:hover {
  background-color: #777;
  box-shadow: 1px 1px 0px 0px rgba(0,0,0,0.75);
  transform: translate(1px, 1px);
}
.shape-button.disabled, .none-button.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}
.shape-button svg {
  width: 100%;
  height: 100%;
  fill: #34a870;
}
.none-button {
  font-size: 2em;
  line-height: 0.6;
}
.retake-button {
  font-size: 16px;
  font-weight: bold;
  margin-top: 10px;
}
.score {
  margin-top: 10px;
  font-size: 1.2em;
}
h1, h2 {
  font-weight: bold;
}
#resultsContainer {
  margin-top: 20px;
  text-align: left;
  width: 100%;
  max-width: 600px;
}
.timer-container {
  width: 80vw;
  max-width: 30rem;
  height: 10px;
  margin-top: 10px;
  background-color: white;
  border: 2px solid white;
  position: relative;
}
#timerBar {
  width: 0%;
  height: 100%;
  background-color: black;
  transition: width 5s linear;
}
#gameScreen, #startScreen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}
#gameScreen {
  display: none;
}
table {
  margin-top: 20px;
  border-collapse: collapse;
  width: 100%;
}
th, td {
  border: 1px solid white;
  padding: 8px;
  text-align: left;
  font-size: 0.9em;
}
th {
  background-color: #555;
}
.quiz-area {
  position: relative;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.quiz-controls {
  position: static;
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}
#start-quiz-controls .highlight, .quiz-controls .highlight {
    animation: pulse 1.5s infinite;
    transform: scale(1);
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); background-color: #777; }
    100% { transform: scale(1); }
}
#startScreen p {
    margin-top: 20px;
}
.retake-button {
    margin-top: 20px;
}

#myCanvas, #startCanvas {
    margin: 0 auto;
    display: block;
    width: 80vw;
    max-width: 30rem;
    height: 80vw;
    max-height: 30rem;
}

#resultsContainer p {
    width: 100%;
    max-width: 600px;
    margin-top: 10px;
}

.test-header {
  width: 80vw;
  max-width: 30rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#pauseButton {
    font-size: 1.5em;
    line-height: 0.8;
    padding: 0;
    border: none;
    background: none;
    box-shadow: none;
    color: white;
    transition: none;
    width: 30px;
    height: 30px;
    position: absolute;
    right: -45px;
    top: 50%;
    transform: translateY(-50%);
}

.canvas-container {
    position: relative;
    width: 80vw;
    max-width: 30rem;
    height: 80vw;
    max-height: 30rem;
}

.overlay-canvas {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    display: none;
    width: 100%;
    height: 100%;
}