* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Segoe UI", "Tahoma", "Cairo", system-ui, sans-serif;
  background: #f5f5f7;
  color: #1c1c1e;
  -webkit-font-smoothing: antialiased;
}
.app {
  max-width: 1000px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100vh;
}
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.score { font-size: 18px; font-weight: 700; }
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filters label { font-size: 13px; color: #8e8e93; }
.timer {
  font-weight: 700;
  font-size: 18px;
  color: #0a84ff;
  font-variant-numeric: tabular-nums;
}
.timer.warn { color: #ff9500; }
.timer.danger { color: #ff3b30; }
select {
  font: inherit;
  padding: 6px 10px;
  border: 1px solid #d1d1d6;
  border-radius: 8px;
  background: #fff;
}
.progress {
  height: 6px;
  background: #e5e5ea;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: #0a84ff;
  transition: width .2s ease;
}
.card {
  background: #fff;
  border: 1px solid #e5e5ea;
  border-radius: 16px;
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.qmeta { color: #8e8e93; font-size: 13px; }
.qimg {
  display: block;
  margin: 6px auto;
  max-height: 220px;
  max-width: 90%;
  object-fit: contain;
  border-radius: 8px;
}
.qtext {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}
.options { display: flex; flex-direction: column; gap: 10px; }
.opt {
  font: inherit;
  font-size: 16px;
  text-align: right;
  padding: 14px 16px;
  border: 1px solid #d1d1d6;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: background .12s, border-color .12s;
  display: block;
  width: 100%;
}
.opt:hover:not(:disabled) {
  background: #e3f2ff;
  border-color: #0a84ff;
}
.opt:disabled { cursor: default; }
.opt.correct {
  background: #34c759 !important;
  border-color: #34c759 !important;
  color: #fff;
}
.opt.wrong {
  background: #ff3b30 !important;
  border-color: #ff3b30 !important;
  color: #fff;
}
.opt.dim { background: #f2f2f7; color: #1c1c1e; }
.feedback {
  font-size: 16px;
  font-weight: 700;
  min-height: 24px;
  white-space: pre-line;
}
.feedback.correct { color: #34c759; }
.feedback.wrong { color: #ff3b30; }
.btn {
  font: inherit;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-size: 15px;
}
.btn.primary { background: #0a84ff; color: #fff; }
.btn.primary:disabled { background: #c7c7cc; cursor: default; }
.btn.ghost { background: #e5e5ea; color: #1c1c1e; }
.hint { color: #8e8e93; font-size: 13px; }

@media (max-width: 600px) {
  .qtext { font-size: 17px; }
  .opt { font-size: 15px; padding: 12px 14px; }
  .hint { display: none; }
}
