/* ===========================
   9 × 9 Classic Sudoku
   Easy / Medium / Hard
=========================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:Arial, Helvetica, sans-serif;
}

body{
    background:#f2f4f8;
    display:flex;
    justify-content:center;
    align-items:center;
    min-height:100vh;
    padding:20px;
}

.container{
    width:100%;
    max-width:700px;
    background:#fff;
    padding:25px;
    border-radius:12px;
    box-shadow:0 5px 15px rgba(0,0,0,.15);
}

h1{
    text-align:center;
    color:#1565c0;
    margin-bottom:20px;
}

.toolbar{
    display:flex;
    justify-content:center;
    align-items:end;
    gap:15px;
    flex-wrap:wrap;
    margin-bottom:20px;
}

.toolbar label{
    display:block;
    margin-bottom:5px;
    font-weight:bold;
}

select,
button{
    padding:10px 15px;
    border-radius:8px;
    border:1px solid #ccc;
    font-size:16px;
}

button{
    background:#1565c0;
    color:white;
    cursor:pointer;
    border:none;
    transition:.2s;
}

button:hover{
    background:#0d47a1;
}

#board{
    display:grid;
    grid-template-columns:repeat(9, 1fr);
    width:min(540px, 100%);
    aspect-ratio:1 / 1;
    margin:20px auto;
    border:3px solid #222;
}

.cell{
    width:100%;
    height:100%;
    min-width:0;
    text-align:center;
    font-size:clamp(18px, 4vw, 30px);
    font-weight:bold;
    color:#1565c0;
    background:#fff;
    border:1px solid #aaa;
    border-radius:0;
    outline:none;
}

.cell:focus{
    background:#eaf3ff;
    box-shadow:inset 0 0 0 2px #1565c0;
    position:relative;
    z-index:2;
}

.fixed{
    background:#e3f2fd;
    color:#000;
}

/* Strong lines around the classic 3 × 3 boxes */
.cell:nth-child(9n+3),
.cell:nth-child(9n+6){
    border-right:3px solid #222;
}

.cell:nth-child(9n){
    border-right:0;
}

.cell:nth-child(n+19):nth-child(-n+27),
.cell:nth-child(n+46):nth-child(-n+54){
    border-bottom:3px solid #222;
}

.cell:nth-child(-n+9){
    border-top:0;
}

.cell:nth-child(n+73):nth-child(-n+81){
    border-bottom:0;
}

#message{
    text-align:center;
    margin-top:20px;
    font-size:20px;
    font-weight:bold;
    min-height:30px;
}

.success{
    color:green;
}

.error{
    color:red;
}

.status{
    text-align:center;
    font-size:24px;
    font-weight:bold;
    margin:15px 0;
    color:#1565c0;
}

.timer-buttons{
    display:flex;
    justify-content:center;
    gap:10px;
    margin:15px 0;
}

.timer-buttons button{
    width:120px;
}

#bestTime{
    color:#2e7d32;
    font-weight:bold;
}

.game-info{
    margin:20px 0;
    padding:15px 20px;
    background:#eef7ff;
    border-left:5px solid #1565c0;
    border-radius:10px;
}

.game-info h3{
    color:#1565c0;
    margin-bottom:10px;
}

.game-info p{
    margin:8px 0;
    line-height:1.6;
}

/* Mobile */
@media(max-width:600px){
    .container{
        padding:15px;
    }

    #board{
        width:100%;
    }

    .cell{
        font-size:clamp(15px, 5.8vw, 24px);
    }

    .toolbar{
        flex-direction:column;
        align-items:stretch;
    }

    button,
    select{
        width:100%;
    }
}
/* Home navigation */
.home-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;margin:0 auto 16px;padding:9px 16px;border-radius:9px;background:#1769e0;color:#fff;text-decoration:none;font-weight:700;font-size:14px;box-shadow:0 4px 10px rgba(23,105,224,.18);transition:.2s}.home-button:hover{background:#1258bd;transform:translateY(-1px)}
