import { useState, useEffect } from "react"; // ═══════════════════════════════════════════════════════════════════ // ⚠️ DISCLAIMER — FOR ENTERTAINMENT & EDUCATION ONLY // This app provides predictions based on stats & AI analysis. // Gambling carries financial risk. Bet responsibly. // ═══════════════════════════════════════════════════════════════════ const MATCHES = [ { id: "pbks-rcb", matchNo: "Match 61", date: "Sun 17 May 2026", time: "3:30 PM IST", venue: "HPCA Stadium, Dharamsala", format: "T20 • Afternoon", status: "UPCOMING", t1: { abbr:"PBKS", full:"Punjab Kings", emoji:"🔴", clr:"#dc2626" }, t2: { abbr:"RCB", full:"Royal Challengers Bengaluru", emoji:"❤️", clr:"#9b1c1c" }, // ── REAL BETTING ODDS (Dafa, sourced) ── odds: { matchWinner: { t1: "2.18", t2: "1.69", note:"RCB heavy favourite" }, toss: { t1: "1.90", t2: "1.90", note:"Even money" }, t1Score: { range:"185-205", over:"1.85", under:"1.95" }, t2Score: { range:"175-195", over:"1.90", under:"1.90" }, topBat: [ {p:"Virat Kohli", odds:"2.20", team:"RCB" }, {p:"Prabhsimran Singh", odds:"3.50", team:"PBKS" }, {p:"Rajat Patidar", odds:"4.00", team:"RCB" }, {p:"Cooper Connolly", odds:"4.50", team:"PBKS" }, {p:"Jacob Bethell", odds:"6.00", team:"RCB" } ], topBowl: [ {p:"Bhuvneshwar Kumar", odds:"2.10", team:"RCB" }, {p:"Arshdeep Singh", odds:"3.80", team:"PBKS" }, {p:"Josh Hazlewood", odds:"4.20", team:"RCB" }, {p:"Yuzvendra Chahal", odds:"5.50", team:"PBKS" }, {p:"Jacob Duffy", odds:"7.00", team:"RCB" } ], sixesLine: { line:"13.5", over:"1.87", under:"1.87" }, powerplay1: { range:"50-60", fav:"Over 55.5 @ 1.90" }, }, // ── TEAM FORM ── form1: ["W","L","L","L","L"], form2: ["W","W","W","L","W"], // ── POINTS TABLE ── pts1: "13 pts · 4th · 6W-6L · 5 LOSSES IN A ROW", pts2: "16 pts · 1st · 8W-4L · ALREADY QUALIFIED", // ── PREDICTED XIs (from Yahoo/CricTracker) ── xi1: ["Priyansh Arya","Prabhsimran Singh (wk)","Shreyas Iyer (c)","Cooper Connolly", "Marcus Stoinis","Shashank Singh","Marco Jansen","Vijaykumar Vyshak", "Ben Dwarshuis","Yuzvendra Chahal","Arshdeep Singh"], xi2: ["Jacob Bethell","Virat Kohli","Rajat Patidar (c)","Jitesh Sharma (wk)", "Krunal Pandya","Tim David","Venkatesh Iyer","Rasikh Salam Dar", "Bhuvneshwar Kumar","Josh Hazlewood","Jacob Duffy"], // ── KEY PLAYER STATS ── keyStats: [ { cat:"🏏 BATTING", items:[ { p:"Virat Kohli (RCB)", stat:"484 runs · Avg 53.78 · SR 165.75 · 9th IPL ton just scored" }, { p:"Rajat Patidar (RCB)", stat:"337 runs · SR 192.57 · Explosive middle-order" }, { p:"Prabhsimran Singh (PBKS)", stat:"439 runs · 11 innings · 57 vs MI last game" }, { p:"Cooper Connolly (PBKS)", stat:"415 runs · SR 168 · Most consistent PBKS bat" }, { p:"Priyansh Arya (PBKS)", stat:"342 runs · SR 226 — highest of any 300+ scorer in IPL 2026" }, ]}, { cat:"🎯 BOWLING", items:[ { p:"Bhuvneshwar Kumar (RCB)", stat:"22 wkts · Eco 7.46 · PURPLE CAP LEADER · Best in IPL 2026" }, { p:"Josh Hazlewood (RCB)", stat:"10 wkts · BBI 4/12 at THIS venue · Lethal here" }, { p:"Arshdeep Singh (PBKS)", stat:"13 wkts · Eco 9.92 · Worst IPL season economy" }, { p:"Yuzvendra Chahal (PBKS)", stat:"9 wkts · 11 games · Under-delivering on this pitch" }, ]}, { cat:"📊 HEAD-TO-HEAD", items:[ { p:"IPL All Time", stat:"RCB lead 19-18 in 37 meetings" }, { p:"Last 5 meetings", stat:"RCB won 4 of 5 — dominant run" }, { p:"PBKS at Dharamsala", stat:"Lost 6 of last 7 at home venue!" }, { p:"Kohli vs PBKS (IPL career)", stat:"129 runs last season · High of 73*" }, ]}, { cat:"🏟 VENUE", items:[ { p:"HPCA Stadium altitude", stat:"1,457 m above sea level — thin air adds 5-8% to distances" }, { p:"Avg 1st innings IPL 2026", stat:"~190-210 runs · Batting friendly · True bounce" }, { p:"Pace wickets %", stat:"65% pace wickets at this venue" }, { p:"Toss at Dharamsala", stat:"Bowl first preferred — afternoon conditions" }, ]}, ], // ── WIN PROBABILITIES ── p1: 38, p2: 62, winner: "RCB", conf: "HIGH", verdictColor: "#dc2626", verdict: "Back RCB", // ── PREDICTION MARKETS ── bets: [ { market:"✅ Match Winner", pick:"RCB to win", odds:"1.69", conf:"HIGH", reason:"Form, H2H, Kohli in peak, Bhuvi leads Purple Cap" }, { market:"🪙 Toss", pick:"No strong edge", odds:"1.90", conf:"LOW", reason:"Even money — skip or bet small on Bowl First decision" }, { market:"🏏 Top Batter", pick:"Virat Kohli", odds:"2.20", conf:"HIGH", reason:"484 runs this season · 9th IPL ton · vs PBKS bowling avg" }, { market:"🎯 Top Bowler", pick:"Bhuvneshwar Kumar", odds:"2.10", conf:"HIGH", reason:"Purple Cap (22 wkts) · Dharamsala aids swing · Economy 7.46" }, { market:"📈 1st Innings Runs", pick:"Over 195.5", odds:"1.87", conf:"MEDIUM", reason:"Dharamsala avg is 190-210 · Both teams bat aggressively" }, { market:"💥 Total Sixes", pick:"Over 13.5", odds:"1.87", conf:"MEDIUM", reason:"RCB's hitting + Priyansh Arya's SR 226 = sixes galore" }, { market:"⚡ Powerplay Runs", pick:"Over 55.5 (Inn 1)", odds:"1.90", conf:"MEDIUM", reason:"Thin air + flat pitch = high powerplay at altitude" }, ], // ── PITCH & WEATHER ── pitch: "Flat · True bounce · Batters thrive · Altitude boosts hitting · Seamers get early swing", weather: "Afternoon · Cool 22°C · Post-rain moisture · No dew factor", toss: "Bowl first expected — dry afternoon easier to bat second on", // ── RISK RATING ── risk: "MEDIUM", riskReason: "PBKS desperation could produce an upset — but RCB's quality is overwhelming", // ── PREDICTED SCORES ── pred1: "195–215", pred2: "190–210", }, { id: "dc-rr", matchNo: "Match 62", date: "Sun 17 May 2026", time: "7:30 PM IST", venue: "Arun Jaitley Stadium, New Delhi", format: "T20 • Evening", status: "UPCOMING", t1: { abbr:"DC", full:"Delhi Capitals", emoji:"🔷", clr:"#1d4ed8" }, t2: { abbr:"RR", full:"Rajasthan Royals", emoji:"🩷", clr:"#db2777" }, // ── REAL BETTING ODDS ── odds: { matchWinner: { t1:"2.30", t2:"1.65", note:"RR clear favourites" }, toss: { t1:"1.90", t2:"1.90", note:"Even money — toss critical here" }, t1Score: { range:"160-180", over:"1.90", under:"1.90" }, t2Score: { range:"170-195", over:"1.87", under:"1.87" }, topBat: [ {p:"Yashasvi Jaiswal", odds:"2.80", team:"RR" }, {p:"Vaibhav Sooryavanshi", odds:"3.20", team:"RR" }, {p:"KL Rahul", odds:"3.50", team:"DC" }, {p:"Riyan Parag", odds:"4.00", team:"RR" }, {p:"Abishek Porel", odds:"6.50", team:"DC" } ], topBowl: [ {p:"Mitchell Starc", odds:"2.60", team:"DC" }, {p:"Jofra Archer", odds:"3.10", team:"RR" }, {p:"Ravi Bishnoi", odds:"3.50", team:"RR" }, {p:"Kuldeep Yadav", odds:"4.80", team:"DC" }, {p:"Ravindra Jadeja", odds:"5.50", team:"RR" } ], sixesLine: { line:"11.5", over:"1.87", under:"1.87" }, powerplay1: { range:"45-58", fav:"Under 50.5 @ 1.90" }, }, form1: ["W","L","L","W","L"], form2: ["L","W","L","L","W"], pts1: "10 pts · 7th · 5W-7L · MUST WIN or ELIMINATED", pts2: "12 pts · 5th · 6W-5L · Top-4 push", xi1: ["KL Rahul (wk)","Abishek Porel","Sahil Parakh","Tristan Stubbs", "David Miller","Axar Patel (c)","Madhav Tiwari","Mukesh Kumar", "Auqib Nabi Dar","Mitchell Starc","Lungi Ngidi"], xi2: ["Yashasvi Jaiswal (c)","Vaibhav Suryavanshi","Dhruv Jurel (wk)","Riyan Parag", "Donovan Ferreira","Ravindra Jadeja","Shubham Dubey","Jofra Archer", "Ravi Bishnoi","Dasun Shanaka","Brijesh Sharma"], keyStats: [ { cat:"🏏 BATTING", items:[ { p:"Vaibhav Sooryavanshi (RR)", stat:"440 runs · 30 powerplay sixes — MOST in IPL 2026" }, { p:"Yashasvi Jaiswal (RR)", stat:"Top-order anchor · 500+ runs · H2H record vs DC excellent" }, { p:"Riyan Parag (RR)", stat:"90 off 50 vs DC last meeting (May 1) · Returning from hamstring" }, { p:"KL Rahul (DC)", stat:"SR 177.98 · Orange Cap contender · DC's lifeline" }, { p:"David Miller (DC)", stat:"SR 230 in death overs · 3 dismissals — Archer's prime target" }, ]}, { cat:"🎯 BOWLING", items:[ { p:"Mitchell Starc (DC)", stat:"New-ball swing · Reverse-swing with old ball · vs RR openers key" }, { p:"Jofra Archer (RR)", stat:"X-factor · David Miller: 2 dismissals in 5 innings for 19 runs" }, { p:"Ravi Bishnoi (RR)", stat:"Middle-overs control · DC struggle vs leg-spin" }, { p:"Kuldeep Yadav (DC)", stat:"Left-arm wrist spin — Sooryavanshi's hardest challenge" }, ]}, { cat:"📊 HEAD-TO-HEAD", items:[ { p:"IPL All Time (DC vs RR)", stat:"DC lead overall 16-15" }, { p:"This season (Jaipur, May 1)", stat:"DC WON by 7 wickets — RR want revenge" }, { p:"DC at home (Arun Jaitley)", stat:"WON only 1 of 6 HOME games this season — shocking" }, { p:"Chasing at AJS (IPL 2026)", stat:"Chasing wins 80% — 4 from 5 games here" }, ]}, { cat:"🏟 VENUE", items:[ { p:"Arun Jaitley Stadium scores", stat:"Bimodal — ranged 75 to 264 this IPL season!" }, { p:"Spin factor", stat:"Kotla is traditionally spin-friendly — Bishnoi + Jadeja thrive" }, { p:"Evening conditions", stat:"Hot & dry · 35°C · No dew expected · Even contest" }, { p:"Toss verdict", stat:"Bowl first = 80% win rate here in IPL 2026" }, ]}, ], p1: 40, p2: 60, winner: "RR", conf: "MEDIUM", verdictColor: "#db2777", verdict: "Back RR", bets: [ { market:"✅ Match Winner", pick:"RR to win", odds:"1.65", conf:"MEDIUM", reason:"Better batting depth, Sooryavanshi explosive, DC poor home record (1W-6L)" }, { market:"🪙 Toss", pick:"Toss winner bats second", odds:"~1.75",conf:"HIGH", reason:"Chasing wins 80% at AJS this IPL — CRITICAL market" }, { market:"🏏 Top Batter", pick:"Vaibhav Sooryavanshi", odds:"3.20", conf:"MEDIUM", reason:"30 powerplay sixes, flat Delhi pitch, high ceiling" }, { market:"🎯 Top Bowler", pick:"Mitchell Starc", odds:"2.60", conf:"MEDIUM", reason:"Best bowler on paper · New-ball in cool evening vs RR openers" }, { market:"📈 1st Innings Runs", pick:"Under 175.5", odds:"1.90", conf:"MEDIUM", reason:"Kotla produces low scores — 75 to 180 range seen this IPL" }, { market:"💥 Total Sixes", pick:"Under 11.5", odds:"1.87", conf:"MEDIUM", reason:"Spin-friendly surface limits big-hitting compared to other venues" }, { market:"⚡ Powerplay Runs", pick:"Under 50.5 (Inn 1)", odds:"1.90", conf:"MEDIUM", reason:"Starc/Ngidi new-ball vs Jaiswal/Sooryavanshi — wickets likely early" }, ], pitch: "Spin-friendly · Low & slow · Kotla track favours cutters & spinners · Evening conditions help pacers", weather: "Evening · Hot dry 35°C · No dew · Spin gets grip later", toss: "Bowl first STRONGLY preferred — chasing wins 80% at this ground this IPL", risk: "MEDIUM", riskReason: "DC are a wounded animal — desperation produces upsets. Starc + Kuldeep could restrict 160-175 which DC chase.", pred1: "160–180", pred2: "165–185", }, ]; // ── POINTS TABLE DATA ─────────────────────────────────────────── const POINTS = [ { p:1, t:"RCB", e:"❤️", m:12, w:8, l:4, pts:16, nrr:"+0.83", form:["W","W","W","L","W"] }, { p:2, t:"CSK", e:"💛", m:12, w:7, l:5, pts:14, nrr:"+0.54", form:["L","W","L","W","W"] }, { p:3, t:"KKR", e:"💜", m:12, w:7, l:5, pts:14, nrr:"+0.41", form:["W","W","L","W","W"] }, { p:4, t:"PBKS", e:"🔴", m:12, w:6, l:6, pts:13, nrr:"+0.21", form:["L","L","L","L","L"] }, { p:5, t:"RR", e:"🩷", m:11, w:6, l:5, pts:12, nrr:"-0.12", form:["L","W","L","L","W"] }, { p:6, t:"GT", e:"🔵", m:12, w:6, l:6, pts:12, nrr:"-0.27", form:["W","W","L","W","L"] }, { p:7, t:"DC", e:"🔷", m:12, w:5, l:7, pts:10, nrr:"-0.31", form:["W","L","L","W","L"] }, { p:8, t:"MI", e:"🩵", m:12, w:5, l:7, pts:10, nrr:"-0.44", form:["W","L","W","L","L"] }, { p:9, t:"SRH", e:"🟠", m:12, w:4, l:8, pts:8, nrr:"-0.52", form:["L","L","W","L","L"] }, { p:10,t:"LSG", e:"⚡", m:12, w:3, l:9, pts:6, nrr:"-0.89", form:["L","L","L","W","L"] }, ]; // ══════════════════════════════════════════════════════════════════ // ATOMS // ══════════════════════════════════════════════════════════════════ const FP = ({ r }) => ( {r} ); const Conf = ({ c }) => { const cfg = {HIGH:["rgba(74,222,128,.15)","#4ade80"],MEDIUM:["rgba(251,191,36,.15)","#fbbf24"],LOW:["rgba(148,163,184,.15)","#64748b"]}; const [bg,col] = cfg[c]||cfg.LOW; return {c}; }; const OddsBox = ({ label, odds, highlight }) => (
{aiText||"Expand card to auto-load AI analysis."}
}{verdict}
}