From 2cd343e8ef99d8475df074ce55bd439aa29871d1 Mon Sep 17 00:00:00 2001 From: Antigravity Date: Thu, 17 Sep 2026 10:12:56 +0000 Subject: [PATCH] feat: Add Pause system, User Profile Dashboard, and shift grid with neighbour fence - Implement in-game pause with Space/KeyP hotkeys and pause banner overlay - Split Auth modal into clean Profile Dashboard (stats, coins, cloud save status) and Guest Login - Shift lawn startY to 108 to make top-row zombie HP bars 100% visible - Render decorative wooden neighbour fence above top row --- game/css/style.css | 94 ++++++++++++++++++++++++++++++- game/index.html | 75 ++++++++++++++++++------- game/js/game.js | 120 ++++++++++++++++++++++++++++++++++------ game/js/systems/grid.js | 81 ++++++++++++++++++++++++++- 4 files changed, 328 insertions(+), 42 deletions(-) diff --git a/game/css/style.css b/game/css/style.css index 416ec97..0133cf0 100644 --- a/game/css/style.css +++ b/game/css/style.css @@ -450,10 +450,98 @@ canvas#gameCanvas { cursor: not-allowed; } -/* Auth Modal Styles */ +/* Auth Modal & Profile Dashboard Styles */ .auth-card { - max-width: 420px; - width: 90%; + max-width: 440px; + width: 92%; +} + +.auth-view.hidden { + display: none; +} + +.profile-header-card { + display: flex; + align-items: center; + gap: 14px; + background: rgba(0, 0, 0, 0.4); + border: 1.5px solid #81c784; + border-radius: 10px; + padding: 10px 14px; + margin-bottom: 12px; +} + +.profile-avatar-icon { + font-size: 32px; + background: rgba(255, 255, 255, 0.1); + width: 50px; + height: 50px; + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + border: 2px solid #81c784; +} + +.profile-info-text { + text-align: left; +} + +.profile-username { + font-size: 18px; + font-weight: bold; + color: #ffeb3b; +} + +.profile-status-badge { + font-size: 11px; + color: #a5d6a7; + margin-top: 2px; +} + +.profile-stats-grid { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 8px; + margin-bottom: 8px; +} + +.profile-stat-box { + background: rgba(0, 0, 0, 0.35); + border: 1px solid #5d4037; + border-radius: 8px; + padding: 8px 10px; + display: flex; + flex-direction: column; + align-items: flex-start; +} + +.profile-stat-box .stat-label { + font-size: 11px; + color: #bcaaa4; +} + +.profile-stat-box .stat-value { + font-size: 15px; + font-weight: bold; + color: #fff; + margin-top: 2px; +} + +.btn-pause { + background: #37474f; + color: #eceff1; + border-color: #78909c; +} +.btn-pause:hover { + background: #455a64; + border-color: #b0bec5; +} +.btn-pause.active { + background: #d84315 !important; + border-color: #ffab91 !important; + color: #fff !important; + box-shadow: 0 0 10px rgba(255, 87, 34, 0.6) !important; } .auth-input { diff --git a/game/index.html b/game/index.html index 19cf15a..10410bd 100644 --- a/game/index.html +++ b/game/index.html @@ -39,6 +39,7 @@