body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f0f0f0;
}

.sudoku-container {
    text-align: center;
    max-width: 600px;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

h1 {
    color: #333;
    margin-bottom: 20px;
}

.controls {
    margin-bottom: 20px;
}

#difficulty, #start-btn, #reset-btn {
    padding: 10px;
    font-size: 16px;
    margin: 5px;
    cursor: pointer;
}

#timer {
    font-size: 18px;
    margin-bottom: 20px;
    color: #333;
}

#sudoku-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    border: 2px solid red;
    box-sizing: border-box;
    background-color: #fff;
}

.cell {
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid red;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    box-sizing: border-box;
}

.cell:nth-child(3n):not(:nth-child(9n)) {
    border-right: 2px solid red;
}

.cell:nth-child(n+19):nth-child(-n+27),
.cell:nth-child(n+46):nth-child(-n+54),
.cell:nth-child(n+73):nth-child(-n+81) {
    border-bottom: 2px solid red;
}

.cell input {
    width: 100%;
    height: 100%;
    border: none;
    text-align: center;
    font-size: 18px;
    outline: none;
}

.cell input.pre-filled {
    background-color: #e0e0e0;
    color: #000;
    font-weight: bold;
}

.cell input.auto-filled {
    color: green;
    font-weight: bold;
}

.cell input.user-filled {
    color: blue;
}

/* WordPress and Mobile Responsiveness */
@media (max-width: 600px) {
    .sudoku-container {
        padding: 10px;
    }

    #sudoku-grid {
        max-width: 100%;
    }

    .cell {
        font-size: 14px;
    }

    .cell input {
        font-size: 14px;
    }

    #difficulty, #start-btn, #reset-btn {
        font-size: 14px;
        padding: 8px;
    }

    #timer {
        font-size: 16px;
    }
}

@media (max-width: 400px) {
    .cell {
        font-size: 12px;
    }

    .cell input {
        font-size: 12px;
    }
}