 /* Custom styles for the Sudoku game */
 body {
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent; /* Disable tap highlight on mobile */
}

#sudoku-board {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    grid-template-rows: repeat(9, minmax(0, 1fr));
    width: 100%;
    max-width: 540px; /* Max width for larger screens */
    aspect-ratio: 1 / 1; /* Maintain a square grid */
    border: 3px solid #1f2937; /* dark gray */
    border-radius: 8px;
    background-color: #f3f4f6; /* light gray */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sudoku-cell {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #d1d5db; /* medium gray */
    font-size: clamp(1rem, 4vw, 1.75rem); /* Responsive font size */
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    position: relative;
}

/* Add thicker borders for the 3x3 subgrids */
.sudoku-cell:nth-child(3n) { border-right: 2px solid #4b5563; }
.sudoku-cell:nth-child(9n) { border-right: 1px solid #d1d5db; }
.sudoku-cell:nth-child(n+19):nth-child(-n+27),
.sudoku-cell:nth-child(n+46):nth-child(-n+54) {
    border-bottom: 2px solid #4b5563;
}

.sudoku-cell.prefilled {
    font-weight: 700;
    color: #111827; /* almost black */
    cursor: not-allowed;
}

.sudoku-cell.user-input {
    color: #1d4ed8; /* blue */
    font-weight: 500;
}

.sudoku-cell.selected {
    background-color: #dbeafe; /* light blue */
    outline: 2px solid #3b82f6; /* blue */
    z-index: 10;
}

.sudoku-cell.highlighted {
    background-color: #e5e7eb; /* lighter gray */
}

.sudoku-cell.selected.highlighted {
     background-color: #dbeafe; /* light blue */
}

.sudoku-cell.incorrect {
    background-color: #fee2e2; /* light red */
    color: #b91c1c; /* dark red */
}

.sudoku-cell.incorrect::after {
    content: 'X';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 0.7rem;
    color: #ef4444;
    font-weight: bold;
}

.footer{
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    text-align: center;
}