/* game.css */ /* ════════════════════════════════════════ GAME LAYOUT ════════════════════════════════════════ */ .game-layout { min-height: calc(100vh - var(--hh)); display: grid; grid-template-rows: auto 1fr auto; padding: 20px 0 28px; gap: 16px; } /* ════════════════════════════════════════ TOP BAR ════════════════════════════════════════ */ .game-topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; } /* Round pips */ .game-round { display: flex; align-items: center; gap: 10px; } .round-pip { width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: background 0.3s; } .round-pip--active { background: var(--sea); } .round-pip--done { background: var(--leaf); } .round-label { font-family: "Syne", sans-serif; font-size: 0.82rem; font-weight: 700; color: var(--ink-muted); letter-spacing: 0.06em; text-transform: uppercase; } .round-label span { color: var(--ink); } /* Country name */ .game-country { text-align: center; } .country-name { font-family: "Syne", sans-serif; font-weight: 800; font-size: clamp(1.5rem, 3vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.1; } .country-hint { font-size: 0.82rem; color: var(--ink-muted); margin-top: 4px; } /* Timer */ .game-timer { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; } .timer-display { display: flex; align-items: baseline; gap: 4px; } .timer-num { font-family: "Syne", sans-serif; font-weight: 800; font-size: 2rem; line-height: 1; color: var(--ink); transition: color 0.3s; min-width: 2ch; text-align: right; } .timer-unit { font-size: 0.78rem; font-weight: 600; color: var(--ink-muted); } .timer-track { width: 120px; height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; } .timer-bar { height: 100%; width: 100%; background: linear-gradient(90deg, var(--sea), var(--leaf)); border-radius: 999px; transition: width 1s linear, background 0.4s ease; } /* Timer urgency states — toggled via JS */ .timer--warning .timer-num { color: var(--gold); } .timer--warning .timer-bar { background: var(--gold); } .timer--danger .timer-num { color: var(--danger); } .timer--danger .timer-bar { background: var(--danger); } /* ════════════════════════════════════════ CANVAS AREA ════════════════════════════════════════ */ .canvas-area { display: grid; grid-template-columns: 1fr 220px; gap: 16px; min-height: 0; align-items: start; } .canvas-wrap { position: relative; justify-self: center; width: min(100%, 68vh); aspect-ratio: 1; background: var(--white); border: 1.5px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow); overflow: hidden; cursor: crosshair; } .canvas-wrap::before { content: "Draw the border here"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; font-weight: 500; color: var(--ink-muted); pointer-events: none; opacity: 1; transition: opacity 0.3s; } .canvas-wrap.has-drawing::before { opacity: 0; } #draw-canvas { display: block; width: 100%; height: 100%; touch-action: none; } /* Score feedback overlay */ #score-feedback { position: absolute; top: 20px; left: 50%; transform: translateX(-50%) translateY(-10px); font-family: "Syne", sans-serif; font-size: 2rem; font-weight: 800; opacity: 0; transition: opacity 0.4s ease, transform 0.4s ease; pointer-events: none; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); white-space: nowrap; } /* ════════════════════════════════════════ SIDEBAR ════════════════════════════════════════ */ .game-sidebar { display: flex; flex-direction: column; gap: 12px; } .sidebar-card { background: var(--glass); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.85); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-sm); } .sidebar-card__label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: 10px; } /* Round score rows */ .round-scores { display: grid; gap: 8px; } .rscore-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; } .rscore-label { font-size: 0.82rem; color: var(--ink-soft); font-weight: 500; } .rscore-val { font-family: "Syne", sans-serif; font-weight: 800; font-size: 0.9rem; color: var(--ink-muted); } .rscore-val.filled { color: var(--sea); } /* Player info */ .player-name-display { font-family: "Syne", sans-serif; font-weight: 700; font-size: 1rem; color: var(--ink); word-break: break-word; } .sidebar-hint { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.55; } /* ════════════════════════════════════════ CONTROLS ════════════════════════════════════════ */ .game-controls { display: flex; gap: 10px; } /* ════════════════════════════════════════ RESPONSIVE ════════════════════════════════════════ */ @media (max-width: 900px) { .canvas-area { grid-template-columns: 1fr; grid-template-rows: 1fr auto; } .game-sidebar { flex-direction: row; flex-wrap: wrap; } .sidebar-card { flex: 1 1 140px; } .canvas-wrap { width: min(100%, 72vh); } .game-topbar { grid-template-columns: auto 1fr auto; } } @media (max-width: 600px) { .game-layout { padding: 14px 0 20px; gap: 12px; } .game-topbar { grid-template-columns: 1fr; grid-template-rows: auto auto auto; gap: 10px; } .game-country { text-align: left; } .game-timer { align-items: flex-start; } .timer-track { width: 100%; } .canvas-wrap { width: 100%; } .game-controls { flex-direction: column; } .game-controls .btn { width: 100%; } } @media (max-width: 360px) { .country-name { font-size: 1.4rem; } .timer-num { font-size: 1.6rem; } .canvas-wrap { min-height: 0; } }