/* ===== game.css — משחק המסוע (PlayEngine.TYPES.game): חדר כיתה י' ושאלוני י"א ===== */
/* בשאלוני י"א (nq.css) אין את משתני ה-play — מגדירים אותם בתוך .nq-game */
.nq-game { --pl-violet: #7c3aed; --pl-soft: #475569; --pl-ink: #1e1b4b; --pl-line: #e5e7eb; }
.nq-game .pl-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 16px; padding: 12px 26px; font: 800 1.1rem "Assistant", sans-serif; cursor: pointer;
  background: linear-gradient(135deg, #7c3aed, #6366f1); color: #fff; box-shadow: 0 8px 20px rgba(124,58,237,.3); transition: transform .15s; }
.nq-game .pl-btn:hover { transform: translateY(-2px); }
/* ---- משחק מסוע (game) ---- */
.gm-intro { text-align: center; padding: 10px 0; }
.gm-logo { font-size: 3.4rem; animation: gmBob 1.6s ease-in-out infinite; }
@keyframes gmBob { 50% { transform: translateY(-8px) rotate(-6deg); } }
.gm-intro h3 { font-family: "Rubik", sans-serif; font-size: 1.6rem; margin: 4px 0; color: var(--pl-violet); }
.gm-rules { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0 16px; }
.gm-rules span { background: #f5f3ff; border: 2px solid #ddd6fe; border-radius: 99px; padding: 6px 14px; font-weight: 700; }
.gm-slow { font-weight: 800; color: #0f766e; }
.gm { user-select: none; }
.gm-hud { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; margin-bottom: 8px; flex-wrap: wrap; }
.gm-s b { font-family: "Rubik", sans-serif; font-size: 1.3rem; color: var(--pl-violet); }
.gm-lv { color: #ea580c; }
.gm-track { position: relative; height: 96px; border-radius: 20px; overflow: hidden;
  background: repeating-linear-gradient(90deg, #1e1b4b 0 40px, #27235f 40px 80px); box-shadow: inset 0 0 0 3px #312e81, inset 0 -10px 20px rgba(0,0,0,.35); }
.gm-door { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 2.2rem; filter: drop-shadow(0 0 10px rgba(250,204,21,.6)); }
.gm-pk { position: absolute; right: 12px; top: 50%; margin-top: -26px; height: 52px; display: grid; place-items: center; padding: 0 16px; border-radius: 14px;
  background: linear-gradient(135deg, #fef3c7, #fde68a); border: 3px solid #f59e0b; box-shadow: 0 6px 16px rgba(0,0,0,.35); will-change: transform; }
.gm-pk::before { content: "📦"; position: absolute; top: -18px; right: -10px; font-size: 1.4rem; }
.gm-pk .mono { font-size: 1.35rem; font-weight: 800; background: none; color: #1e1b4b; }
.gm-pk .pk-t { font-size: 1.25rem; font-weight: 800; color: #1e1b4b; white-space: nowrap; }
.gm-pk.ok { background: linear-gradient(135deg, #bbf7d0, #4ade80); border-color: #16a34a; animation: gmOk .45s ease forwards; }
.gm-pk.no { background: linear-gradient(135deg, #fecaca, #f87171); border-color: #dc2626; animation: gmNo .4s; }
@keyframes gmNo { 25% { rotate: -7deg; } 75% { rotate: 7deg; } }
@keyframes gmOk { to { opacity: 0; translate: 0 60px; scale: .6; } }
.gm-msg { min-height: 2.6em; margin: 8px 0; text-align: center; font-weight: 700; }
.gm-good { color: #16a34a; font-size: 1.3rem; font-family: "Rubik", sans-serif; }
.gm-bad { color: #b91c1c; }
.gm-lanes { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; }
.gm-lane { position: relative; border: 0; border-radius: 18px; padding: 18px 8px 14px; font: 800 1.15rem "Assistant", sans-serif; color: #fff; cursor: pointer;
  box-shadow: 0 6px 0 rgba(0,0,0,.25); transition: transform .1s, box-shadow .1s, filter .2s; }
.gm-lane:active, .gm-lane.hit { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.gm-lane kbd { position: absolute; top: 6px; right: 8px; font: 700 .75rem Consolas, monospace; background: rgba(255,255,255,.25); border-radius: 6px; padding: 0 5px; }
.gm-lane.l0 { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.gm-lane.l1 { background: linear-gradient(135deg, #f97316, #e11d48); }
.gm-lane.l2 { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.gm-lane.l3 { background: linear-gradient(135deg, #14b8a6, #0f766e); }
.gm-rev ul { list-style: none; padding: 0; display: grid; gap: 6px; }
.gm-rev li { background: #f8fafc; border-radius: 12px; padding: 6px 12px; }
.gm-rev small { color: var(--pl-soft); }
@media (max-width: 520px) { .gm-track { height: 84px; } .gm-pk .mono { font-size: 1.1rem; } .gm-lane { font-size: 1rem; padding: 16px 4px 12px; } }

/* ---- משחק זיכרון (memory) ---- */
.mm-intro { text-align: center; font-weight: 700; margin: 0 0 8px; }
.mm-h b { color: #e11d48; }
.mm-grid { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 10px; perspective: 900px; }
.mm-card { position: relative; min-height: 92px; border: 0; padding: 0; background: none; cursor: pointer; transform-style: preserve-3d; transition: transform .45s; font: inherit; }
.mm-card.up { transform: rotateY(180deg); }
.mm-back, .mm-face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 16px; backface-visibility: hidden; padding: 6px 8px; text-align: center; line-height: 1.3; }
.mm-back { font-size: 2rem; background: repeating-linear-gradient(45deg, #4f46e5 0 12px, #6366f1 12px 24px); box-shadow: 0 6px 0 #3730a3; }
.mm-card:hover:not(.up) .mm-back { filter: brightness(1.12); }
.mm-face { transform: rotateY(180deg); background: #fff; border: 3px solid #c7d2fe; font-weight: 800; font-size: .95rem; color: #1e1b4b; }
.mm-card.s1 .mm-face { background: #fffbeb; border-color: #fcd34d; font-weight: 700; }
.mm-face.mono { font: 800 .95rem Consolas, monospace; background: #0b1220; color: #4ade80; border-color: #334155; }
.mm-card.done .mm-face { border-color: #22c55e; box-shadow: 0 0 0 3px #bbf7d0; animation: mmPop .4s; }
.mm-card.no .mm-face { border-color: #ef4444; animation: gmNo .4s; }
@keyframes mmPop { 50% { scale: 1.08; } }
/* ---- הכו בחפרפרת (whack) ---- */
.wk-t { background: #fef3c7; border-radius: 99px; padding: 2px 12px; font-size: .95rem; }
.wk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px; border-radius: 22px;
  background: radial-gradient(circle at 30% 20%, #4d7c0f, #365314); box-shadow: inset 0 0 0 3px #3f6212; }
.wk-hole { position: relative; height: 82px; border-radius: 50% / 40%; background: radial-gradient(ellipse at 50% 70%, #1c1917 55%, #44403c 56%, #57534e 70%, transparent 71%); overflow: hidden; }
.wk-mole { position: absolute; left: 6%; right: 6%; bottom: 10px; min-height: 52px; border: 3px solid #b45309; border-radius: 16px; padding: 4px 6px;
  background: linear-gradient(180deg, #fde68a, #f59e0b); color: #1e1b4b; font: 800 .9rem "Assistant", sans-serif; line-height: 1.2; cursor: pointer;
  box-shadow: 0 6px 12px rgba(0,0,0,.4); animation: wkUp .28s cubic-bezier(.3,1.5,.6,1); }
.wk-mole.mono { font: 800 .85rem Consolas, monospace; }
.wk-mole { overflow-wrap: anywhere; }
.wk-mole:hover { filter: brightness(1.08); }
.wk-mole.hit { background: linear-gradient(180deg, #bbf7d0, #22c55e); border-color: #15803d; animation: wkDown .35s forwards; }
.wk-mole.oops { background: linear-gradient(180deg, #fecaca, #ef4444); border-color: #b91c1c; animation: wkDown .35s forwards; }
.wk-mole.away { animation: wkDown .35s forwards; }
@keyframes wkUp { from { transform: translateY(110%); } }
@keyframes wkDown { to { transform: translateY(120%); opacity: .4; } }
@media (max-width: 520px) { .wk-grid { gap: 6px; padding: 8px; } .wk-hole { height: 74px; } .wk-mole { font-size: .78rem; left: 2%; right: 2%; } .mm-card { min-height: 84px; } .mm-face { font-size: .82rem; } .mm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* ---- סידור (order) בתוך שאלוני י"א — העתק מצומצם מ-play.css ---- */
.g-intro { margin: 4px 0 8px; font-weight: 700; color: #334155; }
.nq-game { --pl-violet-soft: #ede9fe; --pl-ok: #16a34a; --pl-ok-soft: #dcfce7; --pl-muted: #64748b; }
.nq-game .pl-help { color: var(--pl-muted); font-size: .92rem; margin: 0 0 10px; }
.nq-game .pl-pool { display: flex; flex-wrap: wrap; gap: 8px; min-height: 52px; padding: 10px; border: 2px dashed #c4b5fd; border-radius: 18px; background: #faf5ff; justify-content: center; }
.nq-game .pl-chip { background: #fff; border: 2px solid #c4b5fd; border-radius: 14px; padding: 7px 14px; font: inherit; font-weight: 700; cursor: pointer; color: var(--pl-ink); text-align: right; transition: transform .15s; }
.nq-game .pl-chip:hover { transform: translateY(-2px); }
.nq-game .pl-seq { list-style: none; counter-reset: s; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
.nq-game .pl-seq li { counter-increment: s; display: flex; align-items: center; gap: 10px; min-height: 46px; border-radius: 14px; padding: 4px 10px; background: #f9fafb; border: 2px dashed var(--pl-line); }
.nq-game .pl-seq li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--pl-violet-soft); color: #5b21b6; font-weight: 800; flex: 0 0 auto; }
.nq-game .pl-seq li.filled { border-style: solid; border-color: #c4b5fd; background: #fff; }
.nq-game .pl-seq li.lock { border-color: #86efac; background: var(--pl-ok-soft); }
.nq-game .pl-seq li.lock::before { content: "✓"; background: var(--pl-ok); color: #fff; }
.nq-game .pl-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; justify-content: center; }
.nq-game .pl-btn:disabled { opacity: .45; cursor: default; transform: none; }
.gm-rev ol { padding-inline-start: 22px; display: grid; gap: 4px; }
/* ---- מיון לסלים (sort) בתוך שאלוני י"א ---- */
.nq-game .pl-bins { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
@media (max-width: 640px) { .nq-game .pl-bins { grid-template-columns: 1fr; } }
.nq-game .pl-bin { border-radius: 18px; padding: 10px; min-height: 110px; border: 3px solid transparent; cursor: pointer; transition: transform .15s, border-color .2s; }
.nq-game .pl-bin > b { display: block; text-align: center; font-size: 1.05rem; margin-bottom: 6px; }
.nq-game .pl-bin:hover, .nq-game .pl-bin.over { transform: scale(1.02); border-color: var(--pl-violet); }
.nq-game .pl-bin .bin-in { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.nq-game .pl-bin.c0 { background: #e0f2fe; } .nq-game .pl-bin.c1 { background: #fef3c7; } .nq-game .pl-bin.c2 { background: #dcfce7; } .nq-game .pl-bin.c3 { background: #fce7f3; }
.nq-game .pl-chip.sel { background: var(--pl-violet); color: #fff; border-color: var(--pl-violet); transform: scale(1.06); }
.nq-game .pl-chip.lock { border-color: #86efac; background: var(--pl-ok-soft); cursor: default; }
.nq-game .pl-empty { color: var(--pl-violet); font-weight: 700; align-self: center; }
.mm-grid .mm-card .mm-face.mono { background: #0b1220; color: #4ade80; border-color: #334155; font: 800 .95rem Consolas, monospace; } /* גובר על .mono של חדר כיתה י' */
