
/* ===============================
    Beauty Exam Academy — Practice Exam
    Mirrors Flashcards look & feel
    =============================== */

:root{
  /* Use same tokens as flashcards for seamless look */
  --bg: #FFF;
  --panel: #fdeeee;
  --panel-hover: #F1C7BD;
  --border: #B77467;
  --ink: #2B1F1F;
  --muted: #6E4D45;
  --accent: #B66A5C;
  --accent-light: #E8B6AB;

  --correct: #2F6D4F;
  --wrong: #9B1C1C;

  --radius: 14px;
  --shadow: 0 8px 24px rgba(183,116,103,0.18);
  --shadow-soft: 0 6px 18px rgba(183,116,103,0.12);
}

html, body { height: 100%; background: #fdeff1; }
body {
  margin: 0;
  color: var(--ink);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  line-height: 1.45;
  background:
    radial-gradient(1200px 600px at 75% -200px, #ffe3e7 0, rgba(255,227,231,0) 70%),
    radial-gradient(900px 500px at -200px 120%, #ffeceb 0, rgba(255,236,235,0) 70%),
    #FCE9EC;
}

.shell {
  max-width: 1150px;
  margin: 0 auto;
  padding: 24px;
}

header {
  display:flex; align-items:center; justify-content:space-between;
  gap: 16px; margin-bottom: 16px;
}
.title-badge {
  display:inline-flex; align-items:center; gap:.6rem;
  background: var(--panel);
  color: var(--ink);
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.controls {
  display:flex; gap:8px; align-items:center;
}
.btn {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: background .15s ease, transform .05s ease;
}
.btn:hover { background: var(--panel-hover); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity:.5; cursor:not-allowed; }

.score {
  font-weight:700; color: var(--muted);
}
.score .good { color: var(--correct); }
.score .bad { color: var(--wrong); }

.card {
  background: #fff7f8;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.qwrap {
  padding: 28px;
}

.qtext {
  font-size: clamp(18px, 2.2vw, 22px);
  margin: 4px 0 18px;
  font-weight: 700;
}

.options {
  display: grid;
  gap: 12px;
}

.option {
  display:flex;
  align-items:center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #fdeeee;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background .15s ease, transform .05s ease, border-color .15s ease;
  position: relative;
}
.option:hover { background: var(--panel-hover); }
.option[data-state="selected"] { outline: 3px solid var(--accent-light); }
.option[data-state="correct"]  { background: #eef7f1; border-color: var(--correct); }
.option[data-state="wrong"]    { background: #fff1f1; border-color: var(--wrong); }

.keycap {
  font-weight: 800;
  min-width: 28px;
  height: 28px;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
}

.explain {
  margin-top: 16px;
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--muted);
}

.footer {
  display:flex; align-items:center; justify-content:space-between;
  gap: 12px;
  padding: 14px 18px;
  background: #fff3f4;
  border-top: 1px solid var(--border);
}

.progress { color: var(--muted); }

.end {
  padding: 28px;
  display: none;
}
.end h2 { margin-top:0; }
.summary {
  display:grid; gap: 12px;
  margin-top: 12px;
}
.tag {
  display:inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-weight: 600;
}

/* Accessibility helpers */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
[tabindex]:focus, button:focus { outline: 3px solid var(--accent-light); outline-offset: 2px; }

@media (max-width: 720px){
  .qwrap { padding: 20px; }
  .footer { flex-direction: column; align-items: stretch; gap: 10px; }
  header { flex-direction: column; align-items: flex-start; gap: 10px; }
}