Multi-match restructure + 06.09 meeting reflection + scoring design

구조:
- 단일 경기 → 멀티 경기: 대시보드(/) + 경기 상세(/match/[matchId], 6경기 SSG) + 리더보드 stub(/leaderboard)
- 컴포넌트 파라미터화: MatchupHUD/Arena가 match·predictions·crowd props 수신 (싱글톤 의존 제거)
- 신규 컴포넌트: ScheduleBoard, Countdown, TeamFlag
- mockData: 경기별 결정론적 AI예측/Crowd 생성기(getPredictions/getCrowd) + matchUrl

06.09 회의 반영:
- 확률 라벨 "OO 승리 확률 %"+승리팀 국기(D3), confidence 바 제거 + 메인 리즌 강조
- 닉네임 제거→이메일만(D5), 투표 종료 카운트다운(D7), 결과 보기 전환, 경기별 공유(D8)
- "월드컵" 표현 제거→글로벌 축구(D9), 서브타이틀 중복 삭제, Crowd "AI 승리 확률과 다름" 라벨
- 포인트 컬러 #4AFFA0 통일, 일정 #94FBE0, 푸터 가시성 개선

채점·심사 설계(docs/SCORING.md):
- 공정성 모델 확정: 주최측 배제 + 순수 누적 포인트(점수는 정확도에서만)
- 배점/랭킹/배제/결과정의 + scorePrediction·rank 참조 구현
- 골드 카드 심사 기준 카피 정합

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Haewon KamandClaude Opus 4.8 committed 2026-06-09 14:05:14 +09:00
1 parent 0a96babc98
commit a0fc9d6194
19 files changed
+925 -244

No files matched your search

+162 -121
View File
@@ -1,59 +1,75 @@
"use client";
import { useMemo, useState } from "react";
import { MATCH, AI_PREDICTIONS, CROWD, LANDING_URL, DEMO_FORCE_OPEN } from "@/lib/mockData";
import { outcomeLabel, pct, kickoffDisplay } from "@/lib/format";
import type { Outcome, CrowdStats, ModelName } from "@/lib/types";
import { DEMO_FORCE_OPEN } from "@/lib/mockData";
import { outcomeLabel, pct, kickoffDisplay, winProb } from "@/lib/format";
import type {
Outcome,
CrowdStats,
ModelName,
Match,
AIPrediction,
} from "@/lib/types";
import Countdown from "./Countdown";
import TeamFlag from "./TeamFlag";
type Step = "pick" | "form" | "done";
const MODEL_COLOR: Record<ModelName, string> = {
GPT: "var(--gpt)",
Claude: "var(--claude)",
Gemini: "var(--gemini)",
};
const MODEL_ICON: Record<ModelName, string> = {
GPT: "/icons/gpt.png",
Claude: "/icons/claude.jpg",
Gemini: "/icons/gemini.jpeg",
};
export default function Arena() {
const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
export default function Arena({
match,
predictions,
crowd: initialCrowd,
shareUrl,
}: {
match: Match;
predictions: AIPrediction[];
crowd: CrowdStats;
shareUrl: string;
}) {
const [outcome, setOutcome] = useState<Outcome | null>(null);
const [scoreA, setScoreA] = useState(2);
const [scoreB, setScoreB] = useState(1);
const [step, setStep] = useState<Step>("pick");
const [nickname, setNickname] = useState("");
const [email, setEmail] = useState("");
const [notify, setNotify] = useState(true);
const [crowd, setCrowd] = useState<CrowdStats>(CROWD);
const [crowd, setCrowd] = useState<CrowdStats>(initialCrowd);
const [copied, setCopied] = useState(false);
// 투표 창: 오픈(D-2) ≤ now < 마감(킥오프 정각)
// 투표 창: 오픈(D-2) ≤ now < 마감(킥오프 정각). 종료 = 결과 존재.
const now = Date.now();
const notOpen = !DEMO_FORCE_OPEN && now < new Date(MATCH.opensAt).getTime();
const locked = now >= new Date(MATCH.lockAt).getTime();
const disabled = locked || notOpen; // 폼 비활성
const ctaLabel = notOpen
? `투표 오픈 ${kickoffDisplay(MATCH.opensAt)}`
: locked
? "예측 마감 (경기 시작)"
: "AI보다 잘 맞히기";
const finished = !!match.result;
const notOpen = !DEMO_FORCE_OPEN && now < new Date(match.opensAt).getTime();
const locked = now >= new Date(match.lockAt).getTime();
const disabled = finished || locked || notOpen;
const ctaLabel = finished
? "결과 보기"
: notOpen
? `투표 오픈 ${kickoffDisplay(match.opensAt)}`
: locked
? "예측 마감 (경기 시작)"
: "AI보다 잘 맞히기";
const matched = useMemo(() => {
if (!outcome) return [];
return AI_PREDICTIONS.filter((p) => p.outcome === outcome).map((p) => ({
model: p.model,
exact: p.scoreA === scoreA && p.scoreB === scoreB,
}));
}, [outcome, scoreA, scoreB]);
return predictions
.filter((p) => p.outcome === outcome)
.map((p) => ({ model: p.model, exact: p.scoreA === scoreA && p.scoreB === scoreB }));
}, [outcome, scoreA, scoreB, predictions]);
const submitPick = () => {
if (!outcome) return;
setStep("form");
};
const confirmSubmit = () => {
if (nickname.trim().length < 2) return;
if (!EMAIL_RE.test(email.trim())) return;
setCrowd((c) => ({
...c,
total: c.total + 1,
@@ -66,16 +82,16 @@ export default function Arena() {
const shareText = useMemo(() => {
if (!outcome) return "";
const me = `${MATCH.teamA.shortName} ${scoreA}-${scoreB} ${MATCH.teamB.shortName}`;
const me = `${match.teamA.shortName} ${scoreA}-${scoreB} ${match.teamB.shortName}`;
const sameAI = matched.map((m) => m.model).join("·");
return sameAI
? `나는 ${me}. ${sameAI}와 같은 선택! 너는? — TriplePick`
: `나는 ${me}. AI 셋과 다 다른 선택! 너는? — TriplePick`;
}, [outcome, scoreA, scoreB, matched]);
}, [outcome, scoreA, scoreB, matched, match]);
const copyLink = async () => {
try {
await navigator.clipboard.writeText(`${shareText}\n${LANDING_URL}`);
await navigator.clipboard.writeText(`${shareText}\n${shareUrl}`);
setCopied(true);
setTimeout(() => setCopied(false), 1800);
} catch {
@@ -85,7 +101,11 @@ export default function Arena() {
const nativeShare = async () => {
if (navigator.share) {
try {
await navigator.share({ text: shareText, url: LANDING_URL });
await navigator.share({
title: `${match.teamA.shortName} vs ${match.teamB.shortName} — TriplePick`,
text: shareText,
url: shareUrl,
});
} catch {
/* cancelled */
}
@@ -94,57 +114,59 @@ export default function Arena() {
return (
<>
{/* ===== 카운트다운 (D7) — 투표 진행 중일 때만 ===== */}
{!finished && !notOpen && (
<div className="mt-4">
<Countdown to={match.lockAt} />
</div>
)}
{/* ===== 레이어드 화이트 시트 (002) ===== */}
<section className="sheet mt-6 p-5 text-[var(--ink)]">
<div className="mb-3 flex items-end gap-2">
<h2 className="text-[22px] font-extrabold">AI의 예측</h2>
<span className="mb-1.5 h-[4px] w-10 rounded bg-[var(--green)]" />
<section className="sheet mt-4 p-5 text-[var(--ink)]">
<div className="mb-3">
<h2 className="text-[22px] font-extrabold">AI의 예측 대결</h2>
</div>
<div className="flex flex-col gap-3">
{AI_PREDICTIONS.map((p) => (
<div
key={p.model}
className="rounded-2xl border border-[var(--line-l)] bg-[var(--sheet-card)] p-4"
>
<div className="flex items-center gap-3">
<img
src={MODEL_ICON[p.model]}
alt={p.model}
className="h-12 w-12 shrink-0 rounded-full object-cover"
/>
<div className="min-w-0">
<div className="text-[20px] font-extrabold leading-none">
{p.model}
{predictions.map((p) => {
const wp = winProb(match, p);
return (
<div
key={p.model}
className="rounded-2xl border border-[var(--line-l)] bg-[var(--sheet-card)] p-4"
>
<div className="flex items-center gap-3">
<img
src={MODEL_ICON[p.model]}
alt={p.model}
className="h-12 w-12 shrink-0 rounded-full object-cover"
/>
<div className="min-w-0">
<div className="text-[20px] font-extrabold leading-none">
{p.model}
</div>
{/* D3: 승리 예측 팀의 승리 확률 + 승리팀 국기 */}
<div className="mt-1.5 flex items-center gap-1.5">
{wp.team && (
<TeamFlag team={wp.team} className="h-3.5 w-5 shrink-0" />
)}
<span className="text-[12px] font-bold text-[var(--ink-muted)]">
{wp.label} <span className="text-[var(--gpt)]">{wp.pct}%</span>
</span>
</div>
</div>
<div className="mt-1 text-[11px] font-semibold text-[var(--ink-muted)]">
Confidence
</div>
</div>
<div className="ml-auto flex shrink-0 items-center gap-3">
<div className="whitespace-nowrap font-mono text-[28px] font-extrabold tabular-nums">
<div className="ml-auto shrink-0 whitespace-nowrap font-mono text-[28px] font-extrabold tabular-nums">
{p.scoreA}&nbsp;-&nbsp;{p.scoreB}
</div>
<div className="w-11 text-right text-[18px] font-extrabold">
{p.confidencePct}%
</div>
</div>
</div>
<div className="mt-2.5 h-2.5 w-full overflow-hidden rounded-full bg-[#eceee9]">
<div
className="bar-anim h-full rounded-full"
style={{
width: `${p.confidencePct}%`,
background: MODEL_COLOR[p.model],
}}
/>
{/* 메인 리즌 강조 (D3: 확률은 텍스트, 바 제거) */}
<p className="mt-3 text-[15px] font-bold leading-snug text-[var(--ink)]">
“{p.reasonShort}”
</p>
</div>
<p className="mt-2 text-[13px] leading-snug text-[var(--ink-muted)]">
{p.reasonShort}
</p>
</div>
))}
);
})}
</div>
{/* 당신의 선택 */}
@@ -158,16 +180,16 @@ export default function Arena() {
<div className="mt-3 grid grid-cols-3 gap-2">
{(
[
["TEAM_A_WIN", `${MATCH.teamA.shortName} 승`],
["TEAM_A_WIN", `${match.teamA.shortName} 승`],
["DRAW", "무승부"],
["TEAM_B_WIN", `${MATCH.teamB.shortName} 승`],
["TEAM_B_WIN", `${match.teamB.shortName} 승`],
] as [Outcome, string][]
).map(([val, label]) => (
<button
key={val}
disabled={disabled}
onClick={() => setOutcome(val)}
className={`rounded-xl border py-3.5 text-[16px] font-extrabold transition ${
className={`rounded-xl border py-3.5 text-[16px] font-extrabold transition disabled:opacity-50 ${
outcome === val
? "border-transparent bg-[var(--mint)] text-[var(--mint-ink)]"
: "border-[var(--line-l)] bg-white text-[var(--ink-muted)]"
@@ -179,14 +201,41 @@ export default function Arena() {
</div>
<div className="mt-3 flex items-center justify-center gap-5 rounded-xl border border-[var(--line-l)] bg-white py-3">
<Stepper label={MATCH.teamA.shortName} value={scoreA} onChange={setScoreA} disabled={disabled} />
<Stepper label={match.teamA.shortName} value={scoreA} onChange={setScoreA} disabled={disabled} />
<span className="text-[26px] font-extrabold text-[var(--ink-muted)]">:</span>
<Stepper label={MATCH.teamB.shortName} value={scoreB} onChange={setScoreB} disabled={disabled} />
<Stepper label={match.teamB.shortName} value={scoreB} onChange={setScoreB} disabled={disabled} />
</div>
</section>
{/* ===== CTA 민트 #85FCA8 ===== */}
{step === "pick" && (
{/* ===== 종료된 경기: 결과 보기 ===== */}
{finished && match.result && (
<section className="mt-5 rounded-2xl border border-[var(--green)]/50 bg-[var(--bg2)] p-5">
<div className="text-[13px] text-[var(--ink-muted)]">최종 결과</div>
<div className="mt-1 text-[26px] font-extrabold">
{match.teamA.shortName} {match.result.scoreA}-{match.result.scoreB}{" "}
{match.teamB.shortName}
<span className="ml-2 text-[16px] font-bold text-[var(--green)]">
{outcomeLabel(match, match.result.outcome)}
</span>
</div>
<div className="mt-3 flex flex-col gap-1.5">
{predictions.map((p) => {
const hit = p.outcome === match.result!.outcome;
return (
<div key={p.model} className="flex items-center justify-between text-[13px]">
<span className="font-bold text-white/85">{p.model}</span>
<span className={hit ? "font-bold text-[var(--green)]" : "text-white/45"}>
{hit ? "적중 ✓" : "빗나감"}
</span>
</div>
);
})}
</div>
</section>
)}
{/* ===== CTA 민트 #85FCA8 (진행 중일 때) ===== */}
{!finished && step === "pick" && (
<button
onClick={submitPick}
disabled={!outcome || disabled}
@@ -196,28 +245,29 @@ export default function Arena() {
</button>
)}
{step === "form" && (
{/* ===== 폼: 이메일만 (D5, 닉네임 제거) ===== */}
{!finished && step === "form" && (
<div className="mt-5 space-y-2.5 rounded-2xl border border-[var(--line-d)] bg-[var(--bg2)] p-4">
<input
value={nickname}
onChange={(e) => setNickname(e.target.value)}
maxLength={16}
placeholder="닉네임 (2~16자)"
className="w-full rounded-lg border border-[var(--line-d)] bg-[#0f1217] px-3 py-3 text-[15px] text-white outline-none focus:border-[var(--green)]"
/>
<input
type="email"
inputMode="email"
value={email}
onChange={(e) => setEmail(e.target.value)}
placeholder="이메일 (선택 · 결과 알림)"
placeholder="이메일 (결과·다음 경기 알림)"
className="w-full rounded-lg border border-[var(--line-d)] bg-[#0f1217] px-3 py-3 text-[15px] text-white outline-none focus:border-[var(--green)]"
/>
<label className="flex items-center gap-2 text-[13px] text-[var(--ink-muted)]">
<input type="checkbox" checked={notify} onChange={(e) => setNotify(e.target.checked)} className="accent-[var(--mint)]" />
경기 결과 나오면 알려주세요 (AI 이겼는지 확인)
<label className="flex items-start gap-2 text-[13px] text-[var(--ink-muted)]">
<input
type="checkbox"
checked={notify}
onChange={(e) => setNotify(e.target.checked)}
className="mt-0.5 accent-[var(--mint)]"
/>
경기 결과가 나오면 알려주세요. 다음 경기·100만원 챌린지 소식도 받겠습니다.
</label>
<button
onClick={confirmSubmit}
disabled={nickname.trim().length < 2}
disabled={!EMAIL_RE.test(email.trim())}
className="btn-mint w-full rounded-xl py-3.5 text-[17px] font-extrabold transition active:scale-[0.99] disabled:opacity-40 disabled:shadow-none"
>
제출하고 AI와 겨루기
@@ -225,20 +275,21 @@ export default function Arena() {
</div>
)}
{step === "done" && outcome && (
{/* ===== 제출 완료: 같은 AI + 경기별 공유 (D8) ===== */}
{!finished && step === "done" && outcome && (
<div className="mt-5 rounded-2xl border border-[var(--green)]/50 bg-[var(--bg2)] p-5">
<div className="text-[13px] text-[var(--ink-muted)]">내 예측</div>
<div className="mt-1 text-[26px] font-extrabold">
{MATCH.teamA.shortName} {scoreA}-{scoreB} {MATCH.teamB.shortName}
{match.teamA.shortName} {scoreA}-{scoreB} {match.teamB.shortName}
<span className="ml-2 text-[16px] font-bold text-[var(--green)]">
{outcomeLabel(MATCH, outcome)}
{outcomeLabel(match, outcome)}
</span>
</div>
<p className="mt-2 text-[14px] leading-relaxed text-white/80">
{matched.length > 0 ? (
<>
당신은 <b>{matched.map((m) => m.model).join("·")}</b>와 같은
선택입니다.{matched.some((m) => m.exact) ? " 스코어까지 일치! " : " "}
당신은 <b>{matched.map((m) => m.model).join("·")}</b>와 같은 선택입니다.
{matched.some((m) => m.exact) ? " 스코어까지 일치! " : " "}
나머지 AI는 생각이 다릅니다.
</>
) : (
@@ -247,7 +298,7 @@ export default function Arena() {
</p>
<div className="mt-4 grid grid-cols-2 gap-2.5">
<button onClick={nativeShare} className="btn-mint rounded-xl py-3 text-[15px] font-bold active:scale-[0.99]">
내 픽 자랑하기
이 경기 공유하기
</button>
<button onClick={copyLink} className="rounded-xl border border-[var(--line-d)] py-3 text-[15px] font-bold active:scale-[0.99]">
{copied ? "복사됨 ✓" : "링크 복사"}
@@ -265,8 +316,7 @@ export default function Arena() {
<span>★</span>
</div>
<p className="mt-1.5 text-[13px] leading-snug text-white/75">
<b className="text-[var(--gold-border)]">NEW</b> 정확한 스코어까지
맞히면 100만원 상금에 도전하세요
경기마다 승패·스코어를 맞혀 포인트를 쌓고, 누적 1위에게 최종 100만원
</p>
</div>
<button className="gold-btn shrink-0 rounded-xl px-4 py-3.5 text-[14px] font-extrabold leading-tight active:scale-[0.98]">
@@ -277,18 +327,19 @@ export default function Arena() {
</div>
</section>
{/* ===== Crowd Pick (003) ===== */}
{/* ===== Crowd Pick (003) — 보팅 비율(≠ AI 승리 확률) ===== */}
<section className="mt-6">
<div className="mb-2.5 text-[20px] font-extrabold">
<div className="mb-1 text-[20px] font-extrabold">
Crowd Pick{" "}
<span className="text-[14px] text-[var(--ink-muted)]">
| 참여자들의 선택
</span>
<span className="text-[14px] text-[var(--ink-muted)]">| 참여자들의 선택</span>
</div>
<div className="mb-2.5 text-[11px] text-[var(--ink-muted)]">
참여자 투표 비율입니다 (AI 승리 확률과 다릅니다)
</div>
<div className="flex h-14 overflow-hidden rounded-2xl border border-[var(--line-d)]">
<CrowdSeg flag="/icons/kor.png" value={pct(crowd.teamAWin, crowd.total)} tone="kor" />
<CrowdSeg team={match.teamA} value={pct(crowd.teamAWin, crowd.total)} tone="a" />
<CrowdSeg value={pct(crowd.draw, crowd.total)} tone="draw" />
<CrowdSeg cze value={pct(crowd.teamBWin, crowd.total)} tone="cze" />
<CrowdSeg team={match.teamB} value={pct(crowd.teamBWin, crowd.total)} tone="b" />
</div>
<div className="mt-1.5 text-right text-[11px] text-[var(--ink-muted)]">
{crowd.total.toLocaleString()}명 참여
@@ -348,31 +399,21 @@ function StepBtn({
}
function CrowdSeg({
flag,
cze,
team,
value,
tone,
}: {
flag?: string;
cze?: boolean;
team?: import("@/lib/types").Team;
value: number;
tone: "kor" | "draw" | "cze";
tone: "a" | "draw" | "b";
}) {
const bg =
tone === "draw" ? "#2b313c" : tone === "kor" ? "rgba(62,224,138,0.22)" : "#222831";
const bg = tone === "draw" ? "#2b313c" : tone === "a" ? "rgba(74,255,160,0.22)" : "#222831";
return (
<div
className="flex items-center justify-center gap-1.5 border-r border-[var(--line-d)] text-[16px] font-extrabold last:border-r-0"
style={{ width: `${value}%`, background: bg, minWidth: 56 }}
>
{flag && <img src={flag} alt="KOR" className="h-4 w-6 rounded object-cover" />}
{cze && (
<svg viewBox="0 0 6 4" className="h-4 w-6 rounded" preserveAspectRatio="none">
<rect width="6" height="2" y="0" fill="#fff" />
<rect width="6" height="2" y="2" fill="#d7141a" />
<polygon points="0,0 3,2 0,4" fill="#11457e" />
</svg>
)}
{team && <TeamFlag team={team} className="h-4 w-6" />}
<span>{value}%</span>
</div>
);
+1 -1
View File
@@ -5,7 +5,7 @@ export default function BallIcon({ className = "" }: { className?: string }) {
src="/icons/profile.png?v=3"
alt="TriplePick"
className={`rounded-full ${className}`}
style={{ filter: "drop-shadow(0 0 7px rgba(62,224,138,0.55))" }}
style={{ filter: "drop-shadow(0 0 7px rgba(74,255,160,0.55))" }}
/>
);
}
+53
View File
@@ -0,0 +1,53 @@
"use client";
import { useEffect, useState } from "react";
// "투표 종료까지" 카운트다운 (D7). 마감 = 킥오프 정각(lockAt).
// 서버/클라 hydration mismatch 방지: 시간 계산은 마운트 후 useEffect에서만.
export default function Countdown({
to,
label = "투표 종료까지",
}: {
to: string;
label?: string;
}) {
const [left, setLeft] = useState<number | null>(null);
useEffect(() => {
const target = new Date(to).getTime();
const tick = () => setLeft(Math.max(0, target - Date.now()));
tick();
const id = setInterval(tick, 1000);
return () => clearInterval(id);
}, [to]);
const ended = left !== null && left <= 0;
return (
<div className="flex items-center justify-center gap-2 rounded-xl border border-[var(--line-d)] bg-[var(--bg2)] px-3 py-2.5">
<span className="text-[12px] font-semibold text-[var(--ink-muted)]">
{ended ? "투표가 마감되었습니다" : label}
</span>
{!ended && (
<span
className="font-mono text-[18px] font-extrabold tabular-nums text-[var(--green)]"
style={{ textShadow: "0 0 12px rgba(74,255,160,0.45)" }}
suppressHydrationWarning
>
{left === null ? "--:--:--" : fmt(left)}
</span>
)}
</div>
);
}
function fmt(ms: number): string {
const s = Math.floor(ms / 1000);
const d = Math.floor(s / 86400);
const h = Math.floor((s % 86400) / 3600);
const m = Math.floor((s % 3600) / 60);
const sec = s % 60;
const pad = (n: number) => String(n).padStart(2, "0");
if (d > 0) return `${d}일 ${pad(h)}:${pad(m)}:${pad(sec)}`;
return `${pad(h)}:${pad(m)}:${pad(sec)}`;
}
+4 -4
View File
@@ -1,15 +1,15 @@
export default function Footer() {
return (
<footer className="mt-6 text-center">
<p className="text-[10.5px] font-semibold text-[var(--ink-muted)]">
<p className="text-[10.5px] font-semibold text-white/75">
Independent AI prediction event. Not official.
</p>
<p className="mt-1 text-[10.5px] leading-relaxed text-[var(--ink-muted)]">
<p className="mt-1 text-[10.5px] leading-relaxed text-white/60">
본 서비스는 독립적인 AI 예측 이벤트이며, 공식·조작·후원·운영과
무관합니다.
</p>
<div className="mx-auto mt-3 max-w-[400px] space-y-1 text-[9.5px] leading-relaxed text-[var(--ink-muted)]/70">
<div className="mx-auto mt-3 max-w-[400px] space-y-1 text-[9.5px] leading-relaxed text-white/55">
<p>
스포츠 분석·엔터테인먼트 목적의 예측 게임이며 베팅·도박을 권유하지
않습니다. AI 예측은 실제 결과를 보장하지 않습니다.
@@ -20,7 +20,7 @@ export default function Footer() {
</p>
</div>
<div className="mt-3 text-[10px] text-[var(--ink-muted)]">
<div className="mt-3 text-[10px] text-white/70">
© 2026 TriplePick · 운영 AIO2O · @triplepick_ai
</div>
</footer>
+15 -13
View File
@@ -1,8 +1,19 @@
import { MATCH } from "@/lib/mockData";
import Link from "next/link";
export default function Hero() {
// 브랜드 헤더 (대시보드·상세 공용). 경기별 후킹 카피는 상세 페이지에서 별도 노출.
export default function Hero({ back = false }: { back?: boolean }) {
return (
<header className="pt-7 text-center">
<header className="pt-5 text-center">
{back && (
<div className="mb-3 flex">
<Link
href="/"
className="flex items-center gap-1 rounded-full border border-white/12 bg-white/8 px-3 py-1.5 text-[12px] font-bold text-white/85 active:scale-95"
>
← 전체 일정
</Link>
</div>
)}
<div className="font-impact text-[44px] leading-none tracking-tight">
TRIPLE PICK <span className="text-[var(--green)]">2026</span>
</div>
@@ -10,16 +21,7 @@ export default function Hero() {
AI Prediction Arena
</div>
<div className="mt-2 inline-block rounded-full border border-white/12 bg-white/8 px-3 py-1 text-[13px] font-semibold text-white/85">
AI와 함께하는 월드컵 승부 예측 대결 챌린지
</div>
<h1 className="mt-6 flex items-center justify-center gap-2 whitespace-nowrap text-[19px] font-extrabold leading-snug">
<span className="text-[var(--green)]">⫽</span>
{MATCH.hookText}
<span className="text-[var(--green)]">⫽</span>
</h1>
<div className="mt-1.5 text-[13px] font-semibold text-[var(--green)]">
Korea Republic vs Czechia · Matchday Prediction
AI와 함께하는 글로벌 축구 승부예측 챌린지
</div>
</header>
);
+35 -46
View File
@@ -1,12 +1,14 @@
import { MATCH } from "@/lib/mockData";
import type { Match } from "@/lib/types";
import { kickoffDisplay } from "@/lib/format";
import BallIcon from "./BallIcon";
import TeamFlag from "./TeamFlag";
export default function MatchupHUD() {
const { group, roundLabel } = MATCH;
export default function MatchupHUD({ match }: { match: Match }) {
const { group, roundLabel } = match;
const finished = !!match.result;
return (
<section className="mt-6">
{/* Match 01 → Final 진행 */}
{/* 진행 바: roundLabel → Final */}
<div className="mb-3 flex items-center gap-2 text-[11px] font-semibold">
<span className="rounded-md border border-[var(--green)] px-2.5 py-1 text-[var(--green)]">
{roundLabel}
@@ -27,65 +29,52 @@ export default function MatchupHUD() {
{/* 대결 카드 (녹색 글로우 보더) */}
<div
className="rounded-3xl border-2 border-[var(--green)] bg-[#171b21] p-5"
style={{ boxShadow: "0 0 28px rgba(62,224,138,0.35), inset 0 0 24px rgba(62,224,138,0.06)" }}
style={{ boxShadow: "0 0 28px rgba(74,255,160,0.35), inset 0 0 24px rgba(74,255,160,0.06)" }}
>
{/* 헤더: 축구공 아이콘 + 타이틀 + 일시 */}
{/* 헤더: 브랜드 아이콘 + 팀명 + 일시 */}
<div className="flex items-center gap-3">
<BallIcon className="h-14 w-14 shrink-0" />
<div className="min-w-0">
<div className="text-[22px] font-extrabold leading-tight">
{MATCH.teamA.name}{" "}
<span className="text-white/55">vs</span> {MATCH.teamB.name}
{match.teamA.name} <span className="text-white/55">vs</span>{" "}
{match.teamB.name}
</div>
<div className="mt-1 text-[15px] font-bold text-[var(--green)]">
{kickoffDisplay(MATCH.kickoffKst)} · Group {group}
{kickoffDisplay(match.kickoffKst)} · Group {group}
</div>
<div className="mt-0.5 text-[12px] text-white/65">{MATCH.venue}</div>
<div className="mt-0.5 text-[12px] text-white/65">{match.venue}</div>
</div>
</div>
{/* 국기 + 라이트닝 VS */}
{/* 국기 + 라이트닝 VS (종료 시 최종 스코어) */}
<div className="mt-5 grid grid-cols-[1fr_auto_1fr] items-center gap-3">
<KorFlag />
<TeamFlag team={match.teamA} className="mx-auto h-[68px] w-[104px]" />
<div className="relative grid place-items-center">
<div className="vs-glow absolute h-28 w-28" />
<span
className="relative font-impact text-[46px] italic leading-none text-[var(--green)]"
style={{ textShadow: "0 0 18px rgba(62,224,138,0.8)" }}
>
VS
</span>
{finished && match.result ? (
<span className="relative whitespace-nowrap font-mono text-[34px] font-extrabold tabular-nums text-white">
{match.result.scoreA}
<span className="px-1 text-white/55">-</span>
{match.result.scoreB}
</span>
) : (
<span
className="relative font-impact text-[46px] italic leading-none text-[var(--green)]"
style={{ textShadow: "0 0 18px rgba(74,255,160,0.8)" }}
>
VS
</span>
)}
</div>
<CzeFlag />
<TeamFlag team={match.teamB} className="mx-auto h-[68px] w-[104px]" />
</div>
{finished && (
<div className="mt-3 text-center text-[12px] font-bold text-[var(--green)]">
경기 종료 · 최종 결과
</div>
)}
</div>
</section>
);
}
function KorFlag() {
// 실제 국기 이미지
return (
<img
src="/icons/kor.png"
alt="Korea Republic"
className="flag-img mx-auto h-[68px] w-[104px]"
/>
);
}
function CzeFlag() {
// 체코 국기 (이미지 없음 → SVG)
return (
<svg
viewBox="0 0 6 4"
className="mx-auto h-[68px] w-[104px] rounded-lg border border-[var(--line-d)]"
preserveAspectRatio="none"
aria-label="Czechia"
>
<rect width="6" height="2" y="0" fill="#ffffff" />
<rect width="6" height="2" y="2" fill="#d7141a" />
<polygon points="0,0 3,2 0,4" fill="#11457e" />
</svg>
);
}
+98
View File
@@ -0,0 +1,98 @@
import Link from "next/link";
import { matchesByDate, matchPhase, type MatchPhase } from "@/lib/schedule";
import { getPredictions, getCrowd } from "@/lib/mockData";
import { dateHeading, timeOnly } from "@/lib/format";
import type { Match } from "@/lib/types";
import TeamFlag from "./TeamFlag";
const STROKE = "#94FBE0"; // 일정 텍스트·선택 아웃라인 스트로크 컬러
const PHASE_META: Record<MatchPhase, { label: string; cls: string }> = {
open: { label: "투표 중", cls: "border-[#94FBE0] text-[#94FBE0]" },
scheduled: { label: "오픈 예정", cls: "border-[var(--line-d)] text-[var(--ink-muted)]" },
locked: { label: "투표 마감", cls: "border-[var(--line-d)] text-[var(--ink-muted)]" },
finished: { label: "종료", cls: "border-white/15 text-white/55" },
};
export default function ScheduleBoard() {
const groups = matchesByDate();
return (
<section className="mt-6">
<div className="mb-3">
<h2 className="text-[22px] font-extrabold">전체 일정</h2>
</div>
<div className="flex flex-col gap-5">
{groups.map((g) => (
<div key={g.date}>
<div className="mb-2 text-[13px] font-bold" style={{ color: STROKE }}>
{dateHeading(g.date)}
</div>
<div className="flex flex-col gap-2.5">
{g.matches.map((m) => (
<MatchCard key={m.matchId} match={m} />
))}
</div>
</div>
))}
</div>
</section>
);
}
function MatchCard({ match }: { match: Match }) {
const phase = matchPhase(match);
const meta = PHASE_META[phase];
const preds = getPredictions(match);
const crowd = getCrowd(match);
// AI 픽 갈림 요약
const tally = { a: 0, d: 0, b: 0 };
for (const p of preds) {
if (p.outcome === "TEAM_A_WIN") tally.a++;
else if (p.outcome === "DRAW") tally.d++;
else tally.b++;
}
const split: string[] = [];
if (tally.a) split.push(`${match.teamA.shortName} ${tally.a}`);
if (tally.d) split.push(`무 ${tally.d}`);
if (tally.b) split.push(`${match.teamB.shortName} ${tally.b}`);
return (
<Link
href={`/match/${match.matchId}`}
className="block rounded-2xl border-2 border-[#94FBE0]/45 bg-[#171b21] p-4 transition active:scale-[0.99] hover:border-[#94FBE0]"
>
<div className="flex items-center justify-between text-[11px]">
<span className="font-mono font-bold text-white/70">
{timeOnly(match.kickoffKst)} <span className="text-white/40">KST</span> · {match.roundLabel}
</span>
<span className={`rounded-md border px-2 py-0.5 font-semibold ${meta.cls}`}>
{meta.label}
</span>
</div>
<div className="mt-3 grid grid-cols-[1fr_auto_1fr] items-center gap-2">
<div className="flex items-center gap-2">
<TeamFlag team={match.teamA} className="h-6 w-9 shrink-0" />
<span className="truncate text-[15px] font-extrabold">{match.teamA.shortName}</span>
</div>
<span className="font-impact text-[18px] italic text-[#94FBE0]">VS</span>
<div className="flex items-center justify-end gap-2">
<span className="truncate text-right text-[15px] font-extrabold">{match.teamB.shortName}</span>
<TeamFlag team={match.teamB} className="h-6 w-9 shrink-0" />
</div>
</div>
<div className="mt-3 flex items-center justify-between text-[11px] font-bold text-[#F4F3FE]">
<span>
<span className="font-semibold text-white/55">AI 픽</span> {split.join(" · ")}
</span>
<span className="flex items-center gap-2">
<span>{crowd.total.toLocaleString()}명 참여</span>
<span className="text-[#94FBE0]">→</span>
</span>
</div>
</Link>
);
}
+46
View File
@@ -0,0 +1,46 @@
import type { Team } from "@/lib/types";
// 모든 경기에 일반화된 국기 렌더.
// KOR = 실제 png 자산, CZE = 인라인 SVG(기존 디자인 유지), 그 외 = 이모지 박스.
export default function TeamFlag({
team,
className = "",
}: {
team: Team;
className?: string;
}) {
if (team.code === "KOR") {
return (
<img
src="/icons/kor.png"
alt={team.name}
className={`flag-img object-cover ${className}`}
/>
);
}
if (team.code === "CZE") {
return (
<svg
viewBox="0 0 6 4"
className={`rounded-lg border border-[var(--line-d)] ${className}`}
preserveAspectRatio="none"
aria-label={team.name}
>
<rect width="6" height="2" y="0" fill="#ffffff" />
<rect width="6" height="2" y="2" fill="#d7141a" />
<polygon points="0,0 3,2 0,4" fill="#11457e" />
</svg>
);
}
// 그 외 국가 — 이모지 국기 (자산 추가 전 fallback)
return (
<span
className={`grid place-items-center overflow-hidden rounded-lg border border-[var(--line-d)] bg-white/[0.06] ${className}`}
aria-label={team.name}
>
<span className="leading-none" style={{ fontSize: "1.7em" }}>
{team.flag}
</span>
</span>
);
}