html, body { margin: 0; height: 100%; background: #140E12; overflow: hidden; }
#stage { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; transform-origin: 0 0; overflow: hidden; background: #140E12; color: #F7EDE4; font-family: 'IBM Plex Sans Arabic', sans-serif; }
.d { font-family: Alexandria, sans-serif; }
.abs { position: absolute; }
.logo { position: absolute; top: 48px; right: 96px; font-family: Alexandria, sans-serif; font-weight: 900; font-size: 34px; color: #F3C66B; }

@keyframes hover { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes ring { 0%,100% { outline-color: rgba(243,198,107,1); } 50% { outline-color: rgba(243,198,107,.45); } }
@keyframes flick { 0%,100% { transform: scaleY(1) scaleX(1); } 30% { transform: scaleY(1.07) scaleX(.97); } 60% { transform: scaleY(.96) scaleX(1.03); } }
@keyframes rise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-380px); opacity: 0; } }
@keyframes pop { 0% { transform: scale(.5); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@keyframes cheer { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-22px) rotate(3deg); } }
@keyframes burst { 0% { transform: translate(0,0) scale(1); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(var(--dx), -480px) scale(.3); opacity: 0; } }
@keyframes float { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-14px) rotate(1deg); } }
@keyframes fadein { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.screen { position: absolute; inset: 0; animation: fadein .35s ease both; }
.hover { animation: hover 2.4s ease-in-out infinite; }
.pop { animation: pop .45s cubic-bezier(.2,.9,.3,1.3) both; }
.flick { animation: flick 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.ember { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #FF9A5C; animation: rise 5s linear infinite; }
.spark { position: absolute; width: 8px; height: 8px; border-radius: 50%; animation: burst 3.6s ease-out infinite; }
.glow { position: absolute; border-radius: 50%; pointer-events: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 14px; height: 80px; padding: 0 40px; border-radius: 999px; background: #211820; color: #F7EDE4; font-size: 26px; font-weight: 600; box-sizing: border-box; border: 3px solid transparent; }
.btn.primary { background: #F3C66B; color: #1A1216; font-family: Alexandria, sans-serif; font-weight: 800; font-size: 30px; padding: 0 44px 0 16px; }
.btn .ok { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: #1A1216; color: #F3C66B; font-size: 18px; font-weight: 700; font-family: 'IBM Plex Sans Arabic', sans-serif; }
.focus { outline: 5px solid #F3C66B; outline-offset: 6px; animation: ring 1.4s ease-in-out infinite; }
.dim { opacity: .35; }

/* شريط اللاعبين */
.host { position: absolute; top: 18px; width: 90px; display: flex; flex-direction: column; align-items: center; transition: left .7s cubic-bezier(.3,1.4,.5,1); }
.pills { position: absolute; top: 120px; left: 0; right: 0; display: flex; justify-content: center; gap: 60px; }
.pill { width: 360px; height: 96px; border-radius: 999px; box-sizing: border-box; display: flex; align-items: center; gap: 16px; padding: 0 12px 0 28px; border: 4px solid transparent; background: #211820; transition: transform .35s cubic-bezier(.2,1.4,.4,1), background-color .25s, border-color .25s; }
.pill .av { width: 70px; height: 70px; border-radius: 50%; background: #1A1216; padding: 6px; box-sizing: border-box; flex-shrink: 0; }
.pill .nm { font-size: 32px; font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill .sc { font-family: Alexandria, sans-serif; font-weight: 800; font-size: 38px; }
.info { position: absolute; top: 246px; left: 0; right: 0; display: flex; justify-content: center; gap: 12px; }
.chip { background: #211820; border-radius: 999px; padding: 10px 26px; font-size: 26px; font-weight: 600; }
.chip.gold { background: #F3C66B; color: #1A1216; font-family: Alexandria, sans-serif; font-weight: 800; }
.side { position: absolute; top: 420px; width: 210px; display: flex; flex-direction: column; gap: 14px; }
.hp { height: 76px; border-radius: 22px; display: flex; align-items: center; justify-content: center; font-size: 25px; font-weight: 700; box-sizing: border-box; background: #211820; border: 2px solid; }
.hp.used { background: transparent; opacity: .25; }
.card { position: absolute; top: 330px; left: 330px; right: 330px; height: 550px; background: #211820; border-radius: 48px; box-sizing: border-box; padding: 56px 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; text-align: center; box-shadow: 0 30px 60px rgba(0,0,0,.35); }
.timer { position: absolute; bottom: 36px; left: 895px; width: 130px; height: 130px; }
.timer .n { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: Alexandria, sans-serif; font-weight: 900; font-size: 46px; }

/* لوحة سين جيم */
.board { position: absolute; top: 290px; right: 330px; left: 330px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.col { display: flex; flex-direction: column; gap: 12px; }
.cat { height: 104px; border-radius: 22px; background: #211820; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; font-family: Alexandria, sans-serif; font-weight: 800; font-size: 26px; text-align: center; padding: 0 8px; }
.cat i { position: absolute; bottom: 0; left: 0; right: 0; height: 6px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.cell { height: 118px; border-radius: 22px; display: flex; align-items: center; justify-content: center; font-family: Alexandria, sans-serif; font-weight: 800; font-size: 38px; box-sizing: border-box; background: #2B2029; color: #F3C66B; transition: transform .15s; }
.cell.done { background: transparent; border: 2px solid #231A20; color: #3E3138; }
.cell.focus { background: #F3C66B; color: #1A1216; transform: scale(1.05); }

/* الصالة */
.gcard { display: flex; flex-direction: column; gap: 12px; flex-shrink: 0; width: 300px; transition: transform .2s; }
.gcard .art { width: 300px; height: 180px; border-radius: 24px; background: #2E2614; overflow: hidden; box-sizing: border-box; }
.gcard .t { font-size: 24px; font-weight: 700; }
.gcard.on { transform: translateY(-8px); }
.gcard.on .t { color: #F3C66B; }
.gcard.soon .art { background: #1C1419; }
.gcard.soon .t { color: #7E6C70; }

.overlay { position: absolute; inset: 0; background: rgba(10,6,8,.82); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 36px; z-index: 20; }
.toast { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); background: #2B2029; border-radius: 999px; padding: 12px 28px; font-size: 22px; color: #B9A79F; z-index: 30; }
[data-ok],[data-j],[data-ci],[data-h],[data-c]{cursor:pointer}
.cell.off:not(.done) { opacity: .38; }
.exit { position: absolute; top: 44px; left: 72px; height: 56px; padding: 0 28px; display: inline-flex; align-items: center; border-radius: 999px; border: 2px solid #3A2C36; color: #B9A79F; font-size: 22px; font-weight: 600; cursor: pointer; }
.exit:hover { color: #F7EDE4; border-color: #5A4752; }
