/* Zetawe Games 1.3.0 – تصميم الألعاب المطوّرة: بنك المعلومات، ساحة المربعات، المليون */

/* ================= بنك المعلومات ================= */
#app .card.j3 { background: linear-gradient(170deg, #123A4A 0%, #0B2532 60%, #081B26 100%) !important; color: #F5FBFF !important; border: 4px solid #FFC93C !important; box-shadow: 0 8px 0 #12303B, 0 0 0 3px #12303B, 0 24px 50px rgba(0,0,0,.45) !important; }
.j3 .tag { background: #FFF6E3 !important; color: #12303B !important; }
.j3-turn { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 18px; background: rgba(255,255,255,.07); border: 3px solid var(--tc); margin-bottom: 10px; }
.j3-turn > span { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: var(--tc); border: 3px solid #12303B; flex: 0 0 auto; }
.j3-turn b { display: block; font: 400 1.35rem/1.2 Lalezar, sans-serif; color: #fff; }
.j3-turn small { display: block; font-weight: 700; color: #CFE9F2; font-size: .95rem; }
.j3-skbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.j3-skbar small { font-weight: 800; color: #FFE08A; margin-inline-end: 2px; }
.j3-skbar.in { justify-content: center; margin: 12px 0 0; padding-top: 10px; border-top: 2px dashed rgba(255,255,255,.18); }
.j3-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 2px solid #FFC93C; background: rgba(255,201,60,.14); color: #FFF3C9; font: 800 .92rem "Baloo Bhaijaan 2", Tahoma, sans-serif; cursor: pointer; }
.j3-chip i { font-style: normal; font-size: 1.05em; }
.j3-chip:disabled { cursor: default; opacity: .5; }
.j3-chip.used { opacity: .35; text-decoration: line-through; }
.j3-chip.armed { background: #FFC93C; color: #12303B; box-shadow: 0 0 0 3px rgba(255,201,60,.35), 0 0 20px rgba(255,201,60,.6); opacity: 1; }
.j3-chip:not(:disabled):active { transform: scale(.94); }

.j3-grid { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 7px; }
.j3-h { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; padding: 6px 3px; border-radius: 12px; background: #FFF6E3; color: #12303B; text-align: center; border: 2px solid #12303B; }
.j3-h span .ci { width: 22px; height: 22px; margin: 0; }
.j3-h b { font: 400 .82rem/1.15 Lalezar, sans-serif; overflow-wrap: anywhere; }
.j3-c { min-height: 50px; border-radius: 12px; border: 2px solid #12303B; display: grid; place-items: center; cursor: pointer; padding: 0;
  background: linear-gradient(180deg, #FFE08A 0%, #F2B705 100%); color: #12303B; box-shadow: 0 4px 0 #8A6200, inset 0 2px 0 rgba(255,255,255,.6); transition: transform .12s; }
.j3-c b { font: 400 clamp(1.05rem, 4.4vw, 1.5rem)/1 Lalezar, sans-serif; }
.j3-c.r3, .j3-c.r4 { background: linear-gradient(180deg, #FFB86B, #F07B1A); box-shadow: 0 4px 0 #8C3F00, inset 0 2px 0 rgba(255,255,255,.5); }
.j3-c.r5 { background: linear-gradient(180deg, #FF8FA8, #E8456B); color: #fff; box-shadow: 0 4px 0 #8A1C3A, inset 0 2px 0 rgba(255,255,255,.4); }
.j3-c.r5 b { text-shadow: 0 2px 0 #8A1C3A; }
.j3-c:not(.done):hover { transform: translateY(-2px); }
.j3-c:not(.done):active { transform: translateY(3px); box-shadow: 0 1px 0 #12303B; }
.j3-c.done { cursor: default; background: color-mix(in srgb, var(--o) 30%, #0B2532); border-color: var(--o); box-shadow: none; font-size: 1.3rem; opacity: .9; }
.j3-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.j3-legend { font-weight: 800; font-size: .9rem; color: #FFE08A; }

/* اختيار المهارات */
.j3-dh { display: flex; align-items: center; gap: 12px; }
.j3-db { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: 32px; background: var(--tc); border: 3px solid #12303B; box-shadow: 0 4px 0 #12303B; flex: 0 0 auto; }
.j3-dh small { color: #FFE08A; font-weight: 800; }
.j3-dh h2 { margin: 0; font: 400 1.8rem/1.15 Lalezar, sans-serif; color: #fff; }
.j3-dp { margin: 12px 0; font-weight: 700; color: #DDF1F7; line-height: 1.6; }
.j3-dp b { color: #FFC93C; }
.j3-sks { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .j3-sks { grid-template-columns: 1fr 1fr; } }
.j3-sk { display: grid; grid-template-columns: 52px 1fr 30px; align-items: start; gap: 10px; text-align: start; padding: 12px; border-radius: 18px; border: 3px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; cursor: pointer; font-family: "Baloo Bhaijaan 2", Tahoma, sans-serif; }
.j3-sk.on { border-color: #FFC93C; background: rgba(255,201,60,.16); box-shadow: 0 0 0 3px rgba(255,201,60,.25); }
.j3-si { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font: 400 1.6rem/1 Lalezar, sans-serif; background: #FFF6E3; color: #12303B; border: 3px solid #12303B; }
.j3-st b { display: block; font: 400 1.2rem/1.2 Lalezar, sans-serif; color: #FFE08A; }
.j3-st em { display: inline-block; font-style: normal; font-size: .75rem; font-weight: 800; padding: 1px 8px; margin: 3px 0; border-radius: 99px; background: rgba(255,255,255,.14); color: #E9F7FB; }
.j3-st small { display: block; font-size: .9rem; font-weight: 600; line-height: 1.55; color: #E3F2F7; }
.j3-ck { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255,255,255,.4); display: grid; place-items: center; font-weight: 900; color: #12303B; }
.j3-sk.on .j3-ck { background: #FFC93C; border-color: #12303B; }
.j3-df { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.j3-cnt { font: 400 1.5rem Lalezar, sans-serif; color: #FFC93C; }
.j3-df .btn:disabled { opacity: .45; }

/* السؤال */
.j3-qtop { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.j3-val { font: 400 1.7rem/1 Lalezar, sans-serif; padding: 6px 16px; border-radius: 14px; background: linear-gradient(180deg, #FFE08A, #F2B705); color: #12303B; border: 3px solid #12303B; box-shadow: 0 4px 0 #12303B; }
.j3-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.j3-tg { padding: 3px 12px; border-radius: 99px; font-weight: 800; font-size: .9rem; border: 2px solid #12303B; }
.j3-tg.gold { background: #FFC93C; color: #12303B; }
.j3-tg.dbl { background: #FF8A1F; color: #12303B; }
.j3-tg.trap { background: #E8456B; color: #fff; }
.j3-tg.hj { background: #9B82FF; color: #12303B; }
.j3-who { margin: 10px 0 6px; display: flex; align-items: center; gap: 8px; font-weight: 800; color: #DDF1F7; }
.j3-who span { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--tc); border: 2px solid #12303B; }
.j3-who b { color: #fff; font: 400 1.15rem Lalezar, sans-serif; }
.j3-tm { position: relative; height: 14px; border-radius: 99px; background: rgba(255,255,255,.15); overflow: hidden; margin: 6px 0 12px; }
.j3-tm i { position: absolute; inset: 0; background: linear-gradient(90deg, #35D399, #FFC93C); transform-origin: right center; border-radius: 99px; }
html[dir=ltr] .j3-tm i, .lang-en .j3-tm i { transform-origin: left center; }
.j3-tm.crit i { background: #FF5A5A; }
.j3-tm b { position: absolute; inset-inline-end: 8px; top: -3px; font: 400 .85rem Lalezar, sans-serif; color: #fff; text-shadow: 0 1px 2px #000; }
.j3 .q { color: #fff !important; }
.j3 .opt.j3-off { opacity: .25; text-decoration: line-through; }
.j3 #fb .msg { color: #fff; }
.j3-hj { margin-top: 12px; padding: 14px; border-radius: 18px; border: 3px solid var(--tc); background: rgba(255,255,255,.08); text-align: center; }
.j3-hj b { display: block; font: 400 1.3rem/1.3 Lalezar, sans-serif; color: #fff; }
.j3-hj small { display: block; margin: 4px 0 10px; color: #E3F2F7; font-weight: 700; }
.j3-hj .row { justify-content: center; gap: 10px; }

.j3-gold { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; background: radial-gradient(circle, rgba(255,201,60,.35), rgba(8,27,38,.85)); pointer-events: none; }
.j3-gold > div { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 34px; border-radius: 28px; background: linear-gradient(180deg, #FFE08A, #F2B705); border: 5px solid #12303B; box-shadow: 0 10px 0 #12303B, 0 0 80px #FFC93C; color: #12303B; }
.j3-gold span { font-size: 64px; line-height: 1; }
.j3-gold b { font: 400 2.2rem/1.1 Lalezar, sans-serif; }
.j3-gold small { font-weight: 800; font-size: 1rem; }
.j3-toast { position: fixed; left: 50%; top: 22%; transform: translateX(-50%); z-index: 9001; padding: 12px 22px; border-radius: 99px; background: #12303B; color: #FFC93C; border: 3px solid #FFC93C; font: 400 1.3rem Lalezar, sans-serif; pointer-events: none; animation: j3t 1.6s ease forwards; white-space: nowrap; }
@keyframes j3t { 0% { opacity: 0; transform: translate(-50%, 16px) scale(.8); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -14px); } }
@media (max-width: 380px) { .j3-grid { gap: 5px; } .j3-h { min-height: 56px; } .j3-h b { font-size: .72rem; } .j3-c { min-height: 44px; } }

/* ================= ساحة المربعات ================= */
/* إصلاح: ساعة الفريق غير النشط كانت شبه مخفية (CSS transition على opacity يتعارض مع حركة GSAP) */
#app .fd-pod { opacity: 1 !important; transition: box-shadow .25s, transform .25s, border-color .25s !important; background: linear-gradient(180deg, #16304F, #0B1A30) !important; border: 3px solid color-mix(in srgb, var(--oc) 55%, transparent) !important; position: relative; }
#app .fd-pod:not(.on) .fd-clock { color: #DCE7F2 !important; text-shadow: none !important; opacity: .85; }
#app .fd-pod:not(.on) .fd-who { opacity: .85; }
#app .fd-pod.on { border-color: var(--oc) !important; background: linear-gradient(180deg, color-mix(in srgb, var(--oc) 30%, #16304F), #0B1A30) !important; }
#app .fd-pod .fd-clock.low { color: #FF6B6B !important; }
#app .fd-who { color: #fff; }
#app .fd-who small { opacity: 1 !important; color: #BFD7EA; }
.fd-sp { justify-self: center; padding: 4px 14px; border-radius: 99px; background: #FFC93C; color: #12303B; font-weight: 800; border: 2px solid #12303B; }
.fd-combo { position: absolute; inset-inline: 0; bottom: -14px; margin: auto; width: max-content; padding: 2px 10px; border-radius: 99px; background: #FF8A1F; color: #12303B; font-weight: 900; font-size: .85rem; border: 2px solid #12303B; animation: j3t 1.4s ease forwards; }

.fl-war { display: flex; align-items: stretch; gap: 8px; }
.fl-side { flex: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 16px; background: color-mix(in srgb, var(--oc) 22%, #0B1B33); border: 3px solid var(--oc); color: #fff; position: relative; }
.fl-bdg { font-size: 22px; line-height: 1; }
.fl-bdg img.bdg { width: 28px !important; height: 28px !important; }
.fl-nm { font: 400 1rem/1.15 Lalezar, sans-serif; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-side b { font: 400 1.9rem/1 Lalezar, sans-serif; color: #FFC93C; text-shadow: 0 2px 0 #12303B; }
.fl-side em { position: absolute; top: -10px; inset-inline-end: 8px; font-style: normal; font-size: .75rem; font-weight: 900; padding: 0 7px; border-radius: 99px; background: #FFC93C; color: #12303B; border: 2px solid #12303B; }
.fl-vs { align-self: center; font: 400 1.1rem Lalezar, sans-serif; color: #22D3EE; text-shadow: 0 0 12px #22D3EE; }
.fl-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; margin: 10px 0 12px; border: 2px solid rgba(255,255,255,.25); background: #0B1B33; }
.fl-bar i { display: block; height: 100%; transition: width .6s cubic-bezier(.3,1.4,.5,1); }
.fl-dots { display: flex; gap: 5px; justify-content: center; }
.fl-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.2); }
.fl-dots i.d { background: #22D3EE; }
.fl-dots i.c { background: #FFC93C; box-shadow: 0 0 8px #FFC93C; }
.flcard .msg { color: #E6FBFF !important; }
.fl-turn { color: #fff; background: var(--oc); padding: 0 10px; border-radius: 8px; border: 2px solid #12303B; text-shadow: 0 1px 0 #12303B; }
.fsq-sp { position: absolute; bottom: 3px; inset-inline-start: 4px; font-size: 17px; line-height: 1; filter: drop-shadow(0 1px 1px #000); }
.fsq.sp-star { box-shadow: inset 0 0 18px rgba(0,0,0,.45), 0 0 0 2px #FFC93C !important; }
.fsq.sp-fort { box-shadow: inset 0 0 18px rgba(0,0,0,.45), 0 0 0 2px #9AD8FF !important; }
.fl-leg { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 12px; font-size: .85rem; font-weight: 700; color: #BFE9F2; }
#app .fl-score { display: none; }
@media (max-width: 380px) { .fl-nm { font-size: .85rem; } .fl-side b { font-size: 1.5rem; } }

/* ================= من سيربح المليون ================= */
.m3 { display: grid; grid-template-columns: 1fr; gap: 14px; max-width: 980px; margin: 0 auto; color: #fff; font-family: "Baloo Bhaijaan 2", Tahoma, sans-serif; }
@media (min-width: 860px) { .m3 { grid-template-columns: 1fr 230px; } .m3-side { order: 2; display: block !important; } .m3-ladbtn { display: none; } }
.m3-side { display: none; }
.m3.lad-open .m3-side { display: block; }
.m3-lad { list-style: none; margin: 0; padding: 10px; border-radius: 20px; background: linear-gradient(180deg, #1D0F4E, #0E0830); border: 3px solid #C9A6FF; box-shadow: 0 6px 0 #12303B; display: flex; flex-direction: column; gap: 3px; }
.m3-lad li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 12px; border-radius: 10px; font-weight: 800; color: #E9DDFF; font-size: .95rem; }
.m3-lad li b { color: #FFC93C; font: 400 .95rem Lalezar, sans-serif; min-width: 1.6em; }
.m3-lad li.safe { color: #fff; }
.m3-lad li.safe span::after { content: " ✅"; font-size: .8em; }
.m3-lad li.ok { opacity: .55; }
.m3-lad li.cur { background: linear-gradient(90deg, #FF8A1F, #FFC93C); color: #12303B; box-shadow: 0 0 18px rgba(255,201,60,.6); }
.m3-lad li.cur b { color: #12303B; }
.m3-main { min-width: 0; padding: 14px; border-radius: 26px; background: linear-gradient(180deg, rgba(40,20,110,.92), rgba(14,8,48,.95)); border: 4px solid #C9A6FF; box-shadow: 0 8px 0 #12303B, 0 0 0 3px #12303B, 0 24px 60px rgba(0,0,0,.5); position: relative; }
.m3-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.m3-stage small { display: block; color: #D9C9FF; font-weight: 800; }
.m3-stage b { font: 400 clamp(1.5rem, 6vw, 2.1rem)/1.1 Lalezar, sans-serif; color: #FFC93C; text-shadow: 0 3px 0 #12303B; }
.m3-ladbtn { padding: 8px 14px; border-radius: 999px; border: 3px solid #12303B; background: #FFC93C; color: #12303B; font: 800 .95rem "Baloo Bhaijaan 2", sans-serif; cursor: pointer; box-shadow: 0 3px 0 #12303B; }
.m3-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 12px; font-weight: 700; color: #E9DDFF; font-size: .95rem; }
.m3-sub b { color: #7CFFB2; }
.m3-lfs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.m3-lf { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 16px; border: 3px solid #C9A6FF; background: radial-gradient(circle at 50% 30%, #4B2AA8, #20105E); color: #fff; cursor: pointer; font: 800 .8rem "Baloo Bhaijaan 2", sans-serif; }
.m3-lf i { font-style: normal; font-size: 1.45rem; line-height: 1.1; }
.m3-lf:disabled { opacity: .35; cursor: default; filter: grayscale(.6); }
.m3-lf:not(:disabled):active { transform: scale(.93); }
.m3-tm { position: relative; width: 64px; height: 64px; margin: 12px auto 6px; }
.m3-tm svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.m3-tm circle { fill: none; stroke-width: 4.5; }
.m3-tm .b { stroke: rgba(255,255,255,.15); }
.m3-tm .f { stroke: #FFC93C; stroke-dasharray: 119.38; stroke-linecap: round; transition: stroke-dashoffset .1s linear; }
.m3-tm.crit .f { stroke: #FF5A5A; }
.m3-tm b { position: absolute; inset: 0; display: grid; place-items: center; font: 400 1.5rem Lalezar, sans-serif; color: #fff; }
.m3-qbox { position: relative; margin: 8px 0 14px; padding: 16px 18px 18px; border-radius: 22px; background: linear-gradient(180deg, #0D0A36, #24135F); border: 3px solid #FFC93C; box-shadow: 0 0 0 3px #12303B, 0 0 30px rgba(155,107,255,.45); text-align: center; }
.m3-qbox .tag { background: #FFF6E3 !important; color: #12303B !important; }
.m3-qbox .q { color: #fff !important; margin: 10px 0 0; font-size: clamp(1.2rem, 4.8vw, 1.6rem); }
.m3-opts { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 620px) { .m3-opts { grid-template-columns: 1fr 1fr; } }
.m3-o { position: relative; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 10px 22px; text-align: start; cursor: pointer; color: #fff; font: 800 1.1rem/1.3 "Baloo Bhaijaan 2", Tahoma, sans-serif;
  background: linear-gradient(180deg, #2A1873, #150B45); border: 3px solid #C9A6FF; clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%); border-radius: 4px; transition: background .2s; }
.m3-o i { font-style: normal; color: #FFC93C; font: 400 1.2rem Lalezar, sans-serif; }
.m3-o span { flex: 1; min-width: 0; }
.m3-o:not(:disabled):hover { background: linear-gradient(180deg, #3B23A0, #1F1062); }
.m3-o.sel { background: linear-gradient(180deg, #FFB347, #FF8A1F) !important; color: #12303B; border-color: #fff; }
.m3-o.sel i { color: #12303B; }
.m3-o.off { opacity: .25; }
.m3-o.ok { background: linear-gradient(180deg, #4BE38E, #18A957) !important; color: #06281A; border-color: #fff; animation: m3ok .5s ease 3; }
.m3-o.ok i { color: #06281A; }
.m3-o.no { background: linear-gradient(180deg, #FF7A7A, #D93A3A) !important; color: #fff; }
@keyframes m3ok { 50% { filter: brightness(1.35); } }
.m3-pc { font-style: normal; font-weight: 900; color: #FFC93C; }
.m3-o.sel .m3-pc, .m3-o.ok .m3-pc { color: #12303B; }
.m3-aud { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end; height: 130px; margin: 14px 0 0; padding: 10px; border-radius: 18px; background: rgba(0,0,0,.25); border: 2px solid rgba(201,166,255,.5); }
.m3-aud div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; }
.m3-aud i { width: 60%; height: var(--h); min-height: 3px; border-radius: 8px 8px 2px 2px; background: linear-gradient(180deg, #FFC93C, #FF8A1F); transform-origin: bottom; }
.m3-aud b { font-size: .85rem; color: #fff; }
.m3-aud span { font: 400 1rem Lalezar, sans-serif; color: #FFC93C; }
.m3-call { display: flex; gap: 12px; align-items: center; margin-top: 14px; padding: 12px; border-radius: 18px; background: #FFF6E3; color: #12303B; border: 3px solid #12303B; }
.m3-call > span { font-size: 2.2rem; }
.m3-call b { display: block; font-weight: 900; }
.m3-call p { margin: 2px 0 0; font-weight: 700; }
.m3-fb { margin-top: 12px; }
.m3-final { padding: 12px; border-radius: 18px; background: rgba(255,201,60,.12); border: 2px solid #FFC93C; text-align: center; }
.m3-final p { margin: 0 0 10px; font-weight: 800; color: #fff; }
.m3-final p b { color: #FFC93C; }
.m3-final .row { justify-content: center; gap: 10px; }
.m3-sus { text-align: center; font: 400 1.4rem Lalezar, sans-serif; color: #FFC93C; animation: m3p 0.6s ease-in-out infinite alternate; }
@keyframes m3p { to { transform: scale(1.06); opacity: .75; } }
.m3-res { text-align: center; padding: 10px; border-radius: 16px; font: 400 1.35rem/1.3 Lalezar, sans-serif; margin-bottom: 10px; }
.m3-res.ok { background: rgba(53,211,153,.18); color: #7CFFB2; }
.m3-res.no { background: rgba(255,90,90,.18); color: #FFB1B1; }
.m3-walk { text-align: center; margin-top: 12px; }
.m3-frs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m3-fr { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 16px; border: 3px solid #12303B; background: #FFF6E3; color: #12303B; cursor: pointer; font-family: "Baloo Bhaijaan 2", sans-serif; }
.m3-fr span { font-size: 1.8rem; }
.m3-fr b { font-size: .9rem; }
.m3-fr small { font-size: .72rem; font-weight: 700; opacity: .8; }
.m3-end .m3-won { font-size: 1.3rem; font-weight: 800; }
.m3-end .m3-won b { font: 400 2.2rem Lalezar, sans-serif; color: #FF8A1F; }
.m3-end .m3-meta { font-weight: 700; opacity: .85; }

/* ===== 1.6: زر «الفرق والإعدادات» العائم ===== */
#zg-jump { position: fixed; z-index: 60; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 74px); transform: translate(-50%, -260%); display: flex; align-items: center; gap: 8px; padding: 10px 18px 10px 14px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #FFD23F, #FFAA2B); color: #1B1F3B; font-weight: 700; font-size: 16px; line-height: 1; font-family: inherit; box-shadow: 0 10px 26px -8px rgba(0,0,0,.45), inset 0 -3px 0 rgba(0,0,0,.12); cursor: pointer; opacity: 0; pointer-events: none; transition: transform .35s cubic-bezier(.2,1.4,.4,1), opacity .25s; }
#zg-jump.on { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
#zg-jump svg { width: 20px; height: 20px; fill: currentColor; }
#zg-jump:active { transform: translate(-50%, 0) scale(.95); }
@media (prefers-reduced-motion: reduce) { #zg-jump { transition: opacity .2s; } }

/* ===== 1.6: النمط الفردي – قسم «طريقة اللعب» ===== */
.zs-mode .zm-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.zs-mode .zm-tabs button { display: grid; justify-items: center; gap: 2px; padding: 14px 8px 12px; border: 3px solid #E4DCCB; border-radius: 20px; background: #fff; color: #1B1F3B; font-family: inherit; cursor: pointer; transition: transform .15s, border-color .2s, background .2s; }
.zs-mode .zm-tabs button i { font-style: normal; font-size: 30px; line-height: 1.1; }
.zs-mode .zm-tabs button b { font: 400 22px/1.2 Lalezar, sans-serif; }
.zs-mode .zm-tabs button small { font-size: 13px; font-weight: 700; opacity: .7; }
.zs-mode .zm-tabs button.on { border-color: #1B1F3B; background: linear-gradient(160deg, #FFE27A, #FFC23C); box-shadow: 0 5px 0 #1B1F3B; transform: translateY(-2px); }
.zm-solo { display: grid; gap: 12px; margin-top: 14px; }
.zm-name { display: grid; gap: 6px; font-weight: 800; color: #1B1F3B; }
.zm-name input { padding: 13px 14px; border: 3px solid #1B1F3B; border-radius: 16px; font-weight: 700; font-size: 18px; line-height: 1.2; font-family: inherit; background: #fff; color: #1B1F3B; }
.zm-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.zm-sub button { display: flex; align-items: center; gap: 10px; padding: 12px; border: 3px solid #E4DCCB; border-radius: 18px; background: #fff; color: #1B1F3B; text-align: start; font-family: inherit; cursor: pointer; }
.zm-sub button i { font-style: normal; font-size: 28px; }
.zm-sub button span { display: grid; } .zm-sub button b { font-size: 17px; } .zm-sub button small { font-size: 12px; opacity: .7; font-weight: 700; }
.zm-sub button.on { border-color: #12B5B0; background: #E3FAF7; box-shadow: 0 4px 0 #0E8C88; }
.zm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 800; color: #1B1F3B; }
.zm-seg { display: flex; gap: 6px; padding: 4px; border-radius: 14px; background: #EFE8DA; }
.zm-seg button { min-width: 48px; padding: 8px 12px; border: 0; border-radius: 11px; background: transparent; font-weight: 800; font-size: 16px; line-height: 1; font-family: inherit; color: #1B1F3B; cursor: pointer; }
.zm-seg button.on { background: #1B1F3B; color: #FFD23F; }
.zm-bots { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.zm-bots span { display: grid; justify-items: center; gap: 4px; font-weight: 800; color: #1B1F3B; font-size: 14px; }
.zm-bav { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--c); border: 3px solid #1B1F3B; font-style: normal; flex: none; }
.zm-bav svg { width: 34px; height: 34px; }
.zm-bav.me { color: #1B1F3B; font: 400 22px/1 Lalezar, sans-serif; }
.zm-best, .zm-note { margin: 0; text-align: center; font-weight: 800; color: #1B1F3B; background: #FFF3C9; border-radius: 14px; padding: 10px; }

/* ===== 1.6: النمط الفردي – شاشة اللعب ===== */
.sl { max-width: 640px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px 40px; color: #fff; }
.sl-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sl-x { width: 42px; height: 42px; border-radius: 50%; border: 3px solid #1B1F3B; background: #fff; color: #1B1F3B; font-size: 18px; font-weight: 900; cursor: pointer; box-shadow: 0 3px 0 #1B1F3B; }
.sl-prog { display: flex; align-items: baseline; gap: 2px; padding: 6px 14px; border-radius: 999px; background: rgba(0,0,0,.28); }
.sl-prog b { font: 400 24px/1 Lalezar, sans-serif; } .sl-prog span { opacity: .8; font-weight: 800; }
.sl-gn { margin-inline-start: auto; font-weight: 800; font-size: 14px; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.16); }
.sl-players { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; }
.sl-p { flex: 1 0 auto; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; background: rgba(0,0,0,.28); border: 2px solid transparent; transition: background .2s, border-color .2s; }
.sl-p span { display: grid; line-height: 1.1; } .sl-p small { font-size: 12px; font-weight: 800; opacity: .9; } .sl-p b.sc { font: 400 20px/1 Lalezar, sans-serif; }
.sl-p .zm-bav { width: 36px; height: 36px; border-width: 2px; } .sl-p .zm-bav svg { width: 28px; height: 28px; }
.sl-p.me { border-color: #FFD23F; }
.sl-p.ans { background: rgba(255,255,255,.22); }
.sl-p.good { background: rgba(53,211,153,.45); border-color: #35D399; } .sl-p.bad { background: rgba(255,80,100,.35); }
.sl-solo-s { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; font-weight: 800; }
.sl-solo-s b.sc { font: 400 34px/1 Lalezar, sans-serif; color: #FFD23F; } .sl-solo-s em { font-style: normal; padding: 4px 10px; border-radius: 99px; background: #FF6B3D; }
.sl-time { position: relative; height: 14px; border-radius: 99px; background: rgba(0,0,0,.3); overflow: hidden; margin-bottom: 14px; }
.sl-time i { position: absolute; inset: 0; transform-origin: right; background: linear-gradient(90deg, #35D399, #FFD23F); transition: transform .1s linear; }
[dir=ltr] .sl-time i { transform-origin: left; }
.sl-time span { position: absolute; inset-inline-end: 8px; top: -1px; font-weight: 800; font-size: 12px; line-height: 16px; font-family: inherit; color: #1B1F3B; }
.sl-time.crit i { background: linear-gradient(90deg, #FF3B5C, #FF8A1F); }
.sl-q { text-align: center; color: #1B1F3B; }
.sl-q h2 { font-size: clamp(20px, 5.4vw, 28px); line-height: 1.45; margin: 8px 0 4px; }
.sl-meta { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 800; }
.sl-meta span { padding: 4px 10px; border-radius: 99px; background: #F1ECE0; }
.sl-meta .lv1 { background: #D7F7E9; } .sl-meta .lv2 { background: #DDEBFF; } .sl-meta .lv3 { background: #FFE6CC; } .sl-meta .lv4 { background: #FFD6DE; }
.sl-shown { margin: 12px auto 4px; display: grid; gap: 4px; padding: 12px; border-radius: 16px; background: #FFF6D8; border: 2px dashed #E9B92F; }
.sl-shown small { font-weight: 800; opacity: .7; } .sl-shown b { font-size: 22px; }
.sl-opts { display: grid; gap: 10px; margin-top: 14px; }
.sl-opts.tf { grid-template-columns: 1fr 1fr; }
.sl-o { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; border: 3px solid #1B1F3B; border-radius: 18px; background: #fff; color: #1B1F3B; font-weight: 800; font-size: 18px; line-height: 1.35; font-family: inherit; text-align: start; cursor: pointer; box-shadow: 0 5px 0 #1B1F3B; transition: transform .1s, background .2s; }
.sl-o i { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #1B1F3B; color: #FFD23F; font: 400 18px/1 Lalezar, sans-serif; font-style: normal; }
.sl-opts.tf .sl-o { justify-content: center; font: 400 26px/1 Lalezar, sans-serif; min-height: 74px; }
.sl-opts.tf .sl-o i { display: none; }
.sl-o.t { background: #DFFBEF; } .sl-o.f { background: #FFE3E8; }
.sl-o:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #1B1F3B; }
.sl-o:disabled { cursor: default; }
.sl-o.picked { background: #FFE27A; }
.sl-o.ok { background: #35D399 !important; color: #fff; } .sl-o.ok i { background: #fff; color: #0E8C5F; }
.sl-o.no { background: #FF5A6E !important; color: #fff; }
.sl-wait { text-align: center; min-height: 22px; margin: 10px 0 0; font-weight: 800; opacity: .9; }
.sl-fb { text-align: center; }
.sl-msg { display: inline-block; margin: 6px 0 4px; padding: 10px 18px; border-radius: 16px; font: 400 24px/1.2 Lalezar, sans-serif; }
.sl-msg.ok { background: #35D399; color: #053B27; } .sl-msg.no { background: #FF5A6E; color: #fff; }
.sl-ans { margin: 4px 0; font-weight: 800; }
.sl-next { display: block; width: 100%; margin-top: 12px; padding: 16px; border: 3px solid #1B1F3B; border-radius: 20px; background: linear-gradient(180deg, #FFE27A, #FFB534); color: #1B1F3B; font: 400 24px/1 Lalezar, sans-serif; cursor: pointer; box-shadow: 0 6px 0 #1B1F3B; }
.sl-next:active { transform: translateY(3px); box-shadow: 0 3px 0 #1B1F3B; }
.sl-ghost { display: block; width: 100%; margin-top: 12px; padding: 14px; border: 3px solid rgba(255,255,255,.7); border-radius: 18px; background: transparent; color: #fff; font-weight: 800; font-size: 17px; line-height: 1; font-family: inherit; cursor: pointer; }
.sl-end-h { text-align: center; margin-top: 10px; }
.sl-end-h h1 { margin: 6px 0; font: 400 40px/1.2 Lalezar, sans-serif; color: #FFD23F; text-shadow: 0 4px 0 rgba(0,0,0,.3); }
.sl-end-h p { margin: 0; font-weight: 800; }
.sl-stars { display: flex; justify-content: center; gap: 6px; }
.sl-stars i { font-style: normal; font-size: 46px; color: rgba(255,255,255,.25); text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.sl-stars i.on { color: #FFD23F; }
.sl-score { display: grid; justify-items: center; gap: 4px; margin: 18px 0; padding: 18px; border-radius: 22px; background: rgba(0,0,0,.25); }
.sl-score small { font-weight: 800; opacity: .85; } .sl-score b { font: 400 64px/1 Lalezar, sans-serif; color: #FFD23F; } .sl-score span { font-weight: 800; opacity: .9; }
.sl-rank { list-style: none; margin: 18px 0; padding: 0; display: grid; gap: 8px; }
.sl-rank li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 18px; background: rgba(0,0,0,.25); border: 2px solid transparent; }
.sl-rank li.me { border-color: #FFD23F; background: rgba(255,210,63,.18); }
.sl-rank em { font-style: normal; font: 400 24px/1 Lalezar, sans-serif; width: 26px; text-align: center; }
.sl-rank li:first-child em { color: #FFD23F; }
.sl-rank span { display: grid; flex: 1; font-weight: 800; } .sl-rank small { opacity: .8; font-size: 12px; }
.sl-rank b { font: 400 26px/1 Lalezar, sans-serif; }
@media (prefers-reduced-motion: reduce) { .sl-time i { transition: none; } }
#app .zm-seg { flex-direction: row; flex-wrap: nowrap; flex: 0 1 auto; }
#app .zm-seg button { width: auto; flex: 1 1 auto; margin: 0; white-space: nowrap; }

/* ===== 1.7: وين الكرة؟ ===== */
.cup-stage { position: relative; height: 190px; margin: 18px 0 6px; }
.cup { position: absolute; bottom: 14px; width: min(22vw, 92px); height: auto; aspect-ratio: 80 / 90; margin-left: calc(min(22vw, 92px) / -2); padding: 0; border: 0; background: none; cursor: pointer; z-index: 2; transition: bottom .35s cubic-bezier(.3,1.4,.5,1); filter: drop-shadow(0 6px 0 rgba(0,0,0,.25)); }
.cup svg { width: 100%; height: 100%; display: block; }
.cup.up { bottom: 82px; }
.cup:disabled { cursor: default; }
.cup:not(:disabled):active { transform: scale(.95); }
.cup-ball { position: absolute; bottom: 16px; width: 30px; height: 30px; margin-left: -15px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFF7C2, #FACC15 45%, #CA8A04); box-shadow: 0 4px 0 rgba(0,0,0,.25); opacity: 0; z-index: 1; transition: opacity .2s; }
.cup-ball.on { opacity: 1; }
.cupc .msg.bad, .dif-card .msg.bad, #oddfb .msg.bad { background: #FFE3E8; color: #9F1239; }

/* ===== 1.7: أوجد الاختلاف ===== */
.dif-top { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.dif-pair { display: grid; gap: 10px; }
@media (min-width: 760px) { .dif-pair { grid-template-columns: 1fr 1fr; } }
.dif-svg { width: 100%; height: auto; display: block; border-radius: 16px; border: 3px solid #1B1F3B; cursor: crosshair; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.dif-ok { fill: none; stroke: #16A34A; stroke-width: 4; }
.dif-miss { fill: none; stroke: #DC2626; stroke-width: 3.5; stroke-dasharray: 6 4; }

/* ===== 1.7: مين الدخيل؟ ===== */
.odd-lv { font-weight: 800; margin: 2px 0 10px; }
.odd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.odd-c { min-height: 92px; padding: 10px; border: 3px solid #1B1F3B; border-radius: 20px; background: #fff; color: #1B1F3B; font-family: inherit; font-weight: 800; font-size: clamp(17px, 4.6vw, 22px); line-height: 1.3; cursor: pointer; box-shadow: 0 5px 0 #1B1F3B; }
.odd-grid.big .odd-c { font-size: clamp(46px, 13vw, 64px); line-height: 1; }
.odd-c:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 2px 0 #1B1F3B; }
.odd-c.ok { background: #35D399; } .odd-c.no { background: #FF5A6E; color: #fff; } .odd-c.dim { opacity: .55; }
.odd-why { font-weight: 800; margin: 6px 0 0; }

/* ===== 1.7: مزاد الأسعار ===== */
.auc-prod { display: grid; justify-items: center; gap: 4px; margin: 6px 0 10px; }
.auc-prod span { font-size: 64px; line-height: 1.1; }
.auc-prod b { font-size: clamp(20px, 5.4vw, 26px); line-height: 1.35; }
.auc-prod small { font-weight: 800; opacity: .65; }
.auc-disp { margin: 8px auto; min-width: 180px; max-width: 260px; padding: 10px 16px; border-radius: 16px; background: #1B1F3B; color: #FFD23F; font: 400 42px/1.1 Lalezar, sans-serif; }
.auc-kb { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 300px; margin: 8px auto 4px; }
.auc-kb button { padding: 12px 0; border: 3px solid #1B1F3B; border-radius: 14px; background: #fff; color: #1B1F3B; font: 400 26px/1 Lalezar, sans-serif; cursor: pointer; box-shadow: 0 4px 0 #1B1F3B; }
.auc-kb button:active { transform: translateY(3px); box-shadow: 0 1px 0 #1B1F3B; }
.auc-bidv, .auc-real { display: grid; justify-items: center; margin: 8px auto; padding: 10px 18px; border-radius: 18px; background: #FFF3C9; max-width: 280px; }
.auc-bidv b, .auc-real b { font: 400 40px/1.1 Lalezar, sans-serif; }
.auc-real { background: #D7F7E9; }
.auc-call { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.auc-call button { padding: 18px 0; border: 3px solid #1B1F3B; border-radius: 18px; font: 400 28px/1 Lalezar, sans-serif; cursor: pointer; box-shadow: 0 5px 0 #1B1F3B; color: #1B1F3B; }
.auc-call .auc-hi { background: #86EFAC; } .auc-call .auc-lo { background: #FCA5A5; }
.auc-call button:disabled { opacity: .5; }

/* ===== 1.7.1: شاشات الألعاب الجديدة + خلفيات مشاهد الدخول ===== */
body[data-g=cup], .gi.gi-cup { background: radial-gradient(900px 520px at 50% -5%, #E11D48 0, #7F1D1D 45%, #2A0A0F 100%) !important; background-color: #2A0A0F !important; }
body[data-g=dif], .gi.gi-dif { background: radial-gradient(900px 520px at 50% 0, #38BDF8, #0C4A6E 75%) !important; background-color: #0C4A6E !important; }
body[data-g=odd], .gi.gi-odd { background: radial-gradient(900px 520px at 50% 0, #C084FC, #3B0764 75%) !important; background-color: #3B0764 !important; }
body[data-g=auc], .gi.gi-auc { background: radial-gradient(900px 520px at 50% 0, #4ADE80, #14532D 72%) !important; background-color: #14532D !important; }
body[data-g=cup] #app .cupc { background: linear-gradient(180deg, #FFF1F2, #FFE4E6) !important; border-color: #4C0519 !important; }
body[data-g=cup] .cup-stage { background: radial-gradient(60% 40% at 50% 92%, rgba(76,5,25,.25), transparent 70%), linear-gradient(180deg, transparent 70%, #7F1D1D 70%, #4C0519); border-radius: 18px; }
body[data-g=dif] #app .dif-card { background: linear-gradient(180deg, #F0F9FF, #E0F2FE) !important; border-color: #0C4A6E !important; }
body[data-g=odd] #app .card { background: linear-gradient(180deg, #FAF5FF, #F3E8FF) !important; border-color: #3B0764 !important; }
body[data-g=odd] .odd-c { border-color: #3B0764; box-shadow: 0 5px 0 #3B0764; }
body[data-g=auc] #app .auc-card { background: linear-gradient(180deg, #F0FDF4, #DCFCE7) !important; border-color: #14532D !important; }
body[data-g=auc] .auc-disp { background: #14532D; }
.gi-cupx { bottom: 18%; width: min(20vw, 130px); }
.gi-cupx svg, .gi-pic svg, .gi-lens svg, .gi-gav svg { width: 100%; height: auto; display: block; }
.gi-ball { bottom: 19%; width: min(8vw, 46px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFF7C2, #FACC15 45%, #CA8A04); }
.gi-pic { top: 14%; width: min(40vw, 330px); border: 5px solid #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 14px 30px rgba(0,0,0,.35); }
.gi-lens { top: 40%; left: 20%; width: min(18vw, 120px); z-index: 4; }
.gi-ring2 { width: min(12vw, 80px); aspect-ratio: 1; border-radius: 50%; border: 5px solid #22C55E; z-index: 3; }
.gi-oddt { width: min(32vw, 210px); aspect-ratio: 1; display: grid; place-items: center; font-size: min(18vw, 120px); line-height: 1; border-radius: 26px; background: #fff; border: 5px solid #fff; box-shadow: 0 10px 0 rgba(0,0,0,.25); }
.gi-tag { top: 14%; left: 50%; margin-left: min(-22vw, -150px); width: min(44vw, 300px); padding: 22px 0; text-align: center; border-radius: 22px; background: #FDE047; border: 5px solid #422006; box-shadow: 0 10px 0 rgba(0,0,0,.3); }
.gi-tag b { font: 400 clamp(2.4rem, 9vw, 4.4rem)/1 Lalezar, sans-serif; color: #422006; }
.gi-gav { top: 4%; right: 12%; width: min(26vw, 170px); z-index: 4; }
.gi-coin { top: 34%; width: min(8vw, 46px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FEF9C3, #EAB308 55%, #A16207); border: 3px solid #713F12; }

/* ===== 1.7.1: النمط الفردي للألعاب العامة ===== */
html.zg-solo1 #app .score .team:nth-child(2) { display: none !important; }
html.zg-solo1 #app .score { grid-template-columns: 1fr !important; justify-content: center; }
html.zg-solo1 #app .score .team:first-child { flex: 0 1 420px; margin: 0 auto; }
