/* Sudoku Generator Styles */
.sudoku-container {
    max-width: 500px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #ffffff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.sudoku-header h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1e1e1e;
    text-align: center;
}

.sudoku-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.sudoku-controls select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    font-size: 14px;
}

.wpsg-btn {
    background-color: #3858e9;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background 0.2s ease;
}

.wpsg-btn:hover {
    background-color: #1d3dd1;
}

.wpsg-btn.secondary {
    background-color: #67727e;
}

.wpsg-btn.secondary:hover {
    background-color: #4f5862;
}

#sudoku-board-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

#sudoku-board {
    border-collapse: collapse;
    border: 3px solid #1e1e1e;
    user-select: none;
}

#sudoku-board td {
    padding: 0;
    margin: 0;
    width: 45px;
    height: 45px;
    border: 1px solid #ccc;
    text-align: center;
    vertical-align: middle;
}

/* 3x3 Block Borders */
#sudoku-board td:nth-child(3n) {
    border-right: 2px solid #1e1e1e;
}
#sudoku-board td:nth-child(9n) {
    border-right: 3px solid #1e1e1e;
}
#sudoku-board tr:nth-child(3n) td {
    border-bottom: 2px solid #1e1e1e;
}
#sudoku-board tr:nth-child(9n) td {
    border-bottom: 3px solid #1e1e1e;
}

#sudoku-board input {
    width: 100%;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #3858e9;
    background-color: #fff;
    outline: none;
    padding: 0;
    box-sizing: border-box;
}

#sudoku-board input:focus {
    background-color: #e8f0fe;
}

/* Style for system generated clues */
#sudoku-board input.clue {
    color: #1e1e1e;
    background-color: #f3f4f6;
    cursor: not-allowed;
}

/* Validation styles */
.error-cell input {
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
}

.sudoku-message {
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
    min-height: 24px;
}

.success-msg { color: #16a34a; }
.error-msg { color: #dc2626; }

@media (max-width: 480px) {
    #sudoku-board td {
        width: 35px;
        height: 35px;
    }
    #sudoku-board input {
        font-size: 16px;
    }
}
