* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    text-align: center;
    font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

html {
    font-size: 16px;
}

body, main {
    width: 100%;
    height: 100%;
    background-color: rgb(170, 170, 255);
}

header {
    margin-bottom: 15px;
}

h1 {
    padding: 5px 0px;
    font-size: 2.5rem;
}

a {
    text-decoration: none;
    color: rgb(0, 0, 0);
}

span {
    color: rgb(128, 64, 0);
}

#form {
    margin: 5px 1% 0px 1%;
    width: 98%;
    display: grid;
    grid-template-areas:
    "divFilas      divColumnas       divGatos"
    "divCronometro inputIniciarJuego divVictorias";
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 1fr 1fr 1fr;
    row-gap: 10px;
    justify-items: center;
    align-items: center;
    border: 2px solid rgb(0, 0, 0);
    border-radius: 5px;
    box-shadow: 2px -2px 2px;
}

.divFi {
    grid-area: divFilas;
}

.divCo {
    grid-area: divColumnas;
}

.divGa {
    grid-area: divGatos;
}

.divCr {
    grid-area: divCronometro;
}

div p {
    margin-bottom: 1px;
    font-weight: bold;
    font-size: 1.5rem;
}

.divGa p {
    font-size: 1.5rem;
}

#dificPorcent {
    position: relative;
}

input {
    width: 100px;
    font-size: 1.5rem;
}

#cronometro {
    padding: 10px 14px;
}

#botonIniciarJuego {
    padding: 10px 14px;
    width: 170px;
    color: rgb(255, 255, 255);
    background-color: rgb(0, 0, 255);
    border: 2px solid rgb(0, 0, 0);
    border-radius: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    grid-area: inputIniciarJuego;
}

#botonIniciarJuego:hover {
    color: rgb(0, 0, 0);
    background-color: rgb(150, 150, 255);
}

#botonIniciarJuego:active {
    background-color: rgb(240, 240, 255);
    transform: scale(0.95);
}

.divVi {
    grid-area: divVictorias;
}

.divVi p {
    font-size: 1.3rem;
}

.cartelInputs {
    color: rgb(15, 15, 240);
    background-color: rgb(240, 240, 255);
    border: 2px solid rgb(0, 0, 0);
    border-radius: 10px;
}

.cartelDatos {
    font-weight: normal;
    color: rgb(255, 255, 255);
    background-color: rgb(0, 0, 255);
    border: 2px solid rgb(0, 0, 0);
    border-radius: 10px;
}

#tablero {
    margin: auto;
    user-select: none;
    font-weight: bold;
    box-shadow: 2px -2px 2px;
}

.bordeTablero {
    border: 1px solid rgb(0, 0, 0);
}

#cartelInicial {
    padding: 20px;
    margin: 15px 5%;
    width: 90%;
    font-size: 2rem;
    border: 3px solid rgb(0, 0, 0);
    border-radius: 10px;
    box-shadow: 2px -2px 2px;
}

#bienvenida {
    margin-top: 20px;
    font-size: 1.5rem;
}

#consejosRandom {
    margin: 10px 1% 0px 1%;
    height: 100px;
    font-size: 1.6rem;
}

#creditos {
    position: fixed;
    right: 2vw;
    bottom: 1vh;
    transition: transform 0.5s;
}

#creditos:hover {
    transform: scale(1.1);
}

/*--- Clases para los casilleros ---*/

.casilleroOculto { /* Clase que viene por defecto en todos los casilleros */
    height: 2rem;
    width: 2rem;
    border: 1px solid rgb(0, 0, 0);
    background-color: rgb(127, 127, 127);
}

.visibleTexto { /* Clase para los casilleros descubiertos sin gato */
    height: 2rem;
    width: 2rem;
    border: 1px solid rgb(0, 0, 0);
    background-color: rgb(0, 0, 255);
    font-size: 1rem;
    transition: background-color 0.35s;
}

.colorVerde { /* Colores de los números */
    color: rgb(0, 255, 0);
}

.colorAmarillo {
    color: rgb(255, 255, 0);
}

.colorRojo {
    color: rgb(255, 0, 0);
}

.textoOculto {
    font-size: 0px;
}

.colorPerdedorFondo { /* Clase para los casilleros con gato si se perdió el juego */
    background-color: rgb(255, 50, 50);
}

.colorGanadorFondo {
    background-color: rgb(0, 155, 0);
}

.colorMarcado { /* Clase para el gato que seleccionamos cuando perdemos */
    background-color: rgb(0, 0, 0);
}

img {
    width: 100%;
}

/*--- Media queries ---*/

@media screen and (min-width: 565px) and (max-width: 837px){
    .divGa p {
        font-size: 1rem;
    }

    #dificPorcent {
        top: 4px;
    }

    #consejosRandom {
        font-size: 1.4rem;
    }

    #creditos {
        font-size: 0.8rem;
    }
}

@media screen and (max-width: 565px){
    h1 {
        font-size: 2.1rem;
    }

    #form {
        row-gap: 5px;
    }

    div p {
        font-size: 1.1rem;
    }
    
    .divGa p {
        font-size: 0.7rem;
    }

    #dificPorcent {
        top: 3px;
    }

    input {
        width: 80px;
        font-size: 1.4rem;
    }

    #cronometro {
        padding: 7px 5px;
    }

    #botonIniciarJuego {
        padding: 7px 1px;
        width: 100px;
        font-size: 1rem;
    }
    
    #botonIniciarJuego:active {
        font-size: 0.9rem;
    }

    .divVi p {
        font-size: 0.9rem;
    }

    #cartelInicial {
        font-size: 1.5rem;
    }
    
    #bienvenida {
        font-size: 1.2rem;
    }
    
    #consejosRandom {
        margin: 10px 1%;
        font-size: 1.2rem;
    }

    #creditos {
        font-size: 0.7rem;
    }
}

@media screen and (max-width: 402px){
    .divGa p {
        font-size: 0.6rem;
    }

    #dificPorcent {
        top: 4px;
    }
}

@media screen and (min-width: 720px){
    td:hover {
        opacity: 0.9;
        border: 1px solid rgb(0, 255, 255);
    }

    #botonIniciarJuego {
        cursor: pointer;
    }
}
