* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  background: #800f1b;
}

body.cargando #app,
body.cargando #cerrado {
  display: none !important;
}

#app {
  width: 100%;
  max-width: 900px;
  min-height: 100vh;
}

.pantalla {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 25px;
}

h1 {
  color: #7d1820;
  font-size: 38px;
  font-weight: 900;
  text-align: center;
}

h2 {
  color: white;
  font-size: 42px;
  font-weight: 900;
  margin-bottom: 35px;
  text-align: center;
}

h3 {
  color: #9c7378;
  font-size: 22px;
  margin-top: 20px;
}

.caja {
  width: 100%;
  max-width: 720px;
  padding: 55px 45px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: white;
  border-radius: 45px;
}

input {
  width: 90%;
  max-width: 100%;
  height: 60px;
  margin: 15px;
  padding: 0 25px;
  border: none;
  border-radius: 35px;
  background: #801521;
  color: white;
  font-size: 22px;
  font-weight: bold;
  text-align: center;
}

input::placeholder { color: #c19ca1; }

button {
  min-width: 400px;
  height: 90px;
  margin-top: 30px;
  padding: 0 40px;
  border: none;
  border-radius: 45px;
  background: #ff851b;
  color: #801521;
  font-size: 35px;
  font-weight: 900;
  cursor: pointer;
}

button:active { transform: scale(.96); }
button{transition:transform .12s ease,filter .12s ease,box-shadow .12s ease;}
button:hover{filter:brightness(1.04);}
button:active{transform:translateY(3px) scale(.98);filter:brightness(.82);box-shadow:inset 0 3px 7px rgba(0,0,0,.22);}

.notificacion{position:fixed;top:20px;left:50%;z-index:50;max-width:min(90vw,520px);padding:14px 22px;border-radius:18px;background:#800f1b;color:white;font-weight:bold;text-align:center;box-shadow:0 8px 20px rgba(0,0,0,.22);opacity:0;pointer-events:none;transform:translate(-50%,-12px);transition:opacity .18s ease,transform .18s ease;}
.notificacion.visible{opacity:1;transform:translate(-50%,0);}
.notificacion.error{background:#541016;}

.check {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 22px;
  color: #aa8085;
  font-size: 14px;
  font-weight: bold;
}

.check input {
  width: 34px;
  height: 34px;
  min-width: 34px;
  max-width: 34px;
  flex: 0 0 34px;
  aspect-ratio: 1 / 1;
  margin: 0;
  appearance: none;
  border: 2px solid #d9c9cb;
  border-radius: 8px;
  background: white;
  cursor: pointer;
}

.check input:checked {
  position: relative;
  border-color: #801521;
  background: #801521;
}

.check input:checked::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 11px;
  width: 10px;
  height: 20px;
  border: solid #ff851b;
  border-width: 0 4px 4px 0;
  transform: rotate(45deg);
}

.logo { width: 160px; max-width: 50%; margin-top: 60px; }

.marcas {
  position: relative;
  width: 100%;
  min-height: 105px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
}

.logoMarca {
  display: block;
  object-fit: contain;
}

.logoBingazo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.logoMasson {
  width: 145px;
  height: auto;
  max-height: 68px;
  filter: brightness(0);
}

.marcas p {
  position: absolute;
  bottom: 0;
  color: #aa8085;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
}

.contador {
  margin: 20px;
  color: #a2767b;
  font-size: 25px;
  font-weight: bold;
}

#tablero {
  width: 100%;
  height: 235px;
  max-height: 235px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  padding: 15px 24px 15px 15px;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 35px;
  background: #801521;
  scrollbar-color: #c1848b #801521;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

#tablero::-webkit-scrollbar { width: 12px; }
#tablero::-webkit-scrollbar-track { background: transparent; }
#tablero::-webkit-scrollbar-thumb {
  border: 3px solid #801521;
  border-radius: 10px;
  background: #c1848b;
}
#tablero::-webkit-scrollbar-button { display: none; }

.tabla {
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: white;
  color: #801521;
  font-size: 22px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
}

.tabla.seleccionada,
.tabla.reservada.seleccionada { background: #ff851b; color: white; }
.tabla.reservada,
.tabla.reservada.confirmada { background: #c1848b; color: white; }
.tabla.pagada,
.tabla.pagada.confirmada { background: #800f1b; color: white; }

#precio {
  width: 80%;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 30px;
  border-radius: 40px;
  background: #800f1b;
  color: white;
  font-size: 38px;
  font-weight: 900;
}

#comentarioPrecio {
  min-height: 28px;
  margin-top: 12px;
  color: #a2767b;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
}

.limpiarSeleccion {
  min-width: 260px;
  height: 52px;
  margin-top: 14px;
  background: #c1848b;
  color: white;
  font-size: 20px;
}

.busqueda {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
  padding: 20px;
  border-radius: 28px;
  background: #f8eeee;
}

.busqueda input {
  width: auto;
  flex: 1 1 220px;
  margin: 0;
  border: 2px solid #801521;
  background: white;
  color: #801521;
}

.busqueda button { min-width: 180px; height: 60px; margin-top: 0; font-size: 24px; }
#resultadoBusqueda { width: 100%; color: #801521; font-size: 18px; font-weight: bold; text-align: center; }

.verTabla {
  min-width: 180px;
  height: 48px;
  margin-top: 12px;
  padding: 0 24px;
  font-size: 20px;
}

.modalTabla {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(128, 15, 27, .92);
}

.modalContenido {
  position: relative;
  width: min(92vw, 520px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 24px;
  overflow: auto;
  border-radius: 28px;
  background: white;
}

.modalContenido img {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
}

.modalContenido #nombreJugadorTabla {
  width: 100%;
  color: #801521;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
}

.modalContenido #descargarTablaBuscada {
  min-width: 220px;
  height: 58px;
  margin-top: 0;
  font-size: 22px;
}

.cerrarModal {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 1;
  min-width: 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  font-size: 30px;
  line-height: 1;
}

#misNumeros { color: #a2767b; font-size: 28px; font-weight: bold; text-align: center; }

#paso3 .caja h1 {
  color: #801521;
  font-size: 42px;
  margin-bottom: 0;
}

#paso3 .caja h2 {
  margin: 0 0 18px;
  color: #801521;
  font-size: 22px;
}

.descarga { height: 75px; background: #b57d84; color: white; font-size: 28px; }
.volver { position: static; min-width: 280px; height: 70px; margin-top: 24px; font-size: 28px; }

.cerrado {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #800f1b;
}

.cerrado h1 { color: white; font-size: 55px; }
.cerrado h2 { margin: 20px; color: #ff851b; font-size: 65px; }
.cerrado p { color: white; font-size: 35px; }

.cara {
  position: relative;
  width: 230px;
  height: 230px;
  border: 15px dashed #ff851b;
  border-radius: 50%;
}

.ojos {
  position: absolute;
  top: 70px;
  left: 0;
  width: 100%;
  height: 25px;
  display: flex;
  justify-content: center;
  gap: 50px;
}

.ojos::before,
.ojos::after {
  content: "";
  display: block;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #ff851b;
}

.boca {
  position: absolute;
  top: 145px;
  left: calc(50% - 27.5px);
  width: 55px;
  height: 15px;
  background: #ff851b;
}

.oculto { display: none !important; }

@media (max-width: 600px) {
  h1 { font-size: 32px; }
  h2 { font-size: 35px; }
  .caja { padding: 35px 20px; border-radius: 35px; }
  button { min-width: 280px; height: 70px; font-size: 27px; }
  input { height: 50px; font-size: 18px; }
  #tablero { grid-template-columns: repeat(4, 1fr); height: 220px; max-height: 220px; }
  .tabla { height: 48px; font-size: 18px; }
  #precio { font-size: 30px; }
  .volver { min-width: 220px; }
}

@media (max-width: 350px) {
  button { min-width: 240px; }
  .tabla { height: 40px; font-size: 15px; }
}
