1. 04 Jun, 2026 1 commit
    • Mahmoud Aglan's avatar
      feat: Ludo multiplayer — 2 humans + 2 bots, matchmaking + realtime sync · d6b1ca39
      Mahmoud Aglan authored
      New API: /api/ludo-match.php
      - queue: searches ludo_queue for opponent, creates match with 2 humans + 2 bots
      - status: polls for match_id when opponent joins
      - move: syncs game state (positions, turn, dice)
      - get: fetches current match state
      
      Ludo game scene updated:
      - Stores mode, myPlayerIndex, matchId, isHost
      - isMyTurn() checks player_index vs current_turn
      - handleNonPlayerTurn(): routes to bot (if host) or polling (if waiting)
      - syncLudoState(): sends positions/turn/dice to server after every move
      - startLudoPolling(): polls every 2s for opponent moves, applies state
      - Bot turns run by host only (prevents duplicate bot moves)
      - Player names show 'أنت' for self, 'لاعب X' for other human, 'Bot X' for bots
      
      Queue scene updated:
      - Uses ludo-match.php endpoint for Ludo games
      - Passes playerIndex and players array to game scene
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      d6b1ca39
  2. 03 Jun, 2026 39 commits
    • Mahmoud Aglan's avatar
      fix: Ludo/Domino multiplayer skips time control (chess-only) · ae7f8586
      Mahmoud Aglan authored
      Only chess shows the time control picker (bullet/blitz/rapid).
      Ludo and Domino go straight to matchmaking queue with 'standard' control.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      ae7f8586
    • Mahmoud Aglan's avatar
      fix: matchmaking — add match_type, initial_time_ms, started_at to match creation · 57d5b88d
      Mahmoud Aglan authored
      ROOT CAUSE: matches table has NOT NULL constraint on 'match_type' column.
      Insert was failing silently, falling through to 'queued: true'.
      
      FIX: Added required fields:
      - match_type: 'rated'
      - initial_time_ms: calculated from time_control
      - white/black_time_remaining_ms: set to initial
      - is_rated: true
      - started_at: current timestamp
      
      Removed debug output.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      57d5b88d
    • Mahmoud Aglan's avatar
      debug: show match insert error · 9c2f1f1d
      Mahmoud Aglan authored
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      9c2f1f1d
    • Mahmoud Aglan's avatar
      9d9d328b
    • Mahmoud Aglan's avatar
    • Mahmoud Aglan's avatar
      fix: realtime chess multiplayer — RLS bypass + live polling + opponent move sync · c37f0571
      Mahmoud Aglan authored
      ROOT CAUSE: Supabase RLS on matchmaking_queue only allowed players to
      see their OWN rows. Player A couldn't find Player B in the queue.
      
      FIX: All matchmaking operations now use service_role key (bypasses RLS):
      - handleQueue: searches ALL waiting players, not just own
      - handleStatus: reads match details with service key
      - handleDequeue: cleans up with service key
      - Random color assignment (50/50 white/black)
      
      Chess game live mode:
      - NEW: sendLiveMove() — sends current FEN + move_count to server after player moves
      - NEW: startLivePolling() — polls match row every 2s for opponent's move
      - NEW: When opponent's move_count increases, loads new FEN and updates board
      - NEW: Detects opponent resign/completion via status field
      - If playing as black in live mode, waits for white's first move
      - stopLivePolling() on game end
      
      Flow:
      1. Player A queues → inserted as 'waiting'
      2. Player B queues → finds Player A, creates match, marks A as 'matched'
      3. Player B gets match_id immediately (they're white or black randomly)
      4. Player A polls status → finds 'matched' → gets match_id + color
      5. Both enter chess-game with mode:'live' + matchId
      6. Each player's moves update the match row
      7. Opponent detects new move_count via polling
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      c37f0571
    • Mahmoud Aglan's avatar
      fix(home): remove empty space, add greeting, better quick-action layout · c21445cb
      Mahmoud Aglan authored
      - Content starts from TOP (justify-content: flex-start) — no more void
      - Player greeting: 'أهلاً [name] 👋' with level display
      - Quick action buttons redesigned: icon circles with labels below
        (Challenges , Season 🎖️, Gift 🎁, Puzzles 🧩)
      - Gift button has breathe-glow animation (attention grabber)
      - Puzzles button added for direct access
      - Game tiles: aspect ratio 1.1 (slightly shorter, fits better)
      - Grid gap reduced to 12px for tighter layout
      - Page scrolls if content overflows
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      c21445cb
    • Mahmoud Aglan's avatar
      feat: wire all engagement features into UI · cc5ca0f9
      Mahmoud Aglan authored
      Home screen:
      - 3 widget buttons above game tiles:  التحديات | 🎖️ الموسم | 🎁 هدية
      - Challenges button → daily-challenges scene
      - Daily reward button → daily-reward scene
      
      Social tab:
      - Added '📰 أخبار' (Activity) as 4th tab
      - Activity tab loads friend timeline from activity API
      - Shows actions with Arabic labels and relative timestamps
      
      All features now accessible from UI:
      - Daily Challenges: Home →  button
      - Battle Pass: Home → 🎖️ button (placeholder)
      - Daily Reward: Home → 🎁 button
      - Activity Feed: Social tab → أخبار tab
      - Rank tiers: Profile → rating section (logic ready)
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      cc5ca0f9
    • Mahmoud Aglan's avatar
      feat: activity feed + battle pass system · e9838deb
      Mahmoud Aglan authored
      Activity Feed (api/activity.php + scenes/activity.js):
      - Fetches friend + self activity from activity_feed table
      - Enriches with actor profile (name, avatar)
      - Timeline UI with action labels in Arabic
      - Relative timestamps
      
      Battle Pass (api/battlepass.php):
      - Season config: 30 tiers, 100 XP per tier
      - Current tier from player total XP
      - Free + premium reward tracks
      - Claim tier endpoint
      - Days remaining counter
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      e9838deb
    • Mahmoud Aglan's avatar
      feat: daily challenges + streak + rank tiers system · 5ade83d4
      Mahmoud Aglan authored
      Daily Challenges (api/challenges.php):
      - GET: returns 3 randomized challenges per day (deterministic per user+date)
      - 10 challenge types: play X games, win X, play specific game, solve puzzles,
        beat bot, claim daily, win streak
      - Rewards scale with player level (+10% coins per level)
      - POST claim: grants coins + XP, records transaction
      - Streak tracking with bonus multiplier
      
      Challenges UI (rewards/scenes/challenges.js):
      - Progress bars per challenge
      - Claim button with coin burst + fly-to-HUD animation
      - Streak badge showing consecutive days
      - Staggered card entrance animation
      - Haptic success on claim
      
      Rank Tiers (rewards/scenes/ranks.js):
      - 7 tiers: Bronze → Silver → Gold → Platinum → Diamond → Master → Grandmaster
      - Rating ranges defined for each tier
      - getTier(), getTierProgress(), getNextTier() utilities
      - Arabic + English names, colors, icons
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      5ade83d4
    • Mahmoud Aglan's avatar
      feat: resweep + admin branding expanded to 60 emoji slots · 40ded3ba
      Mahmoud Aglan authored
      Full resweep results:
      - 78 emojis (was 67)
      - 84 colors (was 80)
      - 14 gradients
      - 26 animations (was 24)
      - 57 CSS variables (was 56)
      
      Admin branding panel now has 60 emoji replacement slots:
      - Original 27 (trophy, skull, gift, etc.)
      - NEW: HUD icons (coin dot, gem diamond, level hex)
      - NEW: Game-specific (lightning, best-move star, particle star)
      - NEW: Home screen game tiles (chess pawn, domino, backgammon, ludo)
      - NEW: Social (challenge swords, search, online dot)
      - NEW: All 6 dice faces (⚀⚁⚂⚃⚄⚅) at 56px
      - NEW: Puzzle themes (fork, pin, castle, crown, sacrifice)
      - NEW: Tournament (cup, money bag)
      - NEW: Misc (thinking dots, building/org)
      
      Labels switched to English per user request.
      All slots have exact pixel size hints.
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      40ded3ba
    • Mahmoud Aglan's avatar
      feat(social): full friends system — search, add, pending requests, online filter, remove · bf608999
      Mahmoud Aglan authored
      Friends scene rebuilt:
      - 3 tabs: الأصدقاء (all), الطلبات (pending), متصلين (online)
      - Search players by username (🔍 button → input + results)
      - Send friend request with + button (success feedback)
      - Accept/reject pending requests (✓/✕ buttons)
      - Remove friend (with confirm dialog)
      - Challenge online friend (️ → navigates to game select)
      - View profile button
      - Online dot indicator on avatars
      - Empty states with helpful CTAs
      
      API updated:
      - New action: search — finds players by username (ilike)
      - Returns id, username, display_name, avatar_url, level, is_online
      
      UI polish:
      - Tab system with active state
      - Card-based friend list with actions
      - Animations and haptic on interactions
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      bf608999
    • Mahmoud Aglan's avatar
      feat: realtime multiplayer system for Chess and Ludo · e1001508
      Mahmoud Aglan authored
      New core module: realtime.js
      - WebSocket connection to Supabase Realtime
      - Auto-reconnect on disconnect (3s retry)
      - Heartbeat every 30s
      - Subscribe to any table row by filter
      - subscribeMatch(), subscribeLudoMatch(), subscribeQueue() helpers
      - Unsubscribe cleanup on leave
      
      Chess live (logic/live.js) rewritten:
      - startMatchmaking() — joins queue + subscribes for match found
      - joinMatch() — subscribes to match row, fires onMove/onStateChange
      - sendMove() — updates match with fen, move, move_count
      - sendResign(), sendDrawOffer(), sendEmote()
      - Properly increments move_count for realtime detection
      
      Ludo live (logic/live.js) new:
      - joinMatch() — subscribes to ludo_matches row
      - sendRoll() — updates positions, current_turn, dice_value
      - sendEnd() — marks game complete
      
      API game.php updated:
      - handleGameMove now supports: move_count, game_state, time remaining
      - All fields optional (only updates what's sent)
      - updated_at timestamp on every move (triggers realtime broadcast)
      
      Architecture: Player A updates row → Supabase broadcasts → Player B receives
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      e1001508
    • Mahmoud Aglan's avatar
      feat(ludo): JUICY flat dice — CSS dot rendering, slam, shake, golden glow on 6 · e26cb40f
      Mahmoud Aglan authored
      Dice overhaul:
      - Flat white die with CSS-rendered dots (3x3 grid, proper pip layout)
      - Roll animation: rapid random faces + violent shake + blur (55ms per frame, 14 frames)
      - SLAM landing: scale 1.25 → 1.0 with spring easing
      - Heavy haptic on every roll
      - Dice area shakes on land
      - Rolling 6: golden box-shadow glow + 8 star particles + success haptic
      - Bot rolls: same dot renderer with subtle scale pulse
      - Button fades to 0.5 opacity when disabled (clear visual state)
      - Faster animation interval (55ms vs 70ms) for more frantic feel
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      e26cb40f
    • Mahmoud Aglan's avatar
      fix(ludo): center pawns in home, fix center triangles geometry · 8d556485
      Mahmoud Aglan authored
      - Home bases: positions at grid 1.5/3.5 (exact quadrant centers)
      - Center: 4 triangles now form a proper square (top=red, right=blue,
        bottom=green, left=yellow) with white border — like real Ludo boards
      - Removed weird angle-based triangle calculation
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      8d556485
    • Mahmoud Aglan's avatar
    • Mahmoud Aglan's avatar
      fix(ludo): bigger pawns with pawn-shape, centered home bases, emotes, board polish · 8922b607
      Mahmoud Aglan authored
      Pawns:
      - Size increased from 0.32 to 0.42 radius (30% bigger)
      - Pawn shape: round head on elliptical base (not just circle)
      - White border, highlight spot, drop shadow
      - Much more visible and satisfying
      
      Home bases:
      - Positions recentered within home zones (1.8/4.2 instead of 2/4)
      - Inner white area with rounded corners
      - Colored ring border inside home zone (like real Ludo boards)
      
      Board:
      - Start position squares colored per player
      - Home zones have rounded inner area with colored ring
      
      Emotes:
      - 💬 emote button added to Ludo game (same system as chess)
      - 8 preset emotes: GG, Good Move, Think, Hurry, Wow, Laugh, Angry, Hello
      - Floating animation when sent
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      8922b607
    • Mahmoud Aglan's avatar
      feat(ludo): FULL REWRITE — proper board path, dice animation, player panels · a01bee1c
      Mahmoud Aglan authored
      Complete Ludo game overhaul:
      - NEW: board-map.js with exact 52-square path coordinates on 15x15 grid
      - Pieces now move on CORRECT squares (not random circular positions)
      - Home columns, safe squares (stars), home bases all properly mapped
      - Dice roll ANIMATION: 10 frames of random faces with rotation
      - Dice slam-in effect + star burst on rolling 6
      - 4 player panels showing whose turn it is (active border glow)
      - Proper game flow: roll → valid moves → auto-pick best → animate
      - Bot turns show dice face updates
      - Capture: screen shake + heavy haptic
      - Finish: star burst + success haptic
      - Win: confetti + celebration
      - Board rendering: colored home zones, grid lines, home columns,
        safe squares with stars, center triangles, piece shadows + highlights
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      a01bee1c
    • Mahmoud Aglan's avatar
    • Mahmoud Aglan's avatar
      feat: bigger game menu, in-game emotes, full tournament system with Swiss pairings · 868682de
      Mahmoud Aglan authored
      Game Menu:
      - Buttons: 72px min-height (was 52), 20px padding, 48px icons
      - Feature chips: 40px min-height, 13px font, 10px gaps
      - Menu takes up to 75vh for better visibility
      
      In-Game Emotes:
      - 💬 toggle button in bottom-right during chess game
      - 8 preset emotes: GG, Good Move, Think, Hurry, Wow, Laugh, Angry, Hello
      - 3-second cooldown between sends
      - Floating emoji animation when received
      - Sound feedback on send
      
      Tournament System:
      - New API: /api/swiss.php (tournament, standings, rounds, pairings, my-games)
      - Integrates with Swiss API at swissapi.caprover.al-arcade.com
      - Tournament Detail scene with 4 tabs:
        - Info: stats grid, prize pool, registration button
        - Standings: ranked player list with score + buchholz
        - Rounds: expandable rounds → click to load pairings
        - My Games: player's own tournament matches
      - Syncs with el3ab-management SwissApiService endpoints
      - Tournament cards in list now navigate to full detail view
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      868682de
    • Mahmoud Aglan's avatar
    • Mahmoud Aglan's avatar
      feat: complete theming system — 67 emoji replacements, juice settings, full asset registry · 8aa32432
      Mahmoud Aglan authored
      ASSET_REGISTRY.json: machine-readable sweep of entire codebase
      - 67 emojis with exact file:line locations
      - 80 unique colors
      - 14 gradients
      - 24 animations
      - 56 CSS variables
      
      Admin panel new sections:
      - 🧃 Juice Settings: particles on/off, shake intensity, haptic, confetti count,
        coin fly count, bounce scale, slam scale, float amount
      - 😀 Emoji Replacements: 27 most visible emojis as upload slots
        Each with: current emoji preview, size hint, usage description
        Upload SVG/PNG → replaces emoji throughout the app
      
      theme.js updated:
      - emoji() helper: returns uploaded image OR fallback emoji at exact size
      - image-rendering: -webkit-optimize-contrast (fixes pixelation on non-retina)
      - All images use object-fit:contain (never overflow their expected box)
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      8aa32432
    • Mahmoud Aglan's avatar
      fix: review accuracy threshold, friends empty state, profile fresh fetch · b2c350bc
      Mahmoud Aglan authored
      - Classifier: book threshold reduced from 5 to 2 full moves (was classifying
        everything as book in short games, resulting in 0% accuracy)
      - Friends empty state: shows friendly illustration + 'invite friends' CTA button
        instead of hostile 'لا توجد بيانات' on black void
      - Profile: always fetches fresh data from API on mount (fixes stale rating
        showing 1200 after playing rated games)
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      b2c350bc
    • Mahmoud Aglan's avatar
    • Mahmoud Aglan's avatar
      feat(chess): Chess.com-style Game Review with full move analysis · 049e06c9
      Mahmoud Aglan authored
      New screen: Game Review (chess-review)
      - Analyzes EVERY move with Stockfish (depth 12)
      - Shows progress bar while analyzing
      - Eval graph: canvas-rendered white/black area chart with mistake dots
      - Accuracy comparison: player vs opponent percentage with colored bars
      - Move classification breakdown table:
        !! Brilliant, ! Great, ★ Best, ✓ Good, 📖 Book,
        ?! Inaccuracy, ? Mistake, ?? Blunder
      - Counts per player side-by-side (like Chess.com)
      - Opening name displayed
      - Links to detailed analysis (timeline scrubber)
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      049e06c9
    • Mahmoud Aglan's avatar
      feat(analysis): timeline scrubber replaces arrow buttons · 1b3088ab
      Mahmoud Aglan authored
      - Draggable slider bar to scrub through moves like a video
      - RTL-aware: drag right = start, drag left = end
      - Blue fill + white thumb shows current position
      - Touch/pointer events for mobile drag
      - Move display text above scrubber shows current move
      - Move chips below still clickable as secondary nav
      - No more confusing directional arrows
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      1b3088ab
    • Mahmoud Aglan's avatar
      fix(analysis): redesign navigation layout for RTL + better eval bar · 8fb5b77a
      Mahmoud Aglan authored
      - Nav buttons: RTL order (end/next on LEFT, prev/start on RIGHT)
      - Nav buttons: larger (38x34px), rounded, hover states, scale on press
      - Arrows: clean ⟫ › ‹ ⟪ instead of emoji 
      - Eval bar: number shown separately on left, colored bar on right
      - Eval text: colored green/red/white based on advantage
      - Analysis section: tighter spacing, better contrast
      - Move chips: larger padding, hover highlight, smoother active state
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      8fb5b77a
    • Mahmoud Aglan's avatar
      feat(chess): complete pro features — premoves, rating graph, puzzle themes,... · 744f8637
      Mahmoud Aglan authored
      feat(chess): complete pro features — premoves, rating graph, puzzle themes, best move comparison, opening explorer
      
      NEW MODULES:
      - premove.js: Queue moves during opponent's turn, auto-execute when legal
      - rating-graph.js: Canvas sparkline with gradient fill, grid, current rating label, change indicator
      - themes.js: 16 puzzle themes with Arabic names and icons for filtering
      - analyzer.js: Full game analysis — classifies every move, calculates accuracy per game
      - explorer.js: Opening explorer database — popular moves with white/draw/black win rates + visual bar
      
      ANALYSIS SCENE UPGRADED:
      - Shows opening explorer data (book moves + win rate bars) above engine analysis
      - Engine lines show best moves with eval and principal variation
      - Move navigator with clickable chips
      
      GAME SCENE UPGRADED:
      - Opening name shown in Arabic during game (40+ ECO openings)
      - Material advantage displayed (+2/-1) with color coding
      - PGN share/copy buttons on result screen
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      744f8637
    • Mahmoud Aglan's avatar
      feat(chess): Make Chess Professional — opening names, material count, move... · 7ffde6b5
      Mahmoud Aglan authored
      feat(chess): Make Chess Professional — opening names, material count, move classification, PGN sharing
      
      Pro features added:
      - Opening name display: shows ECO opening name during game (40+ openings in Arabic/English)
      - Material count difference: shows +2/-1 advantage next to captured pieces
      - Move classifier engine: labels moves as brilliant(!!) / great(!) / best(★) / good / book / inaccuracy(?!) / mistake(?) / blunder(??)
      - Accuracy calculator: 0-100% accuracy score based on move classifications
      - Material counter: tracks piece values for both sides from FEN
      - PGN Share: share button uses Web Share API or clipboard
      - PGN Copy: one-tap copy to clipboard with visual feedback
      
      Foundation for remaining features:
      - classifier.js ready for post-game analysis integration
      - openings.js ready for opening explorer
      - material.js ready for in-game display
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      7ffde6b5
    • Mahmoud Aglan's avatar
      feat(juice): chess capture explosions, ludo dice slam + star burst on 6 · ae9d5065
      Mahmoud Aglan authored
      Chess juice:
      - Capture: particle burst at capture square + board shake + haptic
      - Check: board shake + haptic medium
      - Checkmate: heavy shake + screen flash + haptic heavy
      
      Ludo juice:
      - Dice roll: slam-in with 1.6x overshoot + board shake + haptic
      - Roll 6: golden star burst around dice
      - Capture: confetti + heavy shake + haptic heavy
      - Piece finish: star burst + haptic success
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      ae9d5065
    • Mahmoud Aglan's avatar
      feat: THE JUICE UPDATE — full game-feel overhaul · ee14c2cd
      Mahmoud Aglan authored
      New core module: juice.js
      - Particle burst engine (coins, stars, confetti, squares)
      - Coin fly-to-target animation (particles arc from source to HUD)
      - Screen shake with intensity decay
      - Number counter with eased tick-up
      - Haptic feedback (light/medium/heavy/success/error patterns)
      - Element glow/pulse effects
      - Slam-in, bounce-in, slide-up-bounce animations
      - Stagger utility for sequential element animations
      - Float/breathe idle animations
      - Full-screen flash effect
      
      CSS juice system:
      - 16 keyframe animations (slamIn, slideUpBounce, breatheGlow, ringExpand, wobble, numberPop, shimmerBorder, bgGradientMove...)
      - Ambient moving gradient background on body
      - Primary buttons breathe with golden glow when idle
      - Scene transitions: spring overshoot (scale 0.88→1.02→1)
      - will-change hints on interactive elements
      
      Home screen juiced:
      - Game tiles bounce-in staggered on load
      - Tiles float with subtle Y-axis bob (different speeds)
      - Tile press: haptic + pulse glow
      - Game menu slams up with spring overshoot
      
      Result screen juiced:
      - Screen flash (green for win, red for loss)
      - Trophy/skull slams in with 1.8x scale overshoot
      - Rating counter ticks up/down per digit
      - Win: confetti burst (40 particles) + haptic success
      - Loss: screen shake + haptic error
      - Coins fly from result area to HUD counter
      - Buttons stagger slide-up on entry
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      ee14c2cd
    • Mahmoud Aglan's avatar
      feat: branding admin fully connected to live system · 00ea47bc
      Mahmoud Aglan authored
      Theme loader (theme.js):
      - Reads theme.json on boot, applies CSS custom properties
      - All colors, animations, button shapes, and radii are live-editable
      - assetImg() helper renders uploaded assets at exact expected size
        with object-fit:contain (prevents pixelation/oversizing)
      
      Admin panel updates:
      - Button shapes section: radius, height, font weight, shadow, borders
      - 25 asset upload slots (up from 19) including tab bar icons
      - Each slot shows expected dimensions + usage hint in Arabic
      - Upload accepts SVG, PNG, JPG, WebP, GIF
      - Preview renders at exact expected size (not pixelated, not huge)
      - Old files for same slot are cleaned up on re-upload
      
      CSS connected to theme variables:
      - --btn-press-scale, --btn-min-height, --btn-weight, --btn-shadow
      - --r-full (button radius), --r-btn-secondary, --r-input
      - --card-border-width
      - All existing color variables mapped from theme.json
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      00ea47bc
    • Mahmoud Aglan's avatar
      c64ac838
    • Mahmoud Aglan's avatar
      feat: branding admin panel + asset registry · f09aa13d
      Mahmoud Aglan authored
      Admin panel (/admin/branding.php):
      - Hardcoded login (admin / El3ab@Brand2024)
      - Color editor for all 13 platform colors with live preview
      - Game color editor (8 game-specific colors)
      - Chess board color editor (5 board theme colors)
      - Animation/motion settings (speeds, scale, radius)
      - 19 asset upload slots with size hints:
        - Logo (200×60), Icon (64×64), Splash (1080×1920)
        - Coin/Gem/XP icons (24×24)
        - Game icons (64×64 each)
        - Win/Loss/Draw icons (128×128)
        - Medals (32×32), Avatar default (128×128)
      - Each upload shows expected dimensions in Arabic
      - Changes save to theme.json and appear as platform defaults
      - Does NOT override user skins/cosmetics
      
      Asset Registry (ASSET_REGISTRY.md):
      - 44 emojis cataloged with file locations
      - 71 colors mapped
      - 9 gradients
      - 17 animations
      - 5 board visual configs
      - 1 piece renderer (vector paths)
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      f09aa13d
    • Mahmoud Aglan's avatar
      feat: game-feel animations — bounce, shake, pop, coin fly, slide up · 02573701
      Mahmoud Aglan authored
      - Scene transitions: scale+slide (game-like) instead of horizontal slide (web-like)
      - Buttons: more aggressive scale on press (0.92 in 50ms)
      - Cards: snappier press response (0.96 in 80ms)
      - New animation classes: .shake, .pop-in, .bounce-in, .slide-up
      - Toast: spring bounce entrance, reward/error variants
      - Keyframes: coinFly, bounceIn, popIn, shake for game events
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      02573701
    • Mahmoud Aglan's avatar
      fix: piece click offset + redesign home screen · 8a856349
      Mahmoud Aglan authored
      - Canvas coords: scale CSS pixels to logical canvas coordinates properly
        (fixes the offset between where you tap and what gets selected)
      - Canvas touchAction:none prevents browser gestures interfering
      - Canvas width/height explicitly set in style to match logical size
      
      Home screen redesign:
      - Games as 2x2 grid of large colorful tiles (center stage)
      - Tap game → bottom sheet menu slides up with:
        - Single Player (bots + local play)
        - Multiplayer (online ranked)
        - Feature chips: Leaderboard, My Matches, Puzzles (chess only)
      - No more carousel that gets cut off
      - Game-feel: tiles scale down on press, smooth spring animation
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      8a856349
    • Mahmoud Aglan's avatar
      feat(tournaments): detail view, registration, bracket placeholder, Arabic labels · e84212cf
      Mahmoud Aglan authored
      - Tournament list with registration button for open tournaments
      - Tournament detail view with player count, rounds, bracket area
      - Register button with loading state and success feedback
      - Arabic status labels (تسجيل مفتوح, جارية, منتهية)
      - Format names in Arabic (سويسري, دوري, خروج المغلوب)
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      e84212cf
    • Mahmoud Aglan's avatar
      feat(chess): live polling, match history scene, coin economy on game end · 0f9efb00
      Mahmoud Aglan authored
      - GET match endpoint for live polling during multiplayer
      - Match history scene (placeholder)
      - Live sync module with poll/sendMove/drawOffer/resign/rematch
      - Economy: coins actually granted to player profile on game completion
      - Economy transactions recorded with reason
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      0f9efb00
    • Mahmoud Aglan's avatar
      feat(chess): real Elo rating system + carousel fix + board sizing · 4b119421
      Mahmoud Aglan authored
      - Backend Elo calculation (K=32/24/16 based on rating)
      - Rating history recorded per game in rating_history table
      - Profile updated with new rating + win/loss/draw counts
      - Result screen shows actual rating change from server
      - Board fills more available space (up to 500px)
      - Carousel cards fixed: proper padding, no truncation, gradient previews
      Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
      4b119421