feat(ui): redesign modern game dashboard and add 2k/4k full-screen fluid scaling

This commit is contained in:
Antigravity committed 2026-09-17 12:59:30 +00:00
1 parent 84c28addfe
commit 258b1a9cb1
4 files changed
+357 -34

No files matched your search

+212 -7
View File
@@ -24,8 +24,33 @@ body {
display: flex;
flex-direction: column;
align-items: center;
width: 900px;
max-width: 98vw;
width: min(98vw, calc((98vh - 44px) * 1.5));
max-width: 1920px;
aspect-ratio: 900 / 644;
margin: 0 auto;
position: relative;
}
/* Fullscreen support (F / F11 or Fullscreen button) */
:fullscreen #game-wrapper,
:-webkit-full-screen #game-wrapper {
width: min(100vw, calc(100vh * 1.5));
max-width: 100vw;
height: 100vh;
justify-content: center;
padding: 0;
margin: 0 auto;
}
:fullscreen .top-nav-bar,
:-webkit-full-screen .top-nav-bar {
border-radius: 0;
}
:fullscreen #game-container,
:-webkit-full-screen #game-container {
border-radius: 0;
max-height: calc(100vh - 44px);
}
/* Minimalist Clean Top Navigation Bar */
@@ -138,8 +163,8 @@ body {
#game-container {
position: relative;
width: 100%;
height: 600px;
max-height: calc(95vh - 54px);
height: auto;
max-height: calc(98vh - 44px);
aspect-ratio: 900 / 600;
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(76, 175, 80, 0.3);
border-radius: 0 0 10px 10px;
@@ -219,16 +244,163 @@ canvas#gameCanvas {
/* Start Screen Specific Card (Spacious & Fits 600px Canvas) */
.start-card {
max-width: 840px;
max-width: 860px;
width: 95%;
max-height: 565px;
padding: 12px 18px;
max-height: 96%;
padding: 14px 20px;
display: flex;
flex-direction: column;
justify-content: space-between;
overflow-y: auto;
}
.modern-dashboard {
background: radial-gradient(circle at 50% 15%, rgba(42, 22, 12, 0.95), rgba(15, 8, 4, 0.98)) !important;
border: 3px solid #ffb74d !important;
box-shadow: 0 15px 45px rgba(0, 0, 0, 0.85), 0 0 30px rgba(255, 183, 77, 0.25) !important;
border-radius: 16px !important;
backdrop-filter: blur(12px);
}
.modern-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 16px;
margin-bottom: 8px;
border-bottom: 1px solid rgba(255, 183, 77, 0.2);
padding-bottom: 8px;
}
.brand-title-wrap {
text-align: left;
}
.game-logo-text {
font-size: 22px !important;
font-weight: 900;
margin: 0 !important;
letter-spacing: 0.5px;
text-shadow: 0 2px 8px rgba(0,0,0,0.8), 2px 2px 0 #000;
line-height: 1.1;
}
.logo-plant {
color: #aed581;
text-shadow: 0 0 10px rgba(139, 195, 74, 0.6), 2px 2px 0 #000;
}
.logo-vs {
font-size: 16px;
color: #ffca28;
font-style: italic;
margin: 0 2px;
}
.logo-zombie {
color: #e57373;
text-shadow: 0 0 10px rgba(239, 83, 80, 0.6), 2px 2px 0 #000;
}
.game-version-badge {
font-size: 10px;
color: #ffe082;
letter-spacing: 0.8px;
font-weight: bold;
opacity: 0.9;
margin-top: 3px;
}
.start-hero-profile {
display: flex;
align-items: center;
gap: 10px;
background: rgba(0, 0, 0, 0.55);
border: 1.5px solid #8d6e63;
border-radius: 12px;
padding: 6px 12px;
cursor: pointer;
transition: all 0.2s ease;
box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.start-hero-profile:hover {
background: rgba(66, 40, 23, 0.7);
border-color: #ffd54f;
transform: translateY(-2px);
box-shadow: 0 6px 16px rgba(255, 213, 79, 0.3);
}
.hero-avatar {
font-size: 26px;
line-height: 1;
}
.hero-profile-data {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 2px;
}
.hero-user-line {
display: flex;
align-items: center;
gap: 8px;
}
.hero-username {
font-size: 13px;
font-weight: bold;
color: #fff;
max-width: 140px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.badge-offline {
font-size: 9px;
background: #546e7a;
color: #eceff1;
padding: 1px 6px;
border-radius: 10px;
font-weight: bold;
text-transform: uppercase;
}
.badge-online {
font-size: 9px;
background: #2e7d32;
color: #c8e6c9;
padding: 1px 6px;
border-radius: 10px;
font-weight: bold;
text-transform: uppercase;
box-shadow: 0 0 6px rgba(76, 175, 80, 0.6);
}
.hero-stats-line {
display: flex;
gap: 8px;
font-size: 11px;
color: #ffecb3;
}
.mode-selector-wrapper {
margin-bottom: 6px;
}
.mode-selector-title {
font-size: 11px;
font-weight: bold;
color: #ffe082;
letter-spacing: 1px;
margin-bottom: 4px;
text-transform: uppercase;
opacity: 0.9;
}
.start-header h1 {
font-size: 24px;
margin: 0 0 3px 0;
@@ -263,6 +435,39 @@ canvas#gameCanvas {
font-size: 15px;
}
.btn-play-main {
background: linear-gradient(135deg, #43a047, #2e7d32) !important;
border-color: #81c784 !important;
font-size: 16px !important;
padding: 10px 28px !important;
box-shadow: 0 4px 0 #1b5e20, 0 8px 20px rgba(46, 125, 50, 0.5) !important;
letter-spacing: 0.5px;
}
.btn-play-main:hover {
background: linear-gradient(135deg, #4caf50, #388e3c) !important;
transform: translateY(-2px);
box-shadow: 0 6px 0 #1b5e20, 0 10px 25px rgba(76, 175, 80, 0.6) !important;
}
.btn-campaign {
background: linear-gradient(135deg, #0288d1, #01579b) !important;
border-color: #4fc3f7 !important;
box-shadow: 0 4px 0 #013660, 0 8px 15px rgba(2, 136, 209, 0.4) !important;
}
.btn-campaign:hover {
background: linear-gradient(135deg, #039be5, #0288d1) !important;
}
.btn-inventory {
background: linear-gradient(135deg, #8e24aa, #6a1b9a) !important;
border-color: #ba68c8 !important;
box-shadow: 0 4px 0 #4a148c, 0 8px 15px rgba(142, 36, 170, 0.4) !important;
}
.btn-inventory:hover {
background: linear-gradient(135deg, #9c27b0, #7b1fa2) !important;
}
.start-activities-grid {
display: flex;
gap: 6px;