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

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f0f2f5;
  color: #232f3e;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px;
}

h1 {
  font-size: 1.6rem;
  color: #232f3e;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.subtitle {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 28px;
}

/* File loader */
#loader {
  background: #fff;
  border-radius: 10px;
  padding: 36px 40px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  text-align: center;
  max-width: 480px;
  width: 100%;
}

#loader label {
  display: block;
  font-size: 1rem;
  margin-bottom: 18px;
  color: #444;
}

#fileInput {
  display: none;
}

.btn-upload {
  display: inline-block;
  cursor: pointer;
  background: #ff9900;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 11px 32px;
  border-radius: 6px;
  border: none;
  transition: background 0.2s;
}

.btn-upload:hover {
  background: #e68a00;
}

#fileName {
  margin-top: 14px;
  font-size: 0.88rem;
  color: #888;
}

/* Quiz container */
#quiz {
  display: none;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  max-width: 760px;
  width: 100%;
  padding: 36px 40px;
}

/* Progress */
#progress {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}

#jumpWrap {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

#jumpInput {
  width: 54px;
  padding: 3px 6px;
  font-size: 0.82rem;
  border: 1.5px solid #e0e0e0;
  border-radius: 4px;
  text-align: center;
  color: #232f3e;
}

#jumpInput:focus {
  outline: none;
  border-color: #ff9900;
}

#btnJump {
  padding: 3px 10px;
  font-size: 0.82rem;
  font-weight: 600;
  background: #232f3e;
  color: #fff;
  border-radius: 4px;
  border: none;
  cursor: pointer;
}

#btnJump:hover {
  background: #374554;
}

#progressBar {
  width: 100%;
  height: 6px;
  background: #e8e8e8;
  border-radius: 3px;
  margin-bottom: 24px;
  overflow: hidden;
}

#progressFill {
  height: 100%;
  background: #ff9900;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Question */
.question-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: #ff9900;
  text-transform: uppercase;
  margin-bottom: 8px;
}

#questionText {
  font-size: 1.05rem;
  line-height: 1.65;
  color: #232f3e;
  margin-bottom: 24px;
}

.hint {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 18px;
  font-style: italic;
}

/* Options */
#options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}

.option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

.option:hover:not(.disabled) {
  border-color: #ff9900;
  background: #fff8ee;
}

.option input[type="checkbox"],
.option input[type="radio"] {
  margin-top: 2px;
  accent-color: #ff9900;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.option .option-text {
  font-size: 0.97rem;
  line-height: 1.5;
}

/* Feedback states */
.option.correct {
  border-color: #1a9e5c;
  background: #f0fbf5;
}

.option.wrong {
  border-color: #d93025;
  background: #fdf3f2;
}

.option.missed {
  border-color: #1a9e5c;
  background: #f0fbf5;
  opacity: 0.75;
}

.option.disabled {
  cursor: default;
}

/* Feedback banner */
#feedback {
  display: none;
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.55;
  margin-bottom: 22px;
}

#feedback.correct {
  background: #f0fbf5;
  border: 1.5px solid #1a9e5c;
  color: #145c37;
}

#feedback.incorrect {
  background: #fdf3f2;
  border: 1.5px solid #d93025;
  color: #8c1a12;
}

/* Buttons */
.btn-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

button {
  padding: 10px 26px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}

#btnSubmit {
  background: #232f3e;
  color: #fff;
}

#btnSubmit:hover {
  background: #374554;
}

#btnSubmit:disabled {
  opacity: 0.4;
  cursor: default;
}

#btnNext {
  display: none;
  background: #ff9900;
  color: #fff;
}

#btnNext:hover {
  background: #e68a00;
}

/* Score screen */
#scoreScreen {
  display: none;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.10);
  max-width: 520px;
  width: 100%;
  padding: 48px 40px;
  text-align: center;
}

#scoreScreen h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #232f3e;
}

#scoreValue {
  font-size: 3.5rem;
  font-weight: 700;
  color: #ff9900;
  margin: 18px 0 6px;
}

#scoreSub {
  font-size: 1rem;
  color: #666;
  margin-bottom: 28px;
}

#scoreResult {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 32px;
}

#scoreResult.pass {
  color: #1a9e5c;
}

#scoreResult.fail {
  color: #d93025;
}

#btnRestart {
  background: #ff9900;
  color: #fff;
  font-size: 1rem;
  padding: 12px 36px;
  border-radius: 6px;
}

#btnRestart:hover {
  background: #e68a00;
}

@media (max-width: 540px) {
  #quiz, #loader, #scoreScreen {
    padding: 24px 16px;
  }
}
