/* Form controls */
.controls {
    max-width: 600px;
    margin: 0 auto 1.5em;
}

.control-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1em;
    font-size: 16px;
    flex-wrap: wrap;
}

.control-row select {
    font-size: 16px;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    min-width: 70px;
    transition: border-color 0.2s;
}

.control-row select:focus {
    border-color: #666;
    outline: none;
}

/* Given / exclude digit grids */
.digit-filter {
    margin-bottom: 1em;
}

.digit-filter-label {
    font-size: 16px;
    margin-bottom: 0.5em;
    color: #555;
}

.digit-filter-label .hint {
    font-size: 13px;
    color: #999;
    font-weight: normal;
}

.digit-grid {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.digit-grid label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s;
    background: #fff;
    color: #333;
}

.digit-grid label:hover {
    border-color: #999;
    background: #f5f5f5;
}

.given-grid label.checked {
    background: #2e7d32;
    color: #fff;
    border-color: #2e7d32;
}

.exclude-grid label.checked {
    background: #b23b3b;
    color: #fff;
    border-color: #b23b3b;
}

.clear-btn {
    margin-top: 0.25em;
    font-size: 14px;
    color: #666;
    background: none;
    border: none;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
}

.clear-btn:hover {
    color: #333;
}

/* Results */
.inactive {
    color: #ccc;
    text-decoration: line-through;
}

.results {
    list-style-type: none;
    font-size: x-large;
    padding: 0;
}

.results-count {
    font-size: 15px;
    color: #888;
    margin-bottom: 0.5em;
}

.results li {
    padding: 4px 0;
    cursor: pointer;
}

.results li:hover span:not(.inactive) {
    color: #666;
}

.resultsclass {
    min-height: 100px;
}

/* Layout */
.row.content {
    min-height: 600px;
}

.sidenav {
    padding-top: 20px;
    background-color: #f1f1f1;
    height: 100%;
}

footer {
    background-color: #555;
    color: white;
    padding: 15px;
}

@media screen and (max-width: 767px) {
    .sidenav {
        height: auto;
        padding: 15px;
    }
    .row.content {
        height: auto;
    }
    .digit-grid label {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}
