/* صفحة السكورات الجديدة (طلب علي 2026-11-11): تصميم Gemini + قواعد Manus.
   منصة تتويج للثلاثة الأوائل، وتبويب فردي/تحديات/غرف، وهذا الأسبوع/كل الأوقات، ومركزك ثابت تحت.
   التوهج بس على الفايز ومركزك والأزرار المهمة، والباقي هادي. */
.sb { max-width: 760px; margin-inline: auto; padding: 6px 14px 150px; color: #f5f3ff; }
.sb-title { margin: 6px 0 0; text-align: center; font-size: clamp(32px, 9vw, 52px); font-weight: 800; line-height: 1.15;
  background: linear-gradient(180deg, #f9a8d4, #ec4899); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 14px rgba(236, 72, 153, .55)); }
.sb-game { margin: 2px 0 14px; text-align: center; font-size: clamp(20px, 5.5vw, 28px); font-weight: 800; color: #22d3ee;
  text-shadow: 0 0 14px rgba(34, 211, 238, .55); }

/* ثلاث مجموعات أزرار، كل وحدة بشكل ولون (طلب علي 2026-11-11):
   الألعاب = سماوي، مربعات بشبكة 3 بالصف · النوع = وردي، أزرار كبيرة · الفترة = ذهبي، كبسولة وحدة مقسومة */

/* الألعاب: شبكة، كل 3 تحت بعض */
.sb-games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0 12px; }
.sb-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; padding: 8px 6px;
  border: 1px solid rgba(34, 211, 238, .28); border-radius: 14px; background: rgba(34, 211, 238, .05); color: #cffafe;
  font: inherit; font-size: 13.5px; font-weight: 800; line-height: 1.25; text-align: center; cursor: pointer; }
.sb-chip .ic { font-size: 22px; line-height: 1; }
.sb-chip[aria-pressed="true"] { border: 2px solid #22d3ee; background: rgba(34, 211, 238, .16); color: #fff; box-shadow: 0 0 14px rgba(34, 211, 238, .5); }

/* النوع: وردي */
.sb-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 10px; }
.sb-tab { min-height: 48px; border: 2px solid rgba(236, 72, 153, .38); border-radius: 14px; background: rgba(236, 72, 153, .06); color: #fbcfe8;
  font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; }
/* أربع أنواع (فردي، تحديات، غرف، 👥 فرق) */
.sb-tabs.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sb-tabs.four .sb-tab { padding: 0 2px; font-size: 15px; }
/* مباراة فرق: الفريقين بسكورهم وأسماء اللاعبين ومساهمة كل واحد */
.sb-teammatch { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 8px; }
.sb-teamside { display: grid; gap: 4px; padding: 8px; border-radius: 14px; background: rgba(255, 255, 255, .05); }
.sb-teamside.blue { border: 1px solid rgba(59, 130, 246, .7); }
.sb-teamside.red { border: 1px solid rgba(244, 63, 94, .7); }
.sb-teamside.win { box-shadow: 0 0 14px rgba(250, 204, 21, .45); }
.sb-teamside .tscore { font-size: 22px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.sb-teamside .mate { display: flex; justify-content: space-between; gap: 6px; font-size: 13px; }
.sb-teamside .mate small { color: #b9b2dc; }
.sb-teamside .mate.me { color: #22d3ee; font-weight: 800; }
.sb-teammid { align-self: center; font-size: 20px; }
.sb-tab[aria-selected="true"] { border-color: transparent; color: #fff; background: linear-gradient(135deg, #ec4899, #a855f7); box-shadow: 0 0 16px rgba(236, 72, 153, .55); }

/* الفترة: ذهبي، كبسولة وحدة */
.sb-tabs.two { grid-template-columns: repeat(2, 1fr); gap: 0; width: min(100%, 360px); margin: 0 auto 8px; padding: 3px;
  border: 1px solid rgba(250, 204, 21, .45); border-radius: 99px; background: rgba(250, 204, 21, .05); }
.sb-tabs.two .sb-tab { min-height: 36px; border: 0; border-radius: 99px; background: transparent; color: #fde68a; font-size: 14px; }
.sb-tabs.two .sb-tab[aria-selected="true"] { background: linear-gradient(90deg, #facc15, #f59e0b); color: #2a1600; box-shadow: 0 0 12px rgba(250, 204, 21, .45); }
.sb-ends { margin: 2px 0 6px; text-align: center; color: #b9b2dc; font-size: 13px; }
.sb-ends b { color: #facc15; }

/* منصة التتويج */
.sb-podium { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 6px; margin: 14px 0 8px; padding-top: 34px; min-height: 60px; }
.sb-podium::before { content: ''; position: absolute; inset: 0 10% 30%; background: radial-gradient(ellipse at 50% 40%, rgba(250, 204, 21, .28), transparent 65%); pointer-events: none; }
.sb-place { position: relative; flex: 1 1 0; max-width: 150px; display: grid; justify-items: center; text-align: center; animation: sb-rise .5s both; }
.sb-place.p1 { animation-delay: .15s; }
.sb-place.p2 { animation-delay: .05s; }
.sb-place.p3 { animation-delay: .25s; }
.sb-face { position: relative; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; overflow: hidden; border: 3px solid var(--m);
  background: #2a1b5c; color: #fff; font-size: 24px; font-weight: 800; box-shadow: 0 0 14px color-mix(in srgb, var(--m) 55%, transparent); }
.sb-face img, .sb-face svg { width: 100%; height: 100%; object-fit: cover; }
.p1 .sb-face { width: 92px; height: 92px; }
.sb-crown { position: absolute; top: -34px; left: 50%; translate: -50% 0; font-size: 34px; filter: drop-shadow(0 0 10px rgba(250, 204, 21, .9)); z-index: 2; }
.sb-step { display: grid; place-items: center; width: 100%; margin-top: 6px; border-radius: 14px 14px 6px 6px; color: rgba(255, 255, 255, .92);
  font-size: 34px; font-weight: 800; background: linear-gradient(180deg, color-mix(in srgb, var(--m) 90%, #fff 10%), color-mix(in srgb, var(--m) 55%, #000 45%)); }
.p1 { --m: #facc15; } .p2 { --m: #cbd5e1; } .p3 { --m: #d97745; }
.p1 .sb-step { height: 92px; box-shadow: 0 0 26px rgba(250, 204, 21, .55); color: #5b3b00; }
.p2 .sb-step { height: 66px; color: #334155; }
.p3 .sb-step { height: 50px; color: #4a1d06; }
.sb-pname { margin-top: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 800; }
.p1 .sb-pname { color: #fde047; font-size: 17px; }
.sb-pval { color: var(--m); font-size: 15px; font-weight: 800; }
.sb-place.me .sb-face { outline: 3px solid #ec4899; outline-offset: 2px; }
/* بدون اختفاء: لو المتصفح ما شغّل الحركة، المنصة تبين عادي */
@keyframes sb-rise { from { translate: 0 18px; } to { translate: 0 0; } }

/* القائمة بعد المنصة */
.sb-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.sb-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid rgba(168, 85, 247, .28); border-radius: 16px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)); }
.sb-row .no { width: 28px; text-align: center; color: #22d3ee; font-size: 20px; font-weight: 800; }
.sb-row .sb-face { width: 42px; height: 42px; border-width: 2px; --m: #a855f7; box-shadow: none; font-size: 16px; }
.sb-row .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; font-size: 16px; }
.sb-row .who small { display: block; color: #b9b2dc; font-size: 12px; font-weight: 400; }
.sb-row .val { flex: none; min-width: 84px; padding: 6px 10px; border-radius: 12px; background: rgba(0, 0, 0, .25); text-align: center; color: #67e8f9; font-weight: 800; }
.sb-row .val small { color: #b9b2dc; font-weight: 400; }
.sb-row .bar { display: block; height: 4px; margin-top: 4px; border-radius: 4px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.sb-row .bar i { display: block; height: 100%; background: linear-gradient(90deg, #22d3ee, #a855f7); }
.sb-row.me { border-color: #ec4899; background: rgba(236, 72, 153, .1); }

/* أقسام: أنت ضد، آخر التحديات، الغرف */
.sb-h2 { margin: 24px 0 10px; font-size: 21px; font-weight: 800; }
.sb-vs { display: grid; gap: 10px; }
.sb-match { padding: 12px; border: 1px solid rgba(168, 85, 247, .35); border-radius: 18px; background: linear-gradient(160deg, rgba(168, 85, 247, .12), rgba(255, 255, 255, .02)); }
.sb-duel { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; text-align: center; }
.sb-side { display: grid; justify-items: center; gap: 4px; min-width: 0; }
.sb-side .sb-face { width: 58px; height: 58px; --m: #22d3ee; }
.sb-side.win .sb-face { --m: #facc15; box-shadow: 0 0 14px rgba(250, 204, 21, .6); }
.sb-side .nm { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.sb-side .crown { height: 22px; font-size: 20px; }
.sb-mid { display: grid; justify-items: center; gap: 2px; }
.sb-mid .score { font-size: 20px; font-weight: 800; color: #e9d5ff; direction: ltr; }
.sb-mid .swords { font-size: 30px; filter: drop-shadow(0 0 8px rgba(236, 72, 153, .7)); }
.sb-mid .tie { color: #fde68a; font-size: 12px; font-weight: 800; }
.sb-matchfoot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(255, 255, 255, .08); color: #c4b5fd; font-size: 13px; }
.sb-again { padding: 6px 12px; border-radius: 99px; background: linear-gradient(90deg, #ec4899, #db2777); color: #fff; font-weight: 800; text-decoration: none; font-size: 13px; }
.sb-more { color: #b9b2dc; font-size: 12px; }
.sb-rec { display: flex; flex-wrap: wrap; gap: 8px; }
.sb-recpill { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; background: rgba(255, 255, 255, .04); font-weight: 800; }
.sb-recpill .sb-face { width: 34px; height: 34px; border-width: 2px; --m: #a855f7; font-size: 14px; box-shadow: none; }
.sb-recpill .rec { direction: ltr; color: #67e8f9; }
.sb-room { padding: 12px; border: 1px solid rgba(168, 85, 247, .35); border-radius: 18px; background: rgba(255, 255, 255, .03); }
.sb-room .head { display: flex; justify-content: space-between; gap: 8px; color: #c4b5fd; font-size: 13px; margin-bottom: 6px; }
.sb-room .head b { color: #fff; font-size: 15px; }
.sb-room .sb-podium { margin: 6px 0 0; padding-top: 30px; }
.sb-room .sb-face { width: 44px; height: 44px; }
.sb-room .p1 .sb-face { width: 54px; height: 54px; }
.sb-room .sb-step { font-size: 22px; }
.sb-room .p1 .sb-step { height: 54px; } .sb-room .p2 .sb-step { height: 40px; } .sb-room .p3 .sb-step { height: 30px; }
.sb-room .sb-crown { font-size: 24px; top: -26px; }
.sb-empty { margin: 30px 0; padding: 22px 14px; border: 1px dashed rgba(168, 85, 247, .45); border-radius: 18px; text-align: center; color: #c4b5fd; }
.sb-empty b { display: block; margin-bottom: 6px; color: #fff; font-size: 18px; }

/* مركزك: شريط نحيف ثابت تحت (رأي الثلاثة 2026-11-11): ما يغطي المنصة، والصفحة محجوز لها مسافة تحت */
.sb-mine { position: fixed; z-index: 40; left: 50%; bottom: max(8px, env(safe-area-inset-bottom)); translate: -50% 0; width: min(732px, calc(100% - 16px));
  display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 7px 12px; border: 1px solid #ec4899; border-radius: 16px;
  background: rgba(29, 15, 71, .97); box-shadow: 0 0 14px rgba(236, 72, 153, .4), 0 12px 30px -10px rgba(0, 0, 0, .8); }
.sb-mine[hidden] { display: none; }
.sb-mine .tag { flex: none; color: #f9a8d4; font-weight: 800; font-size: 13px; white-space: nowrap; }
.sb-mine .big { color: #facc15; font-size: 26px; font-weight: 800; line-height: 1; min-width: 34px; text-align: center; }
.sb-mine .sb-face { width: 36px; height: 36px; --m: #a855f7; }
.sb-mine .info { flex: 1; min-width: 0; font-size: 14px; line-height: 1.3; }
.sb-mine .info b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-mine .info span { color: #facc15; font-weight: 800; }
.sb-mine .hint { max-width: 34%; color: #fde68a; font-size: 12px; font-weight: 800; text-align: start; }
.sb-mine .btn { flex: none; min-height: 40px; padding: 6px 16px; }
@media (max-width: 520px) { .sb-mine .hint { display: none; } }
.sb { padding-bottom: 96px; }

/* صف الألعاب فوق، بعده النوع، بعده الفترة، وسطر يشرح الحساب */
.sb [hidden] { display: none !important; }
.sb-title { font-size: clamp(26px, 7vw, 40px); margin-bottom: 10px; }
.sb-tab.dim { opacity: .45; border-style: dashed; }
.sb-how { margin: 0 0 4px; text-align: center; color: #b9b2dc; font-size: 13px; }
.sb-how:empty { display: none; }
.sb-state { margin: 26px 0; text-align: center; color: #b9b2dc; }
.sb-play { display: block; margin: 18px auto 0; max-width: 320px; text-align: center; }
@media (prefers-reduced-motion: reduce) { .sb-place { animation: none; } }
/* الجوال: الشريط العلوي كان أعرض من الشاشة فيدفع الصفحة ويطلّع زر «العب» برا (طلب علي) */
@media (max-width: 480px) {
  .site-bar-inner { gap: 6px; padding-inline: 8px; }
  .site-bar-inner > * { min-width: 0; }
  .site-bar-inner .logo { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
  .site-bar-inner .profile-btn { max-width: 38vw; overflow: hidden; text-overflow: ellipsis; }
}
body { overflow-x: clip; }

/* 🧹 ترتيب أخف (طلب علي 2026-11-14): الأزرار 3 سطور صغيرة بدل 5 كبار، والترتيب يطلع من أول شاشة */
.sb-title { margin: 2px 0 8px; font-size: clamp(24px, 6.5vw, 34px); }
/* الألعاب: سطر واحد ينسحب يمين ويسار */
.sb-games { display: flex; gap: 6px; margin: 0 -14px 8px; padding: 2px 14px 6px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.sb-games::-webkit-scrollbar { display: none; }
.sb-chip { flex: none; flex-direction: row; gap: 6px; min-height: 40px; padding: 6px 12px; border-radius: 99px; font-size: 14px; white-space: nowrap; scroll-snap-align: start; }
.sb-chip .ic { font-size: 17px; }
/* طلب علي: الألعاب شبكة مربعات واضحة، 4 بالصف (بدل السطر الطويل اللي ينسحب) */
.sb-games { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0 0 8px; padding: 0; overflow: visible; }
.sb-chip { flex-direction: column; gap: 3px; min-height: 62px; padding: 6px 3px; border-radius: 14px; font-size: 11.5px; line-height: 1.2; white-space: normal; }
.sb-chip .ic { font-size: 20px; }
/* النوع: سطر واحد أصغر */
.sb-tabs.four { margin: 0 0 8px; }
.sb-tabs.four .sb-tab { min-height: 40px; border-radius: 12px; font-size: 14px; }
/* الفترة: الأربع بسطر واحد */
.sb-tabs.two, .sb-tabs.two.three { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; margin: 0 0 6px; border-radius: 99px; }
.sb-tabs.two .sb-tab, .sb-tabs.two.three .sb-tab { min-height: 34px; padding: 0 2px; font-size: 12px; white-space: nowrap; }
.sb-podium { margin-top: 8px; }
.sb-all { display: block; width: 100%; margin: 10px 0 0; min-height: 44px; border: 1px dashed rgba(34, 211, 238, .55); background: rgba(34, 211, 238, .08); color: #67e8f9; font-weight: 800; }
/* 🌟 «الكل»: توب 3 من كل لعبة، كل لعبة بكرت */
.sb-g3 { margin: 12px 0 0; padding: 10px 12px 12px; border: 1px solid rgba(168, 85, 247, .35); border-radius: 18px; background: linear-gradient(160deg, rgba(168, 85, 247, .12), rgba(255, 255, 255, .02)); }
.sb-g3-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sb-g3-head b { color: #fff; font-size: 17px; font-weight: 900; }
.sb-g3-more { flex: none; padding: 5px 12px; border: 1px solid rgba(34, 211, 238, .55); border-radius: 99px; background: rgba(34, 211, 238, .1); color: #67e8f9; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.sb-g3 .sb-podium { margin: 4px 0 0; padding-top: 30px; }
.sb-g3 .sb-face { width: 46px; height: 46px; }
.sb-g3 .p1 .sb-face { width: 58px; height: 58px; }
.sb-g3 .sb-step { font-size: 22px; }
.sb-g3 .p1 .sb-step { height: 52px; } .sb-g3 .p2 .sb-step { height: 38px; } .sb-g3 .p3 .sb-step { height: 28px; }
.sb-g3 .sb-crown { font-size: 24px; top: -26px; }
.sb-g3 .sb-pname { font-size: 13px; } .sb-g3 .sb-pval { font-size: 13px; }
.sb-g3-empty { margin: 12px 0 2px; text-align: center; color: #c4b5fd; font-size: 14px; }
/* طلب علي: «الكل» شبكة مربعات مو طابور طويل: لعبتين بالصف بالجوال، 3 بالكمبيوتر */
.sb-g3-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
@media (min-width: 640px) { .sb-g3-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sb-g3-grid .sb-g3 { margin: 0; padding: 8px 6px 10px; display: flex; flex-direction: column; }
.sb-g3-grid .sb-g3-head { flex-direction: column; gap: 4px; text-align: center; }
.sb-g3-grid .sb-g3-head b { font-size: 14px; }
.sb-g3-grid .sb-g3-more { padding: 3px 10px; font-size: 11.5px; }
.sb-g3-grid .sb-podium { gap: 2px; margin-top: auto; padding-top: 24px; }
.sb-g3-grid .sb-podium::before { inset: 0 0 30%; }
.sb-g3-grid .sb-face { width: 34px; height: 34px; border-width: 2px; font-size: 13px; }
.sb-g3-grid .p1 .sb-face { width: 42px; height: 42px; }
.sb-g3-grid .sb-step { font-size: 15px; border-radius: 8px 8px 4px 4px; }
.sb-g3-grid .p1 .sb-step { height: 34px; } .sb-g3-grid .p2 .sb-step { height: 26px; } .sb-g3-grid .p3 .sb-step { height: 20px; }
.sb-g3-grid .sb-crown { font-size: 18px; top: -20px; }
.sb-g3-grid .sb-pname { font-size: 11px; } .sb-g3-grid .sb-pval { font-size: 10.5px; white-space: normal; line-height: 1.2; }
.sb-g3-grid .sb-g3-empty { margin: auto 0; font-size: 12px; }
/* الشريط العلوي بالجوال: «القائمة الرئيسية» كانت تنقص، نخلي حرف الشعار بس */
@media (max-width: 480px) {
  .site-bar-inner .logo { flex: 0 0 auto; font-size: 0; }
  .site-bar-inner .logo .logo-mark { font-size: 18px; }
}