/* Giao diện chung cho game dùng shared/js/level-game.js và mini-activities.js */

.lv-play { --play-max: 1100px; display: flex; flex-direction: column; gap: 10px; padding: 10px 0 16px; }
.lv-coach { display: flex; align-items: center; gap: 12px; width: 100%; max-width: var(--play-max); margin: 0 auto; }
.lv-coach img { width: 48px; flex: none; animation: float 3.2s ease-in-out infinite; }
.lv-coach .bubble { flex: 1; font-size: 0.82rem; }
.lv-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: var(--play-max);
  min-height: max(420px, calc(100vh - 260px));
  margin: 0 auto;
  padding: 18px 22px 22px;
}
.mod-note { margin: 0; font-weight: 800; text-align: center; }
.tool-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.shake { animation: shake 0.3s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.enter { animation: pop-in 0.3s; }

/* ---------- Câu hỏi ---------- */
.qz { display: flex; flex-direction: column; align-items: center; gap: 12px; width: min(100%, 780px); }
.qz-visual { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 110px; padding: 14px 24px; border-radius: 24px; background: var(--surface-2); text-align: center; }
.qz-visual.empty { display: none; }
.qz-visual img { width: 180px; height: auto; }
.qz-prompt { margin: 0; font-size: 1.15rem; font-weight: 800; text-align: center; }
.qz-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; }
.qz-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 64px;
  padding: 8px 16px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--border), 0 5px 0 var(--border);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
}
.qz-opts.with-img .qz-opt { justify-content: flex-start; text-align: left; }
.qz-opt-img { flex: none; width: 64px; height: 64px; object-fit: contain; }
.qz-opt:hover:not([disabled]) { box-shadow: inset 0 0 0 2px var(--c1, var(--primary)), 0 5px 0 var(--c1, var(--primary)); }
.qz-opt.ok { background: #e3f8ee; box-shadow: inset 0 0 0 3px var(--success), 0 5px 0 var(--success); }
.qz-opt.bad { opacity: 0.45; }
.qz-why { min-height: 1.6em; margin: 0; font-weight: 700; text-align: center; }

/* ---------- Xếp vào hộp ---------- */
.sb { display: grid; grid-template-columns: 1fr 280px 1fr; gap: 18px; align-items: stretch; width: 100%; }
.sb-side { display: flex; flex-direction: column; gap: 14px; }
.sb-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 18px; border-radius: 26px; background: var(--surface-2); text-align: center; }
.sb-card b { font-size: 1.05rem; }
.sb-card .mini-html { font-size: 0.9rem; }
.sb-img { width: 150px; height: 150px; object-fit: contain; }
.sb-bin {
  --bin: var(--primary);
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-height: 140px;
  padding: 16px;
  border: 3px dashed var(--bin);
  border-radius: 24px;
  background: #fff;
  color: var(--bin);
  font: inherit;
  cursor: pointer;
}
.sb-bin b { font-size: 1.05rem; }
.sb-bin small { color: var(--text-soft); font-weight: 700; }
.sb-bin:hover { background: color-mix(in srgb, var(--bin) 8%, #fff); }
.sb-items { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.sb-mini { width: 46px; height: 46px; object-fit: contain; animation: pop-in 0.3s; }
.sb-chip { padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--bin) 14%, #fff); color: var(--text); font-size: 0.7rem; font-weight: 800; animation: pop-in 0.3s; }

/* ---------- Sắp thứ tự ---------- */
.fl-title { margin: 0; font-size: 1.1rem; text-align: center; }
.fl-seq { display: flex; flex-direction: column; gap: 6px; width: min(100%, 640px); min-height: 40px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.fl-seq li { counter-increment: s; padding: 10px 14px; border-radius: 14px; background: #e3f8ee; font-weight: 800; animation: pop-in 0.25s; }
.fl-seq li::before { content: counter(s) ". "; color: var(--success); }
.fl-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.fl-card {
  padding: 12px 18px;
  border: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--border), 0 5px 0 var(--border);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
}

@keyframes float { 50% { transform: translateY(-6px); } }

@media (max-width: 900px) {
  .sb { grid-template-columns: 1fr; }
  .qz-opts { grid-template-columns: 1fr; }
}
