*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    background: #f54c4c;
    background: radial-gradient(circle, rgba(245, 76, 76, 1) 0%, rgba(96, 87, 199, 1) 50%, rgba(83, 214, 237, 1) 100%);
    font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
}
h1{
    font-size: 50px;
    color: #fff;
}
.juego{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.information{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.carcasa{
    background: green;
    border: 4px solid red;
    border-radius: 10px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 80%;
    margin: 2%;
}
.ganador{
    display: none;
    position: absolute;
    width: 300px;
    height: 300px;
    border: 2px solid blueviolet;
    background: radial-gradient(#0Ff, #f54c4c);
    background-size: cover;
    border-radius: 50%;
    z-index: 10;
    /*opacity: 0.6;*/
    transition: 2s ease-out;
}
.ganador > img{
    width: 100%;
}
.perdedor{
    display: none;
    position: absolute;
    width: 300px;
    height: 300px;
    border: 2px solid blueviolet;
    background: radial-gradient(#f0f, #f54c4c);
    background-size: cover;
    border-radius: 50%;
    z-index: 10;
    /*opacity: 0.6;*/
    transition: 2s ease-out;
}
.perdedor > img{
    width: 100%;
}
.botones, .comenzar{
    width: 120px;
    height: 40px;
    border-radius: 5px;
    background: #198754;
    color: #fff;
    margin: 0.5%;
    cursor: pointer;
}
.botones:hover, .comenzar{
    width: 125px;
    transition: 0.5s ease;
}
.info{
    width: 220px;
    height: 80px;
    border: 0.5px solid black;
    text-align: start;
    background: white;
    border-radius: 5px;
    margin: 0.5%;
    box-shadow: 2px 2px 5px #198754;
    -webkit-user-select: none;
    user-select: none;
}
.contenedor-ficha{
    width: 130px;
    height: 130px;
    margin: 1%;
}
.ficha{
    width: 129px;
    height: 129px;
    background: white;
    border-radius: 5px;
}
.dato{
    color: transparent;
    width: 100%;
    height: 100%;
    font-size: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px;
    transform: rotateY(180deg);
    transition: transform 0.5s;
}
.invisible{
    opacity:0;
}
.ficha:hover{
    background: aquamarine;
    cursor: pointer;
    color: transparent;
    width: 101%;
    height: 101%;
}
.descubierta{
    width: 100%;
    height: 100%;
    background: #e4ff98;
    color: red;
    font-size: 50px;
    transform: rotateY(0deg);
}
/* Contenedor principal del modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050; /* alto para estar sobre todo */
  display: none; /* se muestra con .show */
  width: 100%;
  height: 100%;
  overflow: hidden;
  outline: 0;
}

/* Fondo semitransparente */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  width: 100vw;
  height: 100vh;
  background-color: #000;
  opacity: 0.5; /* efecto oscuro */
}

/* Caja del modal */
.modal-dialog {
  position: relative;
  width: auto;
  margin: 0.5rem;
  pointer-events: none;
  max-width: 500px; /* tamaño estándar */
  margin: 1.75rem auto; /* centrado vertical */
}

/* Contenido */
.modal-content {
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid rgba(0,0,0,.2);
  border-radius: 0.6rem;
  outline: 0;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
  pointer-events: auto;
}

/* Header */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid #dee2e6;
  background: #198754;
}

/* Body */
.modal-body {
  position: relative;
  flex: 1 1 auto;
  padding: 1rem;
}

/* Footer */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0.75rem;
  border-top: 1px solid #dee2e6;
}
.bonus-pop{
    position: absolute;
    top: 5%;
    left: 20%;
    transform: translate(-50%, -50%) scale(0.5);
    font-size: 3rem;
    font-weight: bold;
    color: #ffea00;
    opacity: 0;
    text-shadow: 0 0 10px #ff0, 0 0 20px #ffa500;
    pointer-events: none;
    transition: transform 1s ease-out, opacity 1.2s ease-out;
    z-index: 9999;
}
@media(max-width: 990px){
    .contenedor-ficha, .ficha{
        width: 100px;
        height: 100px;
    }
}
@media(max-width: 825px){
    .juego{
        width: 100%;
    }
    .carcasa{
        width: 100%;
    }
    .contenedor-ficha, .ficha{
        width: 90px;
        height: 90px;
    }
}
@media(max-width: 775px){
    .juego{
        flex-direction: column;
    }
    .information{
        flex-direction: row;
        flex-wrap: wrap;
    }
}
@media(max-width: 560px){
    .info{
        width: 110px;
        height: 70px;
    }
}
@media(max-width: 466px){
    .information{
        width: 80%;
    }
    .info{
        width: 100%;
    }
}
@media(max-width: 415px){
    .contenedor-ficha, .ficha{
        width: 80px;
        height: 80px;
    }
}
@media(max-width: 370px){
    .contenedor-ficha, .ficha{
        width: 60px;
        height: 60px;
    }
}