body {
    background: #bec2be;
    font-family: sans-serif;
}
.contenedor{
    width: 100%;
    margin: 0px;
    margin-top: 1em;
}

/* VARIABLES */

:root {
    --main-bg-color: transparent;
    --main-color: rgb(31, 22, 22);
    --app-bg: rgba(26, 25, 41, 0.425);
    --botton-bg: rgb(115, 149, 210);
    --botton-hover: rgb(132, 202, 171);
    --botton-color: white;
    --ficha-bg-front: rgb(219, 222, 226);
    --ficha-bg-back: rgb(71, 81, 99);
    --bar-bg: rgb(44, 40, 40);
    --bar-color: rgb(40, 39, 57);
}


/*   var(--botton-color)    */


/* CUERPO */

#app {
    margin: 0px;
    height: 100%;
}

body {
    height: 100vh;
}

body,
input,
select,
label,
textarea {
    font-family: "Merriweather", Georgia, serif;
    font-size: 1em;
    background-color: var(--main-bg-color);
}

body::after {
    /*  background: url(../img/bg.jpg) no-repeat center center; */
    background-size: cover;
    -moz-background-size: cover;
    -webkit-background-size: cover;
    -o-background-size: cover;
    background-attachment: fixed;
    content: "";
    opacity: 0.5;
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: -1;
}


/* CABECERA */

.cabecera {
    margin: 0px;
    margin-top: 0.1em;
    border-radius: 20px;
    background-color: var(--bar-bg);
    color: var(--bar-color);
    height: 70px;
    display: flex;
    flex-flow: row wrap;
    justify-content: space-around;
    align-items: center;
}

.cabecera h1 {
    margin: 0px;
    text-align: center;
}


/* APLICACION */

#app {
    color: black;
    width: 100%;
    min-width: 300px;
    margin: 0px auto;
    box-shadow: 0px 0px 0px black;
}

.containerBody {
    height: 100%;
    padding-top: 70px;
    padding-bottom: 30px;
}

.bola {
    vertical-align: middle;
    height: 50px;
    width: 50px;
    line-height: 50px;
    font-size: x-large;
    border-radius: 50%;
    background-color: bisque;
    text-align: center;
    margin: 15px;
}

.sacada {
    opacity: 1;
}

.contenedorFlex {
    display: flex;
}

.flexRow {
    flex-flow: row wrap;
    justify-content: space-between;
}

.flexColumn {
    flex-flow: column wrap;
}

.flexCenter {
    justify-content: center;
    align-items: center;
}

.flexLeft {
    justify-content: left;
    align-items: center;
}

.item {
    font-weight: 800;
    margin: 0.5em;
    font-size: 2em;
}

#carton {
    margin: 4em;
    padding: 4px;
    border: 1px solid black;
    border-radius: 20px;
    display: flex;
    flex-flow: column wrap;
    /*     align-items: center;
    justify-items: center;
    justify-content: center; */
}

#carton div {
    border-radius: 10px;
    background-color: antiquewhite;
    border: 1px solid black;
    font-size: xx-large;
    /* PARA CENTRAR EL CONTENIDO*/
    display: flex;
    justify-content: center;
    align-items: center;
}

#carton div.cabecera{
    grid-column-start: 1;
    grid-column-end: end;
    background-color: rgb(228, 224, 220);
    border-radius: 20px;
}

#carton {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: var(--app-bg);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#carton div.numeros {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 2px;
    width: 100%;
    height: 100%;
    padding: 10px;
}

#carton div.numero {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--main-color);
    border-radius: 5px;
    background: var(--ficha-bg-front);
    color: var(--main-color);
    font-weight: bold;
    font-size: 1.2em;
    aspect-ratio: 1;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

#carton div.numero:hover:not(.tachado) {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#carton div.numero img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

#carton div.numero.tachado {
    background: var(--ficha-bg-back);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

#carton div.numero.tachado::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        transparent 0%,
        transparent 45%,
        rgba(255, 255, 255, 0.8) 45%,
        rgba(255, 255, 255, 0.8) 55%,
        transparent 55%
    );
}

@media (max-width: 768px) {
    #carton {
        padding: 10px;
    }
    
    #carton div.numero {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    #carton {
        padding: 5px;
    }
    
    #carton div.numero {
        font-size: 0.9em;
    }
}

.numero:hover:not(.tachado) {
    transform: scale(1.05);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.numero.tachado {
    background: var(--ficha-bg-back);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tachado {
    font-weight: bolder;
/*     background-color: #C3A220 !important;
    color: rgb(233, 234, 240); */
}

#marcador {
    margin: auto;
    width: 500px;
    height: 100px;
    margin-bottom: 3em;
    background-color: rgba(250, 235, 215, 0.479);
    border-radius: 10px;
    /*    display: flex;
    flex-flow: row nowrap;
    justify-content: left;
    align-items: center;
    overflow: hidden; */
    display: grid;
    grid-template: 1fr / repeat(auto-fill, 80px);
}

#panelBolas {
    margin: auto;
    display: grid;
    border-radius: 1em;
    /* grid-gap: 0; */
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(9, 85px);
    background-color: rgb(228, 233, 247);
}

.bola {
    /*  height: 40px;
    width: 40px;
    background-color: white;
    color: black;
    border-radius: 50%;
     */
    margin: 1px;
    display: block;
    position: relative;
    width: 75px;
    height: 75px;
    background: white;
    border-radius: 50%;
    background: -webkit-radial-gradient(25px 25px, circle, white, #000);
    background: -moz-radial-gradient(25px 25px, circle, white, #000);
    background: radial-gradient(25px 25px, circle, white, #000);
    /*position: absolute;*/
    float: left;
}

.boton {
    height: 50px;
    line-height: 0px;
    padding: 0.2em;
    color: var(--botton-color);
    font-family: "Source Sans Pro", Helvetica, sans-serif;
    border-radius: 10px;
    border: var(--botton-bg) 1px solid;
    background: var(--botton-bg);
}

.sizeL {
    height: 70px;
}

button:hover {
    border: var(--botton-hover) 1px solid;
    background: var(--botton-hover);
}


/* FOOTER */

.footer {
    height: 30px;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    background-color: var(--bar-bg);
    color: var(--bar-color);
    text-align: center;
}

.copyleft {
    display: inline-block;
    transform: rotate(180deg);
}


/* =========  VENTANA MODAL ======= */

.contenedorModal {
    background: rgb(211, 136, 136);
    border-radius: 5px;
    padding: 5px;
    width: 80%;
    text-align: center;
    position: fixed;
    top: 100px;
    left: 10%;
}

.close {
    width: 50px;
    float: right;
}

.saleBola {
    -webkit-animation: spin 500ms linear 2, moveRightToLeft 1s linear infinite;
    -moz-animation: spin 500ms linear 2, moveRightToLeft 1s linear infinite;
    -ms-animation: spin 500ms linear 2, moveRightToLeft 1s linear infinite;
    animation: spin 500ms linear 2, moveRightToLeft 1s linear;
    -webkit-transition: all 1s ease;
    transition: all 1s ease;
}

.ruedaBola {
    color: rgb(0, 38, 255);
    -webkit-animation: spin 500ms linear 1, moveRightToLeft2 0.5s linear infinite;
    -moz-animation: spin 500ms linear 1, moveRightToLeft2 0.5s linear infinite;
    -ms-animation: spin 500ms linear 1, moveRightToLeft2 0.5s linear infinite;
    animation: spin 500ms linear 1, moveRightToLeft2 0.5s linear;
    -webkit-transition: all 500ms ease;
    transition: all 500ms ease;
}

@keyframes spin {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

@keyframes moveRightToLeft {
    0% {
        top: -60px;
        left: 200px;
    }

    10% {
        top: -50px;
        left: 185px;
    }

    12% {
        top: -40px;
        left: 170px;
    }

    15% {
        top: -30px;
        left: 165px;
    }

    20% {
        top: 0px;
        left: 150px;
    }

    100% {
        left: 0%;
    }
}

@keyframes moveRightToLeft2 {
    0% {
        left: 80px;
    }

    100% {
        left: 0px;
    }
}