body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
}

h1 {
    color: #333;
    margin-top: 0;
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.timer, .difficulty {
    font-size: 18px;
    font-weight: bold;
}

.sudoku-board {
    display: grid;
    grid-template-columns: repeat(9, 50px);
    grid-template-rows: repeat(9, 50px);
    gap: 1px;
    margin: 0 auto 20px;
    border: 2px solid #333;
}

.cell {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    background-color: #fff;
    border: 1px solid #ccc;
    cursor: pointer;
}

.cell:nth-child(3n):not(:nth-child(9n)) {
    border-right: 2px solid #333;
}

.cell:nth-child(n+19):nth-child(-n+27),
.cell:nth-child(n+46):nth-child(-n+54) {
    border-bottom: 2px solid #333;
}

.cell.fixed {
    background-color: #e0e0e0;
    color: #333;
}

.cell.user-input {
    color: #007bff;
}

.cell.selected {
    background-color: #cce5ff;
}

.cell.error {
    background-color: #ffcccc;
}

.controls {
    margin-bottom: 20px;
}

button {
    padding: 10px 20px;
    margin: 0 5px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #007bff;
    color: white;
}

button:hover {
    background-color: #0056b3;
}

.number-pad {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.number-row {
    display: flex;
    margin-bottom: 5px;
}

.number-btn {
    width: 50px;
    height: 50px;
    margin: 0 5px;
    font-size: 18px;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #f0f0f0;
}

.number-btn:hover {
    background-color: #ddd;
}

@media (max-width: 600px) {
    .sudoku-board {
        grid-template-columns: repeat(9, 30px);
        grid-template-rows: repeat(9, 30px);
    }
    
    .cell {
        font-size: 16px;
    }
    
    .number-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}