Create focused arena layout with main player centered

- Main player board is large and centered with cyan glow
- Opponent boards are smaller (50% scale) and positioned around edges
- Layout adapts for 1, 2, or 3+ players
- Spectator boards have reduced opacity to reduce distraction
This commit is contained in:
2026-03-20 08:01:25 -07:00
parent 45f6d0d0c3
commit bc89948584
3 changed files with 115 additions and 22 deletions
+76 -10
View File
@@ -151,21 +151,82 @@ button:active {
color: #0f0;
}
/* Battle Grid - Responsive Layout */
/* Battle Grid - Focused Layout */
#battle-grid {
display: grid;
gap: 20px;
position: relative;
width: 100%;
height: 80vh;
display: flex;
justify-content: center;
align-items: center;
margin-top: 20px;
}
#battle-grid.grid-2x2 {
grid-template-columns: repeat(2, 1fr);
/* Main player board - centered and large */
.player-board.main {
position: relative;
z-index: 10;
transform: scale(1);
}
#battle-grid.grid-2x4 {
grid-template-columns: repeat(2, 1fr);
grid-template-rows: repeat(2, 1fr);
/* Spectator boards - smaller and around the edges */
.player-board.spectator {
position: absolute;
transform: scale(0.5);
opacity: 0.7;
}
.player-board.eliminated {
opacity: 0.4;
}
/* Position spectator boards around the main board */
.player-board.spectator.top-left {
top: 20px;
left: 20px;
}
.player-board.spectator.top-right {
top: 20px;
right: 20px;
}
.player-board.spectator.bottom-left {
bottom: 20px;
left: 20px;
}
.player-board.spectator.bottom-right {
bottom: 20px;
right: 20px;
}
/* Single player - just show main board */
#battle-grid.single-player {
justify-content: center;
align-items: center;
}
/* Two players - main centered, spectator to the right */
#battle-grid.two-players .spectator {
position: static;
transform: none;
opacity: 1;
margin-left: 30px;
}
#battle-grid.two-players {
display: flex;
justify-content: center;
align-items: center;
gap: 30px;
}
/* Three+ players - main centered with spectators around */
#battle-grid.multi-player {
display: flex;
justify-content: center;
align-items: center;
}
.player-board {
@@ -178,13 +239,18 @@ button:active {
position: relative;
}
.player-board.active {
.player-board.main {
border-color: #0ff;
box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
}
.player-board.spectator {
border-color: #444;
}
.player-board.eliminated {
border-color: #f00;
opacity: 0.5;
opacity: 0.4;
}
.player-board canvas {