/* لمسة الشراكة — الشاشة الرئيسية */
:root { color-scheme: dark; --ease: cubic-bezier(.55, 0, .2, 1); }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; }
body.nocur { cursor: none; }
#root { position: absolute; left: 0; top: 0; overflow: hidden; transform-origin: 0 0; background: #000; color: var(--tc, #fff);
  font-family: var(--tf, "Tajawal"), "Tajawal", system-ui, sans-serif; --U: 1080px; }
.lay { position: absolute; inset: 0; pointer-events: none; }
#bgImg, #bgVid { width: 100%; height: 100%; object-fit: cover; display: none; }
#dim { background: #000; opacity: 0; }
#gl { width: 100%; height: 100%; display: block; }
#gl.screen { mix-blend-mode: screen; }
#vig { background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, .92) 100%); }
#fx { width: 100%; height: 100%; z-index: 7; }

/* ---------- فوق: الشعار والعنوان ---------- */
#top { position: absolute; left: 0; right: 0; top: calc(var(--U) * .035); z-index: 4; display: flex; flex-direction: column; align-items: center; gap: calc(var(--U) * .012);
  text-align: center; transition: opacity .8s, transform .8s var(--ease); }
#logo { height: calc(var(--U) * var(--ls, .11)); max-width: 60%; object-fit: contain; display: none; filter: drop-shadow(0 0 calc(var(--U) * .02) rgba(0, 0, 0, .5)); }
#logoTxt { font: 700 calc(var(--U) * var(--ls, .11) * .55) "Chakra Petch", "Orbitron", sans-serif; letter-spacing: .16em; display: none; }
#title { font-family: var(--hf), "Alexandria", sans-serif; font-weight: 800; font-size: calc(var(--U) * var(--ts, .062)); line-height: 1.25; text-shadow: 0 0 .5em rgba(0, 0, 0, .7); unicode-bidi: plaintext; }
#title2 { font: 600 calc(var(--U) * var(--ts, .062) * .34) "Chakra Petch", "Orbitron", sans-serif; letter-spacing: .5em; opacity: .9; color: var(--ac); direction: ltr; margin-top: calc(var(--U) * -.006); padding-left: .42em; }
.notitle #title, .notitle #title2 { display: none; }

/* ---------- الوسط: الرقم ---------- */
#mid { position: absolute; z-index: 4; transform: translate(-50%, -50%); display: grid; place-items: center; text-align: center; }
#num { grid-area: 1/1; font-family: var(--nf), "Orbitron", sans-serif; font-weight: 700; font-size: calc(var(--R2) * var(--nk, .3)); line-height: 1; direction: ltr;
  font-variant-numeric: tabular-nums; color: var(--ac); text-shadow: 0 0 .25em var(--acg), 0 0 .7em var(--acg2); transition: opacity .7s, transform .9s var(--ease); white-space: nowrap; }
#num small { font-size: .36em; font-weight: 600; margin-left: .08em; opacity: .85; }
#num.idle { opacity: .34; }
#fallring { grid-area: 1/1; width: var(--R2); height: var(--R2); border-radius: 50%; display: none; }
.nogl #fallring { display: block; }
#doneBox { grid-area: 1/1; opacity: 0; transform: scale(.8); transition: opacity .9s, transform 1.1s var(--ease); display: flex; flex-direction: column; align-items: center; max-width: calc(var(--R2) * .92); }
#done1 { font-family: var(--hf), "Alexandria", sans-serif; font-weight: 800; font-size: calc(var(--U) * var(--ds, .13)); line-height: 1.15; color: #fff; text-shadow: 0 0 .3em var(--acg), 0 0 .9em var(--acg2); unicode-bidi: plaintext; }
#done2 { font: 600 calc(var(--U) * var(--ds, .13) * .2) "Chakra Petch", "Orbitron", sans-serif; letter-spacing: .38em; padding-left: .38em; color: var(--ac); direction: ltr; margin-top: .5em; }
.done #num { opacity: 0; transform: scale(1.5); }
.done #doneBox { opacity: 1; transform: none; }

/* ---------- تحت الدائرة: الحالة ---------- */
#status { position: absolute; z-index: 4; left: 0; right: 0; text-align: center; font-size: calc(var(--U) * var(--xs, .034)); font-weight: 600; line-height: 1.4;
  text-shadow: 0 0 .6em rgba(0, 0, 0, .8); transition: opacity .5s; unicode-bidi: plaintext; padding: 0 6%; }
#status.sw { opacity: 0; }
#status .dots i { display: inline-block; width: .22em; height: .22em; margin: 0 .09em; border-radius: 50%; background: currentColor; animation: ctDot 1.2s infinite both; }
#status .dots i:nth-child(2) { animation-delay: .2s; } #status .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes ctDot { 0%, 80%, 100% { opacity: .2; transform: scale(.7); } 40% { opacity: 1; transform: scale(1.15); } }
.done #status { color: var(--ac); font-weight: 700; font-size: calc(var(--U) * var(--xs, .034) * 1.25); }

/* ---------- الطرفان ---------- */
.node { position: absolute; z-index: 4; transform: translate(-50%, -50%); width: var(--N2); height: var(--N2); transition: opacity .6s; }
.nosides .node { opacity: 0; }
.node .disc { width: 100%; height: 100%; border-radius: 50%; box-sizing: border-box; background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .1), rgba(5, 8, 14, .72) 70%);
  border: calc(var(--N2) * .014) solid var(--nc); display: grid; place-items: center; overflow: hidden; opacity: .62; transition: opacity .5s, box-shadow .5s, transform .5s var(--ease);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.node.on .disc { opacity: 1; box-shadow: 0 0 calc(var(--N2) * .22) var(--ncg), inset 0 0 calc(var(--N2) * .18) var(--ncg); transform: scale(1.05); }
.node img { max-width: 66%; max-height: 66%; object-fit: contain; display: none; }
.node .ini { font: 800 calc(var(--N2) * .36) "Alexandria", "Chakra Petch", sans-serif; color: var(--nc); }
.node .nm { position: absolute; top: calc(100% + var(--U) * .014); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: calc(var(--U) * var(--ns, .03)); font-weight: 700;
  text-shadow: 0 0 .6em rgba(0, 0, 0, .9); unicode-bidi: plaintext; }
.node .ok { position: absolute; top: calc(100% + var(--U) * .014 + var(--U) * var(--ns, .03) * 1.7); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: calc(var(--U) * var(--ns, .03) * .62);
  color: var(--nc); opacity: 0; transition: opacity .4s; letter-spacing: .04em; }
.node.on .ok { opacity: 1; }

/* ---------- التوقيع والمعلومات ---------- */
.credit { position: absolute; left: 0; right: 0; bottom: calc(var(--U) * .016); z-index: 6; text-align: center; pointer-events: none; font-size: calc(var(--U) * .016 * var(--cs, 1)); opacity: .9; transition: opacity .5s; }
.credit .inact { display: block; height: 2.4em; width: auto; margin: 0 auto; filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .45)); }
.nocredit .credit { opacity: 0; }
#info { position: fixed; left: 10px; top: 10px; z-index: 50; background: rgba(0, 0, 0, .75); color: #9f9; font: 12px/1.5 ui-monospace, Menlo, monospace; padding: 8px 12px; border-radius: 8px;
  white-space: pre; direction: ltr; display: none; }
#info.on { display: block; }

/* ---------- الإطار التقني (HUD) ---------- */
#hudT { position: absolute; left: 50%; top: calc(50% + var(--R2) * .19); transform: translateX(-50%); white-space: nowrap; font: 600 calc(var(--R2) * .042) "Chakra Petch", "Orbitron", monospace; letter-spacing: .28em; padding-left: .28em;
  color: var(--ac); opacity: .7; direction: ltr; font-variant-numeric: tabular-nums; transition: opacity .5s; }
.done #hudT, .nohud #hudT { opacity: 0; }
.cor { position: absolute; z-index: 5; width: calc(var(--U) * .05); height: calc(var(--U) * .05); border: calc(var(--U) * .0028) solid var(--ac); opacity: .75; pointer-events: none;
  filter: drop-shadow(0 0 calc(var(--U) * .008) var(--acg)); }
.cor.tl { left: calc(var(--U) * .028); top: calc(var(--U) * .028); border-right: 0; border-bottom: 0; }
.cor.tr { right: calc(var(--U) * .028); top: calc(var(--U) * .028); border-left: 0; border-bottom: 0; }
.cor.bl { left: calc(var(--U) * .028); bottom: calc(var(--U) * .028); border-right: 0; border-top: 0; }
.cor.br { right: calc(var(--U) * .028); bottom: calc(var(--U) * .028); border-left: 0; border-top: 0; }
.hudtag { position: absolute; z-index: 5; bottom: calc(var(--U) * .036); font: 600 calc(var(--U) * .0135) "Chakra Petch", "Orbitron", monospace; letter-spacing: .3em; color: var(--ac); opacity: .7; direction: ltr; white-space: nowrap; }
.hudtag.l { left: calc(var(--U) * .1); } .hudtag.r { right: calc(var(--U) * .1); }
.nohud .cor, .nohud .hudtag { display: none; }
