html,
body {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  background-color: #f0f0f0;
  overflow: hidden;
  touch-action: none;
}

button {
  width: 200px;
}

/* Pending-click class for button */
.pending-click {
  background-color: gray;
  /* Change background to a disabled look */
  color: lightgray;
  /* Change text color to light gray */
  border: 1px solid darkgray;
  /* Optional border styling */
  cursor: not-allowed;
  /* Change the cursor to indicate no further actions */
  pointer-events: none;
  /* Prevent further clicks */
  position: relative;
}

.pending-click::after {
  content: "Processing...";
  /* Add a text overlay to indicate pending state */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1em;
}

.pending-click .spinner {
  border: 2px solid lightgray;
  /* Light gray border for spinner */
  border-top: 2px solid white;
  /* White color for spinning part */
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
}

/* Spinner animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

#container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

#startPopup {
  position: absolute;
  top: 160px; /* 125px for the navbar offset, plus a small margin */
  left: 50%;
  transform: translateX(-50%); /* Center horizontally */
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  overflow-y: auto;
  max-width: 90%; /* Fit within screen width */
  max-height: calc(92% - 160px); /* Avoid clipping below the navbar */
  cursor: auto;
}

#instructionsInteractor {
  cursor: pointer; /* Indicate interactivity */
  transition: all 0.3s ease; /* Smooth transition for hover effects */
}

#instructionsInteractor:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Add a subtle shadow */
  background-color: rgba(192, 192, 192, 0.2); /* Light background for hover state */
  color: var(--color-primary); /* Change text color */
  font-weight: bold; /* Increase font weight */
}

#controllerContainer {
  display: flex;
  flex-wrap: wrap;
  /* Allow wrapping for better responsiveness */
  justify-content: center;
  /* Center align items */
  gap: 10px;
  /* Add spacing between elements */
  flex-direction: column;
}

@media screen and (max-width: 768px) {
  #startPopup {
    max-width: 95%;
    max-height: calc(95% - 160px);
  }

  #controllerContainer {
    flex-direction: column;
    align-items: center;
  }
}

#submitScorePopup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  cursor: auto;
}

#descriptionPopup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  overflow-y: auto;
  max-height: 80%;
  cursor: auto;
}

#descriptionPopup p {
  text-align: justify;
  cursor: auto;
}

#instructionText {
  text-align: center;
}

#controlInstructions {
  text-align: left;
}

#calibrationInstructionText {
  color: rgba(0, 123, 192, 1);
}

#activeInstructionText {
  color: rgba(166, 25, 46, 1);
}

.toggled {
  background-color: #666666;
  color: #dddddd;
}

#trialDurationValue {
  color: #1f4c4c;
  font-weight: 800;
}

#submitScore {
  color: #ffffff;
  background-color: #6D6E71;
}

#submitScore:hover {
  background-color: #C41230;
}

#privacyLink {
  color: #555555;
  background-color: #f0f0f0;
  scale: 0.5;
}

#privacyLink:hover {
  background-color: #ffffff;
}

#initials {
  padding: 2px;
  font-size: 2.5rem;
  font-weight: 400;
  border: 2.5px solid #363636;
  border-radius: 15px;
  width: 25vw;
  font-family: var(--font-family-scoreboard);
  text-align: center;
  margin: 3px;
}

.submit-button {
  font-size: 2.5rem;
}