/* ==========================================================================
   "אתגר הלוגואים" – guess the party from a partial logo (on top of games.css)
   ========================================================================== */

/* ---------- Start: frame + magnifier ---------- */

.lq-hero { position: relative; width: 170px; height: 110px; margin: 4px auto 12px; }
.lq-hero__frame {
  position: absolute;
  inset: 8px 22px 12px 10px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(11, 29, 77, .18), inset 0 0 0 1px var(--line);
  transform: rotate(-4deg);
}
.lq-hero__q {
  font-family: var(--font-bold);
  font-weight: 900;
  font-size: 54px;
  line-height: 1;
  background: linear-gradient(135deg, var(--blue-500), var(--navy-700));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lq-hero__lens {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 58px;
  height: 58px;
  border: 7px solid var(--navy-800);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .9), rgba(147, 197, 253, .35) 60%);
  box-shadow: 0 6px 14px rgba(11, 29, 77, .25);
  animation: lens 3.6s ease-in-out infinite;
}
.lq-hero__lens::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -14px;
  width: 24px;
  height: 9px;
  border-radius: 6px;
  background: var(--navy-800);
  transform: rotate(40deg);
}
@keyframes lens {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(70px, -22px) rotate(8deg); }
  66% { transform: translate(34px, -46px) rotate(-6deg); }
}

/* ---------- Logo frame ---------- */

.lq-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #dbe5f5, #f4f7fc) border-box;
  border: 2px solid transparent;
  box-shadow: 0 14px 30px rgba(11, 29, 77, .14);
  transition: box-shadow .3s, border-color .3s;
}
.lq-frame.is-enter { animation: frame-in .55s var(--ease-out) both; }
@keyframes frame-in { from { opacity: 0; transform: translateY(18px) scale(.95) rotate(-1.5deg); } }
.lq-frame.is-right { box-shadow: 0 0 0 4px var(--true), 0 14px 30px rgba(22, 163, 74, .3); }
.lq-frame.is-missed { box-shadow: 0 0 0 4px #f97316, 0 14px 30px rgba(249, 115, 22, .25); }
.lq-frame.is-wrong { animation: shake .45s ease-in-out; }

/* pinned inside the frame so any logo shape (wide, square, tall) is scaled to fit, never cropped */
.lq-frame__art { position: absolute; inset: 9% 9%; display: grid; }
.lq-frame__art img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}
.lq-frame__partial { animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.03); } }
.lq-frame__full { opacity: 0; }
.lq-frame.is-switching img, .lq-frame.is-switching .lq-frame__tag { transition: none !important; }
.lq-frame:not(.is-revealed) .lq-frame__full { visibility: hidden; }
/* Reveal with keyframes, not transitions: the end state (full logo shown, partial gone) applies even if
   the animation is skipped or interrupted, so the answer is never stuck half-visible or invisible. */
.lq-frame.is-revealed .lq-frame__partial { opacity: 0; animation: partial-out .45s var(--ease-out); }
.lq-frame.is-revealed .lq-frame__full { opacity: 1; animation: full-in .7s var(--ease-spring); }
@keyframes partial-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(1.04); } }
@keyframes full-in { from { opacity: 0; transform: scale(.92); filter: blur(6px); } 60% { filter: none; } }

/* light sweep across the frame on reveal */
.lq-frame::after {
  content: "";
  position: absolute;
  inset: -20% auto -20% -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .9), transparent);
  transform: skewX(-18deg);
  opacity: 0;
  pointer-events: none;
}
.lq-frame.is-revealed::after { animation: sweep .9s ease-out .1s; }
@keyframes sweep { 0% { opacity: 1; left: -60%; } 100% { opacity: 0; left: 120%; } }

.lq-frame__tag {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 12px;
  border-radius: 999px;
  font-family: var(--font-bold);
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  background: var(--navy-800);
  transition: opacity .3s, transform .3s;
}
.lq-frame.is-revealed .lq-frame__tag { opacity: 0; transform: translateY(-8px); }
.lq-frame .tol-stamp { z-index: 2; }

/* ---------- Guess form ---------- */

.lq-guess { margin-top: 18px; }
.lq-guess__row { position: relative; display: flex; gap: 8px; }
.lq-guess__input {
  flex: 1;
  min-width: 0;
  height: 58px;
  padding: 0 18px;
  border: 2px solid var(--line);
  border-radius: 16px;
  font-family: var(--font-bold);
  font-weight: 700;
  font-size: 19px;
  color: var(--navy-800);
  background: #fff;
  box-shadow: inset 0 2px 4px rgba(11, 29, 77, .05);
  transition: border-color .15s, box-shadow .15s;
}
.lq-guess__input::placeholder { font-family: "doopro", sans-serif; font-weight: 400; color: #9aa6bd; }
.lq-guess__input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
.lq-guess.is-wrong .lq-guess__input { border-color: var(--false); animation: shake .4s ease-in-out; }
.lq-guess__go {
  flex: none;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600));
  box-shadow: 0 5px 0 #1a46a3, 0 10px 18px rgba(37, 99, 235, .3);
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.lq-guess__go svg { width: 22px; height: 22px; }
.lq-guess__go:hover { transform: translateY(-2px); }
.lq-guess__go:active { transform: translateY(4px); box-shadow: 0 1px 0 #1a46a3; }

.lq-hint {
  min-height: 1.4em;
  margin: 10px 2px 2px;
  font-size: 15px;
  color: var(--muted);
  text-align: start;
}
.lq-hint.is-wrong { color: var(--false); font-weight: 500; }
.lq-hint.is-tip { color: #a16207; }
.lq-hint b { font-family: var(--font-bold); font-weight: 800; letter-spacing: .12em; color: var(--navy-800); direction: rtl; unicode-bidi: isolate; }
.lq-hint.is-pop { animation: rise .35s var(--ease-out); }

.lq-guess__tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.lq-tool {
  padding: 7px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy-700);
  background: var(--bg);
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.lq-tool:hover:not(:disabled) { background: var(--blue-100); border-color: #b9cdf3; transform: translateY(-1px); }
.lq-tool:disabled { opacity: .45; cursor: default; }
.lq-tool.is-glow { animation: glow 1.4s ease-in-out infinite; border-color: #f5b301; }
@keyframes glow { 50% { box-shadow: 0 0 0 5px rgba(245, 179, 1, .25); } }

/* ---------- After answering ---------- */

.lq-answer { margin-top: 18px; animation: rise .4s var(--ease-out) .15s both; }
.lq-answer__verdict { font-family: var(--font-bold); font-weight: 900; font-size: 22px; }
.lq-answer.is-right .lq-answer__verdict { color: var(--true); }
.lq-answer.is-missed .lq-answer__verdict { color: #ea580c; }
.lq-answer__name { margin-top: 2px; font-size: 17px; color: var(--ink); }
.lq-answer__name strong { font-family: var(--font-bold); font-weight: 800; color: var(--navy-800); }

/* ---------- Result recap ---------- */

.lq-recap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin: 22px 0 6px;
}
.lq-recap li {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 8px 6px 6px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--line);
  animation: rise .4s var(--ease-out) both;
}
.lq-recap img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; }
.lq-recap span { font-size: 12px; font-weight: 500; line-height: 1.25; color: var(--ink); }
.lq-recap i {
  position: absolute;
  top: -8px;
  inset-inline-start: -6px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 0 0 2px #fff;
}
.lq-recap i svg { width: 12px; height: 12px; }
.lq-recap li.is-right i { background: var(--true); }
.lq-recap li.is-missed i { background: #f97316; }
.lq-recap li.is-missed { background: #fff8f2; }

@media (max-width: 700px) {
  .lq-guess__input { height: 54px; font-size: 17px; }
  .lq-guess__go { width: 54px; height: 54px; }
}
