Files
2026-05-01 19:53:26 +00:00

305 lines
18 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gartic Phone - DrawTogether</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&display=swap" rel="stylesheet">
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--yellow: #FFD23F; --coral: #FF5C5C; --mint: #4ECDC4;
--lavender: #A593E0; --sky: #5BCEFA; --dark: #2D2D2D;
--cream: #FFF8E7; --white: #FFFFFF;
--shadow-card: 0 6px 0 rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.08);
--shadow-btn: 0 5px 0 rgba(0,0,0,0.18), 0 2px 6px rgba(0,0,0,0.12);
}
html, body { font-family: 'Fredoka', system-ui, sans-serif; color: var(--dark); background: var(--cream); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
.game-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; max-width: 1500px; margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; text-decoration: none; color: inherit; }
.logo-mark { width: 38px; height: 38px; border-radius: 12px; background: var(--coral); display: grid; place-items: center; box-shadow: var(--shadow-card); transform: rotate(-6deg); }
.header-pills { display: flex; gap: 10px; align-items: center; }
.pill-info { padding: 8px 16px; background: var(--white); border: 2px solid var(--dark); border-radius: 999px; font-weight: 700; font-size: 13px; box-shadow: 0 3px 0 rgba(0,0,0,0.1); display: inline-flex; align-items: center; gap: 6px; }
.pill-info.round { background: var(--mint); color: var(--dark); }
.pill-info.timer { background: var(--coral); color: white; }
.leave-btn { padding: 8px 14px; background: var(--white); border: 2px solid var(--dark); border-radius: 999px; font-family: inherit; font-weight: 700; font-size: 13px; cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,0.1); display: inline-flex; align-items: center; gap: 6px; }
.stage-banner {
max-width: 1500px; margin: 0 auto; padding: 0 22px 14px;
}
.banner-inner {
background: var(--white); border: 3px solid var(--dark); border-radius: 18px; padding: 14px 22px;
box-shadow: var(--shadow-card); display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.banner-inner h1 { font-size: 22px; font-weight: 700; }
.banner-inner .sub { font-weight: 600; font-size: 14px; color: rgba(45,45,45,0.65); margin-top: 2px; }
.timer-ring { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.timer-ring svg { width: 64px; height: 64px; transform: rotate(-90deg); }
.timer-ring .bg-track { fill: none; stroke: rgba(45,45,45,0.12); stroke-width: 7; }
.timer-ring .fg-track { fill: none; stroke: var(--coral); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 175; stroke-dashoffset: 60; }
.timer-ring .label { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; font-size: 18px; }
/* Stage chips */
.stage-chips { display: flex; gap: 6px; align-items: center; }
.chip {
width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--dark);
display: grid; place-items: center; font-weight: 700; font-size: 13px;
background: var(--cream);
}
.chip.done { background: var(--mint); color: white; }
.chip.active { background: var(--yellow); transform: translateY(-2px); box-shadow: 0 4px 0 rgba(0,0,0,0.15); }
.chip-line { width: 14px; height: 3px; background: rgba(45,45,45,0.25); border-radius: 2px; }
.chip-line.done { background: var(--mint); }
main {
max-width: 1500px; margin: 0 auto; padding: 0 22px 30px;
display: grid; grid-template-columns: 1fr 280px; gap: 18px;
}
/* Prompt card */
.prompt-card {
background: var(--lavender); border: 3px solid var(--dark); border-radius: 18px;
padding: 18px 24px; box-shadow: var(--shadow-card); margin-bottom: 14px;
display: flex; align-items: center; gap: 16px;
}
.prompt-card .av-from {
width: 50px; height: 50px; border-radius: 14px; border: 3px solid var(--dark);
background: var(--yellow); display: grid; place-items: center; font-size: 26px; flex-shrink: 0;
transform: rotate(-4deg); box-shadow: 0 4px 0 rgba(0,0,0,0.15);
}
.prompt-card .meta { color: rgba(255,255,255,0.85); font-size: 12px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.prompt-card .prompt-text { font-size: 22px; font-weight: 700; color: white; margin-top: 4px; line-height: 1.2; }
.prompt-card .prompt-text .quote { color: var(--yellow); }
.canvas-wrap { background: var(--white); border: 3px solid var(--dark); border-radius: 20px; box-shadow: var(--shadow-card); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.canvas-stage {
aspect-ratio: 16/10; min-height: 420px; background: var(--cream);
border: 2px dashed rgba(45,45,45,0.18); border-radius: 14px; position: relative; overflow: hidden;
display: grid; place-items: center;
}
/* Toolbar */
.toolbar { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--cream); border-radius: 14px; flex-wrap: wrap; justify-content: space-between; }
.tool-section { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.color-row { display: flex; gap: 5px; flex-wrap: wrap; }
.color-swatch { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--dark); cursor: pointer; box-shadow: 0 2px 0 rgba(0,0,0,0.15); transition: transform 0.12s ease; }
.color-swatch:hover { transform: translateY(-2px); }
.color-swatch.active { box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--dark); transform: translateY(-2px); }
.divider { width: 2px; height: 26px; background: rgba(45,45,45,0.15); }
.tool-btn { width: 36px; height: 36px; border-radius: 10px; border: 2px solid var(--dark); background: var(--white); cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 0 rgba(0,0,0,0.15); transition: transform 0.12s ease; }
.tool-btn:hover { transform: translateY(-2px); }
.tool-btn.active { background: var(--yellow); }
.brush-size { width: 32px; height: 32px; border-radius: 10px; border: 2px solid var(--dark); background: var(--white); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 0 rgba(0,0,0,0.15); }
.brush-size .dot { background: var(--dark); border-radius: 50%; }
.brush-size .dot.s1 { width: 4px; height: 4px; }
.brush-size .dot.s2 { width: 8px; height: 8px; }
.brush-size .dot.s3 { width: 14px; height: 14px; }
.brush-size.active { background: var(--mint); }
.submit-btn {
font-family: inherit; font-weight: 700; font-size: 15px; padding: 10px 22px;
border-radius: 999px; border: 2px solid var(--dark);
background: var(--coral); color: white; cursor: pointer;
box-shadow: 0 4px 0 rgba(0,0,0,0.18); display: inline-flex; align-items: center; gap: 8px;
}
.submit-btn:hover { transform: translateY(-2px); }
/* Right column */
.panel { background: var(--white); border: 3px solid var(--dark); border-radius: 20px; padding: 16px; box-shadow: var(--shadow-card); }
.panel-title { font-size: 13px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: rgba(45,45,45,0.6); margin-bottom: 12px; padding-left: 4px; }
.progress-summary { text-align: center; padding: 20px 8px; }
.progress-summary .big { font-size: 42px; font-weight: 700; line-height: 1; }
.progress-summary .big strong { color: var(--coral); }
.progress-summary .lbl { font-weight: 600; font-size: 14px; color: rgba(45,45,45,0.65); margin-top: 4px; }
.player-status { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.ps-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--cream); }
.ps-item.you { background: rgba(255,210,63,0.35); }
.ps-item .av { width: 32px; height: 32px; border-radius: 10px; border: 2px solid var(--dark); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.ps-item .info { flex: 1; min-width: 0; }
.ps-item .name { font-weight: 700; font-size: 13px; }
.ps-item .stat { font-size: 11px; font-weight: 600; color: rgba(45,45,45,0.6); }
.ps-item .pulse { width: 10px; height: 10px; background: var(--mint); border-radius: 50%; box-shadow: 0 0 0 4px rgba(78,205,196,0.25); }
.ps-item.done .pulse { background: var(--mint); box-shadow: none; }
.ps-item.drawing .pulse { background: var(--coral); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,92,92,0.4);} 50%{ box-shadow: 0 0 0 6px rgba(255,92,92,0);} }
.progress-bar-wrap { padding: 0 4px; }
.progress-bar { background: var(--cream); border: 2px solid var(--dark); border-radius: 999px; height: 14px; overflow: hidden; }
.progress-bar .fill { height: 100%; background: var(--mint); border-right: 2px solid var(--dark); width: 40%; border-radius: 999px 0 0 999px; }
.tip {
background: rgba(91,206,250,0.18); border: 2px dashed var(--sky);
padding: 12px; border-radius: 12px; margin-top: 14px; font-size: 12px; font-weight: 500; line-height: 1.45;
}
.tip strong { color: var(--dark); }
@media (max-width: 1100px) { main { grid-template-columns: 1fr; } }
</style>
</head>
<body>
<header class="game-header">
<a class="logo" href="01-landing.html">
<div class="logo-mark"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2.5" stroke-linecap="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg></div>
DrawTogether
</a>
<div class="header-pills">
<span class="pill-info round">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round"><path d="M21 12a9 9 0 1 1-9-9c2.5 0 4.8.97 6.5 2.5L21 8"/><polyline points="21 3 21 8 16 8"/></svg>
Round 3 / 5
</span>
<span class="pill-info">MIA42K</span>
<button class="leave-btn">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4M16 17l5-5-5-5M21 12H9"/></svg>
Leave
</button>
</div>
</header>
<section class="stage-banner">
<div class="banner-inner">
<div>
<h1>Your turn to draw!</h1>
<div class="sub">Sketch what Mia wrote — pass it on when the timer ends.</div>
</div>
<div class="stage-chips" data-testid="stage-chips" aria-label="Round stages">
<div class="chip done"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="3" stroke-linecap="round"><path d="M5 12l5 5L20 7"/></svg></div>
<div class="chip-line done"></div>
<div class="chip active">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/></svg>
</div>
<div class="chip-line"></div>
<div class="chip">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg>
</div>
</div>
<div class="timer-ring" data-testid="timer">
<svg viewBox="0 0 64 64">
<circle class="bg-track" cx="32" cy="32" r="28"/>
<circle class="fg-track" cx="32" cy="32" r="28"/>
</svg>
<div class="label">60s</div>
</div>
</div>
</section>
<main>
<section>
<div class="prompt-card" data-testid="prompt-card">
<div class="av-from">🦄</div>
<div>
<div class="meta">Mia wrote</div>
<div class="prompt-text"><span class="quote">"</span>a cat riding a unicorn<span class="quote">"</span></div>
</div>
</div>
<div class="canvas-wrap">
<div class="canvas-stage" data-testid="canvas">
<!-- empty canvas illustration: simple pencil placeholder -->
<svg width="100%" height="100%" viewBox="0 0 600 380" preserveAspectRatio="xMidYMid meet">
<!-- subtle grid -->
<defs>
<pattern id="grid" width="32" height="32" patternUnits="userSpaceOnUse">
<path d="M 32 0 L 0 0 0 32" fill="none" stroke="rgba(45,45,45,0.04)" stroke-width="1"/>
</pattern>
</defs>
<rect width="600" height="380" fill="url(#grid)"/>
<!-- starter doodle: a few sketch lines + pencil -->
<g opacity="0.7">
<path d="M180 230 Q230 180 290 220" stroke="#A593E0" stroke-width="5" fill="none" stroke-linecap="round"/>
<path d="M290 220 Q350 250 410 200" stroke="#A593E0" stroke-width="5" fill="none" stroke-linecap="round"/>
<circle cx="240" cy="180" r="14" fill="none" stroke="#A593E0" stroke-width="4"/>
</g>
<g transform="translate(420,260) rotate(45)">
<rect x="0" y="0" width="58" height="14" rx="3" fill="#FF5C5C" stroke="#2D2D2D" stroke-width="3"/>
<rect x="58" y="0" width="14" height="14" fill="#FFD23F" stroke="#2D2D2D" stroke-width="3"/>
<polygon points="72,0 84,7 72,14" fill="#FFD23F" stroke="#2D2D2D" stroke-width="3" stroke-linejoin="round"/>
<polygon points="84,7 90,5 90,9" fill="#2D2D2D"/>
</g>
<text x="300" y="340" text-anchor="middle" font-family="Fredoka, sans-serif" font-size="14" font-weight="600" fill="rgba(45,45,45,0.4)">Click and drag to draw</text>
</svg>
</div>
<div class="toolbar" data-testid="toolbar">
<div class="tool-section">
<div class="color-row">
<div class="color-swatch" style="background: #2D2D2D;"></div>
<div class="color-swatch active" style="background: #A593E0;"></div>
<div class="color-swatch" style="background: #FF5C5C;"></div>
<div class="color-swatch" style="background: #4ECDC4;"></div>
<div class="color-swatch" style="background: #FFD23F;"></div>
<div class="color-swatch" style="background: #5BCEFA;"></div>
<div class="color-swatch" style="background: #ffffff;"></div>
<div class="color-swatch" style="background: #6BCB77;"></div>
<div class="color-swatch" style="background: #FF8C42;"></div>
</div>
<div class="divider"></div>
<div class="brush-size"><span class="dot s1"></span></div>
<div class="brush-size active"><span class="dot s2"></span></div>
<div class="brush-size"><span class="dot s3"></span></div>
<div class="divider"></div>
<button class="tool-btn active" title="Brush"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M12 19l7-7 3 3-7 7-3-3z"/><path d="M18 13l-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"/></svg></button>
<button class="tool-btn" title="Eraser"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M20 20H7L3 16a2 2 0 0 1 0-3l9-9a2 2 0 0 1 3 0l6 6a2 2 0 0 1 0 3l-7 7"/></svg></button>
<button class="tool-btn" title="Undo"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><path d="M3 7v6h6M21 17a9 9 0 0 0-15-6.7L3 13"/></svg></button>
<button class="tool-btn" title="Clear"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round"><polyline points="3 6 5 6 21 6"/><path d="M19 6l-2 14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2L5 6"/></svg></button>
</div>
<button class="submit-btn" data-testid="btn-submit-drawing">
Submit drawing
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round"><path d="M5 12h14M12 5l7 7-7 7"/></svg>
</button>
</div>
</div>
</section>
<aside class="panel" data-testid="panel-status">
<div class="panel-title">Round progress</div>
<div class="progress-summary">
<div class="big">waiting on <strong>3</strong> / 5</div>
<div class="lbl">players still working</div>
</div>
<div class="progress-bar-wrap">
<div class="progress-bar"><div class="fill"></div></div>
</div>
<div class="player-status">
<div class="ps-item done">
<div class="av" style="background: var(--yellow);">🦄</div>
<div class="info"><div class="name">Mia</div><div class="stat">submitted prompt</div></div>
<div class="pulse"></div>
</div>
<div class="ps-item done">
<div class="av" style="background: var(--coral);">🐱</div>
<div class="info"><div class="name">Pat</div><div class="stat">submitted drawing</div></div>
<div class="pulse"></div>
</div>
<div class="ps-item drawing you">
<div class="av" style="background: var(--mint);">🦊</div>
<div class="info"><div class="name">Suki (you)</div><div class="stat">drawing now...</div></div>
<div class="pulse"></div>
</div>
<div class="ps-item drawing">
<div class="av" style="background: var(--lavender);">🐼</div>
<div class="info"><div class="name">Ravi</div><div class="stat">drawing now...</div></div>
<div class="pulse"></div>
</div>
<div class="ps-item drawing">
<div class="av" style="background: var(--sky);">🐸</div>
<div class="info"><div class="name">Jules</div><div class="stat">drawing now...</div></div>
<div class="pulse"></div>
</div>
</div>
<div class="tip">
<strong>Tip:</strong> No one sees your drawing until everyone submits — it gets passed to the next player to guess what it is.
</div>
</aside>
</main>
</body>
</html>