/* Reset some default browser styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Outfit, sans-serif;
}

body {
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #006ead, #89b1f7);

  /* nice gradient */
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* The main quiz container */
#app {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;

  /* pushes nav buttons to bottom */
  align-items: center;
  background: white;
  border-radius: 16px;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  min-width: 60%;
  min-height: 70vh;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 20px rgb(0 0 0 / 15%);
  transition: height 0.3s ease;
  position: relative;
}

.setup-container {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  width: 100%;
}

/* Form wrapper (includes heading + form) */
.form-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;

  /* centers the heading over the form */
}

h2 {
  padding-bottom: 30px;
  padding-top: 20px;
}

/* Heading inside the form wrapper */
.form-wrapper h2 {
  margin-bottom: 1rem;

  /* space between heading and form */
  text-align: center;

  /* centers text above the form only */
  color: #006ead;
}

/* Instructions panel styling */
.instructions-panel {
  display: flex;
  flex-direction: column;
  background-color: #f0f4ff;
  border-radius: 12px;
  gap: 0.5rem;
  padding: 1rem;
  font-size: 0.95rem;
  line-height: 1.4;
  box-shadow: 0 2px 8px rgb(0 0 0 / 10%);
  text-align: left;
  width: 40%;
}

.generator-form {
  flex: 1;
  max-width: 350px;
}

.instructions-panel h3 {
  color: #006ead;
  margin-bottom: 0.5rem;
  text-align: center;
}

.indented {
  padding-left: 18px;
  font-size: 14px;
}

/* Generator form wrapper */
#app .generator-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  vertical-align: middle;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Each row contains label + input */
#app .generator-form .form-row {
  display: flex;
  align-items: center;

  /* vertically center label + input */
  justify-content: space-between;
  gap: 1rem;

  /* spacing between label and input */
}

/* Labels fixed width for alignment */
#app .generator-form label {
  flex: 0 0 140px;

  /* fixed width for all labels */
  text-align: right;
  font-weight: bold;
}

/* Inputs grow to fill remaining space */
#app .generator-form input {
  flex: 1;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
}

#app .generator-form select {
  flex: 1;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  background-color: white;
  font-size: 1rem;
  font-family: inherit;
  color: #333;
}

/* Submit button */
#app .control-button {
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: none;
  background: #006ead;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
  align-self: center;
}

#app .generator-form button:hover {
  background: #6a11cb;
}

h1 {
  font-size: 2.5rem;
  color: #3174b2;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-align: center;
  padding-bottom: 20px;

  /* Neon glow effect */
  text-shadow:
    0 0 5px #fff,
    0 0 10px #fff,
    0 0 20px #0ff,
    0 0 40px #0ff,
    0 0 80px #0ff;
}

.question-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1;

  /* fill available vertical space */
  position: relative;
  padding-top: 2rem;
}

.question-form h3 {
  position: absolute;
  top: 0;
  right: 0;
  padding-top: 1rem;
  padding-right: 1rem;
  font-style: italic;
  color: #006ead;
}

.question-index {
  font-size: 1.2rem;
  margin-bottom: 0.5rem; /* space below the index */
}

.question-text {
  font-size: 1.5rem;
  margin-top: 0;      /* remove default h2 margin if needed */
  margin-bottom: 1rem; /* space below question text */
  overflow-wrap: break-word; /* ensures long text wraps */
  line-height: 1.4;  /* better readability */
}

.question-image {
  display: block;
  max-width: 300px;
  max-height: 180px; /* new: limit tallest images */
  width: auto;       /* allow width to scale proportionally */
  height: auto;
  margin: 10px 0;
  border: 1px solid #ccc;
  object-fit: contain; /* optional: preserve aspect ratio inside max-height */
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-left: 30px;
}


.button-container {
  position: absolute;
  bottom: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
  background: white;     /* so buttons aren’t overlaid on text */
  padding: 0.75rem 0;
  z-index: 10;
  width: 100%;
  border-top: 1px solid #eee; /* optional separator */
}

.nav-button {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
  border-width: 0;
  background: transparent;
}

.nav-button img {
  display: block;
  width: 50px;

  /* fixed image size inside button */
  height: 50px;
  border-width: 0;
}

.results-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;

  /* fill #app height */
  overflow: hidden;

  /* prevent scrollbars on container itself */
}

.results-scroll-area {
  flex: 1;

  /* take up remaining height */
  overflow-y: auto;
  margin: 1rem 0;
  padding-right: 0.5rem;

  /* space for scrollbar */
  width: 100%;
}