/* =======================
   BASE
======================= */
html {
  /* 1. Aseguramos que el html no tenga scroll por defecto */
  height: 100%;
}

@font-face {
  font-family: "Jersey 25";
  src: url("../fonts/Jersey_25/Jersey25-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

body {
  font-family: "Jersey 25";
  text-align: center;
  margin: 0;
  padding: 0;
  background: url(../img/BG.png);
  background-size: cover;
  background-position: center;
  /*background: linear-gradient(135deg, #0f2027, #2c5364);*/
  color: white;
  min-height: 100vh;
  background-attachment: fixed;
  overflow: hidden;
}

body.site-closed {
  overflow: hidden;
}

.closed-screen {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.2rem;
  padding: 2rem;
  background: #020917;
  color: #ffffff;
  text-align: center;
}

.closed-screen.is-visible {
  display: flex;
}

.closed-screen img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.42;
}

.closed-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.46);
}

.closed-copy {
  position: relative;
  z-index: 1;
  max-width: min(720px, 92vw);
  padding: 1.5rem;
  text-shadow: 0 0 18px rgba(0, 170, 255, 0.95), 0 0 28px rgba(255, 0, 200, 0.55);
}

.closed-copy h2 {
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 0.9;
  margin: 0 0 0.25em;
}

.closed-copy p {
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1.1;
  margin: 0;
}

h1 {
  font-family: "Jersey 25";
  margin: 10px 0;
  text-shadow: 3px 0 7px rgb(3 0 129 / 54%);
  font-size: 4em;
  margin-bottom: 0;
}

h2,
h3 {
  font-family: "Jersey 25";
  margin: 10px 0;
  text-shadow: 3px 0 7px rgb(3 0 129 / 54%);
  font-size: 4em;
}

/* =======================
   PANTALLAS
======================= */
.container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.contend {
  align-items: center;
}
.pantalla {
  display: none;
  padding: 20px;
  z-index: 1;
  position: relative;
  animation: fadeIn 0.4s ease;
  width: 50%;
  margin: auto;
}
  #pantallaEquipos, #pantallaRival, #pantallaJuego
{
  flex-direction: column;
}
#pantallaJuego.pantalla.glass {
  width: max-content;
  padding: 0.5em 3em;
  top: 3em;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#pantallaMensajes {
  font-family: monospace;
  font-size: 16px;
  color: #0f0;
  text-align: left;
  width: 20vw;
  height: 300px;
  padding: 10px;
  background: #000000bf;
  border: 0 solid #555;
  overflow-y: auto;
  border-radius: 5px;
}

/* =======================
   BOTONES
======================= */
button {
  font-family: "Jersey 25";
  font-size: 30px;
  color: white;
  padding: 0.6em 2.5em;
  cursor: pointer;
  border: none;
  background: none;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
  margin: 0.5em;
}
.botones button {
  padding: 0.6em 0.5em;
}
 button img.equipos{
  padding-right: 10px;
  }

/* fondo de atrás tamaño normal */
button::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #00c6ff, #0072ff); /* COLOR DEL BORDE */
  clip-path: polygon(10% 0%, 100% 0%, 90% 100%, 0% 100%);
  z-index: -2;
}

/* fondo de frente debe ser más pequeño para que se vea el borde */
button::after {
  content: "";
  position: absolute;
  top: 3px; /* Grosor del borde arriba */
  left: 3px; /* Grosor del borde izquierda */
  right: 3px; /* Grosor del borde derecha */
  bottom: 3px; /* Grosor del borde abajo */
  background: linear-gradient(135deg, rgb(191 0 255), rgb(0 245 255));
  clip-path: polygon(10% 0%, 100% 0%, 90% 100%, 0% 100%);
  z-index: -1;
  transition: background 0.3s ease;
}

/* --- EFECTOS --- */

button:hover {
  transform: scale(1.1);
}

button:hover::before {
  background: linear-gradient(-135deg, #00ffee, #2900ff); /* cambio de color del borde */
}

button:hover::after {
  background: linear-gradient(-135deg, #2900ff, #00ffee);
}

.flag {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}
.play {
  font-family: "Jersey 25";
  font-size: 40px;
  background: transparent;
  border: none;
}

button:active {
  transform: scale(0.95);
}

button:disabled {
  opacity: 1;
  cursor: not-allowed;
}
#marcador, #turno {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.5em;
    font-weight: bold;
    padding: 0 0.2em;
    background: #000000a3;
    border-radius: 0.3em;
    text-shadow: 0 0 10px #ff4f00;
    color: #ffffff;
    margin: 0.5em auto;
    width: max-content;
}
#rivalNombre {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 40px;
  font-weight: bold;
  height: auto;
}
#pantallaRival {
  align-items: center;
  justify-content: center;
  z-index: 3;
}
#rivalSelection.glass {
  width: max-content;
  }

.center {
  content: url(../img/centro.png);
  display: block;
  width: 25px;
  text-align: center;
  margin: auto;
}
.left {
  content: url(../img/atras.png);
  display: block;
  width: 25px;
  text-align: center;
  margin: auto;
}
.right {
  content: url(../img/frente.png);
  display: block;
  width: 25px;
  text-align: center;
  margin: auto;
}
/* =======================
   CANCHA
======================= */
#cancha {
  width: 200px;
  height: 320px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(#3ca55c, #2e8b57);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
  margin: auto;
}

/* líneas cancha */
#cancha::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
}

/* =======================
   PERSONAJES
======================= */
#jugador,
#portero,
#balon {
  position: absolute;
  transform: translateX(-50%);
}
#jugador {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 30px;
  background: transparent;
  border-radius: 10px;
  z-index: 1;
}

#balon {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 20px;
  height: 20px;
  background: transparent;
  border-radius: 50%;
  z-index: 0;
  background: url(../img/balon.png);
  background-size: 100%;
}
/*
#balon::after {
  content: "⚽";
  font-size: 25px;
}
*/
#portero {
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 30px;
  background: transparent;
  border-radius: 10px;
  z-index: 1;
}
/* =======================
   BOTONES DIRECCIÓN
======================= */
.botones button {
  font-size: 18px;
  width: 90px;
}
/* =======================
   INPUT JERSEY
======================= */
#mensajeNombre {
font-size: 3.3em;
    text-shadow: -5px 1px 20px #3000ff;
    color: #fff;
    width: max-content;
    border-radius: 5px;
    background: #ffffff3b;
}
#mensajeNombre.glass {
  padding: 0 0.25em;
  margin: 0.5em auto;
box-shadow: 0 -1px 20px 10px #ffffffbf, inset 2px 2px 20px 17px #ffffffb3;
}

.input-container {
  position: relative;
  width: auto;
  margin: auto;
}

.input-container
{
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: column;
}

.jersey-bg {
  position: absolute;
  width: 20%;
  opacity: 1;
  pointer-events: none;
  z-index: 0;
  transition: all 0.3s ease;
}

.input-container input {
  font-family: "Jersey 25";
  font-size: 40px;
  position: relative;
  z-index: 2;
  width: auto;
  background: transparent;
  border: none;
  font-size: 40px;
  text-align: center;
  color: white;
  text-transform: uppercase;
  height: auto;
  line-height: 1.2;
  margin:0 auto 1em;
  padding: 0.25em 0.7em;
  display: block;
}
input::placeholder {
  font-family: "Jersey 25";
  color: white;
  font-size: 1.2em;
  opacity: 1;
}
input:active,
input:focus {
  outline: none;
  box-shadow: none;
}
input:disabled {
  opacity: 1;
  cursor: not-allowed;
  height: 11vh;
  margin-top: 0;
  padding: 0;
  margin-bottom: 1em;
  font-size: 30px;
}
.equiposText {
  font-size: 1em;
}
/* =======================
   MODAL
======================= */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-content: center;
}

.modal-content {
  background: linear-gradient(135deg, #ffffff, #e3f2fd);
  color: #222;
  padding: 25px;
  margin: 10% auto;
  width: 320px;
  border-radius: 16px;
  text-align: center;
  animation: pop 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

@keyframes pop {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-content h2 {
  margin-bottom: 15px;
}

#ranking {
  display: flex;
  flex-direction: column;
  gap: 0.3em;
}

.ranking-row {
  margin: 0;
  padding: 0.25em 0.55em;
  border-radius: 8px;
  color: #1d1d1d;
}

.ranking-current {
  font-weight: bold;
  border: 2px solid currentColor;
}

.ranking-current-top {
  color: #017a2c;
  background: rgba(0, 255, 102, 0.18);
  box-shadow: 0 0 14px rgba(0, 255, 102, 0.45);
}

.ranking-current-outside {
  color: #b60020;
  background: rgba(255, 0, 50, 0.16);
  box-shadow: 0 0 14px rgba(255, 0, 50, 0.36);
}

.ranking-note {
  margin: 0.8em 0 0.1em;
  color: #555;
  font-size: 0.85em;
  text-transform: uppercase;
}

/* =======================
   OVERLAY TURNOS
======================= */
.turn-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  bottom: 0;
  top: 0;
}

.turn-overlay.show {
  opacity: 1;
  pointer-events: all;
}

/* texto principal */
.turn-overlay h2 {
  font-size: 44px;
  color: white;
  background: linear-gradient(135deg, #ff512f, #dd2476);
  padding: 20px 50px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  animation: pulse 0.8s infinite alternate;
}

/* subtitulo */
.turn-overlay p {
  margin-top: 10px;
  font-size: 18px;
  color: #ddd;
}

/* animación */
@keyframes pulse {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.05);
  }
}

/* =======================
   SCORE / TEXTO
======================= */
#dordor {
  font-size: 30px;
  font-weight: bold;
  padding: 0;
  width: 60%;
  margin: auto;
  border-radius: 10px;
}
.glass {
  background: rgba(0, 0, 0, 0.1);
  padding: 0.5em;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  width: auto;
  box-shadow: 0 0 30px rgba(0, 255, 200, 0.4);
}
input.glass [disabled],
input.glass:disabled {
  background: transparent;
  padding: 0;
  border-radius: 0;
  backdrop-filter: inherit;
  width: 100%;
  max-width: inherit;
  box-shadow: none;
  margin: auto;
  top: 0.7em;
  position: relative;
  margin-bottom: 0;
  border: 0;
}
#etapa {
  font-size: 2em;
  opacity: 0.9;
  text-shadow: 3px 0 7px rgb(3 0 129 / 54%);
}
/*

#turno {
  font-size: 1.5em;
  padding: 0;
  margin: 0.5em 0;
  opacity: 1;
  text-shadow: 3px 0 7px rgb(3 0 129 / 54%);
  background-color: #000000a3;
  border-radius: 10px;
  width: 322px;
}
*/
#turnSubText
{
  font-size: 3em;
  margin: 0;
}

.auth-panel {
  width: min(420px, 92vw);
  margin: 0 auto 1em;
  flex-direction: column;
  gap: 0.7em;
}

.auth-tabs {
    display: flex;
    gap: 0.5em;
    justify-content: center;
    flex-direction: column;
}

.auth-tab,
.auth-link {
  font-size: 1em;
  padding: 0.35em 0.75em;
}

.auth-tab.active {
  box-shadow: 0 0 14px rgba(0, 255, 200, 0.8);
}

.auth-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6em;
  align-items: stretch;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
  font-family: "Jersey 25";
  width: 100%;
  box-sizing: border-box;
  font-size: 1.05em;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(178, 229, 255, 0.85);
  border-radius: 8px;
  padding: 0.55em 0.7em;
  text-align: center;
  box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.24);
}

.auth-form input::placeholder {
  color: rgba(255, 255, 255, 0.92);
  opacity: 1;
  text-shadow: 0 0 8px rgba(0, 170, 255, 0.75);
}

.auth-privacy {
  display: flex;
  align-items: center;
  gap: 0.5em;
  text-align: left;
  font-size: 0.95em;
}

.auth-privacy input {
    width: 25px;
    height: 25px;
}

.auth-message {
  min-height: 1.3em;
  margin: 0;
  color: #ffffff;
}

#inputJugador {
  display: none;
  z-index: 0;
}
/* =======================
   MODAL GANAR / PERDER
======================= */

#modalResultado .modal-content {
  background: transparent;
  color: #ffffff;
  padding: 25px;
  margin: 10% auto;
  width: 320px;
  border-radius: 16px;
  text-align: center;
  animation: none;
  box-shadow: none;
}

#modalResultado {
  transition: all 0.4s ease;
}

/* GANAR */
#modalResultado .modal-content.modal-ganar {
  /*
  background: linear-gradient(135deg, #f7f3d0cc, #ead80387);
  box-shadow: 0 0 30px #fbe9a8;
  */
  animation: popWin 0.5s ease;
}

/* PERDER */
#modalResultado .modal-content.modal-perder {
  color: #ffffff;
  padding: 25px;
  margin: 10% auto;
  width: 40vw;
  border-radius: 16px;
  text-align: center;
  /*
  background: linear-gradient(135deg, #fc5e3f8c, #6600867d);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  */
  animation: shakeLose 0.4s ease;
}
#modalResultado.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgb(0 0 0 / 65%);
  backdrop-filter: blur(6px);
  z-index: 1000;
}

#modalResultado.modal.modal-ganar {
  background: linear-gradient(45deg, rgb(0 189 255), #fa00ffb8);
}

#modalResultado.modal.modal-perder {
  background: rgb(135 1 1 / 58%);
}

#modalResultado.modal.modal-ganar .modal-content {
  text-shadow: 0 0 14px rgb(0 255 90 / 75%);
}

#modalResultado.modal.modal-perder .modal-content {
  text-shadow: 0 0 14px rgb(255 55 55 / 75%);
}
/* Animación ganar */

@keyframes popWin {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  60% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Animación perder */

@keyframes shakeLose {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  50% {
    transform: translateX(10px);
  }
  75% {
    transform: translateX(-5px);
  }
  100% {
    transform: translateX(0);
  }
}

#fraseResultado {
  font-size: 3em;
}
.btnReiniciar {
  padding: 0.5em 1.25em;
}
#btnReintentar{
  width: 100%
}

/* =======================
   CONFETI
======================= */

.confeti {
  position: absolute;
  width: 8px;
  height: 8px;
  background: red;
  animation: caer 2s linear forwards;
  z-index: 9;
}

@keyframes caer {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(600px);
  }
}


#listaEquipos button img,#rivalNombre img, #marcador img
{
  width: 1em;
  height: auto;
  margin: auto;
  vertical-align: middle;
}
.btnPlay
{
  width: 300px;
  padding: 0.5em;
  font-size: 2em;
}

   #modalResultado .modal-content.modal-perder #btnReintentar {
    width: 40%;
}
     #modalResultado .modal-content.modal-ganar #btnReintentar {
    display: none;
}
#modalResultado .modal-content.modal-ganar  {
    width: 45vw;
}
#modalResultado.modal  {
    display: none;
    position: fixed;
    inset: 0;
    background: rgb(135 1 1 / 58%);
    backdrop-filter: blur(6px);
    z-index: 1000;
}
button.auth-link
{
    font-size: 1.5em;
    padding: 0.35em 0.75em;
    color: #ffffff;
    text-shadow: 0 0 10px black;
}
button.auth-link::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    background: transparent;
    clip-path: none;
    z-index: -1;
    transition: none;
}
button.auth-link::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    background: transparent;
    clip-path: none;
    z-index: -1;
    transition: none;
}
.subtiles
{
  font-size: 1.5em;
}

.legacy
{
      font-size: 1.5em;
    text-shadow: 2px -1px 20px #000000;
    color: white;
}
.legacy a
{
    color: white;
}
.h2log
{
    font-size: 3em;
    color: #07f144;
    background: linear-gradient(to right, #20caff, #00ff01);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
    filter: drop-shadow(5px 2px 2px rgba(0, 0, 0, 0.5));
    text-shadow: none;
}

/* =========================================================

   📱 MOBILE (0 - 720px)

========================================================= */

@media (max-width: 719px) {
  body {
    top: 1.5em;
    position: relative;
    overflow: scroll;
  }
  h1 {
    font-size: 2.5em;
    margin: auto;
    width: 100%;
  }

  h2,
  h3 {
    font-size: 1.6em;
  }
  .input-container {
    position: relative;
    width: auto;
    margin: auto;
    margin-bottom: 0.5em;
}
  .input-container input {
    font-size: 2em;
    position: relative;
    width: 85%;
    margin: auto;
  }
  #mensajeNombre {
    font-size: 2em;
    width: auto;
  }

  button {
    font-size: 1.5em;
    padding: 0.4em 1.5em;
  }
  #listaEquipos button 
  {
    padding: 0.4em 0.8em;
  }
  button img{
    margin-right: 10px;
  }

#etapa {
    margin: 0;
  }
  
  #jugador,
  #portero {
    width: 45px;
  }

  #balon {
    width: 14px;
    height: 14px;
  }
  input.glass [disabled],
  input.glass:disabled {
    margin: auto;
    top: 0.15em;
    position: relative;
    margin-bottom: 0;
  }
  .jersey-bg {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0%);
    z-index: -1;
    top: 0;
    width: 60%;
    pointer-events: none;
    transition: 0.3s;
    margin: auto;
  }
  #rivalNombre {
    font-size: 3em;
    display: flex;
    font-weight: bold;
    height: inherit;
}
  #rivalSelection.glass
  {
    width: max-content;
  }
  #pantallaEquipos
  {
    flex-direction: column;
  }
  
  #pantallaRival
  {
    height: auto;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    align-items: center;
  }
    #pantallaJuego
  {
    flex-direction: column;
  }
  .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}
  #pantallaMensajes {
    font-family: monospace;
    font-size: 20px;
    width: 300px;
    height: 200px;
}
  .center,.left, .right
  {
    width: 35px;
  }
  #pantallaJuego.pantalla.glass {
    width: 95%;
    padding: 0.5em;
}
.btnPlay
  {        
    width: 300px;
    padding: 0.5em;
    font-size: 2em;
  }
  .contendPantalla
  {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  #modalResultado .modal-content.modal-perder {
color: #ffffff;
padding: 25px;
margin: 10% auto;
width: auto;
border-radius: 16px;
text-align: center;
animation: shakeLose 0.4s ease;
}
#modalResultado .modal-content.modal-perder #btnReintentar {
width: 70%;
}
.modal{
display: none;
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.75);
backdrop-filter: blur(6px);
z-index: 1000;
flex-direction: column;
align-content: center;
justify-content: center;
align-items: center;
}
.turn-box
{
  width: 90%;
}
.modal-content h2 {
margin-bottom: 15px;
text-shadow: 2px 0 2px rgba(3, 0, 129, 0.31);
font-size: 2.5em;
width: 90%;
}
#marcador, #turno {
font-size: 1.5em;
font-weight: bold;
text-shadow: none;
color: #ffffff;
width: max-content;
padding: 0.1em 0.5em;
margin: 0.5em auto;
  }

#marcador, #turno span {
text-shadow:0 0 10px rgba(255, 79, 0, 0.52);
}  
#modalResultado .modal-content.modal-ganar {
width: 90%;
margin: auto;
padding: 0;
text-align: center;
}
#ranking
{
  font-size: 0.90em;
  margin-bottom: 1em;
}
.ranking-row {
  margin: 0;
  padding: 0;
  border-radius: 8px;
  color: #1d1d1d;
}
.modal-content {
background: linear-gradient(135deg, #ffffff, #e3f2fd);
color: #222;
padding: 0.3em;
margin: 5% auto;
width: 95%;
border-radius: 16px;
text-align: center;
animation: pop 0.3s ease;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.modal
{
  overflow: scroll;
}
}


/* =========================================================

   📟 TABLET (720px - 1023px)

========================================================= */

@media (min-width: 720px) and (max-width: 1023px) {
  body {
    top: 1.5em;
    position: relative;
    overflow: scroll;
  }
  h1 {
    font-size: 4em;
    margin: auto;
    width: 100%;
  }

  h2,
  h3 {
    font-size: 1.6em;
  }
  .input-container {
    position: relative;
    width: auto;
    margin: auto;
    margin-bottom: 0.5em;
}
  .input-container input {
    font-size: 2em;
    position: relative;
    width: 85%;
    margin: auto;
  }
  #mensajeNombre {
    font-size: 2em;
    width: auto;
  }

  button {
    font-size: 1.5em;
    padding: 0.4em 0.8em;
  }
  button img{
    margin-right: 10px;
  }

#etapa {
    margin: 0;
  }
  
  #jugador,
  #portero {
    width: 45px;
  }

  #balon {
    width: 14px;
    height: 14px;
  }
  input.glass [disabled],
  input.glass:disabled {
    margin: auto;
    top: 0.15em;
    position: relative;
    margin-bottom: 0;
  }
  .jersey-bg {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 0%);
    z-index: -1;
    top: 0;
    width: 43%;
    pointer-events: none;
    transition: 0.3s;
    margin: auto;
  }
  #rivalNombre {
    font-size: 3em;
    display: flex;
    font-weight: bold;
    height: inherit;
}
  #rivalSelection.glass
  {
    width: max-content;
  }
  #pantallaEquipos
  {
    flex-direction: column;
  }
  
  #pantallaRival
  {
    height: auto;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    align-items: center;
  }
    #pantallaJuego
  {
    flex-direction: column;
  }
  .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}
  #pantallaMensajes {
    font-family: monospace;
    font-size: 20px;
    width: 300px;
    height: 200px;
}
  .center,.left, .right
  {
    width: 35px;
  }
  #pantallaJuego.pantalla.glass {
    width: 90%;
    padding: 0.5em;
}
.btnPlay
  {        
    width: 300px;
    padding: 0.5em;
    font-size: 2em;
  }
  .contendPantalla
  {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  #modalResultado .modal-content.modal-perder {
color: #ffffff;
padding: 25px;
margin: 10% auto;
width: auto;
border-radius: 16px;
text-align: center;
animation: shakeLose 0.4s ease;
}
#modalResultado .modal-content.modal-perder #btnReintentar {
width: 70%;
}
.modal{
display: none;
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.75);
backdrop-filter: blur(6px);
z-index: 1000;
flex-direction: column;
align-content: center;
justify-content: center;
align-items: center;
}
.turn-box
{
  width: 90%;
}
.modal-content h2 {
margin-bottom: 15px;
text-shadow: 2px 0 2px rgba(3, 0, 129, 0.31);
font-size: 4em;
width: 90%;
}
#marcador, #turno {
font-size: 1.5em;
font-weight: bold;
text-shadow: none;
color: #ffffff;
width: max-content;
padding: 0.1em 0.5em;
margin: 0.5em auto;
  }

#marcador, #turno span {
text-shadow:0 0 10px rgba(255, 79, 0, 0.52);
}  
#modalResultado .modal-content.modal-ganar {
width: 90%;
margin: auto;
padding: 0;
text-align: center;
}
#ranking
{
  font-size: 1.2em;
  margin-bottom: 2em;
}
.modal-content {
background: linear-gradient(135deg, #ffffff, #e3f2fd);
color: #222;
padding: 25px;
margin: 10% auto;
width: 70%;
border-radius: 16px;
text-align: center;
animation: pop 0.3s ease;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.modal{
  overflow: scroll;
}
}

/* =========================================================

   💻 DESKTOP (1024px+)

========================================================= */

@media (min-width: 1024px) and (max-width: 1352px) {
  body {
    top: 1em;
    position: relative;
    overflow: scroll;
  }
  h1 {
    font-size: 2.5em;
    margin: auto;
    width: 100%;
  }

  h2,
  h3 {
    font-size: 3em;
    text-shadow: rgb(3 0 129 / 50%) 0 1px 11px;
  }
  #ranking
  {
    font-size: 1.8em;
  }
  .modal-content {
    width: 40%;
  }
  .input-container {
    position: relative;
    width: 300px;
    margin: auto;
    margin-bottom: 0.5em;
    height: 4em;
}
  .input-container input {
    font-size: 1.7em;
    position: relative;
    width: 100%;
    margin: auto;
    height: 3em;
  }
  #mensajeNombre {
    font-size: 2em;
    width: auto;
  }

  button {
    font-size: 1.5em;
    padding: 0.4em 0.8em;
    margin-top: 2em;
  }

  #marcador {
    font-size: 1.5em;
  }

  #turno {
    font-size: 1em;
    width: max-content;
    padding: 0.1em 0.5em;
    margin: 0.5em auto;
  }

  #jugador,
  #portero {
    width: 45px;
  }

  #balon {
    width: 14px;
    height: 14px;
  }
  input.glass [disabled],
  input.glass:disabled {
    margin: auto;
    top: 1.2em;
    position: relative;
    margin-bottom: 0;
  }
  .jersey-bg {
    position: absolute;
    left: 50%;
    transform: translate(-50%, 1%);
    z-index: -1;
    top: 0;
    width: 100%;
    pointer-events: none;
    transition: 0.3s;
    margin: auto;
  }
  #rivalNombre {
    font-size: 3em;
    display: flex;
    font-weight: bold;
    height: inherit;
}
  #rivalSelection.glass
  {
    width: max-content;
  }
  #pantallaEquipos
  {
    flex-direction: column;
  }
  
  #pantallaRival
  {
    height: auto;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    align-items: center;
    top: 5em;
  }
    #pantallaJuego
  {
    flex-direction: column;
  }
  .container {
    display: flex;
    flex-direction: row;
}
  #pantallaMensajes {
    font-family: monospace;
    font-size: 20px;
    width: 300px;
    height: 200px;
}
  .center,.left, .right
  {
    width: 35px;
  }
  #pantallaJuego.pantalla.glass {
    width: 90%;
    padding: 0.5em;
    top: 5em;
}
.btnPlay
  {        
    width: 300px;
    padding: 0.5em;
    font-size: 2em;
  }
  .contendPantalla
  {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  #tituloResultado
  {
    font-size: 3em;
  }
  #modalResultado .modal-content.modal-perder {
    width: 50%;
  }
   #modalResultado .modal-content.modal-perder #btnReintentar {
    width: 40%;
}
	     #modalResultado .modal-content.modal-ganar #btnReintentar {
	    display: none;
	}
}

/* =========================================================

   📟 TABLET HORIZONTAL

========================================================= */

@media (min-width: 720px) and (max-width: 1180px) and (orientation: landscape) {
  body {
    top: 0;
    position: relative;
    overflow: auto;
  }

  h1 {
    font-size: 4em;
    line-height: 1;
    margin: 0.15em auto 0;
    width: 100%;
  }

  h2,
  h3 {
    font-size: 2em;
    line-height: 1;
    margin: 0.2em 0;
    text-shadow: 1px 0 10px rgba(3, 0, 129, 0.26);
}

  button {
    font-size: 1.35em;
    padding: 0.35em 0.75em;
    margin: 0.25em;
  }

  .input-container {
    width: min(42vw, 340px);
    margin: 0.15em auto 0.35em;
  }

  .input-container input {
    font-size: 1.8em;
    width: 100%;
    margin: auto;
    padding: 0.2em 0.5em;
  }

  input.glass:disabled {
    height: auto;
    min-height: 2em;
    top: 0.9em;
    margin-bottom: 2em;
  }

  .jersey-bg {
    left: 50%;
    top: 0;
    transform: translate(-50%, 0);
    width: min(38vw, 80%);
    z-index: -1;
  }

  #pantallaEquipos,
  #pantallaRival,
  #pantallaJuego.pantalla.glass {
    width: min(94vw, 1000px);
    padding: 0.45em 0.8em;
  }

  #listaEquipos {
    display: grid;
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    gap: 0.4em;
    width: min(94vw, 940px);
    margin: 0 auto;
  }

  #listaEquipos button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    line-height: 1;
    margin: 0;
    padding: 0.3em 0.45em;
    white-space: normal;
  }

  #listaEquipos button img {
    flex: 0 0 auto;
    margin: 0 0.35em 0 0;
    padding-right: 0;
  }

  #rivalNombre {
    font-size: 2.4em;
    line-height: 1;
  }

  .btnPlay {
    width: 240px;
    padding: 0.35em 0.5em;
    font-size: 1.7em;
  }

  #pantallaJuego {
    flex-direction: column;
  }

  #etapa {
    font-size: 1.6em;
    margin: 0;
  }

  .container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 1em;
  }

  .contend,
  .contendPantalla {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  #turno,
  #marcador {
    font-size: 1.05em;
    width: max-content;
    max-width: 46vw;
    padding: 0.1em 0.45em;
    margin: 0.25em auto;
    line-height: 1.15;
    text-shadow: none;
  }

  #pantallaMensajes {
    width: min(38vw, 330px);
    height: 250px;
    font-size: 15px;
  }

  .botones {
    display: flex;
    justify-content: center;
    gap: 0.2em;
  }

  .botones button {
    width: 76px;
    margin: 0.25em;
    padding: 0.45em 0.25em;
  }

  .center,
  .left,
  .right {
    width: 28px;
  }

  .turn-box {
    width: min(84vw, 760px);
  }

  .turn-overlay h2 {
    font-size: 2.3em;
    padding: 0.45em 1.1em;
  }

  .modal-content {
    width: min(62vw, 520px);
    margin: 5% auto;
    padding: 1em;
  }

  .modal-content h2 {
    font-size: 2.8em;
    width: 100%;
  }

  #fraseResultado {
    font-size: 2.1em;
  }

  #modalResultado .modal-content.modal-ganar,
  #modalResultado .modal-content.modal-perder {
    width: min(62vw, 520px);
  }

  #modalResultado .modal-content.modal-perder #btnReintentar {
    width: 50%;
  }

  #ranking {
    font-size: 1.25em;
    margin-bottom: 1em;
  }
  .modal{
    align-content: center;
    overflow: scroll;
  }
}

/* El brillo del username bloqueado solo aplica en la pantalla de equipos. */
#inputJugador.input-container {
  display: none;
}

#inputJugador.input-jugador-equipos .jersey-bg {
  z-index: 0;
}

#inputJugador.input-jugador-equipos #nombre,
#inputJugador.input-jugador-equipos #nombre.glass:disabled {
  position: relative;
  font-size: 40px;
  z-index: 2;
  width: auto;
  height: auto;
  min-height: 0;
  top: 0;
  margin: 0 auto 1em;
  padding: 0.25em 0.7em;
  border-radius: 8px;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(0, 170, 255, 0.9), 0 0 18px rgba(255, 0, 200, 0.65);
  box-shadow:
    0 0 12px rgba(0,170,255,0.55),
    0 0 24px rgba(255,0,200,0.35),
    inset 0 0 10px rgba(255,255,255,0.08);
  opacity: 1;
}

@media (max-width: 719px) {
  #inputJugador.input-jugador-equipos #nombre,
  #inputJugador.input-jugador-equipos #nombre.glass:disabled {
    width: 85%;
  }
}
