/* Main Container */
.sudoku-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Header */
.sudoku-container h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
}

/* Difficulty Selector */
.difficulty {
    text-align: center;
    margin-bottom: 15px;
}

.difficulty select {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: white;
    font-size: 16px;
}

/* Sudoku Board */
.sudoku-board {
    display: inline-block;
    border: 2px solid #333;
    margin: 0 auto;
    background-color: white;
}

.sudoku-row {
    display: flex;
}

.sudoku-cell {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    box-sizing: border-box;
    position: relative;
}

/* Cell borders */
.border-right {
    border-right: 2px solid #333;
}

.border-bottom {
    border-bottom: 2px solid #333;
}

/* Cell states */
.sudoku-cell.given {
    background-color: #f9f9f9;
    color: #2c3e50;
}

.sudoku-cell input {
    width: 100%;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    background: transparent;
}

.sudoku-cell input:focus {
    outline: 2px solid #3498db;
    z-index: 1;
}

/* Input number styling */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Controls */
.sudoku-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.sudoku-controls button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.check-button {
    background-color: #2ecc71;
    color: white;
}

.check-button:hover {
    background-color: #27ae60;
}

.hint-button {
    background-color: #3498db;
    color: white;
}

.hint-button:hover {
    background-color: #2980b9;
}

.new-game-button {
    background-color: #e74c3c;
    color: white;
}

.new-game-button:hover {
    background-color: #c0392b;
}

/* Messages */
.sudoku-message {
    text-align: center;
    min-height: 24px;
    margin: 10px 0;
    font-weight: bold;
}

.sudoku-message.success {
    color: #27ae60;
}

.sudoku-message.error {
    color: #e74c3c;
}

/* Timer */
.sudoku-timer {
    text-align: center;
    font-size: 18px;
    margin-top: 15px;
    color: #7f8c8d;
}

/* Responsive Design */
@media (max-width: 600px) {
    .sudoku-cell {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .sudoku-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .sudoku-controls button {
        width: 80%;
        margin-bottom: 5px;
    }
}

/* Animation for incorrect cells */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.incorrect {
    animation: shake 0.5s ease-in-out;
    background-color: rgba(231, 76, 60, 0.1) !important;
}

/* Highlight for hint */
.hint-cell {
    background-color: rgba(52, 152, 219, 0.2) !important;
    transition: background-color 0.3s ease;
}
