* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f7fa;
    color: #333;
}

.game-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 28px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.difficulty select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.timer {
    font-size: 18px;
    font-weight: bold;
    color: #3498db;
}

.sudoku-board {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: repeat(9, 1fr);
    gap: 1px;
    margin: 0 auto 20px;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1 / 1;
    background-color: #222;
    padding: 2px;
    border-radius: 4px;
}

.cell {
    background-color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.cell.fixed {
    color: #2c3e50;
    font-weight: bold;
}

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

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

.cell.error {
    color: #e74c3c;
}

.cell.hints {
    color: #27ae60;
}

/* Borders for boxes */
.cell:nth-child(3n) {
    border-right: 2px solid #222;
}

.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 #222;
}

/* Notes styling */
.notes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 100%;
    height: 100%;
    font-size: 8px;
    opacity: 0.7;
}

.note {
    display: flex;
    justify-content: center;
    align-items: center;
}

.number-pad {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 20px;
}

.number-btn {
    padding: 10px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.number-btn:hover {
    background-color: #2980b9;
}

.erase-btn {
    grid-column: span 2;
    background-color: #e74c3c;
}

.erase-btn:hover {
    background-color: #c0392b;
}

.controls {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
}

.controls button {
    flex: 1;
    padding: 10px 0;
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.controls button:hover {
    background-color: #1a252f;
}

#notes-btn.active {
    background-color: #27ae60;
}

.message {
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
    background-color: #f8f9fa;
    color: #333;
    min-height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
}

.message.info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Responsive adjustments */
@media (max-width: 500px) {
    .game-container {
        padding: 15px;
    }
    
    h1 {
        font-size: 22px;
        margin-bottom: 15px;
    }
    
    .cell {
        font-size: 16px;
    }
    
    .number-btn {
        padding: 8px;
        font-size: 14px;
    }
    
    .controls button {
        padding: 8px 0;
        font-size: 13px;
    }
    
    .notes {
        font-size: 6px;
    }
}

@media (max-width: 350px) {
    .controls {
        flex-wrap: wrap;
    }
    
    .controls button {
        flex: 1 0 40%;
    }
} 