/* NEUROLAB — challenges.css : Styles der einzelnen Übungen */

/* ══ Sequenz ══ */
.ch-sequence-memory .sm-wrap { width: 100%; display: grid; place-items: center; }
.ch-sequence-memory .sm-grid { width: min(86vw, 400px); }
.ch-sequence-memory .sm-tile { aspect-ratio: 1; min-height: 56px; border-radius: 14px; }
.ch-sequence-memory .sm-grid:not(.is-live) .sm-tile { cursor: default; }
.ch-sequence-memory .sm-tile::after {
  content: ""; position: absolute; inset: 26%; border-radius: 50%;
  background: rgba(255,255,255,.10); transition: background 160ms var(--ease), transform 160ms var(--ease);
}
.ch-sequence-memory .sm-tile.is-on::after { background: #fff; transform: scale(1.25); box-shadow: 0 0 22px rgba(255,255,255,.8); }
.ch-sequence-memory .sm-tile.sm-noise::after { background: rgba(124,156,255,.5); }
.ch-sequence-memory .sm-grid.is-live .sm-tile:hover { background: var(--surface-2); }

/* ══ Positionen ══ */
.ch-spatial-memory .spm-wrap { width: 100%; display: grid; place-items: center; }
.ch-spatial-memory .spm-grid { width: min(86vw, 400px); }
.ch-spatial-memory .spm-badge {
  height: 34px; margin-bottom: 10px; display: grid; place-items: center;
  font-size: 13.5px; font-weight: 700; letter-spacing: .04em;
  padding: 0 16px; border-radius: var(--r-full); color: var(--cat-spatial);
  background: rgba(255,209,102,.12); border: 1px solid rgba(255,209,102,.32);
  opacity: 0; transform: translateY(-6px) scale(.9);
  transition: opacity 260ms var(--ease), transform 320ms var(--ease-back);
}
.ch-spatial-memory .spm-badge.is-on { opacity: 1; transform: none; }
.ch-spatial-memory .spm-tile { aspect-ratio: 1; min-height: 44px; border-radius: 12px; }
.ch-spatial-memory .spm-grid:not(.is-live) .spm-tile { cursor: default; }
.ch-spatial-memory .spm-tile.is-on { background: rgba(255,209,102,.28); border-color: rgba(255,209,102,.7); box-shadow: 0 0 26px -4px rgba(255,209,102,.75); }
.ch-spatial-memory .spm-grid.is-live .spm-tile:hover { background: var(--surface-2); }

/* ══ Reflex ══ */
.ch-reaction .rx-wrap { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.ch-reaction .rx-field {
  position: relative; width: 100%; height: min(56vh, 380px); min-height: 260px;
  border-radius: var(--r-l); border: 1px solid var(--stroke);
  background:
    radial-gradient(70% 60% at 50% 45%, rgba(255,154,60,.055), rgba(255,255,255,0) 70%),
    radial-gradient(circle at 1px 1px, rgba(255,255,255,.055) 1px, transparent 1px) 0 0/26px 26px,
    rgba(255,255,255,.015);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  overflow: hidden;
}
.ch-reaction .rx-obj {
  position: absolute; border: none; background: none; padding: 0; cursor: pointer;
  opacity: 0; transform: scale(.5);
  transition: opacity 140ms var(--ease), transform 200ms var(--ease-back);
}
.ch-reaction .rx-obj.is-in { opacity: 1; transform: none; }
.ch-reaction .rx-obj::before {
  content: ""; position: absolute; inset: 8%;
  background: var(--oc); box-shadow: 0 0 34px -6px var(--oc), inset 0 -8px 20px rgba(0,0,0,.25);
}
.ch-reaction .rx-circle::before { border-radius: 50%; }
.ch-reaction .rx-square::before { border-radius: 18%; }
.ch-reaction .rx-triangle::before {
  clip-path: polygon(50% 4%, 96% 92%, 4% 92%); border-radius: 0;
  box-shadow: 0 0 34px -6px var(--oc);
}
.ch-reaction .rx-obj.is-ok { transform: scale(1.16); filter: brightness(1.3); }
.ch-reaction .rx-obj.is-bad { transform: scale(.8); filter: grayscale(.7) brightness(.7); }
.ch-reaction .rx-obj.is-skip { opacity: 0; transform: scale(.85); }
.ch-reaction .rx-flash {
  position: absolute; inset: 0; display: flex; flex-direction: column; gap: 10px;
  align-items: center; justify-content: center; text-align: center; padding: 20px; z-index: 3;
  background: rgba(8,11,20,.72); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity 220ms var(--ease);
}
.ch-reaction .rx-flash.is-on { opacity: 1; }
.ch-reaction .rx-flash span { font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.ch-reaction .rx-flash b { font-size: clamp(20px, 5vw, 28px); font-weight: 750; letter-spacing: -.01em; color: var(--text); max-width: 320px; }

/* ══ Matrix ══ */
.ch-pattern-matrix .pm-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.ch-pattern-matrix .pm-matrix {
  display: grid; grid-template-columns: repeat(3, auto); gap: 8px;
  padding: 12px; border-radius: var(--r-l);
  background: rgba(255,255,255,.03); border: 1px solid var(--stroke);
}
.ch-pattern-matrix .pm-cell {
  display: grid; place-items: center; border-radius: 12px;
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06);
  animation: pmIn .42s var(--ease) both;
}
@keyframes pmIn { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
.ch-pattern-matrix .pm-cell.is-q { border: 1.5px dashed rgba(255,154,60,.5); background: rgba(255,154,60,.07); }
.ch-pattern-matrix .pm-q { font-size: 26px; font-weight: 750; color: var(--accent); }
.ch-pattern-matrix .pm-cell.is-solved { border-color: rgba(62,224,160,.5); background: rgba(62,224,160,.08); }
.ch-pattern-matrix .pm-sep { width: 42px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.12); }
.ch-pattern-matrix .pm-opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ch-pattern-matrix .pm-opt {
  display: grid; place-items: center; padding: 6px; min-width: 66px; min-height: 66px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--stroke); cursor: pointer;
  animation: pmIn .42s var(--ease) both;
  transition: transform 130ms var(--ease), background 160ms, border-color 160ms;
}
.ch-pattern-matrix .pm-opt:hover { background: var(--surface-2); border-color: var(--stroke-2); }
.ch-pattern-matrix .pm-opt:active { transform: scale(.94); }
.ch-pattern-matrix .pm-opt.is-ok { background: rgba(62,224,160,.18); border-color: rgba(62,224,160,.65); }
.ch-pattern-matrix .pm-opt.is-bad { background: rgba(255,95,109,.16); border-color: rgba(255,95,109,.6); }

/* ══ Interferenz ══ */
.ch-stroop .st-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.ch-stroop .st-word {
  font-size: clamp(46px, 15vw, 82px); font-weight: 800; letter-spacing: .02em; line-height: 1.1;
  min-height: 1.15em; display: grid; place-items: center; padding: 10px 22px; border-radius: var(--r-l);
  text-shadow: 0 0 46px currentColor;
}
.ch-stroop .st-word.is-in { animation: stWord .28s var(--ease-back); }
@keyframes stWord { from { opacity: 0; transform: scale(.88); } to { opacity: 1; transform: none; } }
.ch-stroop .st-word.is-framed { box-shadow: inset 0 0 0 4px var(--frame); }
.ch-stroop .st-opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: min(94vw, 500px); }
.ch-stroop .st-opt { flex: 1 1 128px; max-width: 168px; }
.ch-stroop .st-opts.is-swatches .st-opt { flex: 1 1 96px; max-width: 130px; }
.ch-stroop .st-opt {
  min-height: 64px; border-radius: var(--r-m); cursor: pointer;
  background: var(--surface); border: 1px solid var(--stroke); color: var(--text);
  font-size: 17px; font-weight: 660;
  transition: transform 120ms var(--ease), background 150ms, border-color 150ms;
}
.ch-stroop .st-opt:hover { background: var(--surface-2); border-color: var(--stroke-2); }
.ch-stroop .st-opt:active { transform: scale(.95); }
.ch-stroop .st-opt.is-swatch { min-height: 72px; border: 2px solid rgba(255,255,255,.14); box-shadow: inset 0 -10px 24px rgba(0,0,0,.22); }
.ch-stroop .st-opt.is-ok { outline: 3px solid var(--ok); outline-offset: 2px; }
.ch-stroop .st-opt.is-bad { outline: 3px solid var(--bad); outline-offset: 2px; opacity: .75; }

/* ══ Rotation ══ */
.ch-mental-rotation .mr-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ch-mental-rotation .mr-ref {
  display: grid; place-items: center; padding: 10px; border-radius: var(--r-l);
  background: rgba(255,209,102,.07); border: 1px solid rgba(255,209,102,.22);
}
.ch-mental-rotation .mr-ref.is-in { animation: mrIn .45s var(--ease-back); }
@keyframes mrIn { from { opacity: 0; transform: scale(.85) rotate(-8deg); } to { opacity: 1; transform: none; } }
.ch-mental-rotation .mr-sep {
  display: flex; align-items: center; gap: 10px; width: min(90vw, 420px);
  font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3);
}
.ch-mental-rotation .mr-sep::before, .ch-mental-rotation .mr-sep::after {
  content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.12);
}
.ch-mental-rotation .mr-opts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.ch-mental-rotation .mr-opt {
  display: grid; place-items: center; padding: 8px; min-width: 76px; min-height: 76px;
  border-radius: var(--r-m); background: var(--surface); border: 1px solid var(--stroke); cursor: pointer;
  animation: mrIn .4s var(--ease) both;
  transition: transform 130ms var(--ease), background 150ms, border-color 150ms;
}
.ch-mental-rotation .mr-opt:hover { background: var(--surface-2); border-color: var(--stroke-2); }
.ch-mental-rotation .mr-opt:active { transform: scale(.95); }
.ch-mental-rotation .mr-opt.is-ok { background: rgba(62,224,160,.18); border-color: rgba(62,224,160,.65); }
.ch-mental-rotation .mr-opt.is-bad { background: rgba(255,95,109,.16); border-color: rgba(255,95,109,.6); }

/* ══ N-Back ══ */
.ch-nback .nb-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ch-nback .nb-badge {
  font-size: 12px; font-weight: 800; letter-spacing: .18em;
  padding: 6px 14px; border-radius: var(--r-full);
  background: rgba(124,156,255,.12); border: 1px solid rgba(124,156,255,.32); color: var(--cat-memory);
}
.ch-nback .nb-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px;
  width: min(74vw, 300px);
}
.ch-nback .nb-cell {
  aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center;
  font-size: 26px; color: #0B0F1A;
  background: rgba(255,255,255,.04); border: 1px solid var(--stroke);
  transition: background 150ms var(--ease), transform 180ms var(--ease-back), box-shadow 150ms;
}
.ch-nback .nb-cell.is-on {
  background: linear-gradient(150deg, #9DB6FF, #6C8CFF);
  border-color: transparent; transform: scale(1.06);
  box-shadow: 0 0 30px -4px rgba(124,156,255,.8);
}
.ch-nback .nb-sym { font-size: 40px; min-height: 52px; color: var(--cat-memory); }
.ch-nback .nb-hint { font-size: 13px; color: var(--text-3); min-height: 20px; }
.ch-nback .nb-row { display: flex; gap: 10px; width: min(94vw, 460px); }
.ch-nback .nb-btn {
  flex: 1; min-height: 76px; border-radius: var(--r-m); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: var(--surface-2); border: 1px solid var(--stroke-2); color: var(--text);
  transition: transform 120ms var(--ease), background 150ms, opacity 150ms;
}
.ch-nback .nb-btn b { font-size: 16px; font-weight: 700; }
.ch-nback .nb-btn span { font-size: 11.5px; color: var(--text-3); }
.ch-nback .nb-btn:active { transform: scale(.97); }
.ch-nback .nb-btn[disabled] { opacity: .4; }
.ch-nback .nb-btn.is-hit { background: rgba(255,154,60,.28); border-color: rgba(255,154,60,.6); }
