.game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.sudoku-container {
    width: 100%;
    max-width: 450px;
}

.sudoku-container h1 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.difficulty-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
}

.difficulty-selector label {
    font-weight: bold;
    color: #333;
}

.difficulty-selector select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    background-color: white;
    font-size: 16px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.difficulty-selector select:hover {
    border-color: #2196F3;
}

.difficulty-selector select:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

#sudoku-grid {
    display: grid;
    grid-template-columns: repeat(9, 40px);
    grid-template-rows: repeat(9, 40px);
    gap: 0;
    border: 2px solid #333;
    background-color: white;
    margin: 20px auto;
    width: fit-content;
}

.cell-container {
    width: 40px;
    height: 40px;
    border: 1px solid #ccc;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cell-container::before {
    content: '';
    display: block;
    padding-top: 100%;
}

.cell-input {
    width: 100%;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 20px;
    padding: 0;
    margin: 0;
    background: none;
}

.cell-input:focus {
    outline: none;
    background-color: #e6f3ff;
}

.cell-input.initial {
    background-color: #f0f0f0;
    font-weight: bold;
}

.cell-input.incorrect {
    background-color: #ffebee;
    color: #d32f2f;
}

/* Add borders for 3x3 boxes */
.border-left {
    border-left: 2px solid #333 !important;
}

.border-right {
    border-right: 2px solid #333 !important;
}

.border-top {
    border-top: 2px solid #333 !important;
}

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

.candidates {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 1px;
    padding: 2px;
    box-sizing: border-box;
    pointer-events: none;
}

.candidate {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #666;
}

.candidate.active {
    color: #2196F3;
    font-weight: bold;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    background-color: #f0f0f0;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #e0e0e0;
}

#new-game {
    background-color: #4CAF50;
    color: white;
}

#new-game:hover {
    background-color: #45a049;
}

#check-solution {
    background-color: #2196F3;
    color: white;
}

#check-solution:hover {
    background-color: #0b7dda;
}

#show-solution {
    background-color: #ff9800;
    color: white;
}

#show-solution:hover {
    background-color: #e68a00;
}

#toggle-candidates {
    background-color: #9c27b0;
    color: white;
}

#toggle-candidates:hover {
    background-color: #7b1fa2;
}

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

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

.number-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.number-selector h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.number-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 200px;
}

.number-btn {
    padding: 15px;
    border: none;
    border-radius: 4px;
    background-color: #f0f0f0;
    color: #333;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.number-btn:hover {
    background-color: #e0e0e0;
}

.number-btn.selected {
    background-color: #2196F3;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.number-btn.clear {
    grid-column: span 3;
    background-color: #f44336;
    color: white;
}

.number-btn.clear i {
    margin-right: 5px;
}

.number-btn.clear:hover {
    background-color: #d32f2f;
}

@media (max-width: 768px) {
    .game-container {
        flex-direction: column;
    }
    
    .number-selector {
        margin-top: 20px;
    }
} 