/* منصة أحمد — أنماط ألعاب الحزمة الثالثة (js/games3.js): صيد الكلمات، سلة الكلمات، بنغو الكلمات، الصورة المخفية */

/* ───────── مشترك */
.g3-prompt { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 12px; min-height: 64px; font-size: 1.3rem; font-weight: 700; text-align: center; flex-wrap: wrap; }
.g3-prompt b { color: var(--c, var(--blue)); filter: brightness(.85); font-size: 1.55rem; }
.g3-prompt.g3-new { animation: g3-in .35s cubic-bezier(.3, 1.5, .5, 1); }
.big-say.g3-say { width: 64px; height: 64px; flex: none; }
.big-say.g3-say .ico { width: 32px; height: 32px; }
.big-say.g3-say.sm { width: 56px; height: 56px; }
.g3-host { background: #1679B8; }
.g3-tip { text-align: center; color: var(--ink-2); font-size: .92rem; margin-top: 10px; }
.pill.g3-hurry { border-color: var(--berry); color: var(--berry-d); animation: g3-beat .5s infinite alternate; }
.g3-combo:empty { display: none; }
@keyframes g3-in { from { transform: scale(.85); opacity: 0; } }
@keyframes g3-beat { to { transform: scale(1.08); } }

/* ───────── بنغو */
.g3-bingo { position: relative; display: flex; flex-direction: column; gap: 14px; }
.g3-caller { display: flex; align-items: center; gap: 14px; background: var(--card); border: 2px solid var(--line); box-shadow: 0 5px 0 var(--line); border-radius: var(--r-lg); padding: 12px 16px; }
.g3-call-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.g3-call-info small { color: var(--ink-2); font-weight: 600; }
.g3-ar { font-size: 1.35rem; min-height: 1.6em; color: var(--ink-3); transition: color .2s; }
.g3-ar.show { color: var(--c, var(--ink)); filter: brightness(.8); animation: g3-in .3s; }
.g3-bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.g3-bar i { display: block; height: 100%; width: 100%; border-radius: 99px; background: var(--green); transition: width .1s linear, background .3s; }
.g3-bar i.low { background: var(--berry); }
.g3-say.g3-ping { animation: g3-ping .6s; }
@keyframes g3-ping { 30% { transform: scale(1.15); } }
.g3-board { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 8px; direction: ltr; }
.g3-cell {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  padding: 6px; border-radius: 16px; background: var(--card); border: 2px solid var(--line-2); box-shadow: 0 4px 0 var(--line-2);
  font-size: 2.6rem; line-height: 1.1; min-height: 84px; transition: transform .1s, background .2s, border-color .2s; overflow: hidden;
}
.g3-cell:hover:not(.on):not(.missed) { border-color: var(--c, var(--blue)); }
.g3-cell:active:not(.on):not(.missed) { transform: translateY(3px); box-shadow: 0 1px 0 var(--line-2); }
.g3-cell .photo { width: 100%; aspect-ratio: 4 / 3; height: auto; border-radius: 11px; }
.g3-en { font-family: var(--display); font-weight: 700; font-size: .95rem; line-height: 1.2; max-width: 100%; overflow-wrap: anywhere; }
.g3-stamp { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: scale(1.8) rotate(-20deg); transition: opacity .2s, transform .3s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; }
.g3-stamp .ico { width: 58%; height: 58%; max-width: 64px; max-height: 64px; padding: 8px; border-radius: 50%; background: color-mix(in srgb, var(--c, var(--green)) 88%, white); color: #fff; stroke-width: 3; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.g3-cell.on { border-color: var(--c, var(--green)); box-shadow: 0 4px 0 var(--c, var(--green)); background: color-mix(in srgb, var(--c, var(--green)) 12%, white); }
.g3-cell.on .g3-stamp { opacity: 1; transform: none; }
.g3-cell.on .photo, .g3-cell.on .pic-emo { filter: saturate(.6); opacity: .7; }
.g3-cell.missed { opacity: .45; filter: grayscale(1); border-style: dashed; }
.g3-cell.win { animation: g3-win .6s cubic-bezier(.3, 1.6, .5, 1) both; border-color: var(--sun-d); box-shadow: 0 4px 0 var(--sun-d), 0 0 0 4px var(--sun); z-index: 1; }
.g3-cell.shake { animation: shake .4s; border-color: var(--berry); }
@keyframes g3-win { 50% { transform: scale(1.12) rotate(-3deg); } }
.g3-plus { position: absolute; top: 4px; inset-inline-end: 6px; font-style: normal; font-weight: 800; font-size: .9rem; color: var(--green-d); background: #fff; border-radius: 99px; padding: 0 8px; animation: g3-up 1s forwards; }
@keyframes g3-up { from { transform: translateY(8px); opacity: 0; } 30% { opacity: 1; } to { transform: translateY(-6px); opacity: 0; } }
.g3-banner {
  position: absolute; inset-inline: 0; top: 40%; margin: auto; width: fit-content; z-index: 5; text-align: center;
  font-family: var(--display); font-weight: 800; font-size: clamp(2.6rem, 11vw, 4.4rem); line-height: 1; color: #fff;
  background: linear-gradient(135deg, var(--c, var(--lilac)), var(--sun)); padding: 18px 34px; border-radius: 26px;
  box-shadow: 0 10px 0 rgba(0, 0, 0, .15), 0 20px 40px rgba(0, 0, 0, .25); animation: g3-bang .7s cubic-bezier(.3, 1.7, .5, 1);
  text-shadow: 0 3px 0 rgba(0, 0, 0, .18); pointer-events: none;
}
.g3-banner small { display: block; font-family: var(--body); font-size: 1rem; font-weight: 700; margin-top: 6px; text-shadow: none; }
@keyframes g3-bang { from { transform: scale(.2) rotate(-12deg); opacity: 0; } }

/* ───────── الصورة المخفية */
.g3-reveal { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.g3-frame { position: relative; aspect-ratio: 4 / 3; border-radius: 22px; overflow: hidden; background: var(--line); outline: 5px solid #fff; box-shadow: 0 10px 24px rgba(27, 37, 89, .18); }
.g3-frame .g3-hidden { width: 100%; height: 100%; object-fit: cover; display: block; }
.g3-frame .pic-emo.g3-hidden { display: grid; place-items: center; font-size: 7rem; }
.g3-frame.open { outline-color: var(--sun); }
.g3-tiles { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); gap: 3px; padding: 0; }
.g3-tile {
  display: grid; place-items: center; font-style: normal; font-family: var(--display); font-weight: 800; font-size: 1.4rem; color: rgba(255, 255, 255, .85);
  border-radius: 6px; transition: transform .45s cubic-bezier(.5, -.4, .6, 1.4), opacity .45s; transition-delay: var(--d, 0s);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .15), inset 0 3px 0 rgba(255, 255, 255, .2);
}
.g3-tile.c0 { background: #F59E0B; } .g3-tile.c1 { background: #EA580C; } .g3-tile.c2 { background: #D97706; } .g3-tile.c3 { background: #FBBF24; }
.g3-tile.gone { transform: scale(0) rotate(90deg); opacity: 0; transition-delay: 0s; }
.g3-side { display: flex; flex-direction: column; gap: 14px; }
.g3-q { background: var(--card); border: 2px solid var(--line); box-shadow: 0 5px 0 var(--line); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; min-height: 150px; justify-content: center; }
.g3-q-h { font-size: 1.15rem; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.g3-q-h b { font-family: var(--display); font-size: 1.5rem; }
.g3-q-h .ico { color: var(--c); }
.g3-qopts .opt { padding: 11px 12px; font-size: 1.05rem; }
.g3-qopts.pics .opt.pic { font-size: 2.6rem; padding: 6px; }
.g3-guess { background: color-mix(in srgb, var(--c, var(--sun)) 10%, white); border: 2px dashed color-mix(in srgb, var(--c, var(--sun)) 55%, white); border-radius: var(--r-lg); padding: 14px; }
.g3-guess-h { font-weight: 700; font-size: .98rem; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.g3-guess-h .ico { color: var(--sun-d); }
.g3-worth { display: inline-block; background: var(--green); color: #fff; border-radius: 99px; padding: 0 10px; font-size: .95rem; }
.g3-worth.bump { animation: g3-ping .4s; }
.g3-gopts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.g3-gopt {
  padding: 10px 8px; border-radius: 14px; background: var(--card); border: 2px solid var(--line-2); box-shadow: 0 4px 0 var(--line-2);
  font-family: var(--display); font-weight: 700; font-size: 1.15rem; display: flex; flex-direction: column; align-items: center; line-height: 1.25; transition: transform .08s;
}
.g3-gopt small { font-family: var(--body); font-size: .85rem; color: var(--ink-2); font-weight: 600; }
.g3-gopt:hover:not(:disabled) { border-color: var(--c, var(--blue)); }
.g3-gopt:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--line-2); }
.g3-gopt:disabled { cursor: default; }
.g3-gopt.right { background: var(--green-l); border-color: var(--green); box-shadow: 0 4px 0 var(--green); color: var(--green-d); animation: pop .3s; }
.g3-gopt.wrong { background: var(--berry-l); border-color: var(--berry); box-shadow: 0 4px 0 var(--berry); color: var(--berry-d); animation: shake .4s; }
.g3-result { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; font-size: 1.2rem; font-weight: 700; padding: 10px 14px; border-radius: 16px; animation: g3-in .35s; }
.g3-result b { font-family: var(--display); font-size: 1.4rem; }
.g3-result em { font-style: normal; background: var(--green); color: #fff; border-radius: 99px; padding: 0 12px; }
.g3-result.ok { background: var(--green-l); color: var(--green-d); }
.g3-result.no { background: var(--berry-l); color: var(--berry-d); }
.g3-result .ico { width: 26px; height: 26px; stroke-width: 2.6; }

/* ───────── الشاشات الضيقة */
@media (max-width: 640px) {
  .g3-reveal { grid-template-columns: 1fr; gap: 14px; }
  .g3-frame { max-width: min(100%, 300px); width: 100%; margin: 0 auto; }
  .g3-q { min-height: 0; padding: 14px 12px; }
  .g3-qopts.opts.pics.three { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .g3-prompt { font-size: 1.1rem; gap: 8px; min-height: 56px; }
  .g3-prompt b { font-size: 1.3rem; }
  .big-say.g3-say { width: 54px; height: 54px; }
  .big-say.g3-say .ico { width: 28px; height: 28px; }
  .g3-board { gap: 5px; }
  .g3-cell { padding: 4px; border-radius: 12px; min-height: 64px; font-size: 2rem; }
  .g3-cell .photo { border-radius: 8px; }
  .g3-en { font-size: .78rem; }
  .g3-caller { padding: 10px 12px; gap: 10px; }
  .g3-ar { font-size: 1.15rem; }
  .g3-tile { font-size: 1.1rem; }
  .g3-gopt { font-size: 1rem; padding: 8px 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .g3-prompt.g3-new, .g3-cell.win, .g3-banner, .g3-say.g3-ping, .pill.g3-hurry { animation: none; }
  .g3-tile { transition-duration: .01s; }
}
