/*Definición de estilo de los elementos generales.*/

/*Elementos globales*/

* {
    user-select: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

body {
    margin: 0;
    padding: 0;
    background-color: black;
}

@font-face {
    font-family: simon;
    src: url("../fnt/ChakraPetch-Medium.ttf");
}

#contenedor{
    display:flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/*Bloque de elección de dificultad*/

#bloqueDificultad {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    font-family: simon;
    padding: 50px;
    border-radius: 5px;
    border-top: 5px solid red;
    border-right: 5px solid green;
    border-bottom: 5px solid blue;
    border-left: 5px solid yellow;
    background-color: rgb(26, 26, 26);
    opacity: 0;
    transition: all 0.8s;
}

#bloqueDificultad p {
    font-size: 1.4rem;
    color: white;
    margin: 0;
}

#bloqueDificultad button {
    width: 150px;
    padding: 10px;
    color: white;
    border-radius: 3px;
    font-family: simon;
    text-shadow: 1px 1px 1px black;
    transition: all 0.4s;
}

#bloqueDificultad button:nth-of-type(1){
    background-color: red;
    border: 2px solid rgb(114, 0, 0);
}

#bloqueDificultad button:nth-of-type(2){
    background-color: green;
    border: 2px solid rgb(0, 59, 0);
}

#bloqueDificultad button:nth-of-type(3){
    background-color: blue;
    border: 2px solid rgb(0, 0, 119);
}

#bloqueDificultad button:hover {
    cursor: pointer;
    transform: scale(1.2,1.2);
}

/*El tablero*/

#juego {
    display:none;
    position: relative;
    justify-content: center;
    align-items:center;
    flex-wrap: wrap;
    width: 400px;
    height: 400px;
    border: 10px solid black;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0px 0px 100px 1px darkgray;
    transition: all 0.8s;
}

#juego:hover {
    cursor: pointer;
}

/*Pulsadores de colores*/

#juego div:not(div:last-child) {
    width: 198px;
    height: 198px;
    border: 1px solid black;
}

#verde,#rojo,#azul,#amarillo {
    box-shadow: 0px 0px 20px 2px rgb(54, 54, 54) inset;
}

.elemento1 {
    background-color: green;
}

.elemento2 {
    background-color: red;
}

.elemento3 {
    background-color: blue;
}

.elemento4 {
    background-color: yellow;
}

/*Logotipo y centro*/

#logotipo {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 150px;
    height: 150px;
    position: absolute;
    top: 31%;
    left: 31%;
    background-color: black;
    border-radius: 50%;
    box-shadow: 0px 0px 0px 5px rgb(41, 41, 41);
}

#logotipo:hover {
    cursor: default;
}

#logotipo p {
    color: white;
    font-size: 2rem;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    letter-spacing: 1px;
    text-align: center;
}

#logotipo button {
    margin-top: -45px;
}

#logotipo button:hover {
    cursor: pointer;
}

/*Tablero de información*/

#logotipo > p:first-child {
    width: 100px;
    height: 35px;
    color: black;
    font-family: monospace;
    margin-bottom: -30px;
    border: 1px solid rgb(66, 65, 65);
    border-radius: 10px;
    box-shadow: 0px 2px 3px 3px rgb(32, 32, 32) inset;
}

/*Clases para cambiar colores*/

.iluminado {
    background-color: rgba(249, 250, 212, 0.8);
}

.display-noiluminado {
    background-color: rgb(129, 99, 99);
}

.display-iluminado {
    background-color: rgb(223, 186, 186);
}

.display-error {
    background-color: rgb(199, 108, 108);
}

.display-victoria {
    background-color: rgb(115, 223, 147);
}

/*Botón reset. Aparecer y desaparecer.*/

.boton-desaparecer {
    display: none;
}

.boton-aparecer {
    display: block;
}

/*Mensaje de giro en pantalla*/

#mensajeGiro {
    width: 250px;
    padding: 20px;
    text-align: center;
    font-size: 1.6rem;
    font-family: simon;
    color: white;
    position: absolute;
    top: calc(50% - 125px);
    left: calc(50% - 125px);
    transition: all 0.4s;
}

#mensajeGiro img {
    width: 150px;
    animation-name: giroIcono;
    animation-duration: 3s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

@keyframes giroIcono {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-25deg);
    }
    50%{
        transform: rotate(-50deg);
    }
    75%{
        transform: rotate(-25deg);
    }
    100%{
        transform: rotate(0deg);
    }
}

/*Adaptación a móviles*/

@media screen and (min-width:397px) and (max-width:450px){

    #bloqueDificultad {
        width: 100%;
        border: none;
        background-color: black;
        padding: 5px;
        box-sizing: border-box;
    }

    #bloqueDificultad p {
        font-size: 1.8rem;
    }

    #bloqueDificultad button {
        width: 100%;
        font-size: 1.2rem;
    }

    #juego {
        width: 100%;
        height: 100%;
        border: none;
        border-radius: initial;
        overflow: initial;
    }

    #juego div:not(div:last-child) {
        width: 49.5%;
        height: 50%;
        border: 1px solid black;
    }

    #logotipo {
        top: calc(50% - 75px);
        left: calc(50% - 75px);
    }
}

@media screen and (max-width:396px){

    #bloqueDificultad {
        width: 100%;
        border: none;
        background-color: black;
        padding: 5px;
        box-sizing: border-box;
    }

    #bloqueDificultad p {
        font-size: 1.8rem;
    }

    #bloqueDificultad button {
        width: 100%;
        font-size: 1.2rem;
    }

    #juego {
        width: 100%;
        height: 100%;
        border: none;
        border-radius: initial;
        overflow: initial;
    }

    #juego div:not(div:last-child) {
        width: 49.4%;
        height: 50%;
        border: 1px solid black;
    }

    #logotipo {
        top: calc(50% - 75px);
        left: calc(50% - 75px);
    }
}