/* Similar to dotsandboxes but without dots and lines. Just a grid of cells. */
.game-container { width: 100%; max-width: 800px; padding: 2rem; display: flex; flex-direction: column; align-items: center; gap: 2rem; position: relative; z-index: 10; }
.game-header { width: 100%; text-align: center; position: relative; }
.back-btn { position: absolute; left: 0; top: 50%; transform: translateY(-50%); color: var(--text-muted); text-decoration: none; font-weight: 500; transition: color 0.3s; }
.back-btn:hover { color: var(--primary); }

.score-board { display: flex; justify-content: center; gap: 2rem; margin-top: 1.5rem; }
.player-score { background: var(--glass-bg); border: 2px solid transparent; border-radius: 12px; padding: 1rem 2rem; display: flex; flex-direction: column; align-items: center; transition: all 0.3s; opacity: 0.5; }
.player-score.active { opacity: 1; transform: scale(1.05); }
.player-score.player1.active { border-color: #10b981; box-shadow: 0 0 15px rgba(16, 185, 129, 0.4); }
.player-score.player2.active { border-color: #ef4444; box-shadow: 0 0 15px rgba(239, 68, 68, 0.4); }
.player-score .name { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.5rem; }

#status-message { margin-top: 1rem; font-size: 1.2rem; color: var(--text-main); font-weight: 500; height: 1.5rem; }

.panel { background: var(--glass-bg); backdrop-filter: blur(10px); border: 1px solid var(--glass-border); border-radius: 20px; padding: 2rem; text-align: center; width: 100%; max-width: 500px; }
.panel h2 { margin-bottom: 1.5rem; }
.btn-group { display: flex; flex-direction: column; gap: 1rem; }
.hidden { display: none !important; }

#game-board-container { display: flex; flex-direction: column; align-items: center; }

/* Domineering Grid */
.grid-container {
    display: grid;
    gap: 4px;
    background: var(--glass-border);
    padding: 4px;
    border-radius: 8px;
    margin: 2rem auto;
}

.cell {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

/* Hover effects */
.cell.hover-p1 {
    background: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.cell.hover-p2 {
    background: rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.cell.hover-invalid {
    background: rgba(255, 0, 0, 0.2);
    cursor: not-allowed;
}

/* Placed dominoes */
.cell.p1 {
    background: #10b981;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    cursor: default;
}

.cell.p2 {
    background: #ef4444;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    cursor: default;
}

/* Domino connection styles (to make them look like a single piece) */
.cell.p1.top-half { border-bottom-left-radius: 0; border-bottom-right-radius: 0; padding-bottom: 4px; margin-bottom: -4px; z-index: 2; position: relative;}
.cell.p1.bottom-half { border-top-left-radius: 0; border-top-right-radius: 0; }
.cell.p2.left-half { border-top-right-radius: 0; border-bottom-right-radius: 0; padding-right: 4px; margin-right: -4px; z-index: 2; position: relative;}
.cell.p2.right-half { border-top-left-radius: 0; border-bottom-left-radius: 0; }

@media (max-width: 600px) {
    .back-btn { position: relative; top: 0; transform: none; display: block; margin-bottom: 1rem; }
    .score-board { gap: 1rem; }
    .player-score { padding: 0.5rem 1rem; }
}
