// Shared UI primitives + brand
// Palette: Portuguese green / gold / red / cream
const C = {
green: '#0a6b3a',
greenDeep: '#053a1f',
greenInk: '#021a0e',
gold: '#ffc83d',
goldDeep: '#e69a00',
red: '#d6263a',
redDeep: '#971120',
cream: '#fdf7e8',
paper: '#fff8e7',
ink: '#0d1410',
};
window.C = C;
// "CRAQUES 26" wordmark logo (no copyrighted imagery)
function Logo({ size = 22, light = false }) {
const fg = light ? C.cream : C.greenInk;
const accent = light ? C.gold : C.red;
return (
C26
CRAQUES 26
);
}
// Big CTA button — chunky, glossy, with shadow
function CTA({ children, onClick, color = 'gold', full = true, small = false, style = {} }) {
const bg = color === 'gold' ? C.gold : color === 'red' ? C.red : C.green;
const fg = color === 'gold' ? C.greenInk : C.cream;
const shadow = color === 'gold' ? C.goldDeep : color === 'red' ? C.redDeep : C.greenDeep;
return (
);
}
// Sticker card. Uses player artwork when provided, with a colored fallback.
function Cromo({ team = 'POR', num = 7, pos = 'AVA', name = 'Jogador', img = null, rare = false, tilt = 0, size = 1 }) {
// team color map (fictional palette for generic codes)
const teamColors = {
POR: ['#c8102e', '#015e2e'], BRA: ['#fedf00', '#009739'], ARG: ['#75aadb', '#fff'],
FRA: ['#0055a4', '#ef4135'], ESP: ['#aa151b', '#f1bf00'], GER: ['#000', '#dd0000'],
ENG: ['#fff', '#cf081f'], NED: ['#ae1c28', '#21468b'], BEL: ['#000', '#fdda24'],
ITA: ['#008c45', '#cd212a'], CRO: ['#f0263c', '#171796'], MEX: ['#006847', '#ce1126'],
USA: ['#3c3b6e', '#b22234'], URU: ['#7b8cde', '#fcd116'], JPN: ['#fff', '#bc002d'],
KOR: ['#fff', '#003478'], MAR: ['#c1272d', '#006233'], SEN: ['#00853f', '#fdef42'],
};
const [c1, c2] = teamColors[team] || ['#444', '#888'];
const displayName = name.toUpperCase();
const nameFontSize = displayName.length > 16 ? 8.5 * size : displayName.length > 12 ? 9.5 * size : 11 * size;
return (
{/* holographic shine for rare */}
{rare &&
}
{img &&

}
{/* number circle */}
{num}
{/* silhouette area (just a gradient bubble) */}
{!img &&
}
{/* bottom band */}
{displayName}
{team}{pos}
{rare &&
RARO
}
);
}
// Ticker / countdown chip
function Chip({ children, color = C.red, style = {} }) {
return (
{children}
);
}
// Section heading
function SectionTitle({ kicker, title, light = false }) {
return (
{kicker &&
{kicker}
}
{title}
);
}
// Stadium-stripe background pattern
function StadiumBg({ children, style = {} }) {
return (
{children}
);
}
Object.assign(window, { Logo, CTA, Cromo, Chip, SectionTitle, StadiumBg });