/* ── تكتيك هجومي — Game CSS v11 (Mobile-first) ────────────────────── */
*, *::before, *::after {
  box-sizing: border-box; margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg:        #0B0D11;
  --surface:   #111419;
  --card:      #171B21;
  --card-2:    #1D222A;
  --edge:      #252B34;
  --edge-2:    #323945;
  --ink:       #FFFFFF;
  --t2:        #9AA3B0;
  --t3:        #5D6672;
  --acid:      #C6F24E;
  --acid-dim:  rgba(198,242,78,.14);
  --amber:     #FFB84D;
  --amber-dim: rgba(255,184,77,.13);
  --rose:      #FF6B6B;
  --rose-dim:  rgba(255,107,107,.13);
  --nav-h:     68px;

  /* legacy aliases */
  --accent:   #C6F24E;
  --accent-l: rgba(198,242,78,.14);
  --gold:     #FFB84D;
  --green:    #5AC846;
  --red:      #FF6B6B;
  --warn:     #FFB84D;
  --txt-1:    #FFFFFF;
  --txt-2:    #9AA3B0;
  --txt-3:    #5D6672;
  --shadow:   0 8px 32px rgba(0,0,0,.6);
  --shadow-s: 0 2px 12px rgba(0,0,0,.45);
  --radius:   16px;
}

html { height: 100%; height: -webkit-fill-available; }
body {
  font-family: 'Tajawal', sans-serif;
  background: #06070A;
  color: var(--ink);
  overflow: hidden;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  min-height: -webkit-fill-available;
}
.num { font-family: 'Space Grotesk', 'Tajawal', sans-serif; font-variant-numeric: tabular-nums; }

/* ══════════════════════════════════════════════
   APP SHELL
══════════════════════════════════════════════ */
.app {
  width: 100%;
  max-width: 480px;
  min-height: 100%;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0;
  margin: 0 auto;
  overflow: hidden;
}
/* Ambient glow */
.app::before {
  content: "";
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(198,242,78,.06);
  filter: blur(80px);
  top: -100px; right: -60px;
  pointer-events: none; z-index: 0;
}

/* ══════════════════════════════════════════════
   TOP BAR
══════════════════════════════════════════════ */
.top {
  position: relative; z-index: 40;
  flex-shrink: 0;
  background: rgba(11,13,17,.90);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--edge);
  padding: 12px 16px 12px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
}
.toprow {
  display: flex; align-items: center;
  justify-content: space-between; gap: 10px;
  direction: rtl;
}
.top-logo {
  height: 42px; width: auto; display: block;
  border-radius: 9px; flex-shrink: 0;
}
.top-user {
  display: flex; align-items: center; gap: 10px;
}
.top-greet {
  font-size: 14px; font-weight: 700; color: var(--t2);
  white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: 160px;
  direction: rtl;
}
.top-settings-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--card-2); border: 1px solid var(--edge);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: .2s; flex-shrink: 0; color: var(--t2);
  -webkit-tap-highlight-color: transparent;
}
.top-settings-btn svg { width: 19px; height: 19px; }
.top-settings-btn:active { transform: scale(.88); background: var(--edge); }

/* ══════════════════════════════════════════════
   SCROLL AREA
══════════════════════════════════════════════ */
.scroll {
  /* overflow-x: clip (not hidden) — `hidden` can still be scrolled programmatically
     via scrollIntoView, which causes the whole screen to drift sideways on mobile.
     `clip` makes the box truly non-scrollable in the inline axis. */
  flex: 1; overflow-y: auto; overflow-x: clip;
  padding: 16px 14px calc(var(--nav-h) + 60px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-y: contain;
  position: relative; z-index: 1;
}
.scroll::-webkit-scrollbar { display: none; }

/* ══════════════════════════════════════════════
   FLOATING BOTTOM NAV
══════════════════════════════════════════════ */
.nav {
  flex-shrink: 0;
  margin: 0 10px calc(14px + env(safe-area-inset-bottom, 0px));
  height: var(--nav-h);
  background: rgba(23,27,33,.94);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--edge-2);
  border-radius: 22px;
  display: flex; padding: 6px 4px;
  z-index: 50;
  box-shadow: 0 14px 34px rgba(0,0,0,.55);
  position: relative;
}
.bot-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px; border-radius: 16px; cursor: pointer;
  transition: .22s cubic-bezier(.2,.8,.2,1);
  position: relative;
  min-height: 44px;
}
.bot-item svg {
  width: 21px; height: 21px;
  stroke: var(--t3); fill: none;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
  transition: .22s;
}
.bot-item span {
  font-size: 10px; font-weight: 700;
  color: var(--t3); transition: .22s;
  letter-spacing: .01em;
}
.bot-item.on          { background: var(--acid); }
.bot-item.on svg      { stroke: #0B0D11; stroke-width: 2.2; }
.bot-item.on span     { color: #0B0D11; font-weight: 800; }
.bot-item:active      { transform: scale(.90); }

/* ══════════════════════════════════════════════
   TAB PANELS
══════════════════════════════════════════════ */
.tab-pnl           { display: none; }
.tab-pnl.on        { display: block; animation: cin .3s cubic-bezier(.2,.8,.2,1); }
@keyframes cin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ══════════════════════════════════════════════
   SHARED
══════════════════════════════════════════════ */
.gc {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
}
.sl {
  font-size: 11px; font-weight: 800; letter-spacing: .06em;
  color: var(--t3); margin: 18px 0 9px;
  text-transform: uppercase; direction: rtl;
}

/* ── Toast ── */
#toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 28px + env(safe-area-inset-bottom, 0px));
  left: 50%; transform: translateX(-50%) translateY(14px);
  background: var(--acid); color: #0B0D11;
  font-size: 13px; font-weight: 800;
  padding: 12px 24px; border-radius: 12px;
  opacity: 0; pointer-events: none;
  transition: .3s; z-index: 80; white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.ok   { background: var(--acid); color: #0B0D11; }
#toast.err  { background: var(--rose); color: #fff; }

/* ══════════════════════════════════════════════
   AUTH SCREEN
══════════════════════════════════════════════ */
#auth-screen {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: #06070A; direction: rtl;
  padding: 20px 16px;
  padding-top: calc(20px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--card); border: 1px solid var(--edge);
  border-radius: 28px; padding: 32px 22px 26px;
  box-shadow: 0 24px 64px rgba(0,0,0,.7);
}
.auth-brand {
  display: flex; flex-direction: column;
  align-items: center; gap: 10px; margin-bottom: 28px;
}
.auth-logo      { height: 72px; width: auto; display: block; border-radius: 16px; }
.auth-brand-sub { font-size: 12px; color: var(--t3); text-align: center; }

.auth-tabs {
  display: flex;
  background: var(--card-2); border: 1px solid var(--edge);
  border-radius: 15px; padding: 4px; margin-bottom: 20px;
}
.auth-tab {
  flex: 1; padding: 11px 0; border-radius: 11px;
  font-size: 14px; font-weight: 700; color: var(--t3);
  cursor: pointer; text-align: center; transition: all .22s;
}
.auth-tab.on { background: var(--surface); color: var(--ink); }

.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-inp {
  width: 100%; background: var(--card-2);
  border: 1.5px solid var(--edge); border-radius: 13px;
  padding: 14px 16px;
  font-family: 'Tajawal', sans-serif; font-size: 15px; font-weight: 500;
  color: var(--ink); outline: none;
  transition: border-color .2s; direction: rtl;
}
.auth-inp::placeholder { color: var(--t3); }
.auth-inp:focus        { border-color: var(--acid); background: var(--surface); }
.auth-inp.bad          { border-color: var(--rose); }

.auth-select {
  width: 100%; background: var(--card-2);
  border: 1.5px solid var(--edge); border-radius: 13px;
  padding: 14px 16px;
  font-family: 'Tajawal', sans-serif; font-size: 15px; font-weight: 500;
  color: var(--ink); outline: none; cursor: pointer;
  direction: rtl; appearance: none; -webkit-appearance: none;
}
.auth-select option { background: var(--card); color: var(--ink); }
.auth-select.bad    { border-color: var(--rose); }

.auth-btn {
  width: 100%; padding: 16px;
  background: var(--acid); color: #0B0D11;
  border: none; border-radius: 14px;
  font-family: 'Tajawal', sans-serif; font-size: 16px; font-weight: 800;
  cursor: pointer; margin-top: 6px; transition: opacity .2s;
}
.auth-btn:disabled             { opacity: .5; cursor: not-allowed; }
.auth-btn:not(:disabled):active{ opacity: .80; transform: scale(.98); }
.auth-err { font-size: 12px; color: var(--rose); text-align: center; min-height: 18px; }

/* ══════════════════════════════════════════════
   LEADERBOARD
══════════════════════════════════════════════ */
.lb-podium {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 10px; padding: 18px 12px 22px;
  background: linear-gradient(160deg, #141c14, #111a0f);
  border: 1px solid rgba(198,242,78,.18);
  border-radius: 20px; margin-bottom: 14px; direction: rtl;
}
.lb-pod-item         { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.lb-pod-item.first   { margin-bottom: 12px; }
.lb-pod-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; font-weight: 800; color: #fff;
  border: 2px solid rgba(255,255,255,.18);
}
.lb-pod-item.first .lb-pod-avatar { width: 70px; height: 70px; border-color: var(--acid); }
.pod-me .lb-pod-avatar             { border-color: #fff; }
.lb-pod-crown  { font-size: 17px; line-height: 1; }
.lb-pod-badge {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; margin-top: -11px;
}
.lb-pod-item.first  .lb-pod-badge { background: var(--acid);  color: #0B0D11; }
.lb-pod-item.second .lb-pod-badge { background: #9AA3B0;       color: #0B0D11; }
.lb-pod-item.third  .lb-pod-badge { background: #CD9060;       color: #fff; }
.lb-pod-name {
  font-size: 12px; font-weight: 700; color: var(--t2);
  text-align: center; max-width: 80px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lb-pod-pts      { font-size: 14px; font-weight: 800; color: var(--acid); }
.lb-pod-pts span { font-size: 10px; font-weight: 500; color: var(--t3); opacity: .8; }

/* List rows */
.lb-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px; margin-bottom: 8px;
  border-radius: 15px; direction: rtl;
  background: var(--card); border: 1px solid var(--edge);
}
.lb-row.me           { border-color: rgba(198,242,78,.35); }
.lb-row.platform-row { background: var(--surface); }
.lb-rank {
  font-size: 13px; font-weight: 800; color: var(--t3);
  width: 24px; text-align: center; flex-shrink: 0; direction: ltr;
}
.lb-avatar {
  width: 38px; height: 38px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.lb-name      { font-size: 14px; font-weight: 700; color: var(--ink); }
.lb-team      { font-size: 11px; color: var(--t3); margin-top: 2px; }
.lb-pts       { font-size: 17px; font-weight: 800; color: var(--ink); flex-shrink: 0; direction: ltr; }
.lb-pts-lbl   { font-size: 10px; color: var(--t3); text-align: center; }
.lb-me-tag {
  font-size: 10px; font-weight: 800; color: var(--acid);
  border: 1px solid var(--acid); border-radius: 100px; padding: 3px 9px; flex-shrink: 0;
}
.lb-platform-tag {
  font-size: 10px; font-weight: 800; color: #5AC8FA;
  border: 1px solid #5AC8FA; border-radius: 100px; padding: 3px 9px; flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   ROUND CHIPS
══════════════════════════════════════════════ */
.rnd-chips {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 4px 0 16px; scrollbar-width: none; direction: rtl;
}
.rnd-chips::-webkit-scrollbar { display: none; }

.rnd-chip {
  flex-shrink: 0; font-size: 13px; font-weight: 700;
  padding: 10px 18px; border-radius: 13px;
  background: var(--card); border: 1px solid var(--edge);
  color: var(--t2); white-space: nowrap; cursor: pointer; transition: .2s;
  min-height: 44px; display: flex; align-items: center;
}
.rnd-chip.on      { background: var(--acid); color: #0B0D11; border-color: transparent; font-weight: 800; }
.rnd-chip.locked  { opacity: .45; }
.rnd-chip:active  { transform: scale(.94); }

.rnd-chip .live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--acid); display: inline-block;
  margin-left: 6px; vertical-align: middle;
  animation: pl 1.8s infinite;
}
@keyframes pl { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* ══════════════════════════════════════════════
   DAY HEADER
══════════════════════════════════════════════ */
.day-header {
  display: flex; align-items: center; gap: 10px;
  margin: 20px 0 10px;
  font-size: 12px; font-weight: 800;
  color: var(--t2); letter-spacing: .04em;
}
.day-header::before,
.day-header::after {
  content: ""; flex: 1; height: 1px;
  background: var(--edge);
}
.day-header:first-child { margin-top: 4px; }

/* ── Locked-round notice ── */
.round-locked-notice {
  display: flex; align-items: center; gap: 10px;
  margin: 4px 0 16px;
  padding: 12px 16px; border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  font-size: 13px; font-weight: 600;
  color: var(--t2); direction: rtl;
}
.round-locked-notice svg {
  width: 18px; height: 18px; flex-shrink: 0;
  stroke: var(--t2);
}

/* ── Inline leaderboard header ── */
.lb-inline-hd {
  display: flex; align-items: center; gap: 9px;
  margin: 28px 0 8px;
  font-size: 16px; font-weight: 800;
  color: var(--acid);
}
.lb-inline-hd svg {
  width: 19px; height: 19px;
  stroke: var(--acid); stroke-width: 2.1; flex-shrink: 0;
}

/* ══════════════════════════════════════════════
   FIXTURE CARD
══════════════════════════════════════════════ */
.fx-card {
  padding: 14px 14px 12px; margin-bottom: 10px;
  border-radius: 16px; direction: ltr;
  position: relative; overflow: hidden;
  transition: border-color .25s;
}
.fx-card.saved { border-color: rgba(198,242,78,.34); }
.fx-card.saved::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--acid);
}

.fx-teams {
  display: flex; align-items: center;
  justify-content: space-between; gap: 4px;
}
.fx-team {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  flex: 1; min-width: 0; overflow: hidden;
}
.team-logo {
  width: 42px; height: 42px; border-radius: 50%;
  object-fit: contain; background: var(--card-2);
  display: block; border: 1px solid var(--edge);
  flex-shrink: 0;
}
.team-logo-fb {
  width: 42px; height: 42px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.fx-tname {
  font-size: 11.5px; font-weight: 700; color: var(--t2);
  text-align: center; line-height: 1.3;
  direction: rtl;
  /* Allow 2-line wrap — safer than nowrap+ellipsis in flex-column */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
  word-break: break-word;
}
.fx-mid {
  /* Fixed width so teams always get equal space regardless of date string length */
  width: 108px; flex-shrink: 0; min-width: 0;
  text-align: center; padding: 0 4px;
  display: flex; flex-direction: column;
  align-items: center; gap: 3px;
}
.fx-time-line  {
  font-size: 10.5px; color: var(--t3);
  direction: rtl; font-weight: 600;
  /* Allow wrapping — date strings are long in Arabic */
  white-space: normal; word-break: keep-all;
  line-height: 1.35;
}
.fx-vs         { font-size: 12px; font-weight: 700; color: var(--t3); }
.fx-live       { font-size: 11px; font-weight: 800; color: var(--acid); }
.fx-score-actual { font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: 1.5px; }
.fx-countdown  { font-size: 11px; font-weight: 800; color: var(--amber); direction: rtl; }
.fx-close-note { font-size: 11px; color: var(--t3); direction: rtl; }

/* ── Prediction row ── */
.pred-row {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; margin-top: 14px;
}
.pred-dash { font-size: 22px; font-weight: 300; color: var(--t3); }

/* ── Stepper ── */
.stepper {
  display: flex; align-items: center;
  background: var(--card-2); border: 1px solid var(--edge-2);
  border-radius: 11px; overflow: hidden;
}
.stepper-btn {
  /* Visual size: 38×44. Touch size padded to 44px min via parent height */
  width: 38px; height: 44px;
  background: none; border: none; color: var(--t2);
  font-size: 22px; font-weight: 400; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .14s, color .14s;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.stepper-btn:active { background: var(--acid); color: #0B0D11; transform: scale(.88); }
.stepper-inp {
  width: 38px; height: 44px;
  background: none; border: none;
  font-family: 'Space Grotesk', 'Tajawal', sans-serif;
  font-size: 19px; font-weight: 700; color: var(--ink);
  text-align: center; outline: none;
  -moz-appearance: textfield;
  flex-shrink: 0;
}
.stepper-inp::-webkit-outer-spin-button,
.stepper-inp::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper-inp:disabled { opacity: .35; cursor: not-allowed; }

.pred-status {
  margin-top: 8px; text-align: center;
  font-size: 12px; color: var(--t3); direction: rtl;
}
.pred-hint { color: var(--acid); opacity: .7; }

/* ── Locked result rows ── */
.pred-result-row {
  display: flex; align-items: center; gap: 8px;
  margin-top: 10px; padding: 8px 0;
  border-top: 1px solid var(--edge); direction: rtl;
}
.pred-result-row + .pred-result-row { margin-top: 4px; border-top: none; padding-top: 0; }
.pred-label { font-size: 11px; color: var(--t3); font-weight: 700; flex-shrink: 0; }
.pred-score { font-size: 15px; font-weight: 800; color: var(--ink); flex: 1; }

.platform-pred {
  background: rgba(90,200,250,.07);
  border-radius: 10px; padding: 6px 10px;
  border-top: none !important;
}
.platform-pred .pred-label { color: #5AC8FA; }

/* ── Points badges ── */
.pts-badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 10px; border-radius: 100px;
  font-weight: 800; font-size: 11px; flex-shrink: 0;
}
.pts-3 { background: var(--acid-dim);  color: var(--acid);  border: 1px solid rgba(198,242,78,.28); }
.pts-1 { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(255,184,77,.26); }
.pts-0 { background: var(--rose-dim);  color: var(--rose);  border: 1px solid rgba(255,107,107,.22); }

.locked-badge {
  font-size: 11px; color: var(--t3);
  background: var(--card-2); border: 1px solid var(--edge);
  border-radius: 100px; padding: 5px 14px; display: inline-block;
}

/* ══════════════════════════════════════════════
   SETTINGS
══════════════════════════════════════════════ */
.sett-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 16px; margin-bottom: 8px;
  border-radius: 15px; direction: rtl; gap: 12px;
}
.sett-label { font-size: 12px; color: var(--t3); margin-bottom: 3px; }
.sett-value { font-size: 14px; font-weight: 700; color: var(--ink); }
.sett-edit-btn {
  background: var(--card-2); border: 1px solid var(--edge);
  border-radius: 11px; padding: 9px 16px;
  font-family: 'Tajawal', sans-serif; font-size: 12px; font-weight: 700;
  color: var(--t2); cursor: pointer; transition: all .2s;
  white-space: nowrap; flex-shrink: 0;
  min-height: 40px;
}
.sett-edit-btn:active { border-color: var(--acid); color: var(--acid); }

.logout-btn {
  width: 100%; padding: 15px;
  background: var(--rose-dim); border: 1.5px solid rgba(255,107,107,.22);
  border-radius: 15px;
  font-family: 'Tajawal', sans-serif;
  font-size: 14px; font-weight: 800; color: var(--rose);
  cursor: pointer; margin-top: 10px; transition: background .2s;
  direction: rtl;
}
.logout-btn:active { background: rgba(255,107,107,.22); }

.inline-edit {
  padding: 15px 16px; margin-bottom: 8px;
  border-radius: 15px; direction: rtl;
}
.inline-edit .auth-inp { margin-bottom: 10px; }
.inline-edit .ie-btns  { display: flex; gap: 10px; }
.ie-save {
  flex: 1; padding: 12px; background: var(--acid); color: #0B0D11;
  border: none; border-radius: 11px;
  font-family: 'Tajawal', sans-serif; font-size: 14px; font-weight: 800;
  cursor: pointer; min-height: 46px;
}
.ie-cancel {
  flex: 1; padding: 12px; background: var(--card-2); border: 1px solid var(--edge);
  border-radius: 11px;
  font-family: 'Tajawal', sans-serif; font-size: 14px; font-weight: 700;
  color: var(--t2); cursor: pointer; min-height: 46px;
}

/* ══════════════════════════════════════════════
   SKELETON
══════════════════════════════════════════════ */
.skel {
  background: linear-gradient(90deg, var(--card-2) 25%, var(--card) 50%, var(--card-2) 75%);
  background-size: 200% 100%;
  animation: sk 1.4s infinite; border-radius: 12px;
}
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Empty state ── */
.empty-state {
  text-align: center; padding: 52px 16px;
  color: var(--t3); font-size: 14px; line-height: 1.8; direction: rtl;
}

/* ── Lock icon inside chip ── */
.chip-lock {
  width: 11px; height: 11px;
  display: inline-block; vertical-align: middle;
  margin-left: 5px; margin-bottom: 1px;
  stroke: currentColor; stroke-width: 2;
  opacity: .6;
}

/* ── Leaderboard accuracy + cups ── */
.lb-meta {
  font-size: 11px; color: var(--t3); margin-top: 2px;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.lb-acc {
  background: var(--acid-dim); color: var(--acid);
  border-radius: 6px; padding: 2px 7px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.lb-cups  { font-size: 12px; line-height: 1; }
.pred-err { color: #FF6B6B !important; }
.lb-pts-col {
  text-align: center; flex-shrink: 0;
}

/* Full leaderboard tab helpers */
.lbf-mid  { flex: 1; min-width: 0; direction: rtl; }
.lbf-rank { font-size: 19px; width: 30px; text-align: center; flex-shrink: 0; }
.lbf-team { font-size: 11px; color: var(--t3); }

/* Clickable leaderboard row */
.lb-clickable { cursor: pointer; transition: border-color .15s; }
.lb-clickable:active { border-color: var(--acid); transform: scale(.98); }

/* ══════════════════════════════════════════════
   PLAYER PROFILE OVERLAY
══════════════════════════════════════════════ */
#player-overlay {
  position: fixed; inset: 0; z-index: 130;
  background: rgba(0,0,0,.55); backdrop-filter: blur(6px);
  display: flex; flex-direction: column; justify-content: flex-end;
  opacity: 0; pointer-events: none;
  transition: opacity .28s;
}
#player-overlay.open { opacity: 1; pointer-events: all; }

#player-sheet {
  background: var(--bg);
  border-radius: 22px 22px 0 0;
  max-height: 88dvh;
  display: flex; flex-direction: column;
  transform: translateY(48px);
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 -8px 40px rgba(0,0,0,.5);
}
#player-overlay.open #player-sheet { transform: translateY(0); }

/* Drag handle */
.psh-handle {
  width: 38px; height: 4px; border-radius: 2px;
  background: var(--edge); margin: 12px auto 0;
  flex-shrink: 0;
}

.psh-header {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px 12px; border-bottom: 1px solid var(--edge);
  direction: rtl; flex-shrink: 0;
}
.psh-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.psh-info    { flex: 1; min-width: 0; }
.psh-name    { font-size: 16px; font-weight: 800; color: var(--ink); }
.psh-meta    { font-size: 12px; color: var(--t3); margin-top: 2px; }
.psh-close   {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--card-2); border: 1px solid var(--edge);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--t2); font-size: 15px; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

/* Round selector bar */
.psh-rounds {
  display: flex; gap: 8px;
  padding: 10px 16px 8px;
  overflow-x: auto; flex-shrink: 0;
  border-bottom: 1px solid var(--edge);
  scrollbar-width: none;
}
.psh-rounds::-webkit-scrollbar { display: none; }

.prnd-chip {
  padding: 7px 16px; border-radius: 20px;
  font-family: 'Tajawal', sans-serif;
  font-size: 13px; font-weight: 700;
  white-space: nowrap; cursor: pointer; flex-shrink: 0;
  background: var(--card-2); border: 1.5px solid var(--edge); color: var(--t2);
  transition: all .18s; -webkit-tap-highlight-color: transparent;
}
.prnd-chip.on { background: var(--acid); color: #0B0D11; border-color: var(--acid); }

/* Scrollable body */
.psh-body {
  flex: 1; overflow-y: auto; padding: 12px 14px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}
.psh-body .fx-card { margin-bottom: 10px; }

/* No participation badge tweak for player overlay */
.psh-no-pred {
  text-align: center; padding: 10px 0 6px;
}
.psh-no-pred span {
  font-size: 11px; color: var(--t3);
  background: var(--card-2); border: 1px solid var(--edge);
  border-radius: 100px; padding: 5px 14px; display: inline-block;
}

/* ══════════════════════════════════════════════
   CUP BRACKET
══════════════════════════════════════════════ */
.cup-round-header {
  display: flex; align-items: center; gap: 8px;
  margin: 20px 0 9px;
}
.cup-round-label  { font-size: 14px; font-weight: 800; color: var(--ink); flex: 1; }
.cup-round-status {
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 100px;
}
.cup-round-status.done    { background: var(--acid-dim);  color: var(--acid); }
.cup-round-status.active  { background: var(--amber-dim); color: var(--amber); }
.cup-round-status.pending { background: var(--card-2);    color: var(--t3); }
.cup-round-gr {
  font-size: 11px; color: var(--t3); font-weight: 700;
  background: var(--card-2); padding: 4px 9px; border-radius: 8px;
}

/* Match card */
.cup-match {
  padding: 11px 14px; margin-bottom: 9px; border-radius: 15px;
  display: flex; flex-direction: column; gap: 0;
}
.cup-match.cup-me { border-color: rgba(198,242,78,.3); }

.cup-player {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 0;
}
.cup-player + .cup-player { border-top: 1px solid var(--edge); }
.cup-player.winner .cup-av   { box-shadow: 0 0 0 2px var(--acid); }
.cup-player.winner .cup-pname { color: var(--acid); }
.cup-player.loser { opacity: .45; }

.cup-av {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.cup-pname {
  flex: 1; font-size: 14px; font-weight: 700; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cup-pts {
  font-size: 16px; font-weight: 800; color: var(--t2);
  min-width: 28px; text-align: center; direction: ltr;
}
.cup-vs {
  font-size: 10px; font-weight: 700; color: var(--t3);
  text-align: center; padding: 0 4px; direction: rtl;
}
.cup-bye-badge {
  font-size: 11px; color: var(--acid);
  background: var(--acid-dim); border-radius: 100px;
  padding: 5px 14px; align-self: center; margin-top: 4px;
}

/* Champion banner */
.cup-champion {
  padding: 24px 16px; margin-bottom: 14px;
  text-align: center; border-radius: 20px;
  background: linear-gradient(140deg, #141c14, #0f1809);
  border-color: rgba(198,242,78,.3) !important;
  direction: rtl;
}
.cup-champ-crown { font-size: 36px; margin-bottom: 8px; }
.cup-champ-title { font-size: 12px; color: var(--t3); margin-bottom: 5px; font-weight: 700; }
.cup-champ-name  { font-size: 22px; font-weight: 800; color: var(--acid); }

/* Past champion row */
.champ-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 8px; border-radius: 14px;
  direction: rtl;
}
.champ-badge {
  font-size: 11px; font-weight: 800; color: var(--amber);
  background: var(--amber-dim); border-radius: 8px; padding: 3px 9px; flex-shrink: 0;
}
.champ-avatar {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff;
}
.champ-name   { flex: 1; font-size: 14px; font-weight: 700; color: var(--ink); }
.champ-trophy { font-size: 16px; flex-shrink: 0; }

/* ══════════════════════════════════════════════
   CUP PANEL — empty state
══════════════════════════════════════════════ */
.cup-coming {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 60px 24px 40px;
  direction: rtl;
}
.cup-icon {
  width: 100px; height: 100px;
  background: rgba(198,242,78,.06);
  border: 1px solid rgba(198,242,78,.18);
  border-radius: 32px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
}
.cup-icon svg { width: 60px; height: 60px; }
.cup-coming-title {
  font-size: 23px; font-weight: 800; color: var(--ink);
  margin-bottom: 12px; letter-spacing: -.01em;
}
.cup-coming-sub {
  font-size: 14px; color: var(--t3); line-height: 1.8;
}

/* ══════════════════════════════════════════════
   CUP RULES — collapsible
══════════════════════════════════════════════ */
.cup-rules-details {
  margin: 8px 0 24px;
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}
.cup-rules-summary {
  display: flex; align-items: center; gap: 9px;
  padding: 16px 16px;
  font-size: 14px; font-weight: 700; color: var(--t2);
  cursor: pointer; list-style: none; user-select: none;
  direction: rtl; min-height: 50px;
}
.cup-rules-summary::-webkit-details-marker { display: none; }
.cup-rules-details[open] .cup-rules-summary { color: var(--ink); border-bottom: 1px solid var(--edge); }
.cup-rules-icon    { width: 17px; height: 17px; flex-shrink: 0; color: var(--acid); }
.cup-rules-chevron { width: 17px; height: 17px; flex-shrink: 0; margin-right: auto; transition: transform .2s; }
.cup-rules-details[open] .cup-rules-chevron { transform: rotate(180deg); }
.cup-rules-body { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 0; }
.cup-rule-section { padding: 14px 0; border-bottom: 1px solid var(--edge); direction: rtl; }
.cup-rule-section:last-child { border-bottom: none; padding-bottom: 0; }
.cup-rule-title { font-size: 14px; font-weight: 800; color: var(--ink); margin-bottom: 6px; }
.cup-rule-desc  { font-size: 13px; color: var(--t2); line-height: 1.85; }

/* ══════════════════════════════════════════════
   RULES PANEL
══════════════════════════════════════════════ */
.rules-hero {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  padding: 28px 16px 24px;
  direction: rtl;
}
.rules-hero-icon  { font-size: 40px; margin-bottom: 12px; line-height: 1; }
.rules-hero-title { font-size: 22px; font-weight: 800; color: var(--ink); margin-bottom: 5px; }
.rules-hero-sub   { font-size: 13px; color: var(--t3); }

.rules-section-title {
  font-size: 13px; font-weight: 800; color: var(--t2);
  letter-spacing: .04em; margin: 20px 0 10px;
  direction: rtl;
}

/* Points card */
.rules-card { padding: 4px 0; margin-bottom: 10px; }
.rules-pts-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; direction: rtl;
}
.rules-pts-badge {
  width: 46px; height: 46px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 800; flex-shrink: 0;
}
.rules-pts-badge.pts-3 { background: var(--acid-dim);  color: var(--acid);  border: 1.5px solid rgba(198,242,78,.28); }
.rules-pts-badge.pts-1 { background: var(--amber-dim); color: var(--amber); border: 1.5px solid rgba(255,184,77,.26); }
.rules-pts-badge.pts-0 { background: var(--rose-dim);  color: var(--rose);  border: 1.5px solid rgba(255,107,107,.22); }
.rules-pts-info    { flex: 1; }
.rules-pts-label   { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 3px; }
.rules-pts-desc    { font-size: 12px; color: var(--t3); line-height: 1.55; }
.rules-divider     { height: 1px; background: var(--edge); margin: 0 16px; }

/* Steps card */
.rules-steps { padding: 8px 0; margin-bottom: 10px; }
.rules-step {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 16px; direction: rtl;
}
.rules-step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--acid-dim); border: 1.5px solid rgba(198,242,78,.28);
  color: var(--acid); font-size: 14px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.rules-step-text  { flex: 1; }
.rules-step-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.rules-step-desc  { font-size: 12px; color: var(--t3); line-height: 1.6; }
.rules-step-sep   { height: 1px; background: var(--edge); margin: 0 16px; }

/* Info block */
.rules-info {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 17px; margin-bottom: 10px; direction: rtl;
}
.rules-info-icon  { font-size: 28px; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.rules-info-text  { flex: 1; }
.rules-info-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.rules-info-desc  { font-size: 13px; color: var(--t3); line-height: 1.7; }
.rules-info-desc strong { color: var(--acid); font-weight: 700; }

/* ══════════════════════════════════════════════
   SMALL SCREENS  (≤ 360px width)
══════════════════════════════════════════════ */
@media (max-width: 360px) {
  .scroll { padding-left: 11px; padding-right: 11px; }
  .fx-card { padding: 12px 11px 10px; }
  .stepper-btn { width: 40px; }
  .stepper-inp { width: 38px; font-size: 20px; }
  .rnd-chip { padding: 9px 14px; font-size: 12px; }
  .top-greet { max-width: 110px; font-size: 13px; }
  .bot-item span { font-size: 9px; }
}

/* ══════════════════════════════════════════════
   REDUCED MOTION
══════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
