
@font-face {
    font-family: "Upheaval";
    src: url("./fonts/upheavtt.ttf");
}

@font-face {
    font-family: "Retro";
    src: url("./fonts/retro_computer_personal_use.ttf");
}

body{
    margin: 0;
    color: white;
    background: black;
    font-family: Retro, sans-serif;
    text-shadow: 2px 2px 0 #707070;
    cursor: url("./img/cursor.png"), auto;
}

#configPartida{
    display: none;
    justify-content: center;
}
#configPartida > form{
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
}

#ajustesJugadores{
    width: 100%;
    display: flex;
    justify-content: space-evenly;
    flex-direction: row;
}

#ajustesJugadores > div{
    display: grid;
    width: auto;
    padding: 20px;
    gap: 20px;
    align-items: center;
}

#configPartida button{
    font-size: 1.5rem;
}

#configPartida > input[type="number"]{
    width: 30px;
}
#form > input:nth-child(4){
    width: 50px;
}

#ajustesJugadores label{
    grid-column-start: 1;
}
#ajustesJugadores input{
    grid-column-start: 2;
}
#teclaArriba1, #teclaArriba2, #teclaAbajo1, #teclaAbajo2{
    width: 30px;
}
#partida{
    display: none;
    background: #737373;
    height: 100vh;
}

#campo{
    margin: auto;
    background: black;
    width: 90vw;
    border: white 5px solid;
    border-top: none;
    height: 80vh;
    position: relative;
    overflow: hidden;

}

.datos{
    display: flex;
    height: 15vh;
    border-bottom: white 5px solid;
    justify-content: space-evenly;
    background: black;
    color: white;
    font-family: Upheaval, sans-serif;
}

.datos h1, h2{
    margin: 15px;
}

.datos h1{
    font-size: 4rem;
}
.datos h2{
    font-size: 2.6rem;
}

.datos >div:last-child{
    text-align: end;
}

#datosJ2{
    display: none;
}

.paleta{
    height: 120px;
    aspect-ratio: 0.2/1;
    background: white;
    position: absolute;
    top: calc(50% - 60px);
    z-index: 200;
}

.paleta:first-child{
    left: 50px;
}

.paleta:last-child{
    right: 50px;
    display: none;
}

.raya{
    left: 0;
    height: 100%;
    position: absolute;

    width: calc(50% - 5px);

    border-right: white 10px dashed;
}

.pelota{
    width: 50px;
    top: calc(50% - 25px);
    left: calc(50% - 25px);
    aspect-ratio: 1/1;
    position: absolute;
    border-radius: 50%;

}

.formaPelota{
    position: relative;
    background: white;
    z-index: 200;
    border-radius: 50%;
    aspect-ratio: 1/1;
    width: 100%;
}

#rastro{
    position: absolute;
    z-index: 100;
    left: 3px;
    top: 50%;
    width: 45px;
    background: rgba(255, 255, 255, 0.63);
    aspect-ratio: 1/1.5;
    clip-path: polygon(100% 0, 0 0, 50% 100%);
    transform-origin: 50% 0;
    display: none;
    transition: 30ms;
}


#menu{
    display: flex;
    margin: auto;
    gap: 50px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    font-size: 2em;
    text-align: center;
}

input{
    font-family: Retro, sans-serif;
}

button{
    background: white;
    font-family: Retro, sans-serif;
    text-shadow: 1px 2px 0 #969696;
}

button:hover{
    cursor: url("./img/pointer.png"), auto;
    background: #707070;
    text-shadow: 1px 2px 0 #ffffff;
    border: white 2px solid;
}

input{
    background: none;
    border: 5px solid white;
    color: white;
    width: 300px;
    font-size: 1.6rem;
}

input:hover{
    cursor: url("./img/edit.png"), auto;
}

input[type="number"]{
    width: 60px;
}

input[type="checkbox"]{
    width: 60px;
    aspect-ratio: 1/1;
}

input:disabled, input[type="checkbox"]:disabled{
    background: white;
}

#menu input{
    font-size: 3rem;
    z-index: 200;
}

#menu button{
    width: 350px;
    font-size: 1.5em;
}


#menu h1{
    margin: 0;
    font-size: 8rem;
    text-shadow: 5px 5px 0 #707070;
}

#menu h1 > span{
    display: inline-block;
    animation: moverLetra 1s infinite;
}

#menu h1 > span:nth-child(2){
    animation-delay: -0.25s;
}
#menu h1 > span:nth-child(3){
    animation-delay: -0.5s;
}
#menu h1 > span:nth-child(4){
    animation-delay: -0.75s;
}

#formJug{
    display: flex;
    flex-direction: column;
    gap: 50px;
    justify-content: center;
    align-items: center;
}

h1{
    font-family: Upheaval, sans-serif;
}

/* Como he podido personalizar el checkbox */
/*https://medium.com/@jgkousis/customize-the-appearance-of-a-checkbox-c60ad9144974*/

input[type="checkbox"]:checked:active {
    background-image: url("./img/checked.png");
    /* Preview the OFF image when user clicks and the state is ON */
}

input[type="checkbox"]:checked {
    background: url("./img/checked.png") no-repeat right 10px top 5px;
    background-size: 32px 32px;
    /* this image will be shown when the state is ON */}

input[type="checkbox"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    /* so the operating system does nothing about rendering the element*/
    display: inline-block; /* so it can be positioned absolutely */
    background: url("./img/unchecked.png") no-repeat right 10px top 5px;
    /* this image will be shown when the state is OFF *//* the following are optional and up to your point of view */
    background-size: 32px 32px;
      image-rendering: pixelated;
    cursor: url("./img/pointer.png"), auto;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

.pelotaMenu{
    width: 50px;
    aspect-ratio: 1/1;
    position: absolute;
    z-index: -300;
    background: white;
    border-radius: 50%;
    animation: 10s animacionPelotaMenu infinite linear;
}

@keyframes animacionPelotaMenu {
    0%{
        left: calc(50% - 25px);
        top: calc(50% - 25px);
    }

    25%{
        left: calc(0% - 25px);
        top: calc(20% - 25px);
    }

    40%{
        left: calc(30% - 25px);
        top: calc(0% - 25px);
    }

    74%{
        left: calc(70% - 25px);
        top: calc(100% - 25px);
    }

    87%{
        left: calc(100% - 25px);
        top: calc(68% - 25px);
    }


    100%{
        left: calc(50% - 25px);
        top: calc(50% - 25px);

    }
}

    @keyframes moverLetra {
      0% {
        transform: translateY(0);
      }
      50% {
        transform: translateY(-20px);
      }
      100% {
        transform: translateY(0);
      }
    }

#menuPausa{
    position: absolute;
    width: 30vw;
    aspect-ratio: 1/1;
    left: calc(50% - 15vw);
    top: calc(35% - 15vh);
    border: 10px solid white;
    background: black;
    z-index: 400;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 30px;
}

#menuPausa > button{
    font-size: 2.3em;
}

#flag{
    position: absolute;
    left: 5px;
    top: 5px;
    width: 70px;
}

#flag > img{
    width: 55px;
    height: 45px;
}

#labelLimite{
    margin-right: 20px;
}