body {

    min-height: 100vh;
    min-height: 100dvh; 
    margin: 0; 
    background-image: linear-gradient(rgba(255,255,255,0.6), rgba(255,255,255,0.6)), url("../background.jpg");
    background-size: cover;      
    background-repeat: no-repeat; 
    background-position: center;  
    background-attachment: fixed; 
    display: flex;
    flex-direction: column; 
    justify-content: flex-start;
    align-items: center;
    overflow-x: hidden;
}

#container {
    width: 100%;
    max-width: 500px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 10px;
    box-sizing: border-box;
}

h1 {
   text-align: center;
   margin-bottom: 10px;
}

#timer {
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

#sudoku-board {
    display: grid;
    grid-template-columns: repeat(9, 1fr); 
    grid-template-rows: repeat(9, 1fr);
    gap: 0;
    box-shadow: 10px 15px 10px rgba(0,0,0,0.5);
    width: 92vw;
    max-width: 450px;
    aspect-ratio: 1 / 1;
    background-color: white;
}

.cell {
    width: 100%;
    height: 100%;
    text-align: center;
    font-size: 1.2rem;
    border: 1px solid #999;
    box-sizing: border-box; 
    transition: 0.3s ease;
    -webkit-appearance: none;
    border-radius: 0;
}

.cell:focus {
    outline: none;
    background-color: #e0f7fa;
}

.cell:nth-child(3n) {
    border-right: 3px solid black;
}

.cell:nth-child(3n + 1) {
    border-left: 3px solid black;
}

.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: 3px solid black;
}

.cell:nth-child(-n + 9) {
    border-top: 3px solid black;
}

.locked {
    background-color: #ddd;
    font-weight: bold;
    pointer-events: none; 
}

.error {
    background-color: #ffcccc; 
}

button {
    padding: 12px 25px;
    font-size: 18px;
    cursor: pointer;
    margin-top: 20px;
    border-radius: 8px;
    border: 1px solid #333;
    background-color: #f8f8f8;
    width: auto;
    min-width: 180px;
    display: block;
}

#result-message {
    margin-top: 15px;
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

#result-message.correct {
    color: green;
}

#result-message.incorrect {
    color: red;
}

@media (max-width: 480px) {
    .cell {
        font-size: 18px;
    }
}

