body {
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f0f0f0;
    margin: 0;
    padding: 20px;
}

h1 {
    color: #333;
}

#game-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

/* Dimensiones aumentadas en 20% */
#board {
    display: grid;
    grid-template-columns: repeat(9, 60px);
    grid-template-rows: repeat(9, 60px);
    width: 540px;
    height: 540px;
    border: 3px solid #000;
}

/* Dimensiones aumentadas en 20% */
.cell {
    width: 60px;
    height: 60px;
    font-size: 28.8px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background-color: #fff;
    border: 1px solid #ccc;
    box-sizing: border-box;
    position: relative;
}

/* Estilos para el modo notas */
.cell.notes-mode .notes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 100%;
    height: 100%;
    font-size: 10.8px;
    color: #888;
    padding: 2px;
}

.notes-mode .main-number {
    display: none;
}

.cell .notes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 100%;
    height: 100%;
    font-size: 10.8px;
    color: #888;
    padding: 2px;
}

/* Posición fija para cada nota */
.cell .notes span {
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
}
.cell .notes span.note-1 { grid-area: 1 / 1; }
.cell .notes span.note-2 { grid-area: 1 / 2; }
.cell .notes span.note-3 { grid-area: 1 / 3; }
.cell .notes span.note-4 { grid-area: 2 / 1; }
.cell .notes span.note-5 { grid-area: 2 / 2; }
.cell .notes span.note-6 { grid-area: 2 / 3; }
.cell .notes span.note-7 { grid-area: 3 / 1; }
.cell .notes span.note-8 { grid-area: 3 / 2; }
.cell .notes span.note-9 { grid-area: 3 / 3; }

/* Bordes más gruesos para las líneas horizontales de los bloques de 3x3 */
.cell:nth-child(n+28):nth-child(-n+36),
.cell:nth-child(n+55):nth-child(-n+63) {
    border-top: 2px solid #000;
}

/* Bordes más gruesos para las líneas verticales de los bloques de 3x3 */
.cell:nth-child(3n + 1):not(:nth-child(9n+1)) {
    border-left: 2px solid #000;
}

/* Estilos de las celdas */
.given {
    background-color: #e0e0e0;
    cursor: default;
    font-weight: bold;
}

.selected {
    background-color: #a0c0e0;
}

.error {
    background-color: #ff6666;
    color: #fff;
}

/* Controles de números */
#numbers {
    display: grid;
    grid-template-columns: repeat(3, 60px);
    gap: 10px;
}

.number-btn {
    width: 60px;
    height: 60px;
    font-size: 28.8px;
    cursor: pointer;
    border: 1px solid #ccc;
    background-color: #fff;
}

/* Botón de notas activo */
#notes-btn.active {
    background-color: #a0c0e0;
}

/* Controles */
#difficulty-selector, #status {
    margin-top: 10px;
}

#controls {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: 1px solid #ccc;
    background-color: #fff;
}

/* Estilos de la ventana emergente */
#win-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none; /* Oculto por defecto */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#win-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

#win-message {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
}

#play-again-btn {
    padding: 15px 30px;
    font-size: 18px;
    color: white;
    background-color: #4CAF50; /* Verde */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#play-again-btn:hover {
    background-color: #45a049; /* Verde más oscuro al pasar el ratón */
}
