/* EduFabTech — game-nback.css (2-back). Önek gm-nback-. Vurgu renkleri: cyan #19e3ff, mor #845eff. */
.gm-nback-box {
  --nb-cyan: #19e3ff;
  --nb-purple: #845eff;
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 14px;
  box-sizing: border-box;
  background: linear-gradient(180deg, #151b27 0%, #10141c 60%, #0d1118 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .04);
  font-family: var(--sans);
  color: var(--text);
  user-select: none;
  -webkit-user-select: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

/* HUD */
.gm-nback-hud {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 8px;
}
.gm-nback-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, 0));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 4px 12px rgba(0, 0, 0, .25);
}
.gm-nback-lbl {
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.gm-nback-val {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}
.gm-nback-c-trial .gm-nback-val { color: #ffd24a; }
.gm-nback-c-hits .gm-nback-val { color: var(--brand); }
.gm-nback-c-mist .gm-nback-val { color: var(--err); }

.gm-nback-track {
  height: 6px;
  margin: 10px 0 0;
  background: var(--bg);
  border-radius: 999px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .6);
  overflow: hidden;
}
.gm-nback-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--nb-purple), var(--nb-cyan));
  box-shadow: 0 0 10px rgba(25, 227, 255, .5);
  border-radius: 999px;
  transition: width .25s ease;
}

.gm-nback-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Izgara */
.gm-nback-frame {
  position: relative;
  width: min(300px, 100%);
  margin: 16px auto 14px;
  padding: 12px;
  box-sizing: border-box;
  background: linear-gradient(180deg, #0b0f17, #080b11);
  border: 2px solid transparent;
  border-radius: 18px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, .7), 0 8px 24px rgba(0, 0, 0, .4);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.gm-nback-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.gm-nback-tile {
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: linear-gradient(160deg, #1b2333 0%, #121826 55%, #0e1320 100%);
  border: 1px solid #27324a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 -3px 6px rgba(0, 0, 0, .35), 0 2px 4px rgba(0, 0, 0, .35);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.gm-nback-tile.gm-nback-lit {
  background: linear-gradient(150deg, var(--nb-cyan) 0%, #4fa8ff 45%, var(--nb-purple) 100%);
  border-color: rgba(255, 255, 255, .55);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .15), 0 0 26px rgba(25, 227, 255, .65), 0 0 60px rgba(132, 94, 255, .45),
              inset 0 2px 8px rgba(255, 255, 255, .35);
  transform: scale(1.06);
  animation: gm-nback-pop .22s ease-out;
}
@keyframes gm-nback-pop {
  0% { transform: scale(.92); filter: brightness(1.6); }
  100% { transform: scale(1.06); filter: brightness(1); }
}
.gm-nback-veil {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(8, 11, 17, .82);
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .9rem;
}
.gm-nback-veil[hidden] { display: none; }

/* Match düğmesi */
.gm-nback-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #1c2538 0%, #141b2a 100%);
  color: var(--text);
  border: 1px solid #34406a;
  border-radius: 20px;
  box-shadow: 0 6px 0 #0b0f18, 0 12px 24px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .08);
  font: inherit;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: .14em;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform .08s ease, box-shadow .08s ease, background .15s ease, border-color .15s ease;
}
.gm-nback-btn:hover { border-color: #4a5a8f; }
.gm-nback-btn:active {
  transform: translateY(5px);
  box-shadow: 0 1px 0 #0b0f18, 0 4px 10px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.gm-nback-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.gm-nback-btn-key {
  font-family: var(--mono);
  font-size: .75rem;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 7px;
  background: rgba(0, 0, 0, .25);
}
.gm-nback-hint {
  margin: 12px 0 0;
  font-size: .85rem;
  color: var(--muted);
  text-align: center;
}

/* Geri bildirim: isabet (yeşil), yanlış alarm (kırmızı + sarsıntı), kaçırma (ızgara çerçevesi kırmızı) */
.gm-nback-hit .gm-nback-btn {
  background: linear-gradient(180deg, rgba(67, 212, 155, .55), rgba(67, 212, 155, .25));
  border-color: var(--brand);
  box-shadow: 0 6px 0 #0b0f18, 0 0 28px rgba(67, 212, 155, .55), inset 0 1px 0 rgba(255, 255, 255, .15);
  animation: gm-nback-hitpop .25s ease-out;
}
@keyframes gm-nback-hitpop {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
.gm-nback-false .gm-nback-btn {
  background: linear-gradient(180deg, rgba(239, 106, 98, .55), rgba(239, 106, 98, .25));
  border-color: var(--err);
  box-shadow: 0 6px 0 #0b0f18, 0 0 28px rgba(239, 106, 98, .55), inset 0 1px 0 rgba(255, 255, 255, .15);
  animation: gm-nback-shake .28s ease;
}
@keyframes gm-nback-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}
.gm-nback-miss .gm-nback-frame {
  border-color: var(--err);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, .7), 0 0 26px rgba(239, 106, 98, .55);
  animation: gm-nback-shake .28s ease;
}
.gm-nback-done .gm-nback-frame { border-color: var(--brand); }
.gm-nback-paused .gm-nback-btn { opacity: .55; }

/* Hareketi azalt */
.gm-nback-reduced,
.gm-nback-reduced .gm-nback-tile,
.gm-nback-reduced .gm-nback-btn,
.gm-nback-reduced .gm-nback-frame,
.gm-nback-reduced .gm-nback-fill { transition: none; animation: none; }
.gm-nback-reduced .gm-nback-tile.gm-nback-lit,
.gm-nback-reduced .gm-nback-hit .gm-nback-btn,
.gm-nback-reduced .gm-nback-false .gm-nback-btn,
.gm-nback-reduced .gm-nback-miss .gm-nback-frame { animation: none; transform: none; }
.gm-nback-reduced .gm-nback-btn:active { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .gm-nback-box, .gm-nback-tile, .gm-nback-btn, .gm-nback-frame, .gm-nback-fill { transition: none; animation: none; }
  .gm-nback-tile.gm-nback-lit, .gm-nback-hit .gm-nback-btn, .gm-nback-false .gm-nback-btn, .gm-nback-miss .gm-nback-frame { animation: none; transform: none; }
  .gm-nback-btn:active { transform: none; }
}

@media (max-width: 400px) {
  .gm-nback-box { padding: 10px; }
  .gm-nback-hud { gap: 6px; }
  .gm-nback-cell { padding: 6px 8px; }
  .gm-nback-val { font-size: 1rem; }
  .gm-nback-frame { width: min(260px, 100%); padding: 10px; }
  .gm-nback-grid { gap: 8px; }
  .gm-nback-btn { min-height: 64px; font-size: 1.2rem; }
}
