let players = []; for (let i=1; i<=n; i++) players.push("P"+i);
let html = "<h3>Winners Bracket</h3><div class='round'>"; let round = 1; let matches = n/2; while(matches >= 1) html += `<div><strong>Round $round</strong><br>`; for(let i=0; i<matches; i++) html += `<div class='match'>Match W$round_$i+1: _______ vs _______</div>`; html += `</div>`; matches /= 2; round++; if(matches >= 1) html += `<div class='round'>`;
LOSERS BRACKET Match L1: Loser of W1 vs Loser of W2 → L1a Match L2: Loser of W3 vs Loser of W4 → L1b Match L3: Loser of W5 vs L1a → L2a Match L4: Loser of W6 vs L1b → L2b Match L5 (Losers Semis): L2a vs L2b → L3 Match L6 (Losers Final): L3 vs Loser of W7 → LF