/* Sudoku Game Styles */
#sudoku-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 1px;
    background: var(--text, #333);
    border: 2px solid var(--text, #333);
    width: 100%;
    aspect-ratio: 1;
    margin: 0 auto;
    touch-action: none;
}

.game-board-container {
    width: min(90vw, 70vh, 560px);
    max-width: 560px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .game-board-container {
        width: min(95vw, 80vh, 500px);
    }
}

@media (max-width: 480px) {
    .game-board-container {
        width: min(100%, 90vh);
    }
}

.sudoku-cell {
    background: var(--bg, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
    min-width: 0;
    min-height: 0;
}

.sudoku-cell:hover {
    background: var(--bg-alt);
}

.sudoku-cell.selected {
    background: #dbeafe;
}

.sudoku-cell.fixed {
    background: var(--bg-alt);
    color: var(--text);
    cursor: default;
    font-weight: 700;
}

.sudoku-cell.error {
    background: #fee2e2;
    color: #dc2626;
}

.sudoku-cell.highlight {
    background: #fef3c7;
}

/* 3x3 box borders */
.sudoku-cell:nth-child(3n) {
    border-right: 2px solid var(--text);
}

.sudoku-cell:nth-child(9n) {
    border-right: none;
}

.sudoku-cell:nth-child(n+19):nth-child(-n+27),
.sudoku-cell:nth-child(n+46):nth-child(-n+54) {
    border-bottom: 2px solid var(--text);
}

/* Number pad */
#number-pad {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.number-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font-size: 1.25rem;
    cursor: pointer;
    transition: background 0.15s;
}

.number-btn:hover {
    background: var(--bg-alt);
}

.number-btn.clear-btn {
    width: auto;
    padding: 0 1rem;
    background: #fee2e2;
    color: #dc2626;
}

/* Game status messages */
#game-status {
    min-height: 2rem;
    padding: 0.5rem;
}

#game-status.success {
    color: #059669;
    font-weight: 600;
}

#game-status.error {
    color: #dc2626;
}

/* Responsive */
@media (max-width: 480px) {
    .sudoku-cell {
        font-size: 1.25rem;
    }

    .number-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}