Add multi-player support (2-4 players) and AI bots

This commit is contained in:
sokol
2026-02-21 18:33:11 +03:00
parent dbe71dbda6
commit 62bd946509
4 changed files with 566 additions and 205 deletions

View File

@@ -30,6 +30,110 @@ body {
overflow: hidden;
}
/* Start Screen */
.start-screen {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background: var(--bg-primary);
}
.start-panel {
background: var(--bg-secondary);
padding: 40px;
border-radius: 12px;
text-align: center;
max-width: 450px;
width: 90%;
border: 2px solid var(--accent-primary);
}
.start-panel h1 {
font-size: 2.5rem;
color: var(--accent-primary);
text-transform: uppercase;
letter-spacing: 4px;
margin-bottom: 5px;
}
.start-panel .subtitle {
font-size: 1rem;
color: var(--text-secondary);
margin-bottom: 30px;
}
.setup-section {
text-align: left;
}
.setup-section h3 {
font-size: 1.1rem;
color: var(--text-primary);
margin-bottom: 20px;
text-transform: uppercase;
letter-spacing: 1px;
}
.setup-group {
margin-bottom: 20px;
}
.setup-group label {
display: block;
font-size: 0.9rem;
color: var(--text-secondary);
margin-bottom: 8px;
}
.setup-group select {
width: 100%;
padding: 10px;
background: var(--bg-panel);
border: 1px solid var(--accent-secondary);
border-radius: 6px;
color: var(--text-primary);
font-size: 0.9rem;
}
.player-type-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px;
padding: 8px;
background: var(--bg-panel);
border-radius: 6px;
}
.player-type-row span {
font-size: 0.85rem;
color: var(--text-primary);
}
.player-type-row select {
width: 120px;
padding: 6px;
background: var(--bg-primary);
border: 1px solid var(--accent-secondary);
border-radius: 4px;
color: var(--text-primary);
font-size: 0.85rem;
}
.btn-large {
width: 100%;
padding: 15px;
font-size: 1rem;
margin-top: 10px;
}
.game-screen {
display: flex;
flex-direction: column;
height: 100vh;
}
.game-container {
display: flex;
flex-direction: column;
@@ -89,6 +193,7 @@ body {
padding: 12px;
border-left: 4px solid transparent;
transition: all 0.3s ease;
margin-bottom: 10px;
}
.player-card.active {
@@ -96,7 +201,7 @@ body {
}
.player-1 {
border-left-color: var(--player1-color);
border-left-color: #4ecca3;
}
.player-1.active {
@@ -104,13 +209,44 @@ body {
}
.player-2 {
border-left-color: var(--player2-color);
border-left-color: #e94560;
}
.player-2.active {
background: linear-gradient(135deg, var(--bg-panel), rgba(233, 69, 96, 0.1));
}
.player-3 {
border-left-color: #f9ed69;
}
.player-3.active {
background: linear-gradient(135deg, var(--bg-panel), rgba(249, 237, 105, 0.1));
}
.player-4 {
border-left-color: #a8e6cf;
}
.player-4.active {
background: linear-gradient(135deg, var(--bg-panel), rgba(168, 230, 207, 0.1));
}
.player-card.ai-controlled {
opacity: 0.8;
}
.player-card.ai-controlled::after {
content: 'AI';
position: absolute;
top: 5px;
right: 8px;
font-size: 0.7rem;
background: var(--accent-secondary);
padding: 2px 6px;
border-radius: 4px;
}
.player-card h3 {
font-size: 1rem;
margin-bottom: 10px;