* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background-color: #FFFFF0;
    opacity: 1;
    background-image: repeating-radial-gradient( circle at 0 0, transparent 0, #FFFFF0 10px ), repeating-linear-gradient( #DB709355, #DB7093 );
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: ivory;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(251, 117, 150, 0.3);
    padding: 30px;
    max-width: 600px;
    width: 100%;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    color: darkkhaki;
    font-size: 2.5em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    font-size: 1.1em;
}

.stat {
    display: flex;
    align-items: center;
    gap: 10px;
}

.label {
    color: darkkhaki;
    font-weight: bold;
}

.stat span:last-child {
    color: darkkhaki;
    font-weight: bold;
    font-size: 1.3em;
    min-width: 50px;
}

.game-area {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.sudoku-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 2px;
    background: ivory;
    padding: 8px;
    border: 3px dashed darkkhaki;
    border-radius: 4px;
}

.sudoku-cell {
    width: 50px;
    height: 50px;
    background: ivory;
    border: 1px solid darkkhaki;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    color: darkolivegreen;
}

.sudoku-cell:hover {
    background: rgb(255, 209, 216)
}

.sudoku-cell.given {
    background: lightpink;
    color: darkolivegreen;
    font-weight: 900;
    cursor: default;
}

.sudoku-cell.given:hover {
    background: lightpink;
}

.sudoku-cell.selected {
    background: rgb(255, 209, 216);
    color: white;
}

.sudoku-cell.error {
    background: #ff6b6b;
    color: white;
}

.sudoku-cell.hint {
    background: #ffd93d;
    color: #333;
}

/* Thick borders for 3x3 boxes */
/* Right borders after columns 3, 6, 9 */
.sudoku-cell:nth-child(3n) {
    border-right: 3px solid darkkhaki;
}

/* Bottom borders after rows 3, 6, 9 */
.sudoku-cell:nth-child(n + 19):nth-child(-n + 27),
.sudoku-cell:nth-child(n + 46):nth-child(-n + 54),
.sudoku-cell:nth-child(n + 73):nth-child(-n + 81) {
    border-bottom: 3px solid darkkhaki;
}

.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.btn {
    padding: 12px 20px;
    font-size: 1em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, PaleVioletRed 0%, Pink 100%);
    color: ivory;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: ivory;
    color: darkkhaki;
    border: 2px solid lightpink;
}

.btn-secondary:hover {
    background: ivory;
    border-color: lightpink;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary:active {
    transform: scale(0.98);
}

.info {
    text-align: center;
    min-height: 25px;
    font-weight: bold;
}

#message {
    color: darkkhaki;
    font-size: 1.05em;
}

#message.success {
    color: palevioletred;
}

#message.error {
    color: darkolivegreen;
}

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    .header h1 {
        font-size: 2em;
    }

    .sudoku-cell {
        width: 40px;
        height: 40px;
        font-size: 1em;
    }

    .stats {
        gap: 20px;
    }
}

/* Clover button in bottom-left */ 
.clover-link 
{ 
    position: fixed; 
    bottom: 20px; 
    left: 20px; 
} 
.clover-link img 
{ 
    width: 60px; 
    cursor: pointer; 
    transition: transform 0.2s ease; 
} 
.clover-link img:hover 
{ 
    transform: scale(1.1); 
}
