* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f0f2f5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 95%;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

button, select {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

button {
    background-color: #3498db;
    color: white;
}

button:hover {
    background-color: #2980b9;
}

select {
    background-color: #ecf0f1;
    color: #2c3e50;
}

.sudoku-board {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 0;
    background-color: #2c3e50;
    padding: 2px;
    border-radius: 5px;
    margin-bottom: 1rem;
    width: fit-content;
    margin: 0 auto 1rem auto;
}

.cell {
    width: 35px;
    height: 35px;
    border: 1px solid #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    background: white;
    text-align: center;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.cell::-webkit-outer-spin-button,
.cell::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cell:hover {
    background-color: #f7f9fa;
}

.cell.fixed {
    background-color: #ecf0f1;
    cursor: not-allowed;
}

.cell.selected {
    background-color: #e3f2fd;
}

.cell.error {
    color: #e74c3c;
}

/* Add borders for 3x3 boxes */
.cell:nth-child(3n) {
    border-right: 2px solid #2c3e50;
}

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

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

#message {
    text-align: center;
    margin-top: 1rem;
    min-height: 1.5rem;
    color: #2c3e50;
}

@media (max-width: 500px) {
    .cell {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .controls {
        flex-direction: column;
    }
    
    button, select {
        width: 100%;
    }
}

.lives-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.lives-container i {
    color: #e74c3c;
    font-size: 24px;
}

.lives-container i.fa-heart-broken {
    color: #95a5a6;
}

.cell.hint {
    color: #27ae60;
    background-color: #e8f8f5;
} 