diff --git a/frontend/src/components/MatchCard.module.css b/frontend/src/components/MatchCard.module.css index c33e4cd..2fd42ba 100644 --- a/frontend/src/components/MatchCard.module.css +++ b/frontend/src/components/MatchCard.module.css @@ -77,12 +77,32 @@ margin-left: auto; } +/* Kickoff row — above teams */ +.kickoffRow { + text-align: center; + margin-bottom: 8px; +} + +.kickoffTime { + font-size: 12px; + font-weight: 600; + color: var(--text-secondary); + letter-spacing: 0.03em; +} + +/* VS separator */ +.vsSeparator { + font-size: 24px; + font-weight: 800; + color: var(--text-muted); +} + /* Match row — Teams + Score */ .matchRow { display: grid; - grid-template-columns: 1fr 100px 1fr; + grid-template-columns: 1fr 40px 1fr; align-items: center; - gap: 12px; + gap: 8px; margin-bottom: 18px; } @@ -342,6 +362,58 @@ letter-spacing: 0.05em; } +/* Tipped row — clean compact display */ +.tippedRow { + display: flex; + align-items: center; + gap: 10px; + background: rgba(52, 211, 153, 0.08); + border: 1px solid rgba(52, 211, 153, 0.2); + border-radius: var(--radius-sm); + padding: 10px 14px; + cursor: pointer; + transition: background 0.2s; +} +.tippedRow:hover { + background: rgba(52, 211, 153, 0.14); +} + +.tippedIcon { + width: 22px; + height: 22px; + border-radius: 50%; + background: var(--success); + color: white; + font-size: 12px; + font-weight: 700; + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; +} + +.tippedLabel { + font-size: 12px; + color: var(--text-secondary); + text-transform: uppercase; + letter-spacing: 0.04em; + font-weight: 600; +} + +.tippedScore { + font-size: 16px; + font-weight: 800; + color: var(--text-primary); + margin-left: auto; +} + +.tippedEdit { + font-size: 11px; + color: var(--primary); + font-weight: 600; + opacity: 0.7; +} + /* ── State-based card variants ──────────────────────────────────── */ .card_open { /* default — no extra styling needed */ } diff --git a/frontend/src/components/MatchCard.tsx b/frontend/src/components/MatchCard.tsx index 135e63b..31133ac 100644 --- a/frontend/src/components/MatchCard.tsx +++ b/frontend/src/components/MatchCard.tsx @@ -117,22 +117,28 @@ export default function MatchCard({ match, onTip }: Props) { )} + {/* Kickoff time — above the teams row */} + {!isFinished && !isLive && ( +
+ {formatKickoff(match.utcDate)} +
+ )} + {/* Teams + Score */}
{/* Home */}
- {match.homeTeam.name} + {match.homeTeam.shortName}
- {/* Score / Kickoff time */} + {/* Center: Score or VS separator */}
{isFinished || isLive ? (
{match.score.home ?? '–'} : {match.score.away ?? '–'} - {/* For live: show user's tip next to score for comparison */} {isLive && hasTip && ( Tipp: {match.userTip!.home}:{match.userTip!.away} @@ -140,16 +146,14 @@ export default function MatchCard({ match, onTip }: Props) { )}
) : ( -
- {formatKickoff(match.utcDate)} -
+ : )}
{/* Away */}
- {match.awayTeam.name} + {match.awayTeam.shortName}
@@ -210,22 +214,11 @@ export default function MatchCard({ match, onTip }: Props) { ) : ( /* ── Tipp vorhanden, noch nicht ausgewertet (tipped state) ── */ -
-
- {match.tippable && ( - - )} -
-
- {!match.tippable && DEIN TIPP} - - - - {match.userTip!.home} : {match.userTip!.away} - - -
-
+
+ + Dein Tipp + {match.userTip!.home} : {match.userTip!.away} + {match.tippable && Ändern}
) ) : match.tippable ? (