/* =========================================================
   CRUCIGRAMA SÍSMICO OVSICORI
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body {

    font-family: Arial, Helvetica, sans-serif;

    background: #edf0f4;

    color: #172b4d;

    min-height: 100vh;

}


/* =========================================================
   ENCABEZADO
========================================================= */

header {

    width: 100%;

    min-height: 105px;

    background: #172b4d;

    color: white;

    display: flex;

    align-items: center;

    gap: 25px;

    padding: 20px 7%;

    border-bottom: 6px solid #b8202a;

}


.logo {

    padding: 13px 17px;

    border: 2px solid white;

    border-radius: 8px;

    font-size: 24px;

    font-weight: bold;

    letter-spacing: 1px;

}


.header-text h1 {

    font-size: 31px;

    margin-bottom: 5px;

}


.header-text p {

    color: #d9e0ea;

    font-size: 15px;

}


/* =========================================================
   CONTENIDO
========================================================= */

main {

    width: 94%;

    max-width: 1250px;

    margin: 35px auto 60px;

}


/* =========================================================
   JUEGO
========================================================= */

.game-container {

    background: white;

    border-radius: 16px;

    padding: 30px;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.10);

}


.instructions {

    text-align: center;

    margin-bottom: 25px;

}


.instructions h2 {

    color: #172b4d;

    font-size: 25px;

    margin-bottom: 10px;

}


.instructions p {

    color: #596579;

    font-size: 16px;

}


/* =========================================================
   TABLERO
========================================================= */

.board-wrapper {

    width: 100%;

    overflow-x: auto;

    padding: 15px 5px 25px;

}


#crucigrama {

    display: grid;

    grid-template-columns: repeat(20, 40px);

    grid-template-rows: repeat(12, 40px);

    gap: 4px;

    width: max-content;

    margin: auto;

    padding: 16px;

    background: #172b4d;

    border-radius: 14px;

    box-shadow:
        0 7px 20px rgba(0, 0, 0, 0.22);

}


/* =========================================================
   CASILLAS
========================================================= */

.cell {

    width: 40px;

    height: 40px;

    background: white;

    border: 2px solid #9ba5b3;

    position: relative;

    display: flex;

    align-items: center;

    justify-content: center;

}


.cell.black {

    background: #172b4d;

    border: none;

}


/* =========================================================
   INPUT
========================================================= */

.cell input {

    width: 100%;

    height: 100%;

    border: none;

    outline: none;

    background: transparent;

    text-align: center;

    font-size: 22px;

    font-weight: bold;

    color: #172b4d;

    text-transform: uppercase;

    cursor: pointer;

}


.cell input:focus {

    background: #d9e9fa;

}


/* =========================================================
   SELECCIONADA
========================================================= */

.cell.selected {

    background: #b9d5f5;

    border: 3px solid #b8202a;

}


/* =========================================================
   CORRECTA
========================================================= */

.cell input.correct {

    background: #dcefe3;

    color: #172b4d;

}


/* =========================================================
   INCORRECTA
========================================================= */

.cell input.incorrect {

    background: #f8dadd;

    color: #b8202a;

}


/* =========================================================
   NÚMERO
========================================================= */

.number {

    position: absolute;

    top: 2px;

    left: 4px;

    font-size: 9px;

    color: #b8202a;

    font-weight: bold;

    pointer-events: none;

}


/* =========================================================
   TECLADO
========================================================= */

.keyboard {

    width: 100%;

    max-width: 700px;

    margin: 15px auto 0;

}


.keyboard-row {

    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 6px;

    margin-bottom: 7px;

}


.keyboard button {

    width: 43px;

    height: 43px;

    border: none;

    border-radius: 7px;

    background: #172b4d;

    color: white;

    font-size: 16px;

    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;

}


.keyboard button:hover {

    background: #b8202a;

    transform: translateY(-2px);

}


.keyboard button:active {

    transform: scale(0.94);

}


.keyboard .delete-button {

    width: 120px;

    background: #687383;

}


.keyboard .delete-button:hover {

    background: #b8202a;

}


/* =========================================================
   REINICIAR
========================================================= */

.restart-button {

    display: block;

    margin: 25px auto 0;

    padding: 13px 26px;

    border: none;

    border-radius: 8px;

    background: #b8202a;

    color: white;

    font-size: 15px;

    font-weight: bold;

    cursor: pointer;

    transition: 0.2s;

}


.restart-button:hover {

    background: #8e1820;

    transform: translateY(-2px);

}


/* =========================================================
   PISTAS
========================================================= */

.pistas-container {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 25px;

    margin-top: 30px;

}


.pistas {

    background: white;

    padding: 25px;

    border-radius: 15px;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.08);

    border-top: 5px solid #172b4d;

}


.pistas h2 {

    color: #172b4d;

    font-size: 22px;

    margin-bottom: 18px;

}


.pista {

    display: flex;

    align-items: flex-start;

    gap: 12px;

    padding: 13px 0;

    border-bottom: 1px solid #e0e4e9;

}


.pista:last-child {

    border-bottom: none;

}


.numero {

    min-width: 30px;

    height: 30px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #b8202a;

    color: white;

    border-radius: 50%;

    font-weight: bold;

}


.pista p {

    color: #39465a;

    line-height: 1.4;

    font-size: 15px;

}


/* =========================================================
   VENTANA FINAL
========================================================= */

.modal {

    position: fixed;

    inset: 0;

    background: rgba(10, 20, 35, 0.78);

    display: none;

    justify-content: center;

    align-items: center;

    z-index: 1000;

    padding: 20px;

}


.modal.show {

    display: flex;

}


.modal-content {

    background: white;

    width: 100%;

    max-width: 430px;

    padding: 40px 30px;

    border-radius: 18px;

    text-align: center;

    border-top: 8px solid #b8202a;

    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.3);

    animation: aparecer 0.3s ease;

}


@keyframes aparecer {

    from {

        opacity: 0;

        transform: scale(0.8);

    }

    to {

        opacity: 1;

        transform: scale(1);

    }

}


.check {

    width: 70px;

    height: 70px;

    margin: 0 auto 20px;

    border-radius: 50%;

    background: #172b4d;

    color: white;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 40px;

    font-weight: bold;

}


.modal-content h2 {

    color: #172b4d;

    font-size: 28px;

    margin-bottom: 12px;

}


.modal-content p {

    color: #4c596b;

    font-size: 18px;

    margin-bottom: 25px;

}


.modal-content button {

    background: #b8202a;

    color: white;

    border: none;

    padding: 13px 35px;

    border-radius: 8px;

    font-size: 16px;

    font-weight: bold;

    cursor: pointer;

}


.modal-content button:hover {

    background: #8e1820;

}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 700px) {

    header {

        flex-direction: column;

        text-align: center;

    }


    .header-text h1 {

        font-size: 25px;

    }


    .pistas-container {

        grid-template-columns: 1fr;

    }


    .game-container {

        padding: 18px;

    }

}
.ovsi-return { position:fixed; z-index:9999; top:12px; left:12px; padding:10px 14px; color:#fff; background:#071d2d; border:1px solid rgba(255,255,255,.35); border-radius:4px; font:700 13px/1.2 Arial,sans-serif; text-decoration:none; box-shadow:0 4px 18px rgba(0,0,0,.22); }
