/* Firdaws.me — Frans leren. Stijl voor de cursuskaart en de lessen. */

/* ---------- Topbalk met XP, streak en woorden ---------- */
.fr-top {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 0 26px;
}
.fr-top .stat {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  font-weight: 800;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 0 rgba(31,34,51,0.14);
}
.fr-top .stat .big { font-size: 20px; }

/* ---------- Het lespad ---------- */
.fr-unit {
  margin: 0 0 46px;
}
.fr-unit-head {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 20px;
  padding: 18px 22px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.fr-unit-head .ico { font-size: 40px; line-height: 1; }
.fr-unit-head h2 {
  font-family: 'Fraunces', serif;
  font-size: 26px;
  margin: 0;
  letter-spacing: -0.5px;
}
.fr-unit-head .sub {
  margin: 0;
  color: #4a4f6a;
  font-size: 15px;
  font-weight: 600;
}
.fr-unit-head .grow { flex: 1 1 120px; }
.fr-unit.c-rose .fr-unit-head { background: #ffe1e6; }
.fr-unit.c-peach .fr-unit-head { background: #ffe7d2; }
.fr-unit.c-sun .fr-unit-head { background: #fff1c2; }
.fr-unit.c-mint .fr-unit-head { background: #d8f3e8; }
.fr-unit.c-sky .fr-unit-head { background: #d9ebff; }
.fr-unit.c-plum .fr-unit-head { background: #e9defb; }

.fr-crown {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 5px 12px;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
}

/* Zigzag pad met lesbollen */
.fr-path {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 22px 0 6px;
  position: relative;
}
.fr-path .fr-node:nth-child(4n+1) { transform: translateX(-70px); }
.fr-path .fr-node:nth-child(4n+3) { transform: translateX(70px); }
@media (max-width: 520px) {
  .fr-path .fr-node:nth-child(4n+1) { transform: translateX(-46px); }
  .fr-path .fr-node:nth-child(4n+3) { transform: translateX(46px); }
}

.fr-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--ink);
}
.fr-bubble {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 4px solid var(--ink);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  box-shadow: 0 8px 0 rgba(31,34,51,0.22);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  position: relative;
}
.fr-node:hover .fr-bubble:not(.locked) {
  transform: translateY(-3px);
  box-shadow: 0 11px 0 rgba(31,34,51,0.22);
}
.fr-node .label {
  font-weight: 800;
  font-size: 14px;
  text-align: center;
  max-width: 150px;
  line-height: 1.25;
}
.fr-bubble.locked {
  background: #ece9e2;
  border-color: #a9a69f;
  box-shadow: 0 8px 0 rgba(31,34,51,0.10);
  filter: grayscale(1);
  opacity: 0.75;
}
.fr-node.locked .label { color: #8a8794; }
.fr-bubble.done { background: var(--sun); }
.fr-bubble.gold {
  background: var(--sun);
  box-shadow: 0 8px 0 rgba(31,34,51,0.22), 0 0 0 6px rgba(255,209,102,0.45);
}
.fr-bubble.current {
  animation: fr-pulse 1.8s ease-in-out infinite;
}
@keyframes fr-pulse {
  0%, 100% { box-shadow: 0 8px 0 rgba(31,34,51,0.22), 0 0 0 0 rgba(255,122,138,0.55); }
  50% { box-shadow: 0 8px 0 rgba(31,34,51,0.22), 0 0 0 12px rgba(255,122,138,0); }
}
.fr-bubble .stars {
  position: absolute;
  bottom: -12px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  font-size: 11px;
  padding: 2px 8px;
  letter-spacing: 1px;
  white-space: nowrap;
}
.fr-start-here {
  background: var(--rose);
  color: #fff;
  border: 3px solid var(--ink);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Tip-kaart per thema */
.fr-tip {
  background: var(--paper);
  border: 3px dashed var(--ink);
  border-radius: 18px;
  padding: 18px 22px;
  margin-top: 16px;
}
.fr-tip h3 {
  font-family: 'Fraunces', serif;
  font-size: 19px;
  margin: 0 0 6px;
}
.fr-tip p { margin: 0 0 8px; font-size: 16px; line-height: 1.6; }
.fr-tip p:last-child { margin-bottom: 0; }

/* ---------- Lespagina ---------- */
.fr-lesson {
  max-width: 720px;
  margin: 0 auto;
}
.fr-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 10px 0 22px;
}
.fr-quit {
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: #6a6f8a;
  line-height: 1;
  padding: 0 4px;
  font-family: inherit;
}
.fr-progress {
  flex: 1;
  height: 20px;
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}
.fr-progress i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--mint);
  border-radius: 999px;
  transition: width 0.3s ease;
}
.fr-hearts {
  font-size: 20px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.fr-card {
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow: 0 12px 0 rgba(31,34,51,0.14), 0 4px 0 rgba(31,34,51,0.2);
  min-height: 330px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.fr-prompt {
  font-weight: 800;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #6a6f8a;
  margin: 0;
}
.fr-ask {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: clamp(26px, 5vw, 38px);
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.fr-ask.small { font-size: clamp(22px, 4vw, 28px); }

/* Luidsprekerknop */
.fr-speak {
  background: var(--sky);
  border: 3px solid var(--ink);
  border-radius: 14px;
  width: 48px;
  height: 44px;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  flex: 0 0 auto;
  box-shadow: 0 4px 0 rgba(31,34,51,0.2);
  transition: transform 0.1s ease;
}
.fr-speak:hover { background: #b9dcff; }
.fr-speak:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(31,34,51,0.2); }
.fr-speak.big {
  width: 120px;
  height: 110px;
  font-size: 52px;
  border-radius: 24px;
  margin: 6px auto;
  display: block;
}
.fr-speak.slow { background: #fff; font-size: 15px; font-weight: 800; width: auto; padding: 0 14px; }

/* Antwoordknoppen */
.fr-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.fr-choice {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 16px 14px;
  font-family: inherit;
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
  color: var(--ink);
  box-shadow: 0 5px 0 rgba(31,34,51,0.18);
  transition: transform 0.08s ease, background 0.1s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.fr-choice .em { font-size: 40px; line-height: 1; }
.fr-choice:hover:not(:disabled) { background: #fffaef; transform: translateY(-2px); }
.fr-choice:disabled { cursor: default; }
.fr-choice.picked { background: #d9ebff; }
.fr-choice.good { background: #d8f3e8; border-color: #1f7a55; }
.fr-choice.bad { background: #ffd9df; border-color: #b8324a; }

/* Zin bouwen met tegels */
.fr-answer-line {
  min-height: 64px;
  border-bottom: 3px dashed rgba(31,34,51,0.25);
  padding: 8px 0 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
}
.fr-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 50px;
}
.fr-tile {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 12px;
  padding: 8px 14px;
  font-family: inherit;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  color: var(--ink);
  box-shadow: 0 4px 0 rgba(31,34,51,0.18);
}
.fr-tile:hover { background: var(--sun); }
.fr-tile.ghost {
  background: #eee9df;
  border-color: #cfc9bd;
  color: transparent;
  box-shadow: none;
  cursor: default;
}

/* Typen */
.fr-type {
  font-family: inherit;
  font-weight: 700;
  font-size: 22px;
  width: 100%;
  padding: 14px 16px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
}
.fr-type:focus { outline: none; background: #fffaef; }
.fr-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fr-keys button {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 10px;
  width: 40px;
  height: 38px;
  font-family: inherit;
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
  color: var(--ink);
}
.fr-keys button:hover { background: var(--sun); }

/* Woordparen koppelen */
.fr-match {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fr-match .fr-choice { font-size: 16px; padding: 14px 10px; min-height: 58px; justify-content: center; }
.fr-match .fr-choice.gone { visibility: hidden; }

/* Kaartje bij een nieuw woord */
.fr-new {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 0;
}
.fr-new .em { font-size: 74px; line-height: 1; }
.fr-new .fr-word {
  font-family: 'Fraunces', serif;
  font-weight: 800;
  font-size: clamp(30px, 6vw, 44px);
  margin: 4px 0 0;
}
.fr-new .fr-mean {
  font-size: 20px;
  color: #4a4f6a;
  font-weight: 700;
}
.fr-badge-new {
  background: var(--rose);
  color: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Onderbalk met nakijken / verder */
.fr-foot {
  margin-top: 18px;
  border-radius: 20px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border: 3px solid transparent;
}
.fr-foot.ok { background: #d8f3e8; border-color: #1f7a55; }
.fr-foot.no { background: #ffd9df; border-color: #b8324a; }
.fr-foot .msg { flex: 1 1 200px; font-weight: 800; font-size: 17px; }
.fr-foot .msg small {
  display: block;
  font-weight: 600;
  font-size: 15px;
  color: #3a3f5a;
  margin-top: 2px;
}
.fr-btn {
  background: var(--ink);
  color: var(--paper);
  border: 3px solid var(--ink);
  padding: 13px 28px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
  box-shadow: 0 5px 0 rgba(31,34,51,0.25);
  text-decoration: none;
  display: inline-block;
}
.fr-btn:hover { background: #000; }
.fr-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(31,34,51,0.25); }
.fr-btn:disabled {
  background: #ddd8cf;
  border-color: #c4bfb5;
  color: #8b8578;
  cursor: not-allowed;
  box-shadow: none;
}
.fr-btn.green { background: #1f7a55; border-color: #14523a; }
.fr-btn.green:hover { background: #176243; }
.fr-btn.ghost { background: #fff; color: var(--ink); }
.fr-btn.ghost:hover { background: var(--paper-2); }

/* Klaar-scherm */
.fr-done {
  text-align: center;
  background: #fff;
  border: 4px solid var(--ink);
  border-radius: 24px;
  padding: 40px 26px;
  box-shadow: 0 12px 0 rgba(31,34,51,0.14);
}
.fr-done .big { font-size: 76px; line-height: 1; }
.fr-done h2 {
  font-family: 'Fraunces', serif;
  font-size: 34px;
  margin: 10px 0 6px;
}
.fr-scores {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 20px 0 26px;
}
.fr-scores .box {
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 12px 20px;
  min-width: 110px;
  background: var(--paper);
}
.fr-scores .box b {
  display: block;
  font-family: 'Fraunces', serif;
  font-size: 28px;
}
.fr-scores .box span { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

/* Woordenlijst */
.fr-words {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.fr-word-row {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 0 rgba(31,34,51,0.14);
}
.fr-word-row .em { font-size: 30px; line-height: 1; }
.fr-word-row .txt { flex: 1; min-width: 0; }
.fr-word-row .fr { font-weight: 800; font-size: 17px; }
.fr-word-row .nl { color: #4a4f6a; font-size: 15px; }
.fr-word-row.new-word { border-style: dashed; opacity: 0.75; }
.fr-word-row .fr-speak { width: 40px; height: 38px; font-size: 16px; }

.fr-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 8px 0 4px;
}
.fr-filter button {
  background: #fff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  color: var(--ink);
}
.fr-filter button:hover { background: var(--sun); }
.fr-filter button.active { background: var(--ink); color: var(--paper); }

.fr-note {
  background: #fff;
  border: 3px solid var(--ink);
  border-radius: 16px;
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 15px;
}

@media (prefers-reduced-motion: reduce) {
  .fr-bubble.current { animation: none; }
  .fr-progress i { transition: none; }
}
