/* General styling */
body {
  font-family: Arial, sans-serif;
  background: #f4f4f4;
  color: #333;
  margin: 0;
  padding: 20px;
  font-size: 18px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Mode selection container styling */
#mode-selection {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  width: 90%;
  max-width: 800px;
  text-align: center;
  margin-bottom: 20px;
}

#mode-selection button {
  background: #4CAF50;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.2em;
  margin: 10px;
}

/* Quiz/Review container styling */
#quiz-container {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
  width: 90%;
  max-width: 800px;
  display: none;
}

/* Header container styling */
#header-container {
  position: relative;
  margin-top: 10px;
  padding: 0 40px;
  text-align: center;
}

#header-container h2 {
  margin: 0;
  font-size: 2em;
}

#back-btn {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: #f44336;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}

/* Content wrapper to center feedback and final messages */
.content {
  text-align: center;
  width: 100%;
  margin-top: 20px;
}

#progress {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.2em;
  color: #555;
}

#question {
  font-size: 1.8em;
  margin-bottom: 20px;
  line-height: 1.1;
}

#options button {
  display: block;
  width: 100%;
  padding: 15px;
  margin: 10px 0;
  background: #e0e0e0;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color 0.3s ease;
}

#options button:hover {
  background: #d4d4d4;
}

#next-btn, #retry-btn, #mode-select-btn {
  background: #4CAF50;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1.2em;
  margin-top: 20px;
  display: block;
  width: fit-content;
  margin-left: auto;
}

/* Modal styling */
.modal {
  display: none; /* Hidden by default */
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5); /* Black background with opacity */
}

.modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 20px;
  border-radius: 10px;
  width: 80%;
  max-width: 400px;
  text-align: center;
}

.modal-content button {
  background-color: #4CAF50;
  color: #fff;
  border: none;
  padding: 12px 20px;
  margin: 5px;
  cursor: pointer;
  border-radius: 4px;
}

/* PIN Modal specific adjustments */
#pin-modal input {
  width: calc(100% - 20px);
  padding: 10px;
  font-size: 1em;
  margin: 10px 0;
}

/* Mobile-Friendly Adjustments */
@media (max-width: 480px) {
  body {
    font-size: 16px;
  }
  #quiz-container, #mode-selection {
    width: 95%;
    padding: 20px;
  }
  #header-container {
    padding: 0 20px;
  }
  #header-container h2 {
    font-size: 1.8em;
  }
  #question {
    font-size: 1.6em;
  }
  #options button {
    padding: 12px;
    font-size: 0.95em;
  }
  #next-btn, #retry-btn, #mode-select-btn {
    font-size: 1em;
  }
  #progress {
    font-size: 1em;
  }
}

/* Dropdown Select Styling */
#question-file-select {
  padding: 8px;
  font-size: 16px;
  border-radius: 4px;
  border: 1px solid #ccc;
  margin-top: 5px;
  width: 100%;
  max-width: 300px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: #fff;
  background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" width="10" height="7"><polygon points="0,0 5,7 10,0" fill="%23000000"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 10px;
}

.select-wrapper {
  margin: 20px 0;
}

.select-wrapper label {
  font-weight: bold;
}
