html,
body {
    background-color: black;
    color: white;
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
    line-height: 1.6;
    margin: 0;
}

.app {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    position: relative;
}

.info {
    font-size: 12px;
    opacity: 0.7;
    position: absolute;
    top: 10px;
    left: 10px;
    margin: 0;
}

.sudoku {
    width: min(450px, 95vw);
    height: min(450px, 95vw);
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: repeat(9, 1fr);
    border: 2px solid white;
    box-sizing: border-box;
}

.cell {
    font-family: math;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    cursor: pointer;
    border-right: 1px solid white;
    border-bottom: 1px solid white;
}

.cell:hover {
    box-shadow: inset 0 0 0 100px rgba(255, 255, 255, 0.1);
}

.cell.selected {
    box-shadow: inset 0 0 0 100px rgba(255, 255, 255, 0.2);
}

/* remove right border on last column */
.cell:nth-child(9n) {
    border-right: none;
}

/* remove bottom border on last row */
.cell:nth-child(n + 73) {
    border-bottom: none;
}

/* thick right border after columns 3, 6 */
.cell:nth-child(9n + 3),
.cell:nth-child(9n + 6) {
    border-right: 2px solid white;
}

/* thick bottom border after rows 3, 6 */
.cell:nth-child(n + 19):nth-child(-n + 27),
.cell:nth-child(n + 46):nth-child(-n + 54) {
    border-bottom: 2px solid white;
}

.picker-row {
    margin-top: 100px;
    position: relative;
    width: 100%;
}

.cell.mutable {
    background-color: #4a4a4a;
    cursor: pointer;
}

.cell:not(.mutable) {
    cursor: default;
}

.picker-hint {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.7;
    max-width: calc(50% - 235px);
    margin-right: 5%;
}

.number-picker {
    width: min(450px, 95vw);
    height: calc(min(450px, 95vw) / 9);
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    border: 2px solid white;
    box-sizing: border-box;
    margin: 0 auto;
}

.picker-cell {
    font-family: math;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    cursor: pointer;
}

.picker-cell:not(:last-child) {
    border-right: 1px solid white;
}

.picker-cell:hover {
    background-color: #333;
}

.check-btn {
    width: min(450px, 95vw);
    margin-top: 20px;
    padding: 12px 0;
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
    font-size: 16px;
    color: white;
    background-color: transparent;
    border: 2px solid white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.check-btn:hover {
    background-color: #333;
}

.check-btn.valid {
    border-color: #4caf50;
    color: #4caf50;
}

.check-btn.invalid {
    border-color: #f44336;
    color: #f44336;
}

@media (max-width: 1300px) {
    .picker-hint {
        display: none;
    }
}

.too-small {
    display: none;
    text-align: center;
    padding: 20px;
}

@media (max-width: 300px) {
    .sudoku,
    .picker-row,
    .info {
        display: none;
    }

    .too-small {
        display: block;
    }
}