body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.game-container {
    text-align: center;
    max-width: 600px;
}

.game-area {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

h1 {
    color: var(--primary-color);
    margin: 0;
}

.status {
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: bold;
    color: #2c3e50;
    min-height: 1.5em;
}

/* Scoreboard */
.scoreboard {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.score-item {
    background: #f0f2f5;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.score-item.active {
    border-color: var(--primary-color);
    background: #e8f4fd;
}

.score-item .score-name {
    margin-right: 6px;
}

.score-item .score-value {
    color: var(--primary-color);
    font-weight: 700;
}

/* Board wrapper */
.board-wrapper {
    display: inline-block;
    position: relative;
    margin-bottom: 20px;
}

/* Sudoku Board - 6x6 grid with 2x3 box borders */
.sudoku-board {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0;
    background: #2c3e50;
    padding: 3px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
}

.sudoku-cell {
    width: 55px;
    height: 55px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
    border: 1px solid #bdc3c7;
    color: #2c3e50;
    user-select: none;
}

.sudoku-cell:hover {
    background: #ecf0f1;
}

/* 2x3 box borders: thick borders between columns 2-3 and 4-5, and between rows 1-2 and 3-4 */
/* Right border for columns 2 and 4 (0-indexed: col 1, col 3) */
.sudoku-cell[data-col="1"],
.sudoku-cell[data-col="3"] {
    border-right: 3px solid #2c3e50;
}

/* Left border for columns 3 and 5 (0-indexed: col 2, col 4) */
.sudoku-cell[data-col="2"],
.sudoku-cell[data-col="4"] {
    border-left: 3px solid #2c3e50;
}

/* Bottom border for row 1 (0-indexed) */
.sudoku-cell[data-row="1"] {
    border-bottom: 3px solid #2c3e50;
}

/* Top border for row 2 (0-indexed) */
.sudoku-cell[data-row="2"] {
    border-top: 3px solid #2c3e50;
}

/* Bottom border for row 3 (0-indexed) */
.sudoku-cell[data-row="3"] {
    border-bottom: 3px solid #2c3e50;
}

/* Top border for row 4 (0-indexed) */
.sudoku-cell[data-row="4"] {
    border-top: 3px solid #2c3e50;
}

/* Pre-filled (locked) cells */
.sudoku-cell.prefilled {
    background: #f0f2f5;
    cursor: default;
    color: #2c3e50;
    font-weight: 800;
}

.sudoku-cell.prefilled:hover {
    background: #f0f2f5;
}

/* Selected cell */
.sudoku-cell.selected {
    background: #aed6f1;
    box-shadow: inset 0 0 0 3px var(--primary-color);
}

/* Correct placement */
.sudoku-cell.correct {
    color: #27ae60;
}

/* Wrong placement */
.sudoku-cell.wrong {
    color: #e74c3c;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* Number buttons */
.number-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.num-btn {
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.num-btn:hover {
    background-color: var(--primary-hover);
}

/* Game buttons */
.game-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

#exit-game-btn {
    padding: 10px 20px;
    font-size: 1rem;
}

/* Online info */
.online-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.opponent-name {
    font-weight: 600;
    color: var(--text-muted, #666);
}

/* Responsive */
@media (max-width: 460px) {
    .sudoku-cell {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .num-btn {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .scoreboard {
        gap: 8px;
    }

    .score-item {
        padding: 4px 10px;
        font-size: 0.85rem;
    }
}
