.sudoku-container {
    text-align: center;
    padding: 5px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

/* Difficulty selector (mirrors minesweeper) */
.sudoku-difficulty {
    display: flex;
    gap: 10px;
}

.difficulty-button {
    background-color: transparent;
    border: 2px solid;
    border-radius: 8px;
    padding: 8px 18px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.difficulty-button {
    background-color: #0a0a0a;
    border: 2px solid;
    border-radius: 8px;
    padding: 8px 18px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

#sdk-diff-easy {
    color: #00BF63;
    border-color: #00BF63;
}
#sdk-diff-easy:hover { background-color: #1e1e1e; }
#sdk-diff-easy.active {
    background-color: #00BF63;
    color: #0a0a0a;
    border-color: #0a0a0a;
}

#sdk-diff-medium {
    color: #FFC107;
    border-color: #FFC107;
}
#sdk-diff-medium:hover { background-color: #1e1e1e; }
#sdk-diff-medium.active {
    background-color: #FFC107;
    color: #0a0a0a;
    border-color: #0a0a0a;
}

#sdk-diff-hard {
    color: #EF4444;
    border-color: #EF4444;
}
#sdk-diff-hard:hover { background-color: #1e1e1e; }
#sdk-diff-hard.active {
    background-color: #EF4444;
    color: #0a0a0a;
    border-color: #0a0a0a;
}

.sudoku-board-wrapper {
    background-color: #141414;
    border: 2px solid #00BF63;
    border-radius: 14px;
    padding: 14px;
    overflow-x: auto;
    max-width: 100%;
}

table {
    border-collapse: collapse;
    margin: 0 auto;
    border: none;
    padding: 0px;
}

tr {
    padding: 0;
}

td {
    width: clamp(34px, 10vw, 46px);
    height: clamp(34px, 10vw, 46px);
    border: 1px solid #2a2a2a;
    position: relative;
    margin: 0px;
    text-align: center;
    background-color: #1e1e1e;
    transition: background-color 0.15s ease;
}

input[type="text"] {
    font-family: "DM Sans", sans-serif;
    width: 90%;
    height: 90%;
    text-align: center;
    font-size: clamp(16px, 4.4vw, 21px);
    font-weight: 500;
    border: none;
    background-color: transparent;
    color: #f4f4f4;
    caret-color: #00BF63;
    border-radius: 4px;
}

input[type="text"]:focus {
    outline: none;
    background-color: rgba(0, 191, 99, 0.18);
    box-shadow: inset 0 0 0 2px #00BF63;
}

/* Given (non-editable) cells — bold, faint green tint, distinct from user entries */
input:not(.editable) {
    font-weight: 700;
    color: #00BF63;
    background-color: rgba(0, 191, 99, 0.08);
    cursor: default;
}

/* Correct / incorrect feedback, replaces inline style.backgroundColor */
input.cell-correct {
    background-color: rgba(0, 191, 99, 0.35) !important;
    box-shadow: inset 0 0 0 2px #00BF63;
}

input.cell-incorrect {
    background-color: rgba(239, 68, 68, 0.35) !important;
    box-shadow: inset 0 0 0 2px #EF4444;
}

/* Thicker green borders to separate 3x3 grids */
td:nth-child(3n) {
    border-right: 3px solid #00BF63;
}

tr:nth-child(3n) td {
    border-bottom: 3px solid #00BF63;
}

td:first-child {
    border-left: 3px solid #00BF63;
}

tr:first-child td {
    border-top: 3px solid #00BF63;
}

@media (max-width: 480px) {
    .sudoku-board-wrapper {
        padding: 8px;
        border-radius: 10px;
    }
    .sudoku-container {
        padding: 0 6px;
    }
}