AI-powered MCU intelligence

Your MCU.
Reviewed. Decoded. Predicted.

Breaking Marvel movie reviews, deep-dive stories, and AI-generated predictions — refreshed twice daily, straight from the multiverse.

Iron Man

Avenger

Iron
Man

Spider-Man

Avenger

Spider-
Man

Thor

Avenger

Thor

Captain America

Avenger

Captain
America

Trending
#FantasticFour ✦ #Doomsday ✦ #SpiderMan4 ✦ #AvengersSecretWars ✦ #XMen97 ✦ #Thunderbolts

Latest News

Movie & Series Reviews

Stories & Deep Dives

Predictions

const escapeHtml = (v = '') => String(v).replace(/[&<>'"]/g, c => ({'&':'&','<':'<','>':'>',"'":''','"':'"'}[c])); const safeUrl = (v = '') => /^https:\/\//i.test(v) ? escapeHtml(v) : '#'; // ── Supabase ────────────────────────────────────────────────── const supabaseUrl = 'https://atqgkxwfvfalgvxqdwxp.supabase.co'; const supabaseAnonKey = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImF0cWdreHdmdmZhbGd2eHFkd3hwIiwicm9sZSI6ImFub24iLCJpYXQiOjE3OTAyNTU5NDUsImV4cCI6MjEwNTgzMTk0NX0.4Eve4h7wdy-NGd6Yb4ZUCQKq02z-4r2jgbdAVKT_2DQ'; const db = window.supabase.createClient(supabaseUrl, supabaseAnonKey); // ── Render helpers ──────────────────────────────────────────── function newsCard(a) { return `
${escapeHtml(a.category)}

${escapeHtml(a.title)}

${escapeHtml(a.summary)}

${escapeHtml(a.source_name || 'MarvelDays')} · source ↗
`; } function reviewCard(a) { const score = escapeHtml(a.score || '?'); return `
${score}
${escapeHtml(a.category || 'Review')}

${escapeHtml(a.title)}

${escapeHtml(a.summary)}

Read full review →
`; } function storyCard(a) { return `

${escapeHtml(a.category)}

${escapeHtml(a.title)}

${escapeHtml(a.summary)}

`; } function predictionRow(a) { const conf = escapeHtml(a.score || '70'); const pct = Math.min(Math.max(parseInt(conf) || 70, 0), 100); const colour = pct >= 85 ? '#b8ff41' : pct >= 70 ? '#65d7ff' : '#8b5cf6'; return `
${conf}% confidence

${escapeHtml(a.title)}

${escapeHtml(a.summary)}

AI
`; } function emptyState(msg) { return `

${msg}

`; } // ── Load from Supabase ──────────────────────────────────────── async function loadMarvelIntelligence() { try { const { data: articles, error } = await db .from('articles') .select('*') .order('created_at', { ascending: false }); if (error) throw error; const news = (articles || []).filter(a => a.type === 'news' || !a.type).slice(0, 3); const reviews = (articles || []).filter(a => a.type === 'review').slice(0, 3); const stories = (articles || []).filter(a => a.type === 'story').slice(0, 4); const theories = (articles || []).filter(a => a.type === 'theory').slice(0, 5); document.getElementById('newsGrid').innerHTML = news.length ? news.map(newsCard).join('') : emptyState('No news yet — check back soon.'); document.getElementById('reviewsGrid').innerHTML = reviews.length ? reviews.map(reviewCard).join('') : emptyState('No reviews yet.'); document.getElementById('storiesGrid').innerHTML = stories.length ? stories.map(storyCard).join('') : emptyState('No stories yet.'); document.getElementById('theoriesList').innerHTML = theories.length ? theories.map(predictionRow).join('') : emptyState('No AI predictions yet.'); } catch (err) { console.error('Supabase error:', err); ['newsGrid','reviewsGrid','storiesGrid','theoriesList'].forEach(id => { document.getElementById(id).innerHTML = emptyState('Could not load content. Please try again later.'); }); } } loadMarvelIntelligence(); // ── Light / Dark Mode Toggle ─────────────────────────────── const html = document.documentElement; const toggleBtn = document.getElementById('modeToggle'); const modeIcon = document.getElementById('modeIcon'); const modeLabel = document.getElementById('modeLabel'); function setTheme(mode) { if (mode === 'light') { html.classList.add('light'); modeIcon.textContent = '☀️'; modeLabel.textContent = 'Light'; } else { html.classList.remove('light'); modeIcon.textContent = '🌙'; modeLabel.textContent = 'Dark'; } localStorage.setItem('md-theme', mode); } // Load saved preference (default: dark) setTheme(localStorage.getItem('md-theme') || 'dark'); toggleBtn.addEventListener('click', () => { setTheme(html.classList.contains('light') ? 'dark' : 'light'); });