/* ─── Football Predictions Engine — Frontend v2 ─── */
:root {
    --fpe-bg-dark: #0b0f19;
    --fpe-bg-card: #111827;
    --fpe-bg-card-hover: #1a2332;
    --fpe-bg-surface: #0f1520;
    --fpe-border: #1e293b;
    --fpe-border-light: #334155;
    --fpe-text: #e2e8f0;
    --fpe-text-muted: #94a3b8;
    --fpe-text-dim: #64748b;
    --fpe-accent: #22c55e;
    --fpe-accent-glow: rgba(34,197,94,0.15);
    --fpe-accent-hover: #16a34a;
    --fpe-home: #22c55e;
    --fpe-draw: #f59e0b;
    --fpe-away: #ef4444;
    --fpe-win: #22c55e;
    --fpe-loss: #ef4444;
    --fpe-zone-cl: #2563eb;
    --fpe-zone-el: #f59e0b;
    --fpe-zone-rel: #dc2626;
    --fpe-radius: 10px;
    --fpe-radius-sm: 6px;
    --fpe-transition: 0.2s ease;
}

/* ═══ MATCH CARD ═══ */
.fpe-match-card {
    background: var(--fpe-bg-card);
    border: 1px solid var(--fpe-border);
    border-radius: var(--fpe-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: border-color var(--fpe-transition), box-shadow var(--fpe-transition), transform var(--fpe-transition);
}
.fpe-match-card:hover {
    border-color: var(--fpe-border-light);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    transform: translateY(-1px);
}
.fpe-match-card.has-prediction { border-left: 3px solid var(--fpe-accent); }
.fpe-match-card.has-prediction:hover { border-color: var(--fpe-accent); box-shadow: 0 0 24px var(--fpe-accent-glow); }

.fpe-match-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1rem; font-size: 0.8rem; color: var(--fpe-text-muted);
}
.fpe-match-round {
    background: var(--fpe-bg-surface); padding: 3px 10px;
    border-radius: 4px; font-size: 0.72rem; color: var(--fpe-text-dim);
}

/* ═══ TEAMS ROW — centered layout with big logos ═══ */
.fpe-match-teams {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.5rem; margin-bottom: 1rem;
}
.fpe-team {
    display: flex; align-items: center; gap: 0.75rem; flex: 1;
}
.fpe-team-away { justify-content: flex-end; }
.fpe-team-info-right { text-align: right; }

/* Team crest container */
.fpe-team-crest {
    position: relative; flex-shrink: 0;
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
}
.fpe-team-logo {
    width: 48px; height: 48px; object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: transform var(--fpe-transition);
}
.fpe-match-card:hover .fpe-team-logo { transform: scale(1.08); }

.fpe-team-logo-placeholder {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--fpe-bg-surface); border: 2px solid var(--fpe-border);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; color: var(--fpe-text-muted);
    text-transform: uppercase;
}

/* Favored team glow */
.fpe-team-favored .fpe-team-crest::after {
    content: ''; position: absolute; inset: -4px;
    border-radius: 50%; border: 2px solid var(--fpe-accent);
    opacity: 0.4; animation: fpe-pulse 2s ease-in-out infinite;
}
@keyframes fpe-pulse {
    0%,100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.05); }
}
.fpe-team-favored .fpe-team-name { color: var(--fpe-accent); }

/* Winner star badge */
.fpe-team-badge-fav {
    position: absolute; top: -4px; right: -4px;
    width: 18px; height: 18px; border-radius: 50%;
    background: var(--fpe-accent); color: #0a0e17;
    font-size: 0.6rem; line-height: 18px; text-align: center;
    font-weight: 700; box-shadow: 0 0 8px var(--fpe-accent-glow);
}

.fpe-team-info { display: flex; flex-direction: column; gap: 2px; }
.fpe-team-name { font-weight: 600; font-size: 0.95rem; color: var(--fpe-text); line-height: 1.2; }
.fpe-team-pct { font-size: 0.8rem; font-weight: 700; color: var(--fpe-text-muted); }

/* VS center */
.fpe-match-center {
    display: flex; flex-direction: column; align-items: center;
    gap: 4px; flex-shrink: 0; min-width: 50px;
}
.fpe-vs-badge {
    font-size: 0.65rem; font-weight: 800; color: var(--fpe-text-dim);
    letter-spacing: 0.15em; background: var(--fpe-bg-surface);
    padding: 3px 10px; border-radius: 4px;
}
.fpe-match-kickoff {
    font-size: 0.7rem; color: var(--fpe-accent); font-weight: 600;
}
.fpe-is-live { color: var(--fpe-loss) !important; font-weight: 800; }
.fpe-is-starting { color: var(--fpe-accent) !important; font-weight: 600; font-size: 0.65rem; }

/* ═══ MATCH SCORE & STATUS BADGES ═══ */
.fpe-match-score {
    font-size: 1.15rem; font-weight: 800; color: var(--fpe-text);
    letter-spacing: 0.05em; line-height: 1;
}
.fpe-match-score.fpe-score-live {
    color: var(--fpe-loss);
}
.fpe-status-badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.6rem; font-weight: 700; letter-spacing: 0.08em;
    padding: 2px 8px; border-radius: 3px; line-height: 1;
    text-transform: uppercase;
}
.fpe-status-badge.fpe-status-ft {
    background: rgba(100, 116, 139, 0.15); color: #94a3b8;
}
.fpe-status-badge.fpe-status-live {
    background: rgba(239, 68, 68, 0.12); color: var(--fpe-loss);
    animation: fpe-pulse-live 2s ease-in-out infinite;
}
.fpe-status-badge .fpe-live-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--fpe-loss); display: inline-block;
    animation: fpe-blink 1.2s ease-in-out infinite;
}
@keyframes fpe-pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}
@keyframes fpe-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Finished match card — subtle dimming */
.fpe-match-card.fpe-match-finished {
    opacity: 0.65;
}
.fpe-match-card.fpe-match-finished:hover {
    opacity: 0.85;
}

/* Live match card — subtle glow */
.fpe-match-card.fpe-match-live {
    border-left-color: var(--fpe-loss);
}

/* ═══ PREDICTION SECTION ═══ */
.fpe-match-prediction {
    border-top: 1px solid var(--fpe-border);
    padding-top: 0.85rem;
}
.fpe-advice {
    font-size: 0.85rem; color: var(--fpe-accent);
    font-weight: 600; margin-bottom: 0.6rem;
}

/* Probability bar */
.fpe-prob-bar-visual {
    display: flex; height: 30px; border-radius: var(--fpe-radius-sm);
    overflow: hidden; font-size: 0.7rem; font-weight: 700; margin-bottom: 0.35rem;
}
.fpe-prob-segment {
    display: flex; align-items: center; justify-content: center;
    color: #fff; transition: width 0.6s ease; min-width: 0;
}
.fpe-prob-segment span { text-shadow: 0 1px 3px rgba(0,0,0,0.4); }
.fpe-prob-home { background: linear-gradient(135deg, #22c55e, #16a34a); }
.fpe-prob-draw { background: linear-gradient(135deg, #f59e0b, #d97706); }
.fpe-prob-away { background: linear-gradient(135deg, #ef4444, #dc2626); }

.fpe-prob-labels {
    display: flex; justify-content: space-between;
    font-size: 0.7rem; margin-bottom: 0.5rem;
}

/* Tags row */
.fpe-tags-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 0.25rem; }
.fpe-tag {
    display: inline-flex; align-items: center; gap: 3px;
    background: var(--fpe-bg-surface); border: 1px solid var(--fpe-border);
    color: var(--fpe-text-muted); padding: 3px 10px;
    border-radius: 4px; font-size: 0.72rem; font-weight: 600;
}
.fpe-tag-sm { font-size: 0.68rem; padding: 2px 7px; }
.fpe-tag-goals { border-color: var(--fpe-draw); color: var(--fpe-draw); }
.fpe-tag-winner { border-color: var(--fpe-accent); color: var(--fpe-accent); }

.fpe-full-analysis {
    display: block; text-align: center; margin-top: 0.85rem; padding: 0.6rem;
    background: var(--fpe-accent); color: #0a0e17 !important;
    border-radius: var(--fpe-radius-sm); font-weight: 700; font-size: 0.85rem;
    text-decoration: none; transition: all var(--fpe-transition);
}
.fpe-full-analysis:hover { background: var(--fpe-accent-hover); transform: translateY(-1px); }

.fpe-pending {
    text-align: center; padding: 0.85rem; color: var(--fpe-text-dim);
    font-style: italic; font-size: 0.85rem;
    border-top: 1px solid var(--fpe-border); margin-top: 0.5rem;
}

/* ═══ LEAGUE BLOCK — with crest + flag ═══ */
.fpe-league-block {
    background: var(--fpe-bg-card); border: 1px solid var(--fpe-border);
    border-radius: var(--fpe-radius); padding: 1.25rem; margin-bottom: 1.5rem;
}
.fpe-league-header {
    display: flex; align-items: center; gap: 0.75rem;
    margin-bottom: 1rem; padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--fpe-border);
}
.fpe-league-crest {
    width: 32px; height: 32px; object-fit: contain; flex-shrink: 0;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}
.fpe-league-title-group { flex: 1; }
.fpe-league-header h3 { margin: 0; font-size: 1rem; color: var(--fpe-text); line-height: 1.2; }
.fpe-league-country { color: var(--fpe-text-dim); font-size: 0.8rem; display: flex; align-items: center; gap: 4px; }
.fpe-flag-icon { border-radius: 2px; flex-shrink: 0; object-fit: cover; }
.fpe-view-all {
    margin-left: auto; color: var(--fpe-accent); font-size: 0.8rem;
    font-weight: 600; text-decoration: none; white-space: nowrap;
}

/* Mini card with team logos */
.fpe-mini-card {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.55rem 0; border-bottom: 1px solid var(--fpe-border);
    font-size: 0.85rem; transition: background var(--fpe-transition);
}
.fpe-mini-card:last-child { border-bottom: 0; }
.fpe-mini-card:hover { background: rgba(255,255,255,0.02); }
.fpe-mini-date { min-width: 45px; color: var(--fpe-text-dim); font-size: 0.75rem; }
.fpe-mini-teams { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.fpe-mini-team {
    display: flex; align-items: center; gap: 6px;
    color: var(--fpe-text); font-size: 0.82rem;
}
.fpe-mini-team img { width: 20px; height: 20px; object-fit: contain; }
.fpe-mini-pred { width: 100px; }
.fpe-mini-bar {
    display: flex; height: 6px; border-radius: 3px; overflow: hidden;
}
.fpe-mb-h { background: var(--fpe-home); }
.fpe-mb-d { background: var(--fpe-draw); }
.fpe-mb-a { background: var(--fpe-away); }
.fpe-mini-link {
    color: var(--fpe-accent); font-weight: 700;
    text-decoration: none; font-size: 1rem;
}

/* ═══ STANDINGS ═══ */
.fpe-standings-wrap { }
.fpe-standings-header {
    display: flex; align-items: center; gap: 8px;
    padding-bottom: 0.65rem; margin-bottom: 0.65rem;
    border-bottom: 1px solid var(--fpe-border);
}
.fpe-league-logo-sm {
    width: 24px; height: 24px; object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}
.fpe-standings-title {
    font-weight: 600; font-size: 0.9rem; color: var(--fpe-text); flex: 1;
}

.fpe-standings-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fpe-standings-table table {
    width: 100%; border-collapse: collapse; font-size: 0.82rem;
    background: var(--fpe-bg-card); border-radius: var(--fpe-radius); overflow: hidden;
}
.fpe-standings-table thead { background: var(--fpe-bg-surface); }
.fpe-standings-table th {
    padding: 0.55rem 0.4rem; text-align: center; color: var(--fpe-text-muted);
    font-weight: 600; font-size: 0.7rem; text-transform: uppercase;
    letter-spacing: 0.05em; border-bottom: 2px solid var(--fpe-border);
}
.fpe-standings-table td {
    padding: 0.45rem 0.4rem; text-align: center;
    border-bottom: 1px solid var(--fpe-border); color: var(--fpe-text);
}
.fpe-standings-table tbody tr {
    transition: background var(--fpe-transition);
}
.fpe-standings-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.fpe-col-team { text-align: left !important; white-space: nowrap; }
.fpe-col-team span { vertical-align: middle; }
.fpe-col-pos { width: 30px; }
.fpe-col-pts { color: var(--fpe-accent) !important; font-weight: 700; }

.fpe-team-logo-tbl {
    width: 24px; height: 24px; object-fit: contain;
    vertical-align: middle; margin-right: 8px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}

/* Zone colors */
.fpe-zone-cl td:first-child { border-left: 3px solid var(--fpe-zone-cl); }
.fpe-zone-el td:first-child { border-left: 3px solid var(--fpe-zone-el); }
.fpe-zone-conf td:first-child { border-left: 3px solid #06b6d4; }
.fpe-zone-rel td:first-child { border-left: 3px solid var(--fpe-zone-rel); }

/* Form dots */
.fpe-form-dot {
    display: inline-block; width: 18px; height: 18px;
    line-height: 18px; text-align: center; border-radius: 50%;
    font-size: 0.6rem; font-weight: 700; color: #fff; margin-right: 2px;
}
.fpe-form-w { background: var(--fpe-win); }
.fpe-form-d { background: var(--fpe-draw); }
.fpe-form-l { background: var(--fpe-loss); }

/* ═══ TODAY'S MATCHES ═══ */
.fpe-today-matches {
    background: var(--fpe-bg-card); border: 1px solid var(--fpe-border);
    border-radius: var(--fpe-radius); padding: 1.25rem;
}
.fpe-today-header {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 1rem; border-bottom: 1px solid var(--fpe-border); padding-bottom: 0.75rem;
}
.fpe-today-header h3 { margin: 0; color: var(--fpe-text); font-size: 1rem; }
.fpe-today-date { color: var(--fpe-text-dim); font-size: 0.8rem; }

/* League group inside today */
.fpe-today-league-group { margin-bottom: 0.75rem; }
.fpe-today-league-label {
    display: flex; align-items: center; gap: 6px;
    padding: 0.4rem 0; font-size: 0.75rem; font-weight: 600;
    color: var(--fpe-text-muted); text-transform: uppercase; letter-spacing: 0.04em;
    border-bottom: 1px solid var(--fpe-border); margin-bottom: 0.25rem;
}
.fpe-today-league-icon { width: 18px; height: 18px; object-fit: contain; }

.fpe-today-card {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.55rem 0; border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background var(--fpe-transition);
}
.fpe-today-card:last-child { border-bottom: 0; }
.fpe-today-card:hover { background: rgba(255,255,255,0.02); }

.fpe-today-time {
    font-size: 0.8rem; font-weight: 700; color: var(--fpe-accent);
    min-width: 42px; font-variant-numeric: tabular-nums;
}
.fpe-today-teams { flex: 1; }
.fpe-today-team {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.85rem; color: var(--fpe-text); margin-bottom: 3px;
}
.fpe-today-team:last-child { margin-bottom: 0; }
.fpe-today-team img { width: 28px; height: 28px; object-fit: contain; }
.fpe-today-fav span:first-of-type { font-weight: 700; color: var(--fpe-accent); }
.fpe-fav-star { color: var(--fpe-accent); font-size: 0.7rem; margin-left: 2px; }

.fpe-today-tip {
    font-size: 0.73rem; color: var(--fpe-accent); font-weight: 600;
    max-width: 200px; text-align: right;
}
.fpe-no-matches { text-align: center; padding: 2rem; color: var(--fpe-text-dim); }

/* ═══ PREDICTION SINGLE PAGE ═══ */
.fpe-prediction-card { max-width: 800px; margin: 0 auto; }
.fpe-match-info { color: var(--fpe-text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }
.fpe-advice-box {
    background: var(--fpe-accent-glow); border: 1px solid var(--fpe-accent);
    border-radius: var(--fpe-radius); padding: 1.25rem; margin-bottom: 1.5rem;
}
.fpe-advice-box h3 {
    color: var(--fpe-accent); margin: 0 0 0.5rem;
    font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em;
}

.fpe-prob-item {
    display: flex; justify-content: space-between;
    padding: 0.4rem 0; border-bottom: 1px solid var(--fpe-border);
}
.fpe-prob-item:last-child { border-bottom: 0; }
.fpe-prob-label { color: var(--fpe-text); }
.fpe-prob-value { font-weight: 700; color: var(--fpe-accent); }

.fpe-comparison-table { width: 100%; border-collapse: collapse; }
.fpe-comparison-table th, .fpe-comparison-table td {
    padding: 0.5rem; text-align: center;
    border-bottom: 1px solid var(--fpe-border);
    color: var(--fpe-text); font-size: 0.85rem;
}
.fpe-comparison-table th { color: var(--fpe-text-muted); font-weight: 600; }


/* Scale feature placeholders */
.fpe-odds-section, .fpe-h2h-section, .fpe-lineups-section {
    background: var(--fpe-bg-card); border: 1px solid var(--fpe-border);
    border-radius: var(--fpe-radius); padding: 1.25rem; margin-bottom: 1.5rem;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 640px) {
    .fpe-hide-mobile { display: none !important; }
    .fpe-match-teams { gap: 0.25rem; }
    .fpe-team-crest { width: 40px; height: 40px; }
    .fpe-team-logo { width: 36px; height: 36px; }
    .fpe-team-name { font-size: 0.82rem; word-break: break-word; }
    .fpe-match-center { min-width: 40px; }
    .fpe-match-score { font-size: 1rem; }
    .fpe-status-badge { font-size: .55rem; padding: 2px 6px; }
    .fpe-today-card { flex-wrap: wrap; }
    .fpe-today-tip { max-width: 100%; text-align: left; }
    .fpe-league-block { padding: .85rem; margin-bottom: 1rem; }
    .fpe-league-header { flex-wrap: wrap; gap: .5rem; }
    .fpe-league-crest { width: 24px; height: 24px; }
    .fpe-league-name { font-size: .88rem; }
    .fpe-view-all { font-size: .72rem; }
    .fpe-standings-table { font-size: 0.75rem; }
    .fpe-team-logo-tbl { width: 20px; height: 20px; margin-right: 4px; }
    .fpe-match-card { padding: .85rem; }
    .fpe-match-header { flex-wrap: wrap; gap: .25rem; }
    .fpe-match-date { font-size: .72rem; }
    .fpe-match-round { font-size: .62rem; }
    .fpe-advice { font-size: .78rem; line-height: 1.4; word-break: break-word; }
    .fpe-prob-bar-visual { height: 20px; }
    .fpe-prob-segment span { font-size: .55rem; }
    .fpe-prob-labels { font-size: .65rem; }
    .fpe-tag { font-size: .68rem; padding: .2rem .5rem; }
    .fpe-full-analysis { font-size: .8rem; padding: .55rem; }
    .fpe-tags-row { gap: 4px; }
}

@media (max-width: 380px) {
    .fpe-team-crest { width: 32px; height: 32px; }
    .fpe-team-logo { width: 28px; height: 28px; }
    .fpe-team-name { font-size: .72rem; }
    .fpe-team-pct { font-size: .72rem; }
    .fpe-team-info { gap: 1px; }
    .fpe-match-center { min-width: 32px; }
    .fpe-match-score { font-size: .88rem; }
    .fpe-vs-badge { font-size: .55rem; padding: 2px 6px; }
    .fpe-match-kickoff { font-size: .6rem; }
    .fpe-league-block { padding: .65rem; }
    .fpe-match-card { padding: .65rem; }
    .fpe-advice { font-size: .7rem; }
    .fpe-prob-bar-visual { height: 16px; }
    .fpe-prob-segment span { font-size: .5rem; }
}

/* ═══ COMPACT LIST (sidebar) ═══ */
.fpe-compact-list { }
.fpe-compact-item {
    display: flex; align-items: center; gap: .6rem;
    padding: .55rem 0; border-bottom: 1px solid var(--fpe-border);
    text-decoration: none; color: var(--fpe-text);
    transition: background var(--fpe-transition);
}
.fpe-compact-item:last-child { border-bottom: none; }
.fpe-compact-item:hover { background: rgba(255,255,255,.02); }
a.fpe-compact-item:hover .fpe-compact-team span { color: var(--fpe-accent); }
.fpe-compact-date {
    font-size: .7rem; color: var(--fpe-text-dim); min-width: 36px;
    font-variant-numeric: tabular-nums;
}
.fpe-compact-match { flex: 1; min-width: 0; }
.fpe-compact-team {
    display: flex; align-items: center; gap: 5px;
    font-size: .8rem; color: var(--fpe-text); line-height: 1.5;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fpe-compact-team img { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
.fpe-compact-team span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fpe-compact-bar {
    display: flex; width: 50px; height: 4px; border-radius: 2px; overflow: hidden;
    flex-shrink: 0; gap: 1px;
}
.fpe-compact-bar span { display: block; }

/* ═══ PREDICTION SINGLE PAGE ═══ */
.fpe-prediction-card { max-width: 800px; margin: 0 auto; }
.fpe-match-info { color: var(--fpe-text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

.fpe-advice-box {
    background: var(--fpe-accent-glow);
    border: 1px solid var(--fpe-accent);
    border-radius: var(--fpe-radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.fpe-advice-box h3 {
    color: var(--fpe-accent);
    margin: 0 0 0.5rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.fpe-advice-box .fpe-advice { font-size: 1.1rem; margin-bottom: 0.5rem; }

/* cards base da single */
.fpe-probabilities,
.fpe-goals-prediction,
.fpe-comparison {
    background: linear-gradient(180deg, rgba(17,24,39,.96), rgba(15,21,32,.98));
    border: 1px solid var(--fpe-border);
    border-radius: 14px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.16);
}

.fpe-probabilities h3,
.fpe-goals-prediction h3,
.fpe-comparison h3 {
    margin: 0 0 0.9rem;
    font-size: 0.82rem;
    color: var(--fpe-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* Goal Prediction */
.fpe-goals-prediction {
    position: relative;
    overflow: hidden;
}
.fpe-goals-prediction::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, var(--fpe-draw), var(--fpe-accent));
    opacity: .95;
}
.fpe-goals-prediction p {
    margin: 0;
    color: var(--fpe-text);
    font-size: 1rem;
    line-height: 1.75;
}
.fpe-goals-prediction p + p {
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--fpe-border);
    color: var(--fpe-text-muted);
}
.fpe-goals-prediction strong {
    color: var(--fpe-text);
    font-weight: 700;
}

/* Probability box */
.fpe-prob-item {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--fpe-border);
}
.fpe-prob-item:last-child { border-bottom: 0; }
.fpe-prob-label { color: var(--fpe-text); }
.fpe-prob-value { font-weight: 700; color: var(--fpe-accent); }

/* Comparison table */
.fpe-comparison-table { width: 100%; border-collapse: collapse; }
.fpe-comparison-table th, .fpe-comparison-table td {
    padding: 0.5rem;
    text-align: center;
    border-bottom: 1px solid var(--fpe-border);
    color: var(--fpe-text);
    font-size: 0.85rem;
}
.fpe-comparison-table th { color: var(--fpe-text-muted); font-weight: 600; }

/* More Predictions */
.fpe-related-predictions {
    margin-top: 1.9rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--fpe-border-light);
}
.fpe-related-predictions h3 {
    color: var(--fpe-text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0 0 0.95rem;
}
.fpe-related-predictions ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.65rem;
}
.fpe-related-predictions li {
    padding: 0;
    border: 0;
}
.fpe-related-predictions a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 0.95rem 1rem;
    background: linear-gradient(180deg, rgba(17,24,39,.9), rgba(15,21,32,.98));
    border: 1px solid var(--fpe-border);
    border-radius: 12px;
    color: var(--fpe-text);
    text-decoration: none;
    font-weight: 600;
    line-height: 1.45;
    transition: border-color var(--fpe-transition), transform var(--fpe-transition), background var(--fpe-transition);
}
.fpe-related-predictions a:hover {
    color: var(--fpe-text);
    border-color: var(--fpe-accent);
    background: linear-gradient(180deg, rgba(22,31,48,.98), rgba(15,21,32,.99));
    transform: translateY(-1px);
}
.fpe-related-date {
    flex-shrink: 0;
    margin-left: auto;
    color: var(--fpe-text-dim);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

/* Scale feature placeholders */
.fpe-odds-section, .fpe-h2h-section, .fpe-lineups-section {
    background: var(--fpe-bg-card);
    border: 1px solid var(--fpe-border);
    border-radius: var(--fpe-radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

/* ===== Single page refinements: Goals Prediction + More Predictions ===== */

/* Goals Prediction */
.fpe-goals-prediction{
    position: relative;
    background: linear-gradient(180deg, rgba(17,24,39,.98), rgba(15,21,32,.98));
    border: 1px solid var(--fpe-border);
    border-radius: 14px;
    padding: 1.2rem 1.25rem 1.15rem 1.35rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 24px rgba(0,0,0,.14);
    overflow: hidden;
}

.fpe-goals-prediction::before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--fpe-draw), var(--fpe-accent));
}

.fpe-goals-prediction h3{
    margin: 0 0 .9rem;
    font-size: .82rem;
    color: var(--fpe-text-muted);
    text-transform: uppercase;
    letter-spacing: .12em;
}

/* New format: prob-item rows inside goals prediction */
.fpe-goals-prediction .fpe-prob-item{
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .55rem 0;
    border-bottom: 1px solid var(--fpe-border);
    font-size: .95rem;
}
.fpe-goals-prediction .fpe-prob-item:last-child{ border-bottom: 0; }
.fpe-goals-prediction .fpe-prob-label{ color: var(--fpe-text); font-weight: 500; }
.fpe-goals-prediction .fpe-prob-value{ font-weight: 700; color: var(--fpe-accent); }

/* Legacy format: p tags from old posts (backward compat) */
.fpe-goals-prediction p{
    margin: 0;
    color: var(--fpe-text);
    font-size: .95rem;
    line-height: 1.7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .4rem 0;
    border-bottom: 1px solid var(--fpe-border);
}
.fpe-goals-prediction p:last-of-type{ border-bottom: 0; }

.fpe-goals-prediction strong{
    color: var(--fpe-draw);
    font-weight: 700;
    margin-left: auto;
}

/* esconde Under/Over vazio */
.fpe-goals-prediction p:first-of-type:has(strong:empty){
    display: none;
}

/* ═══ RESULT BLOCK (injected after match finishes) ═══ */
.fpe-result-block {
    position: relative;
    border-radius: 14px;
    padding: 1.35rem 1.5rem;
    margin-bottom: 1.75rem;
    overflow: hidden;
}
.fpe-result-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px; height: 100%;
}
.fpe-result-block.fpe-result-correct {
    background: linear-gradient(180deg, rgba(34,197,94,.08), rgba(17,24,39,.98));
    border: 1px solid rgba(34,197,94,.25);
}
.fpe-result-block.fpe-result-correct::before {
    background: var(--fpe-accent, #22c55e);
}
.fpe-result-block.fpe-result-wrong {
    background: linear-gradient(180deg, rgba(239,68,68,.08), rgba(17,24,39,.98));
    border: 1px solid rgba(239,68,68,.2);
}
.fpe-result-block.fpe-result-wrong::before {
    background: var(--fpe-loss, #ef4444);
}

.fpe-result-header {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .85rem;
}
.fpe-result-badge {
    font-size: .62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 3px 10px;
    border-radius: 4px;
    background: rgba(100,116,139,.15);
    color: #94a3b8;
}
.fpe-result-date {
    font-size: .78rem;
    color: var(--fpe-text-dim, #64748b);
}

.fpe-result-score {
    font-size: 1.15rem;
    color: var(--fpe-text, #e2e8f0);
    margin-bottom: .6rem;
}
.fpe-result-score strong {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0 .3rem;
}
.fpe-result-correct .fpe-result-score strong { color: var(--fpe-accent, #22c55e); }
.fpe-result-wrong .fpe-result-score strong { color: var(--fpe-loss, #ef4444); }

.fpe-result-verdict {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: .5rem;
}
.fpe-result-verdict span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px; height: 22px;
    border-radius: 50%;
    font-size: .72rem;
    margin-right: .35rem;
}
.fpe-result-correct .fpe-result-verdict {
    color: var(--fpe-accent, #22c55e);
}
.fpe-result-correct .fpe-result-verdict span {
    background: rgba(34,197,94,.15);
    color: var(--fpe-accent, #22c55e);
}
.fpe-result-wrong .fpe-result-verdict {
    color: var(--fpe-loss, #ef4444);
}
.fpe-result-wrong .fpe-result-verdict span {
    background: rgba(239,68,68,.12);
    color: var(--fpe-loss, #ef4444);
}

.fpe-result-detail {
    font-size: .85rem;
    color: var(--fpe-text-muted, #94a3b8);
    margin-bottom: .4rem;
}
.fpe-result-detail strong {
    color: var(--fpe-text, #e2e8f0);
}

.fpe-result-ou {
    font-size: .82rem;
    color: var(--fpe-text-muted, #94a3b8);
    margin-bottom: .5rem;
}
.fpe-result-ou span {
    font-weight: 700;
    margin-right: .2rem;
}
.fpe-result-ou.fpe-result-correct span { color: var(--fpe-accent, #22c55e); }
.fpe-result-ou.fpe-result-wrong span { color: var(--fpe-loss, #ef4444); }

.fpe-result-perf-link {
    display: inline-block;
    margin-top: .6rem;
    font-size: .8rem;
    font-weight: 600;
    color: var(--fpe-accent, #22c55e);
    text-decoration: none;
    transition: opacity .15s;
}
.fpe-result-perf-link:hover { opacity: .8; }

@media (max-width: 640px) {
    .fpe-result-block { padding: 1rem 1.1rem; }
    .fpe-result-score { font-size: 1rem; }
    .fpe-result-score strong { font-size: 1.15rem; }
    .fpe-result-verdict { font-size: .85rem; }
    .fpe-result-detail { font-size: .78rem; }
}

/* More Predictions — clean list */
.fpe-related-predictions{
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--fpe-border);
}
.fpe-related-predictions h3{
    margin: 0 0 1rem;
    font-size: .78rem;
    color: var(--fpe-text-muted);
    text-transform: uppercase;
    letter-spacing: .1em;
}
.fpe-related-predictions ul{
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.fpe-related-predictions li{
    background: var(--fpe-bg-card);
    border: 1px solid var(--fpe-border);
    border-left: 3px solid var(--fpe-border-light);
    border-radius: 8px;
    transition: border-color .15s, transform .15s;
}
.fpe-related-predictions li:hover{
    border-left-color: var(--fpe-accent);
    transform: translateX(2px);
}
.fpe-related-predictions a{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1rem;
    color: var(--fpe-text);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.35;
}
.fpe-related-predictions a:hover{ color: var(--fpe-text); }
.fpe-related-title{
    flex: 1;
    min-width: 0;
}
.fpe-related-date{
    flex-shrink: 0;
    color: var(--fpe-accent);
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 640px){
    .fpe-related-predictions a{
        padding: .7rem .85rem;
        font-size: .82rem;
        gap: .75rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   PERFORMANCE PAGE
   ═══════════════════════════════════════════════════════════════ */
.fpe-performance-wrap {
    max-width: 100%;
}

/* ─── STAT CARDS ─── */
.fpe-perf-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.fpe-perf-stat-card {
    background: var(--fpe-bg-surface, #111827);
    border: 1px solid var(--fpe-border, #1e293b);
    border-radius: 10px;
    padding: 1.25rem 1rem;
    text-align: center;
}
.fpe-perf-stat-card.fpe-perf-stat-main {
    border-color: var(--fpe-accent, #22c55e);
    border-width: 2px;
}
.fpe-perf-stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--fpe-text, #e2e8f0);
    margin-bottom: .25rem;
}
.fpe-perf-stat-value.fpe-perf-good { color: var(--fpe-accent, #22c55e); }
.fpe-perf-stat-value.fpe-perf-avg  { color: var(--fpe-warn, #f59e0b); }
.fpe-perf-stat-label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--fpe-text-dim, #64748b);
    font-weight: 600;
}
.fpe-perf-stat-detail {
    font-size: .78rem;
    color: var(--fpe-text-muted, #94a3b8);
    margin-top: .3rem;
}

/* ─── PER-LEAGUE BREAKDOWN ─── */
.fpe-perf-leagues {
    background: var(--fpe-bg-surface, #111827);
    border: 1px solid var(--fpe-border, #1e293b);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 2rem;
}
.fpe-perf-leagues h3 {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--fpe-text-dim, #64748b);
    margin: 0 0 1rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid var(--fpe-border, #1e293b);
}
.fpe-perf-league-grid {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}
.fpe-perf-league-row {
    display: grid;
    grid-template-columns: 160px 1fr 50px 50px;
    align-items: center;
    gap: .75rem;
}
.fpe-perf-league-name {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    font-weight: 600;
    color: var(--fpe-text, #e2e8f0);
    min-width: 0;
}
.fpe-perf-league-name img {
    flex-shrink: 0;
    border-radius: 2px;
}
.fpe-perf-league-name span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fpe-perf-league-bar {
    height: 6px;
    background: rgba(255,255,255,.06);
    border-radius: 3px;
    overflow: hidden;
}
.fpe-perf-league-fill {
    height: 100%;
    border-radius: 3px;
    transition: width .4s ease;
}
.fpe-perf-league-fill.fpe-perf-good-bg { background: var(--fpe-accent, #22c55e); }
.fpe-perf-league-fill.fpe-perf-avg-bg  { background: var(--fpe-warn, #f59e0b); }
.fpe-perf-league-pct {
    font-size: .8rem;
    font-weight: 700;
    color: var(--fpe-text, #e2e8f0);
    text-align: right;
}
.fpe-perf-league-count {
    font-size: .72rem;
    color: var(--fpe-text-dim, #64748b);
    text-align: right;
}

/* ─── MATCH HISTORY TABLE ─── */
.fpe-perf-history {
    background: var(--fpe-bg-surface, #111827);
    border: 1px solid var(--fpe-border, #1e293b);
    border-radius: 10px;
    padding: 1.25rem;
}
.fpe-perf-history h3 {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--fpe-text-dim, #64748b);
    margin: 0 0 1rem;
    padding-bottom: .65rem;
    border-bottom: 1px solid var(--fpe-border, #1e293b);
}
.fpe-perf-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.fpe-perf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
    table-layout: fixed;
}
.fpe-perf-table th {
    text-align: left;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--fpe-text-dim, #64748b);
    padding: .5rem .6rem;
    border-bottom: 1px solid var(--fpe-border, #1e293b);
    font-weight: 600;
    white-space: nowrap;
}
/* Column widths */
.fpe-perf-table th:nth-child(1) { width: 30%; }    /* Match */
.fpe-perf-table th:nth-child(2) { width: 55px; }   /* Score */
.fpe-perf-table th:nth-child(3) { width: auto; }   /* Predicted — gets remaining */
.fpe-perf-table th:nth-child(4) { width: 55px; }   /* Result */
.fpe-perf-table td {
    padding: .7rem .6rem;
    border-bottom: 1px solid rgba(255,255,255,.04);
    color: var(--fpe-text, #e2e8f0);
    vertical-align: middle;
    white-space: nowrap;
}
.fpe-perf-table tr:last-child td { border-bottom: none; }

.fpe-perf-match-teams a {
    color: var(--fpe-text, #e2e8f0);
    text-decoration: none;
}
.fpe-perf-match-teams a:hover { color: var(--fpe-accent, #22c55e); }
.fpe-perf-team { font-weight: 600; }
.fpe-perf-vs {
    color: var(--fpe-text-dim, #64748b);
    font-size: .7rem;
    margin: 0 .25rem;
}
.fpe-perf-match-meta {
    font-size: .7rem;
    color: var(--fpe-text-dim, #64748b);
    margin-top: .15rem;
}
.fpe-perf-score-cell {
    white-space: nowrap;
    font-size: .88rem;
}
.fpe-perf-predicted-cell {
    color: var(--fpe-text-muted, #94a3b8);
    font-size: .78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.fpe-perf-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: .72rem;
    font-weight: 800;
}
.fpe-perf-badge-hit {
    background: rgba(34,197,94,.15);
    color: var(--fpe-accent, #22c55e);
}
.fpe-perf-badge-miss {
    background: rgba(239,68,68,.12);
    color: var(--fpe-loss, #ef4444);
}

/* Hit row subtle highlight */
.fpe-perf-hit td:first-child {
    border-left: 2px solid var(--fpe-accent, #22c55e);
}
.fpe-perf-miss td:first-child {
    border-left: 2px solid transparent;
}

/* ─── PERFORMANCE RESPONSIVE ─── */
@media (max-width: 640px) {
    .fpe-perf-stats {
        grid-template-columns: 1fr;
    }
    .fpe-perf-league-row {
        grid-template-columns: 120px 1fr 42px 42px;
        gap: .5rem;
    }
    .fpe-perf-league-name {
        font-size: .75rem;
    }
    .fpe-perf-table {
        font-size: .75rem;
    }
    .fpe-perf-table th,
    .fpe-perf-table td {
        padding: .45rem .4rem;
    }
    .fpe-perf-predicted-cell {
        min-width: 120px;
        font-size: .72rem;
    }
}

/* ═══ SINGLE PREDICTION — MOBILE ═══ */
@media (max-width: 640px) {
    .fpe-prediction-card { padding: 0; }
    .fpe-advice-box { padding: .85rem; }
    .fpe-advice-box .fpe-advice { font-size: .92rem; }
    .fpe-probabilities,
    .fpe-goals-prediction,
    .fpe-comparison { padding: .85rem; border-radius: 10px; }
    .fpe-comparison-table th,
    .fpe-comparison-table td { padding: .4rem .3rem; font-size: .75rem; }
    .fpe-prob-item { font-size: .85rem; }
}
@media (max-width: 380px) {
    .fpe-advice-box .fpe-advice { font-size: .82rem; }
    .fpe-comparison-table th,
    .fpe-comparison-table td { font-size: .68rem; padding: .35rem .2rem; }
}