* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: #f4f4f9;
}

.game-header {  
    display:flex;
    justify-content: center;
    align-items: center;
    padding:20px;
    background-color: #2c3e50;
    color: white;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.icon-container {
    margin-right: 15px;
}

.icon {
    font-size: 3.5rem;
}

.title-container {
    display: flex;
    flex-direction: column;
}

.main-title {
    margin: 0;
    font-size: 2.5rem;
    line-height: 1;
    letter-spacing: 1px;
}

.subtitle {
    margin:5px;
    font-size: 1rem;
    font-weight: 400;
    color: #bdc3c7; 
}

main{
    display: flex;
    flex-direction: column;
    align-items: center;
    padding:20px;
}

.sudoku-board {
    display: grid;
    grid-template-columns: repeat(9,1fr);
    grid-template-rows: repeat(9,1fr);
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1;
    background-color: #2c3e50; 
    border: 4px solid #2c3e50; 
    gap: 1px;
}

.tile {
    width:100%;
    height: 100%;
    border: none;
    outline: none;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    font-family: 'Inter', sans-serif;
    background-color: white;
    color: #333;
    caret-color: transparent;
    cursor: pointer;
}

.tile:hover{
    background-color: #e8f6fd;
}

.tile:focus {
    background-color: #d6eaf8;
}

.tile.border-right {
    border-right: 3px solid #2c3e50;
}

.tile.border-bottom {
    border-bottom: 3px solid #2c3e50;
}

.controls{
    margin: 25px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding:10px 20px;
    border:none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s;
}

.btn:active {
    transform: scale(0.95);
}

.primary { background-color: #2c3e50; color: white; }
.secondary { background-color: #95a5a6; color: white; }
.action { background-color: #27ae60; color: white; }

.prefilled {
    background-color: #e0e0e0;
    color: #000;
    font-weight: 800;
    cursor: default;
}

.prefilled:hover, .prefilled:focus {
    background-color: #e0e0e0;
}

.error {
    background-color: #ffcccc; /* Light red */
    color: red;
}

@media(max-width:600px){
    .icon{font-size: 2.5rem;}
    .main-title{font-size:1.8rem;}
    .subtitle{font-size: 0.9rem;}
    .sudoku-board{max-width: 95vw;}
    .tile{font-size: 1.2rem;}
}