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

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

.container {
    text-align: center;
    background-color: white;
    border: 2px solid #000;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 2.5em;
    margin-bottom: 30px;
    color: #000;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.difficulty-selector {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.difficulty-selector label {
    font-size: 18px;
    font-weight: bold;
    color: #000;
}

.difficulty-buttons {
    display: flex;
    gap: 10px;
}

.difficulty-btn {
    padding: 10px 20px;
    border: 2px solid #000;
    background-color: white;
    color: #000;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.difficulty-btn:hover {
    background-color: #f0f0f0;
}

.difficulty-btn.active {
    background-color: #000;
    color: white;
}

.difficulty-btn.active:hover {
    background-color: #333;
}

.game-board {
    margin-bottom: 20px;
}

.status-panel {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 2px solid #333;
    border-radius: 8px;
    font-family: 'Arial', sans-serif;
    display: none;
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.status-header h3 {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.hide-btn {
    background-color: #fff;
    border: 1px solid #333;
    color: #333;
    padding: 5px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.hide-btn:hover {
    background-color: #333;
    color: #fff;
}

.status-content {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 8px 0;
    padding: 5px 0;
}

.status-label {
    font-weight: bold;
    color: #333;
    font-size: 14px;
    margin-bottom: 5px;
}

.status-value {
    color: #666;
    font-size: 14px;
    font-weight: normal;
}

.status-value.completed {
    color: #28a745;
    font-weight: bold;
}

.status-value.error {
    color: #dc3545;
    font-weight: bold;
}

.sudoku-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: repeat(9, 1fr);
    gap: 1px;
    background-color: #000;
    border: 3px solid #000;
    width: 450px;
    height: 450px;
    margin: 0 auto;
}

.cell {
    background-color: white;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

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

.cell.selected {
    background-color: #000;
    color: white;
}

.cell.given {
    background-color: #e0e0e0;
    color: #000;
    font-weight: bold;
    cursor: not-allowed;
}

.cell.given:hover {
    background-color: #e0e0e0;
}

.cell.error {
    background-color: #ffebee;
    color: #d32f2f;
}

/* Bordes más gruesos para separar las cajas 3x3 */
.cell:nth-child(3n) {
    border-right: 2px solid #000;
}

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

.number-panel {
    margin-bottom: 20px;
}

.number-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.number-btn, .clear-btn {
    width: 45px;
    height: 45px;
    border: 2px solid #000;
    background-color: white;
    color: #000;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.number-btn:hover, .clear-btn:hover {
    background-color: #000;
    color: white;
}

.number-btn.selected {
    background-color: #000;
    color: white;
}

.clear-btn {
    width: 80px;
    font-size: 14px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.control-btn {
    padding: 12px 24px;
    border: 2px solid #000;
    background-color: white;
    color: #000;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.control-btn:hover {
    background-color: #000;
    color: white;
}

/* Responsive design */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    .sudoku-grid {
        width: 360px;
        height: 360px;
    }
    
    .cell {
        font-size: 18px;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .number-btn, .clear-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .clear-btn {
        width: 70px;
    }
    
    .difficulty-selector {
        gap: 10px;
    }
    
    .difficulty-selector label {
        font-size: 16px;
    }
    
    .difficulty-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .difficulty-btn {
        font-size: 14px;
        padding: 8px 16px;
    }
}