/* ===========================
   Latin Sudoku
=========================== */

*{
    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;
    gap:4px;
    justify-content:center;
    width:100%;
    max-width:560px;
    margin:20px auto;
    overflow:visible;
    touch-action:manipulation;
    --cell-size:60px;
    --cell-gap:4px;
}

.cell{
    width:var(--cell-size);
    height:var(--cell-size);
    min-width:0;
    min-height:0;
    padding:0;
    text-align:center;
    font-size:clamp(15px, calc(var(--cell-size) * .40), 24px);
    font-weight:bold;
    border:2px solid #999;
    border-radius:8px;
    outline:none;
    box-sizing:border-box;
}

.cell:focus{
    border-color:#1565c0;
}

.fixed{
    background:#e3f2fd;
    color:#000;
}

#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 / tablet */
@media(max-width:600px){
    body{
        padding:10px;
        align-items:flex-start;
    }

    .container{
        padding:14px;
        border-radius:10px;
    }

    h1{
        font-size:26px;
        margin-bottom:14px;
    }

    .status{
        font-size:20px;
        margin:10px 0;
    }

    #board{
        gap:var(--cell-gap);
        max-width:100%;
        margin:16px auto;
    }

    .toolbar{
        flex-direction:column;
        align-items:stretch;
        gap:10px;
    }

    button,
    select{
        width:100%;
    }

    .game-info{
        padding:12px 14px;
    }
}

@media(max-width:380px){
    .container{
        padding:10px;
    }

    #board{
        gap:2px;
    }

    .cell{
        border-width:1.5px;
        border-radius:5px;
    }
}
/* 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)}
