@charset "UTF-8";
/* ESTILOS GENERALES */
body {
  margin: 0;
  padding: 0;
  background-color: #5d4037; /* Fondo madera */
  font-family: 'Inter', sans-serif;
  color: #000;
}

.pantalla-inicio,
.pantalla-juego,
.pantalla-final {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.2rem 1rem;
  max-width: 700px;
  margin: auto;
  gap: 1rem;
}


/* TITULO Y SUBTITULO */
.titulo {
  background-color: #8B1E3F;
  color: #F7F3E8;
  font-family: 'League Spartan', sans-serif;
  font-size: 3rem;
  width: 100%;
  text-align: center;
  padding: 2rem;
}

.subtitulo {
  font-family: 'League Spartan', sans-serif;  /* âœ… CorrecciÃ³n */
  font-weight: 700;
  font-size: clamp(2rem, 5vw, 2.5rem); /* Ajustable segÃºn tamaÃ±o pantalla */
  color: #000;  /* o #111, el color negro que uses para subtÃ­tulo */
  text-align: center;
  background-color: #FFD700;  /* el amarillo */
  padding: 1.5rem 0;
  margin: 0;
  text-transform: uppercase;
}

/* INSTRUCCIONES INICIO */
.instrucciones {
  background-color: #F7F3E8;
  color: #000000;
  font-family: 'Urbanist', sans-serif;
  text-align: left;
  font-size: 1.2rem;
  line-height: 1.6;
  padding: 2rem;
  width: 100%;
}

.instrucciones h2 {
  margin-top: 0;
  font-size: 1.7rem;
  color: #000000;
  font-weight: bold;
  text-transform: lowercase;
}

/* BOTÃ“N INICIAR */
.btn-iniciar {
  background-color: #ffd700;
  color: #000000;
  font-family: 'Urbanist', sans-serif;
  font-size: 1.4rem;
  border: none;
  padding: 1.2rem 3rem;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-iniciar:hover {
  background-color: #d9a400;
}

/* LOGO Y NOMBRE DE EQUIPO */
.logo-equipo img {
  height: 100px;
  object-fit: contain;
  margin: 1rem 0;
}

.equipo-actual {
  font-family: 'Urbanist', sans-serif;
  font-size: 1.5rem;
  background-color: #F7F3E8;
  color: #000;
  padding: 1rem 2rem;
  width: 100%;
  text-align: center;
}

/* CANCHA VISUAL */
.cancha {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 1rem auto 1rem; /* antes estaba en 3rem */
  background-color: transparent;
  overflow: visible;
}

.cancha img.fondo-cancha {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

.fondo-cancha {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}


/* NUEVO CONTENEDOR DE POSICIONES */
.zona-juego {
  position: absolute;
  inset: 0;
}

/* ... [mismo CSS previo omitido para brevedad] ... */

/* POSICIONES SOBRE CANCHA */
.posicion {
  position: absolute;
  width: 80px;
  height: 80px;
  background-color: #ffd700;
  color: #000000;
  font-family: 'Urbanist', sans-serif;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.zona-juego .posicion:empty {
  display: none;
}

/* Estado cuando ya se colocÃ³ jugador */
.posicion.ocupado {
  background-color: #1B365D;
  color: #F7F3E8;
}

/* POSICIONES SOBRE CANCHA */
.cancha-contenedor {
  position: relative;
  width: 100%;
  max-width: 600px; /* o el ancho real de tu cancha */
  margin: 0 auto;
}

.coach { top: 30%; left: 40%; }
.pg    { top: 30%; left: 80%; }
.sg    { top: 50%; left: 60%; }
.sf    { top: 70%; left: 40%; }
.c     { top: 70%; left: 80%; }
.pf    { top: 90%; left: 60%; }

/* INPUT E INSTRUCCIONES DE TEXTO */
.instruccion,
.titulo-secundario {
  font-family: 'League Spartan', sans-serif;
  font-size: 1.4rem;
  text-align: center;
  color: #F7F3E8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.subinstruccion {
  font-family: 'Urbanist', sans-serif;
  font-size: 1.2rem;
  text-align: center;
  color: #F7F3E8;
}

input#inputNombre {
  width: 100%;
  max-width: 400px;
  padding: 1rem;
  font-size: 1.1rem;
  font-family: 'Inter', sans-serif;
  text-align: center;
  border: none;
  outline: none;
  margin-bottom: 1rem;
}

/* CONTENEDOR DEL JUGADOR COLOCADO */
.jugador-colocado {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  transform: translate(-50%, -50%);
}

/* LOGO PEQUEÃ‘O DEL EQUIPO */
.jugador-colocado img {
  height: 24px;
  width: 24px;
  object-fit: contain;
}

/* TEXTO DE POSICIÃ“N */
.jugador-colocado .pos {
  color: #000000; /* negro */
  font-weight: bold;
}

/* TEXTO DE APELLIDO */
.jugador-colocado .apellido {
  color: #ffd700; /* dorado */
  font-weight: bold;
}

.mini-posiciones {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.mini-posicion {
  background-color: #F7F3E8;
  color: #1B365D;
  border: none;
  font-family: 'Urbanist', sans-serif;
  font-size: 1.1rem;
  padding: 0.6rem 1rem;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s;
}

.mini-posicion:hover {
  background-color: #ffd700;
  color: #000;
}

/* CONTENEDOR DE POSICIONES SECUNDARIAS */
.contenedor-secundario {
  width: 100%;
  max-width: 600px;
  text-align: center;
  margin-top: 1.5rem;
}

.titulo-secundario {
  font-family: 'League Spartan', sans-serif;
  font-size: 1.2rem;
  color: #F7F3E8;
  margin-bottom: 1.2rem;
  text-align: center;
  letter-spacing: 0.5px;
}

.fila-posiciones {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.pos-mini {
  background-color: #E5DED8;
  color: #5A3825;
  font-family: 'League Spartan', sans-serif;
  font-size: 1.1rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pos-mini:hover {
  transform: scale(1.05);
  background-color: #ffd700;
  color: #000;
}

.pos-mini.seleccionada {
  background-color: #ffd700;
  color: #000;
}

.sugerencias-lista {
  list-style: none;
  padding: 0;
  margin-top: 5px;
  background: white;
  color: black;
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid #ccc;
  width: 100%;
}

.sugerencias-lista li {
  padding: 6px 10px;
  cursor: pointer;
}

.sugerencias-lista li:hover {
  background: #eee;
}

.sugerencias-lista {
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.posicion.ocupado {
  background: transparent !important;
  color: #fff !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.botones-final {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
  align-items: center;
}

.mensaje-final {
  margin-top: 1rem;
}

/* --- AJUSTES FINALES PANTALLA FINAL --- */
.pantalla-final {
  padding-top: 1rem;
  padding-bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.pantalla-final .cancha {
  margin-bottom: 0.5rem !important;
}

.pantalla-final .mensaje-final {
  margin-top: 0.3rem !important;
}

.pantalla-final .botones-final {
  margin-top: 0.3rem !important;
  margin-bottom: 1rem !important;
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (max-height: 700px) {
  .cancha {
    margin-bottom: 1rem;
  }

  .mensaje-final {
    margin-top: 0.5rem;
    font-size: 1.1rem;
  }

  .btn-iniciar {
    padding: 1rem 2rem;
    font-size: 1.2rem;
  }
}

.pantalla-final .zona-juego .posicion:not(:empty) {
  background: none !important;
  border: none !important;
}

.pantalla-final .cancha {
  margin-bottom: 1rem; /* reduce el espacio inferior */
}

.pantalla-final .botones-final {
  margin-top: 0.5rem;
}

.pantalla-final .cancha {
  margin-bottom: 0.5rem;
}

.pantalla-final .mensaje-final {
  margin-top: 0.3rem;
}

.pantalla-final .botones-final {
  margin-top: 0.3rem;
}

.pantalla-final .cancha {
  margin-bottom: 0.3rem !important;
}

.pantalla-final .mensaje-final {
  margin-top: 0.2rem !important;
}

.pantalla-final .botones-final {
  margin-top: 0.2rem !important;
  margin-bottom: 0.8rem !important;
}

/* --- AJUSTES RESPONSIVE SOLO PARA MÃ“VILES --- */
@media (max-width: 600px) {
  .titulo {
    font-size: 2.2rem;
    padding: 1.5rem;
  }

  .subtitulo {
    font-size: 1.6rem;
    padding: 1rem;
  }

  .instrucciones {
    font-size: 1rem;
    padding: 1.2rem;
  }

  .instrucciones h2 {
    font-size: 1.4rem;
  }

  .btn-iniciar,
  .mini-posicion,
  .pos-mini {
    font-size: 1.1rem;
    padding: 0.8rem 1.6rem;
  }

  .cancha {
    max-height: 65vh;
    margin-bottom: 1rem;
  }

  .pantalla-final .botones-final,
  .botones-final {
    gap: 0.6rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .mensaje-final,
  .instruccion,
  .subinstruccion {
    font-size: 1rem;
    margin-top: 0.3rem;
  }

  input#inputNombre {
    padding: 0.8rem;
    font-size: 1rem;
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  .pantalla-inicio,
  .pantalla-juego,
  .pantalla-final {
    padding: 1.5rem 2rem;
    gap: 1.2rem;
  }

  .titulo {
    font-size: 3.2rem;
    padding: 2.5rem 1rem;
  }

  .subtitulo {
    font-size: 2.2rem;
    padding: 2rem 1rem;
  }

  .instrucciones {
    font-size: 1.3rem;
    line-height: 1.7;
    padding: 2.5rem;
  }

  .instrucciones h2 {
    font-size: 1.9rem;
  }

  .btn-iniciar,
  .mini-posicion,
  .btn-volver,
  .btn-compartir {
    font-size: 1.5rem;
    padding: 1.2rem 3rem;
  }

  .instruccion,
  .titulo-secundario {
    font-size: 1.6rem;
  }

  .subinstruccion {
    font-size: 1.3rem;
  }

  input#inputNombre {
    font-size: 1.2rem;
    padding: 1rem;
  }

  .posicion {
    width: 90px;
    height: 90px;
    font-size: 1.3rem;
  }

  .jugador-colocado {
    font-size: 1.3rem;
    gap: 0.4rem;
  }

  .jugador-colocado img {
    height: 28px;
    width: 28px;
  }

  .fila-posiciones {
    gap: 1.2rem;
  }

  .pos-mini {
    width: 65px;
    height: 65px;
    font-size: 1.2rem;
  }

  .mensaje-final {
    font-size: 1.3rem;
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

#inputNombre.error {
  animation: shake 0.4s ease;
  border: 2px solid #ffd700;
}

.pos-num {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 0.75em;
  opacity: 0.8;
  margin-left: 2px;
}



/* === NUEVA PANTALLA INICIO QUINTETO HISTÃ“RICO === */
.pantalla-inicio-nueva {
  background-color: #5d4037;
  min-height: 100vh;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: 'Inter', sans-serif;
}

.header-quinteto {
  background-color: #5d4037;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 0 0.5rem; /* o ajusta si necesitas mÃ¡s espacio */
  width: 100%;
}

.logo-quinteto {
  max-width: 220px;
  margin: 0 auto 12px;
  display: block;
}

.lema-quinteto {
  font-family: 'League Spartan', sans-serif;
  font-size: 14px;
  color: #FFFFFF;
  margin: 0;
  text-align: center;
}

.bloque {
  width: 100%;
  text-align: center;
  padding: 2rem 1rem;
  box-sizing: border-box;
}

.titulo-quinteto {
  background-color: #0D1B2A;
  color: #ffffff;
  font-family: 'League Spartan', sans-serif;
  font-weight: 900;
  font-size: 2.8rem;
}

.subtitulo-quinteto {
  background-color: #FFD700;
  color: #000000;
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: 2rem;
}

.instrucciones-quinteto {
  color: #ffffff;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 700px;
  font-family: 'Inter', sans-serif;
}

.instrucciones-quinteto h2 {
  margin-top: 0;
  font-weight: 700;
  font-size: 1.6rem;
  color: #ffffff;
}

.instrucciones-quinteto p {
  margin: 0.5rem 0;
  font-weight: 400;
}

.btn-iniciar-nueva {
  background-color: #f4f1de;
  color: #000;
  font-family: 'Urbanist', sans-serif;
  font-weight: 900;
  font-size: 1.2rem;
  padding: 1rem 3rem;
  border: none;
  margin: 2rem auto;
  cursor: pointer;
  transition: background 0.3s ease;
  text-transform: uppercase;
}

.btn-iniciar-nueva:hover {
  background-color: #e2dbc8;
}

header {
  background-color: #5d4037;
  padding: 2rem 1rem;
  text-align: center;
}

header img {
  max-width: 100%;
  height: auto;
}

.header-jueguitos {
  background-color: #5d4037;
  text-align: center;
  padding: 1.5rem 1rem 0.5rem;
}

.header-jueguitos img {
  max-width: 260px;
  height: auto;
}

.header-jueguitos .lema {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: #ffffff;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.bloque-titulo {
  background-color: #0f1923;
  color: white;
  text-align: center;
  padding: 1.5rem 1rem;
}

.bloque-titulo h1 {
  font-family: 'League Spartan', sans-serif;
  font-weight: 900;
  font-size: 2.5rem;
  margin: 0;
}

.bloque-subtitulo {
  background-color: #FFD700;
  color: #000000;
  text-align: center;
  padding: 1.5rem 1rem;
}

.bloque-subtitulo h2 {
  font-family: 'League Spartan', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  margin: 0;
}

.bloque-header-juego {
  background-color: #5d4037;
  text-align: left;
  padding: 1rem 2rem 0.5rem;
}

.logo-jueguitos {
  max-width: 100%;
  height: auto;
}

.lema-jueguitos {
  color: white;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  margin-top: 0.3rem;
}

.bloque-titulo-juego {
  background-color: #0f1923;
  color: white;
  font-family: 'League Spartan', sans-serif;
  font-size: 2.8rem;
  font-weight: 900;
  text-align: center;
  padding: 2rem 1rem;
  width: 100vw;
}

.bloque-subtitulo-juego {
  background-color: #FFD700;
  color: black;
  font-family: 'League Spartan', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  padding: 2rem 1rem;
  width: 100vw;
}

/* CORRECCIÃ“N COMPLETA PARA TITULO Y SUBTÃTULO EN JUEGO Y FINAL */
.bloque-titulo-juego {
  background-color: #001F3F; /* Azul Marino NBA */
  color: #ffffff;
  font-family: 'League Spartan', sans-serif;
  font-weight: 900;
  font-size: 3rem;
  text-align: center;
  padding: 1.5rem 16px;
  width: 100%;
  box-sizing: border-box;
}

.bloque-subtitulo-juego {
  background-color: #FFD700; /* Amarillo Dorado */
  color: #000000;
  font-family: 'League Spartan', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  text-align: center;
  padding: 1.5rem 16px;
  width: 100%;
  box-sizing: border-box;
}

.logo-generado {
  font-family: 'Graduate', serif;
  font-size: 2.4rem;
  padding: 1rem 2rem;
  text-align: center;
  margin: 1rem auto;
  display: inline-block;
  border-radius: 0px;
  line-height: 1.3;
}

.instruccion {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: #ffffff;
}

.titulo-secundario {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  color: #ffffff;
}

.pos-mini {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  background-color: #f4f1de;
  color: #5d4037;
}

.mensaje-juego {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  color: #ffffff;
  font-size: 1.2rem;
  text-align: center;
  margin-top: 1rem;
}

.pantalla-final .btn-iniciar {
  background-color: #f4f1de;
  color: #000000;
  font-family: 'Urbanist', sans-serif;
  font-weight: 900;
  font-size: 1.2rem;
  text-transform: uppercase;
  padding: 1.2rem 2rem;
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
  width: 100%;
  max-width: 320px;
}

.pantalla-final .btn-iniciar:hover {
  background-color: #e2dbc8;
}

.zona-juego .posicion.ocupado {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
}

.zona-juego .posicion.ocupado span {
  line-height: 1.2;
}

.contenedor-nombre {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.1;
}

.jugador-colocado {
  padding-left: -5px;   /* mueve ligeramente a la derecha */
  margin-top: 10px;     /* baja ligeramente el bloque */
}

.posicion-circulo {
  background-color: #ffd700;
  color: #000000;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.8rem; /* 🔽 antes era 1rem */
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 4px auto;
  text-transform: uppercase;
}

.cancha {
  position: relative;
  width: 909px;
  margin: 0 auto;
}

.zona-juego {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 100%;
}

.logo-quinteto {
  width: 220px;
  max-width: 100%;
  margin: 0 auto 12px;
  display: block;
}

.mensaje-compartir {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #000000dd;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  z-index: 9999;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* ——— Botón ME RINDO al final ——— */
.pie-juego{
  display: flex;
  justify-content: center;
  margin: 18px 0 28px;
}
.btn-rendirse{
  background: #000000;
  color: #ffffff;
  font-family: 'Urbanist', sans-serif;
  font-weight: 900;
  font-size: 1rem;
  padding: 12px 28px;
  border: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity .2s ease;
}
.btn-rendirse:hover{ opacity: .9; }

/* aire seguro en móvil (ya lo tienes, pero por si acaso) */
.pantalla-juego {
  padding-bottom: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}
