Implement hexagonal map and isometric game UI
This commit is contained in:
378
public/styles.css
Normal file
378
public/styles.css
Normal file
@@ -0,0 +1,378 @@
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
:root {
|
||||
--bg-primary: #1a1a2e;
|
||||
--bg-secondary: #16213e;
|
||||
--bg-panel: #0f3460;
|
||||
--text-primary: #eee;
|
||||
--text-secondary: #aaa;
|
||||
--accent-primary: #e94560;
|
||||
--accent-secondary: #00adb5;
|
||||
--player1-color: #4ecca3;
|
||||
--player2-color: #e94560;
|
||||
--blocked-color: #2a2a4a;
|
||||
--empty-color: #3a5a6a;
|
||||
--highlight-color: rgba(255, 255, 255, 0.3);
|
||||
--selected-color: rgba(233, 69, 96, 0.5);
|
||||
--target-color: rgba(78, 204, 163, 0.5);
|
||||
--hex-stroke: #1a1a2e;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
||||
background: var(--bg-primary);
|
||||
color: var(--text-primary);
|
||||
min-height: 100vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.game-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
.game-header {
|
||||
background: var(--bg-secondary);
|
||||
padding: 10px 20px;
|
||||
text-align: center;
|
||||
border-bottom: 2px solid var(--accent-primary);
|
||||
}
|
||||
|
||||
.game-header h1 {
|
||||
font-size: 1.8rem;
|
||||
color: var(--accent-primary);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 4px;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 0.9rem;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
/* Game Area */
|
||||
.game-area {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* Side Panels */
|
||||
.side-panel {
|
||||
width: 220px;
|
||||
background: var(--bg-secondary);
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 15px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.left-panel {
|
||||
border-right: 1px solid var(--bg-panel);
|
||||
}
|
||||
|
||||
.right-panel {
|
||||
border-left: 1px solid var(--bg-panel);
|
||||
}
|
||||
|
||||
/* Player Cards */
|
||||
.player-card {
|
||||
background: var(--bg-panel);
|
||||
border-radius: 8px;
|
||||
padding: 12px;
|
||||
border-left: 4px solid transparent;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.player-card.active {
|
||||
box-shadow: 0 0 15px rgba(233, 69, 96, 0.4);
|
||||
}
|
||||
|
||||
.player-1 {
|
||||
border-left-color: var(--player1-color);
|
||||
}
|
||||
|
||||
.player-1.active {
|
||||
background: linear-gradient(135deg, var(--bg-panel), rgba(78, 204, 163, 0.1));
|
||||
}
|
||||
|
||||
.player-2 {
|
||||
border-left-color: var(--player2-color);
|
||||
}
|
||||
|
||||
.player-2.active {
|
||||
background: linear-gradient(135deg, var(--bg-panel), rgba(233, 69, 96, 0.1));
|
||||
}
|
||||
|
||||
.player-card h3 {
|
||||
font-size: 1rem;
|
||||
margin-bottom: 10px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.player-stats {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.stat {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 0.85rem;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
font-weight: bold;
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
/* Game Info */
|
||||
.game-info {
|
||||
background: var(--bg-panel);
|
||||
border-radius: 8px;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.game-info h3 {
|
||||
font-size: 0.9rem;
|
||||
margin-bottom: 10px;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.info-item {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 0.85rem;
|
||||
padding: 4px 0;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.info-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.btn {
|
||||
padding: 10px 16px;
|
||||
border: none;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
font-size: 0.9rem;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 1px;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.btn:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background: var(--accent-primary);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.btn-primary:hover:not(:disabled) {
|
||||
background: #ff6b6b;
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.btn-secondary {
|
||||
background: var(--bg-panel);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.btn-secondary:hover:not(:disabled) {
|
||||
background: var(--accent-secondary);
|
||||
}
|
||||
|
||||
.btn-action {
|
||||
background: var(--accent-secondary);
|
||||
color: white;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.btn-action:hover:not(:disabled) {
|
||||
background: #00cec9;
|
||||
}
|
||||
|
||||
/* Actions Panel */
|
||||
.actions-panel {
|
||||
background: var(--bg-panel);
|
||||
border-radius: 8px;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.actions-panel h3 {
|
||||
font-size: 0.9rem;
|
||||
margin-bottom: 8px;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.instruction {
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: 12px;
|
||||
min-height: 40px;
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
/* Battle Log */
|
||||
.battle-log {
|
||||
background: var(--bg-panel);
|
||||
border-radius: 8px;
|
||||
padding: 12px;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 200px;
|
||||
}
|
||||
|
||||
.battle-log h3 {
|
||||
font-size: 0.9rem;
|
||||
margin-bottom: 10px;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.log-entries {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
font-size: 0.75rem;
|
||||
font-family: 'Consolas', monospace;
|
||||
}
|
||||
|
||||
.log-entry {
|
||||
padding: 4px 6px;
|
||||
margin-bottom: 4px;
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
border-radius: 4px;
|
||||
border-left: 3px solid var(--accent-secondary);
|
||||
}
|
||||
|
||||
.log-entry.attack {
|
||||
border-left-color: var(--accent-primary);
|
||||
}
|
||||
|
||||
.log-entry.victory {
|
||||
border-left-color: var(--player1-color);
|
||||
}
|
||||
|
||||
.log-entry.defeat {
|
||||
border-left-color: var(--player2-color);
|
||||
}
|
||||
|
||||
/* Canvas Container */
|
||||
.canvas-container {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: var(--bg-primary);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
min-width: 600px;
|
||||
min-height: 600px;
|
||||
}
|
||||
|
||||
#game-canvas {
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
|
||||
display: block;
|
||||
}
|
||||
|
||||
.canvas-overlay {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
background: rgba(26, 26, 46, 0.95);
|
||||
padding: 30px 50px;
|
||||
border-radius: 12px;
|
||||
border: 2px solid var(--accent-primary);
|
||||
display: none;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.canvas-overlay.visible {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#overlay-message {
|
||||
font-size: 1.5rem;
|
||||
color: var(--accent-primary);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 3px;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
.game-footer {
|
||||
background: var(--bg-secondary);
|
||||
padding: 8px 20px;
|
||||
text-align: center;
|
||||
border-top: 1px solid var(--bg-panel);
|
||||
}
|
||||
|
||||
.game-footer p {
|
||||
font-size: 0.8rem;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
/* Scrollbar */
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: var(--bg-primary);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: var(--bg-panel);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--accent-secondary);
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media (max-width: 1200px) {
|
||||
.side-panel {
|
||||
width: 180px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.game-area {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.side-panel {
|
||||
width: 100%;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.canvas-container {
|
||||
min-height: 400px;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user