/* ============ أساسيات ============ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #fbefd6; }
body { font-family: "Segoe UI", system-ui, Tahoma, "Noto Sans Arabic", Arial, sans-serif; color: #3b2a1a; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
button:active { transform: scale(.96); }
svg { display: block; }
[hidden] { display: none !important; }
b { font-weight: 800; }

/* ============ المسرح: 360 عرض ثابت، يكبر بالتناسب، والخلفية تملأ الشاشة ============ */
#stage {
  position: fixed; inset: 0; overflow: hidden; direction: ltr;
  background: radial-gradient(ellipse at 50% 35%, #fffaf0 0, #fbefd6 45%, #f1dbb0 100%);
}
#wrap { position: absolute; top: 0; left: 0; width: 360px; height: 720px; transform-origin: 0 0; }

/* ============ الشريط العلوي ============ */
#topbar { position: absolute; top: 0; left: 0; width: 360px; height: 46px; z-index: 5; display: flex; align-items: center; justify-content: center; }
#topbar::before { content: ""; position: absolute; top: 0; bottom: 0; left: -100vw; right: -100vw; background: #fffaf0; box-shadow: 0 1px 0 #ead8b4; z-index: -1; }
#siteTitle { font-weight: 800; font-size: 16px; color: #5a3214; direction: rtl; }
.tb-left, .tb-right { position: absolute; top: 7px; width: 32px; height: 32px; display: grid; place-items: center; color: #5a3214; }
.tb-left { left: 10px; } .tb-right { right: 8px; }
.tb-left svg, .tb-right svg { width: 26px; height: 26px; }
#btnAccount.in { color: #2e9e44; }

#logo { position: absolute; left: 76px; top: 48px; width: 208px; height: 68px; object-fit: contain; z-index: 3; pointer-events: none; filter: drop-shadow(0 3px 3px rgba(90,50,20,.25)); }

#roundLabel { position: absolute; right: 6px; top: 52px; width: 68px; background: linear-gradient(#7b4a22, #5a3214); color: #ffe9b0; font-weight: 700; font-size: 10px; line-height: 13px; padding: 3px 4px; border-radius: 8px; text-align: center; font-family: "Trebuchet MS", Arial, sans-serif; z-index: 4; border: 1.5px solid #f2b631; }
#roundLabel b { display: block; font-weight: 900; font-size: 14px; color: #ffd34d; }
#mini { position: absolute; left: 8px; top: 52px; display: grid; grid-template-columns: 30px 30px; gap: 6px; z-index: 4; }
#mini button { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(#fff7e0, #ffe4a3); border: 2px solid #b97812; color: #7b4a22; display: grid; place-items: center; box-shadow: 0 2px 0 #8a560c; }
#mini button svg { width: 18px; height: 18px; }
#mini button.off { opacity: .55; }
#mini #btnAgentPlayers { background: linear-gradient(#e6f8ea, #b9ecc6); border-color: #2e9e4f; color: #1f7a38; box-shadow: 0 2px 0 #1f7a38; }
#mini #btnMaker { background: linear-gradient(#f3e8ff, #d8b4fe); border-color: #7e22ce; color: #6b21a8; box-shadow: 0 2px 0 #6b21a8; }
.mk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mk-it { background: #fff; border: 2px solid #e5e7eb; border-radius: 12px; padding: 8px; display: flex; gap: 8px; align-items: center; text-align: right; }
.mk-it svg { width: 36px; height: 36px; flex: none; }
.mk-it b { display: block; font-size: 14px; } .mk-it small { display: block; color: #666; font-size: 11px; line-height: 1.5; }
.mk-it.sel { border-color: #7e22ce; background: #faf5ff; box-shadow: 0 0 0 3px rgba(126,34,206,.18); }
.mk-it.auto { border-style: dashed; border-color: #2e9e4f; }
.mk-it[disabled] { opacity: .5; }
.mk-tag { display: inline-block; font-size: 10px; font-weight: 800; border-radius: 6px; padding: 0 5px; margin-inline-start: 4px; }
.mk-tag.s { background: #7e22ce; color: #fff; } .mk-tag.a { background: #d3f9d8; color: #1f7a38; }
.mk-luck { display: flex; gap: 8px; margin-top: 8px; } .mk-luck .mk-it { flex: 1; }
.fund-row .nm small.low { color: #e03131; font-weight: 700; }
.fund-row .fund { flex: none; width: auto; height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
#btnGift { position: absolute; left: 314px; top: 104px; width: 34px; height: 34px; z-index: 4; }
#btnGift svg { width: 100%; height: 100%; filter: drop-shadow(0 2px 0 rgba(0,0,0,.25)); }
#giftBadge { position: absolute; right: -4px; top: -5px; min-width: 16px; height: 16px; border-radius: 8px; background: #ff2d2d; color: #fff; font: 800 10px/16px Arial; text-align: center; font-style: normal; border: 1.5px solid #fff; }
#badge { position: absolute; left: 6px; top: 124px; height: 22px; padding: 0 7px; background: linear-gradient(#7b4a22, #5a3214); border: 1.5px solid #f2b631; border-radius: 12px; display: flex; align-items: center; gap: 4px; color: #ffe9b0; font: 800 11px Arial; z-index: 4; }
#badge svg { width: 13px; height: 13px; }

/* ============ العجلة ============ */
#wheel { position: absolute; left: 0; top: 0; width: 360px; height: 470px; z-index: 2; }
#spokes { position: absolute; left: 0; top: 0; width: 360px; height: 470px; overflow: visible; }
#spokes .bulb { fill: #fff6c8; stroke: #e0a020; stroke-width: 1; animation: bulb 1.2s infinite alternate; }
#spokes .bulb:nth-of-type(odd) { animation-delay: .6s; }
@keyframes bulb { from { fill: #fff6c8; filter: drop-shadow(0 0 2px #fff2a0); } to { fill: #ffd24a; filter: none; } }
#pointer { position: absolute; left: 169px; top: 120px; width: 22px; height: 26px; z-index: 4; background: linear-gradient(#fff2a8, #f2b631 60%, #c98712); clip-path: polygon(0 0, 100% 0, 50% 100%); filter: drop-shadow(0 2px 1px rgba(0,0,0,.35)); }
#hub {
  position: absolute; left: 130px; top: 242px; width: 100px; height: 100px; border-radius: 50%; z-index: 3;
  background: radial-gradient(circle at 50% 35%, #ffe680 0, #f7c040 45%, #d9921a 100%);
  border: 4px solid #fff3c4; box-shadow: 0 0 0 4px #b97812, 0 0 0 7px #f6c94a, 0 5px 12px rgba(0,0,0,.35); text-align: center; color: #7a3d00;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.hub-txt { font: 900 16px/1.1 "Segoe UI", Tahoma, Arial, sans-serif; direction: rtl; color: #fff; text-shadow: 0 2px 0 #b35c00, 0 0 4px rgba(150,70,0,.6); padding: 0 6px; }
.hub-num { min-width: 52px; padding: 2px 8px; border-radius: 11px; background: #4a2a12; color: #fff; font: 900 17px/1.15 "Trebuchet MS", Arial, sans-serif; box-shadow: inset 0 2px 3px rgba(0,0,0,.4); }
#hub.warn .hub-num { color: #ffe14d; background: #b3141f; animation: pulse .5s infinite alternate; }

.item { position: absolute; width: 74px; height: 74px; margin: -37px 0 0 -37px; padding: 0; z-index: 2; transition: transform .12s; cursor: pointer; }
.item .face { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; border: 4px solid #fff; background: #fffaf0; box-shadow: 0 0 0 3px var(--c), 0 4px 8px rgba(0,0,0,.35); transition: box-shadow .12s, filter .2s; }
.item.veg { --c: #1f8a3a; --c2: #2ea14a; }
.item.meat { --c: #b3241b; --c2: #d63a2c; }
.item .top { position: absolute; left: 0; right: 0; top: 0; height: 56%; display: grid; place-items: center; background: #fffaf0; }
.item .top svg { width: 35px; height: 35px; margin-top: 4px; filter: drop-shadow(0 2px 1px rgba(0,0,0,.2)); }
.item .bot { position: absolute; left: 0; right: 0; bottom: 0; height: 44%; background: var(--c2); color: #fff; text-align: center; font: 800 9.5px/1.15 "Trebuchet MS", Arial, sans-serif; padding-top: 2px; white-space: nowrap; letter-spacing: -.2px; text-shadow: 0 1px 0 rgba(0,0,0,.3); }
.item .bot .l1 { height: 11px; display: flex; justify-content: center; align-items: center; gap: 1px; margin-top: 1px; }
.item .bot .l1 svg { width: 11px; height: 11px; filter: drop-shadow(0 1px 0 rgba(0,0,0,.3)); }
.item .hot { display: none; position: absolute; left: 50%; top: -12px; transform: translateX(-50%) rotate(-6deg); background: linear-gradient(#ff5a3c, #e0201b); color: #fff; font: 800 11px/16px "Segoe UI", Tahoma, Arial, sans-serif; padding: 0 7px; border-radius: 8px; border: 1.5px solid #ffe14d; box-shadow: 0 2px 3px rgba(0,0,0,.3); z-index: 3; animation: hotpop .45s infinite alternate; }
.item.is-hot .hot { display: block; }
@keyframes hotpop { to { transform: translateX(-50%) rotate(-6deg) scale(1.12); } }
.item .you { position: absolute; left: 50%; bottom: -11px; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; background: #4a2a12; color: #ffe14d; font: 800 10px/15px Arial; padding: 0 6px; border-radius: 8px; border: 1.5px solid #f2b631; white-space: nowrap; z-index: 3; }
.item .you:empty { display: none; }
.item .you svg { width: 10px; height: 10px; }
.item:active { transform: scale(.94); }
.item.lit { transform: scale(1.1); z-index: 4; }
.item.lit .face { border-color: #ffe14d; box-shadow: 0 0 0 3px #fff, 0 0 18px 6px #ffe680; }
.item.win { z-index: 4; animation: winpulse .55s infinite alternate; }
.item.win .face { border-color: #ffe14d; box-shadow: 0 0 0 3px #fff, 0 0 22px 8px #ffe680; }
.item.off .face { filter: grayscale(1) brightness(.8); }
.item.off { pointer-events: none; }
.item.off .face::after { content: "مغلق"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; font-size: 12px; }
@keyframes winpulse { from { transform: scale(1.06); } to { transform: scale(1.16); } }
@keyframes pulse { to { transform: scale(1.18); } }

/* أزرار سلطة وبيتزا (ضربة الحظ) أسفل جانبي العجلة */
.grp { position: absolute; top: 392px; width: 64px; height: 76px; z-index: 3; }
#grpSalad { left: 4px; } #grpPizza { left: 292px; }
.grp svg { width: 50px; height: 50px; margin: 0 auto; background: #fffaf0; border-radius: 50%; border: 3px solid #f2b631; padding: 5px; box-shadow: 0 3px 0 #8a560c; }
.grp-name { display: block; margin: -6px auto 0; width: 58px; background: linear-gradient(#7b4a22, #5a3214); color: #ffe9b0; border-radius: 5px; border: 1.5px solid #f2b631; font: 800 11px/14px "Trebuchet MS", Arial; text-align: center; position: relative; }
.grp-mult { position: absolute; right: -2px; top: -2px; background: #e0201b; color: #fff; font: 800 10px/14px Arial; padding: 0 5px; border-radius: 8px; border: 1.5px solid #fff; }
.grp-you { position: absolute; left: 50%; transform: translateX(-50%); bottom: -8px; font: 800 10px/13px Arial; color: #ffe14d; white-space: nowrap; background: #4a2a12; padding: 0 5px; border-radius: 6px; }
.grp-you:empty { display: none; }
.grp.lit .grp-name, .grp.win .grp-name { background: #e0201b; }
.grp.win svg { animation: winpulse .55s infinite alternate; border-color: #ffe14d; }
.grp.off { filter: grayscale(1); pointer-events: none; opacity: .6; }

/* الحامل الخشبي بين العجلة والقاعدة */
#stand { position: absolute; left: 110px; width: 140px; top: 440px; bottom: 250px; z-index: 1; }
#stand svg { width: 100%; height: 100%; }

/* ============ الجزء السفلي (قاعدة خشبية) ============ */
#bottom { position: absolute; left: 0; bottom: 0; width: 360px; height: 252px; z-index: 3; }
#bottom::before { content: ""; position: absolute; top: 0; bottom: 0; left: -100vw; right: -100vw; background: linear-gradient(#8a5528 0, #6e4020 60%, #5a3214 100%); border-top: 4px solid #c98712; box-shadow: 0 -4px 0 #5a3214, 0 -8px 12px rgba(90,50,20,.25); }
#platform { position: absolute; left: 0; top: 0; width: 360px; height: 36px; }
#wagerLbl { position: absolute; left: 22px; right: 22px; top: 9px; height: 24px; border-radius: 12px; background: #3e220c; box-shadow: inset 0 2px 3px rgba(0,0,0,.5), 0 1px 0 rgba(255,220,150,.25); color: #ffe9b0; font: 700 12px/24px "Segoe UI", Tahoma, Arial, sans-serif; text-align: center; direction: rtl; }
#wagerLbl span { color: #f6c94a; margin: 0 4px; }

#chips { position: absolute; left: 0; top: 40px; width: 360px; height: 44px; display: flex; justify-content: center; gap: 4px; z-index: 2; direction: ltr; }
.chip { width: 54px; height: 40px; border-radius: 9px; display: flex; align-items: center; justify-content: center; gap: 2px; position: relative; background: linear-gradient(#fffdf6, #efe2c6); box-shadow: 0 3px 0 #b8a07a, inset 0 0 0 1px #fff; transition: background .15s, transform .15s; }
.chip svg { width: 14px; height: 14px; flex: none; }
.chip span { font: 900 13px Arial; color: #4a2a12; letter-spacing: -.3px; }
.chip span.sm { font-size: 11.5px; }
.chip.sel { background: linear-gradient(#ffe680, #f2b631); box-shadow: 0 3px 0 #a86c0c, 0 0 0 2px #fff6c8, 0 0 10px 2px rgba(255,210,80,.8); transform: translateY(-2px); }
.chip.pop svg { animation: chippop .25s; }
@keyframes chippop { 50% { transform: scale(1.3) rotate(8deg); } }

#tipWrap { position: absolute; left: 0; top: 111px; width: 360px; height: 40px; z-index: 2; }
#tipTitle, #tipBar { display: none; }

#lower { position: absolute; left: 0; top: 92px; width: 360px; height: 160px; }
#btnWallet { position: absolute; left: 8px; top: 4px; width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(#ffe9a8, #f2b631); border: 2px solid #fff3c4; display: grid; place-items: center; box-shadow: 0 2px 0 #3e220c; }
#btnWallet svg { width: 24px; height: 24px; }
.pill { position: absolute; top: 2px; height: 44px; background: #3e220c; border: 1.5px solid #a0652e; border-radius: 12px; padding: 4px 10px; direction: rtl; text-align: center; box-shadow: inset 0 2px 4px rgba(0,0,0,.5); }
.pill small { display: block; font-size: 11px; line-height: 14px; color: #f6c94a; font-weight: 700; }
.pill b { display: flex; justify-content: center; align-items: center; gap: 5px; font: 900 17px/22px Arial; color: #ffe9b0; }
.pill b svg { width: 17px; height: 17px; }
#pillBal { left: 54px; width: 144px; } #pillWin { left: 204px; width: 148px; }

#resultRow { position: absolute; left: 6px; top: 54px; width: 348px; height: 42px; display: flex; align-items: center; background: linear-gradient(#e2372b, #b3141f); border-radius: 21px; border: 2px solid #f2b631; box-shadow: 0 3px 0 #3e220c; direction: rtl; }
#resLabel { margin-right: 10px; padding-left: 8px; color: #fff; font: 800 13px/22px "Segoe UI", Tahoma, Arial; border-left: 1.5px dashed rgba(255,255,255,.6); white-space: nowrap; }
#resSlots { display: flex; gap: 4px; margin-right: 7px; width: 270px; overflow-x: auto; overflow-y: hidden; padding: 12px 1px 2px; margin-top: -10px; scrollbar-width: none; touch-action: pan-x; overscroll-behavior-x: contain; cursor: grab; }
#resSlots::-webkit-scrollbar { display: none; }
.slot { flex: none; width: 30px; height: 30px; border-radius: 50%; background: #fffaf0; border: 2px solid #f2b631; display: grid; place-items: center; position: relative; }
.slot svg { width: 20px; height: 20px; }
.slot.new::after { content: "جديد"; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: #2e9e44; color: #fff; font: 800 10px/13px "Segoe UI", Tahoma, Arial; padding: 0 5px; border-radius: 7px; border: 1.5px solid #fff; white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,.35); z-index: 1; }

.big { position: absolute; top: 106px; height: 42px; width: 162px; background: linear-gradient(#fffaf0, #ffe4a3); border: 2px solid #f2b631; border-radius: 12px; display: flex; align-items: center; gap: 6px; padding: 0 6px; box-shadow: 0 3px 0 #3e220c; direction: rtl; }
#btnRank { left: 12px; } #btnKing { left: 186px; justify-content: space-between; }
.big .ic { width: 30px; height: 30px; flex: none; }
.big .txt { flex: 1; text-align: center; line-height: 1.1; }
.big .txt small { display: block; font-size: 10px; color: #7b4a22; font-weight: 700; }
.big .txt b { display: flex; justify-content: center; align-items: center; gap: 3px; font: 800 13px Arial; }
.big .txt b svg { width: 13px; height: 13px; }
.big .txt.king b { font: 900 15px/1.1 "Trebuchet MS", Arial; color: #b3141f; display: block; }
.big .chev { width: 18px; height: 18px; color: #7b4a22; flex: none; transform: scaleX(-1); }

/* ============ شاشة النتيجة ============ */
#overlay { position: absolute; left: 0; width: 360px; height: 340px; bottom: 0; z-index: 8; color: #fff; text-align: center; }
#overlay::before { content: ""; position: absolute; top: 0; bottom: 0; left: -100vw; right: -100vw; background: rgba(0,0,0,.86); z-index: -1; }
#overlay:not([hidden]) { animation: ovin .35s ease-out; }
@keyframes ovin { from { opacity: 0; transform: translateY(40px); } }
#ovTimer { position: absolute; right: 14px; top: 8px; font: 700 14px Arial; opacity: .9; }
#ovHero { position: relative; height: 70px; display: flex; justify-content: center; align-items: center; gap: 24px; margin-top: 4px; }
#ovHero .winner-ic { width: 60px; height: 60px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.5)); animation: bounce .9s infinite alternate; }
#ovHero .cut { width: 30px; height: 44px; }
#ovHero .cut.l { transform: rotate(-12deg); } #ovHero .cut.r { transform: rotate(12deg); }
@keyframes bounce { to { transform: translateY(-8px) scale(1.05); } }
#confetti { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
#confetti i { position: absolute; top: 40px; width: 7px; height: 11px; border-radius: 2px; animation: fall 1.8s ease-out forwards; }
@keyframes fall { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), 90px) rotate(var(--rot)); opacity: 0; } }
.ov-line { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 14px; line-height: 22px; direction: rtl; }
.ov-line .k { color: #fff; }
.ov-line b { display: inline-flex; align-items: center; gap: 4px; font: 800 15px Arial; direction: ltr; color: #ffe14d; }
.ov-line b svg { width: 16px; height: 16px; }
.ov-line.big-t { font: 600 14px/24px Arial; direction: ltr; }
.ov-line.big-t .t-no { color: #ff4040; font-weight: 800; }
.ov-line.big-t svg { width: 22px; height: 22px; display: inline-block; vertical-align: middle; margin-left: 4px; }
.ov-line.big-t { white-space: nowrap; }
#ovLines { margin-top: 4px; }
#ovTopTitle { display: flex; align-items: center; gap: 8px; margin: 8px 16px 0; color: #ffd34d; font-size: 14px; font-weight: 700; direction: rtl; }
#ovTopTitle i { flex: 1; border-top: 2px dashed #ffd34d; }
#ovTop { display: flex; justify-content: space-around; align-items: flex-end; padding: 40px 6px 0; }
.tp { width: 100px; position: relative; }
.tp .av { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto; border: 3px solid #e7dca0; display: grid; place-items: center; font: 800 26px Arial; color: #fff; position: relative; }
.tp.first .av { width: 76px; height: 76px; font-size: 32px; border: 0; box-shadow: 0 0 0 3px #fff3b0, 0 0 0 7px #e9ad1f, 0 0 0 9px #8a5300, 0 0 24px 8px rgba(255,205,70,.65); }
.tp .crown { position: absolute; left: 50%; top: -38px; width: 52px; height: 36px; transform: translateX(-50%); z-index: 3; filter: drop-shadow(0 3px 3px rgba(0,0,0,.55)); }
.tp.first .rk { right: 6px; top: -4px; width: 22px; height: 22px; font-size: 13px; line-height: 22px; }
.tp.first .nm { color: #ffd34d; }
.tp .rk { position: absolute; right: 8px; top: -6px; width: 20px; height: 20px; border-radius: 50%; background: #ffc619; color: #6a3d00; font: 800 12px/20px Arial; z-index: 2; }
.tp .nm { margin-top: 4px; font: italic 700 14px/1.2 "Trebuchet MS", Arial; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; unicode-bidi: plaintext; }
.tp .am { display: flex; justify-content: center; align-items: center; gap: 3px; font: 800 13px Arial; color: #ffe14d; }
.tp .am svg { width: 14px; height: 14px; }
.tp.empty { opacity: .35; }

/* ============ النوافذ ============ */
#dim { position: absolute; top: 0; bottom: 0; left: 0; width: 360px; z-index: 20; }
#dim::before { content: ""; position: absolute; top: 0; bottom: 0; left: -100vw; right: -100vw; background: rgba(0,0,0,.55); }
#sheet { position: absolute; left: 0; bottom: 0; width: 360px; max-height: 88%; background: #f4f5f7; border-radius: 20px 20px 0 0; z-index: 21; display: flex; flex-direction: column; direction: rtl; color: #222; animation: sheetin .25s ease-out; }
@keyframes sheetin { from { transform: translateY(60px); opacity: 0; } }
#sheetHead { position: relative; height: 50px; flex: none; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid #e6e6e6; background: #fff; border-radius: 20px 20px 0 0; }
#sheetHead h2 { margin: 0; font-size: 16px; font-weight: 800; }
#sheetClose { position: absolute; left: 10px; top: 9px; width: 32px; height: 32px; font-size: 17px; color: #666; border-radius: 50%; background: #f0f0f0; }
#sheetBody { padding: 14px; overflow-y: auto; flex: 1; font-size: 14px; line-height: 1.6; -webkit-overflow-scrolling: touch; user-select: text; -webkit-user-select: text; }

.f-row { margin-bottom: 12px; }
.f-row label { display: block; font-size: 12px; font-weight: 700; color: #666; margin-bottom: 4px; }
.f-row input, .f-row select, .f-row textarea { width: 100%; height: 44px; border: 1.5px solid #d8dbe0; border-radius: 12px; padding: 0 12px; font: inherit; font-size: 15px; background: #fff; color: #222; outline: none; direction: ltr; text-align: right; user-select: text; -webkit-user-select: text; }
.f-row input:focus { border-color: #ff8a3d; }
.btn { display: block; width: 100%; height: 46px; border-radius: 12px; background: linear-gradient(#ff9a4d, #ff7a1f); color: #fff; font-weight: 800; font-size: 15px; box-shadow: 0 3px 0 #c4551a; }
.btn.sec { background: #fff; color: #444; border: 1.5px solid #d8dbe0; box-shadow: none; }
.btn.green { background: linear-gradient(#4cc36b, #2e9e4f); box-shadow: 0 3px 0 #1f7a38; }
.btn.red { background: linear-gradient(#f0605a, #d6362f); box-shadow: 0 3px 0 #a22620; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.tabs { display: flex; background: #e8eaee; border-radius: 12px; padding: 3px; margin-bottom: 14px; }
.tabs button { flex: 1; height: 36px; border-radius: 10px; font-weight: 700; color: #666; }
.tabs button.on { background: #fff; color: #222; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.err { color: #d6362f; font-size: 13px; min-height: 20px; margin-bottom: 6px; }
.note { font-size: 12px; color: #777; }

.card { background: #fff; border-radius: 14px; padding: 12px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.card h3 { margin: 0 0 10px; font-size: 14px; font-weight: 800; padding-right: 8px; border-right: 4px solid #ff8a3d; }
.invite { background: linear-gradient(135deg, #eafbef, #d4f3dd); border: 1.5px solid #7fd59a; }
.inv-code { display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.inv-code span { color: #666; font-size: 13px; } .inv-code b { font: 900 22px Arial; letter-spacing: 2px; color: #1f7a38; }
.inv-stats { display: flex; gap: 10px; margin-top: 10px; }
.inv-stats div { flex: 1; background: #fff; border-radius: 10px; padding: 8px; text-align: center; }
.inv-stats b { display: block; font: 900 18px Arial; } .inv-stats small { color: #777; font-size: 12px; }
.bal-card { background: linear-gradient(135deg, #fff1d6, #fbd5b8); border-radius: 14px; padding: 16px; margin-bottom: 12px; }
.bal-card .v { display: flex; align-items: center; gap: 8px; font: 900 32px Arial; direction: ltr; justify-content: flex-end; }
.bal-card .v svg { width: 34px; height: 34px; }
.bal-card .s { color: #c4551a; font-size: 13px; }
.pk-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pk { position: relative; background: #fff; border: 1.5px solid #dcdfe4; border-radius: 12px; padding: 10px 4px 8px; text-align: center; direction: ltr; }
.pk .d { display: flex; justify-content: center; align-items: center; gap: 4px; font: 800 16px Arial; }
.pk .d svg { width: 18px; height: 18px; }
.pk .p { color: #999; font: 13px Arial; margin-top: 2px; }
.pk .hot { position: absolute; left: -6px; top: -8px; background: #ff2d55; color: #fff; font: 800 9px/14px Arial; padding: 0 6px; border-radius: 8px; transform: rotate(-12deg); }
.pk:active { border-color: #ff8a3d; }
.row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.row:last-child { border-bottom: 0; }
.row .av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 16px Arial; flex: none; }
.row .nm { flex: 1; font-weight: 700; unicode-bidi: plaintext; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .nm small { display: block; font-weight: 400; color: #888; font-size: 12px; }
.row .am { font: 800 14px Arial; direction: ltr; display: flex; align-items: center; gap: 3px; }
.row .am svg { width: 14px; height: 14px; }
.row .rank { width: 26px; text-align: center; font: 800 15px Arial; color: #999; flex: none; }
.row .rank.r1 { color: #e0a800; } .row .rank.r2 { color: #9aa3ad; } .row .rank.r3 { color: #c47a3a; }
.pos { color: #1f9d4b; } .neg { color: #d6362f; }
.tag { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 8px; background: #eee; color: #555; font-weight: 700; }
.tag.pending { background: #fff2cc; color: #8a6200; } .tag.approved { background: #d9f5e1; color: #1f7a38; } .tag.rejected { background: #fde0de; color: #a22620; }
.inline-ic { width: 20px; height: 20px; display: inline-block; vertical-align: -5px; }
.rules p { margin: 0 0 10px; }

#toast { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); background: rgba(20,20,20,.9); color: #fff; padding: 9px 16px; border-radius: 20px; font-size: 13px; z-index: 40; max-width: 320px; text-align: center; direction: rtl; animation: toastin .2s; }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 10px); } }
.float-win { position: absolute; left: 50%; top: 300px; transform: translateX(-50%); z-index: 30; font: 900 34px Arial; color: #ffe14d; text-shadow: 0 2px 0 #b34700, 0 0 12px rgba(255,255,255,.8); animation: floatup 2s ease-out forwards; pointer-events: none; }
@keyframes floatup { to { transform: translate(-50%, -80px); opacity: 0; } }

.ov-line.lucky { color: #ffe14d; font: 900 15px/22px "Segoe UI", Tahoma, Arial; text-shadow: 0 0 10px rgba(255,200,0,.8); animation: pulse .6s infinite alternate; }
.slot.lucky { border-color: #ff4d6d; box-shadow: 0 0 8px 2px #ffd34d; }

/* قائمة الأصوات */
.snd-row { cursor: pointer; }
.sw { appearance: none; -webkit-appearance: none; width: 46px; height: 26px; border-radius: 13px; background: #cfd3d9; position: relative; flex: none; cursor: pointer; transition: background .2s; }
.sw::after { content: ""; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: right .2s; }
.sw:checked { background: #ff8a3d; }
.sw:checked::after { right: 23px; }

/* صورة الحساب */
.av { position: relative; overflow: hidden; }
.av-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.tp .av { overflow: visible; }
.tp .av .av-img { border-radius: 50%; }
.av-edit { position: relative; flex: none; padding: 0; border-radius: 50%; }
.av-edit .av { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; color: #fff; font: 800 24px Arial; }
.av-cam { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); background: #ff8a3d; color: #fff; font-size: 10px; font-weight: 700; padding: 0 6px; border-radius: 8px; line-height: 16px; white-space: nowrap; border: 1.5px solid #fff; }

/* اتجاه النصوص العربية داخل المسرح */
.item .bot, .hub-num, #ovTimer, .ov-line.big-t, .item .you, .grp-you { direction: rtl; }

/* طلبات الشحن */
#btnWallet { position: absolute; }
#walletBadge { position: absolute; right: -5px; top: -5px; min-width: 18px; height: 18px; border-radius: 9px; background: #ff2d2d; color: #fff; font: 800 11px/18px Arial; text-align: center; font-style: normal; border: 1.5px solid #fff; padding: 0 3px; }
.agent-row .av { position: relative; overflow: visible; }
.on-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #22c55e; border: 2px solid #fff; }
.online { color: #1f9d4b; font-weight: 700; } .offline { color: #999; }
.ag-bal { display: flex !important; align-items: center; gap: 3px; color: #7b4a22 !important; font-weight: 700 !important; }
.ag-bal .inline-ic { width: 13px; height: 13px; vertical-align: 0; }
.req-btn { background: #2e9e44; color: #fff; padding: 4px 10px; font-size: 12px; flex: none; }
.req-box { background: #f6faf6; border: 1px solid #d6ead9; border-radius: 12px; padding: 8px 10px; margin-bottom: 12px; }
.req-box .row .tag { flex: none; cursor: pointer; }
.quick-amt { display: flex; gap: 6px; margin: -4px 0 10px; flex-wrap: wrap; }
.quick-amt .tag { cursor: pointer; padding: 3px 10px; }

/* سجل الجولات: تفاصيل الرهان على كل خيار */
.hround { border-bottom: 1px solid #f0f0f0; padding: 10px 0; }
.hround:last-child { border-bottom: 0; }
.hr-top { display: flex; align-items: center; gap: 10px; }
.hr-top b { font-size: 14px; }
.hr-res { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #777; flex: 1; }
.hr-res svg { width: 22px; height: 22px; }
.hr-top .am { font: 800 14px Arial; direction: ltr; }
.hr-bets { display: flex; flex-wrap: wrap; gap: 6px; margin: 7px 0 4px; }
.hb { display: inline-flex; align-items: center; gap: 4px; background: #f4f5f7; border: 1.5px solid #e3e5e9; border-radius: 14px; padding: 2px 9px 2px 4px; font: 700 12px Arial; direction: ltr; }
.hb svg { width: 20px; height: 20px; }
.hb.won { background: #e6f7ea; border-color: #2e9e44; color: #1f7a38; }

/* إخفاء المضاعف فوق البيتزا والسلطة، وإخفاء شارة 7=2 */
.grp-mult, #badge { display: none !important; }
/* شرح البيتزا والسلطة */
#grpTip { position: absolute; top: 330px; width: 200px; z-index: 6; background: rgba(40,22,8,.94); color: #fff; border: 1.5px solid #f2b631; border-radius: 12px; padding: 7px 10px; direction: rtl; text-align: right; font-size: 11.5px; line-height: 1.5; box-shadow: 0 4px 12px rgba(0,0,0,.35); animation: tipin .2s ease-out; pointer-events: none; }
#grpTip b { display: block; color: #ffd34d; font-size: 12.5px; }
#grpTip span { display: block; opacity: .92; }
#grpTip.salad { left: 6px; } #grpTip.pizza { right: 6px; }
#grpTip::after { content: ""; position: absolute; bottom: -7px; width: 12px; height: 12px; background: rgba(40,22,8,.94); border-right: 1.5px solid #f2b631; border-bottom: 1.5px solid #f2b631; transform: rotate(45deg); }
#grpTip.salad::after { left: 26px; } #grpTip.pizza::after { right: 26px; }
@keyframes tipin { from { opacity: 0; transform: translateY(6px); } }

/* تجسيم أقوى للعناصر، وبيتزا وسلطة أكبر بدون إطار دائري */
.item .top svg { filter: drop-shadow(0 2px 1.5px rgba(0,0,0,.28)) saturate(1.15) contrast(1.05); }
.item .bot .l2 { font-size: 11px; }
.grp svg { width: 58px; height: 58px; background: radial-gradient(circle at 50% 60%, #fffaf0 0 55%, rgba(255,250,240,0) 70%); border: 0; padding: 0; box-shadow: none; filter: drop-shadow(0 3px 2px rgba(0,0,0,.3)) saturate(1.1); }
.grp-name { margin-top: -4px; }

/* ===== الحساب: روابط نصية داخل النماذج ===== */
.link-btn { display: block; width: 100%; margin-top: 12px; padding: 6px; background: none; border: 0; color: #e8590c; font: 700 14px "Segoe UI", Tahoma, Arial, sans-serif; text-align: center; text-decoration: underline; cursor: pointer; }
.f-row input[type=email], .f-row input[inputmode=numeric] { text-align: left; }

/* زر نسخ رقم الحساب في طلبات الشحن */
.req-box .row .tag.copy { background: #e8f0fe; color: #1a5fd0; border-color: #c7d9fb; }
@keyframes flashIn { 0% { box-shadow: 0 0 0 4px rgba(46,158,79,.55); } 100% { box-shadow: 0 0 0 0 rgba(46,158,79,0); } }
.f-row input.flash { animation: flashIn 1.2s ease-out; border-color: #2e9e4f; }
.req-box .row { flex-wrap: wrap; row-gap: 6px; }
.req-box .req-acts { flex: 1 0 100%; display: flex; gap: 8px; padding-right: 46px; }
.req-box .req-acts .tag { flex: 1; text-align: center; padding: 5px 0; font-size: 13px; }
