:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --correct-color: #2ecc71;
    --incorrect-color: #e74c3c;
    --cell-size: 50px;
    --light-purple: #f0e6ff;
    --dark-purple: #e0ccff;
}

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

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f6fa;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    
    
    background-image: url('img/background_copia.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    
}

.container {
    text-align: center;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

h1 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.controls {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 10px;
    background-color: var(--light-purple);
    border-radius: 8px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

select, button {
    padding: 8px 15px;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    background-color: white;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    height: 34px;
}

button:hover {
    background-color: var(--primary-color);
    color: white;
}

.board {
    display: grid;
    grid-template-columns: repeat(9, var(--cell-size));
    grid-template-rows: repeat(9, var(--cell-size));
    gap: 1px;
    background-color: var(--primary-color);
    border: 2px solid var(--primary-color);
    margin: 0 auto;
    width: fit-content;
}

.cell {
    background-color: var(--light-purple);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    color: black;
}

.cell:nth-child(odd) {
    background-color: var(--dark-purple);
}

.cell:hover:not(.fixed) {
    filter: brightness(0.95);
}

.cell.fixed {
    font-weight: bold;
}

.cell.selected {
    filter: brightness(0.9);
}

.cell.draft-mode.correct {
    color: var(--correct-color);
}

.cell.draft-mode.incorrect {
    color: var(--incorrect-color);
}

.number-pad {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 20px auto 0;
    padding: 0 10px;
}

.num-btn {
    width: var(--cell-size);
    height: var(--cell-size);
    font-size: 1.3em;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.switch-container {
    display: flex;
    align-items: center;
    position: relative;
    height: 34px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    margin-right: 70px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--secondary-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.label {
    position: absolute;
    left: 70px;
    white-space: nowrap;
    line-height: 34px;
    width: max-content;
    font-size: small;
}

/* Responsive Design */
@media (max-width: 600px) {
    :root {
        --cell-size: 35px;
    }
    
    .container {
        padding: 10px;
    }
    
    .num-btn {
        font-size: 1.2em;
    }
}

@media (max-width: 400px) {
    :root {
        --cell-size: 30px;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .num-btn {
        font-size: 1.1em;
    }
}
