/* Body și fonturi generale */
body {
    font-family: 'Inter', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    margin: 0;
    background: #f5f5f5;
    color: #333;
}

/* Titlu */
h1 {
    margin-bottom: 20px;
    color: #1a202c;
}

/* Controale (dropdown și butoane) */
#controls {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Tabla Sudoku */
#sudoku-grid {
    border-collapse: collapse;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1),
                0 2px 4px -2px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    table-layout: auto;  /* esențial pentru pătrat */
    width: 360px;         /* latura tablei */
    height: 360px;        /* latura tablei */
}

/* Celulele Sudoku */
#sudoku-grid td {
    border: 1px solid #999;
    padding: 0;
    background-color: #fff;
    width: 40px;          /* fix pentru pătrat */
    height: 40px;         /* fix pentru pătrat */
}

/* Input-urile Sudoku (numerele) */
#sudoku-grid input {
    width: 100%;           /* umple celula complet */
    height: 100%;          /* umple celula complet */
    box-sizing: border-box; 
    text-align: center;     
    vertical-align: middle;
    line-height: 40px;      /* egal cu height pentru cifre vizibile */
    font-size: 20px;
    font-weight: bold;
    border: none;
    background: transparent;
    color: #333;
    transition: all 0.2s ease;
    padding: 0;
}

#sudoku-grid input:focus {
    outline: 3px solid #6c63ff;
    background: #e0e0ff;
    border-radius: 4px;
}

#sudoku-grid input:disabled {
    background: #ddd;
    color: #555;
    font-weight: 500;
}

/* Highlight-uri */
#sudoku-grid .selected { background: #c0d0ff !important; }
#sudoku-grid .correct { background: #b4ffa0 !important; }
#sudoku-grid .wrong { background: #ffb4b4 !important; }

/* Linii groase între blocuri 3x3 */
#sudoku-grid .top-border { border-top: 3px solid #333; }
#sudoku-grid .left-border { border-left: 3px solid #333; }
#sudoku-grid .right-border { border-right: 3px solid #333; }
#sudoku-grid .bottom-border { border-bottom: 3px solid #333; }

/* Butoane */
button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #6c63ff;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: background 0.2s;
}

button:hover {
    background: #574fd6;
}

#solveBtn { background: #ff9800; }
#solveBtn:hover { background: #e68900; }

/* Mesaje */
#message {
    margin-top: 15px;
    font-weight: bold;
    min-height: 24px;
    text-align: center;
    color: #6c63ff;
}

#status {
    margin-top: 10px;
    font-weight: bold;
    color: #4a4a4a;
}

/* Responsive pentru mobil */
@media (max-width: 600px) {
    #sudoku-grid {
        width: 300px;
        height: 300px;
    }
    #sudoku-grid td {
        width: 33.33px;
        height: 33.33px;
    }
    #sudoku-grid input {
        font-size: 16px;
        line-height: 33px;
    }
    button {
        padding: 8px 14px;
        font-size: 14px;
    }
}
