body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

h1 {
    text-align: center;
    color: #333;
}

.game-info {
    margin-bottom: 20px;
}

.controls {
    margin-bottom: 10px;
}

.puzzle-info {
    margin-bottom: 10px;
}

.controls button {
    padding: 10px 15px;
    margin-right: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.controls button:hover {
    background-color: #45a049;
}

.puzzle-info {
    text-align: center;
    font-size: 18px;
    margin: 10px 0;
}

.rules {
    background-color: #e9f7fe;
    padding: 10px;
    border-radius: 5px;
    flex: 1;
    margin-left: 20px;
}

.rules h3 {
    margin-top: 0;
}

.rules ul {
    padding-left: 20px;
}

.game-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

#game-board {
    display: grid;
    grid-template-columns: repeat(9, 40px);
    grid-template-rows: repeat(9, 40px);
    gap: 1px;
    background-color: #333;
    border: 2px solid #333;
}

.cell {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    user-select: none;
}

.cell.empty {
    background-color: white;
}

.cell.wall {
    background-color: #333;
}

.cell.number {
    background-color: #ddd;
}

.cell.error {
    background-color: #ffcccc;
}

.status {
    text-align: center;
    margin-top: 20px;
    font-size: 18px;
    font-weight: bold;
}

.status.correct {
    color: green;
}

.status.incorrect {
    color: red;
}

@media (max-width: 600px) {
    .game-info {
        flex-direction: column;
    }
    
    .rules {
        margin-left: 0;
        margin-top: 20px;
    }
    
    #game-board {
        grid-template-columns: repeat(9, 30px);
        grid-template-rows: repeat(9, 30px);
    }
    
    .cell {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
}