@font-face {
  font-family: 'Freshman';
  src: url('fonts/Freshman.ttf') format('truetype');
}

body {
  background: linear-gradient(180deg, #00215E, #001436);
  color: white;
  font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}



.header {
  display: flex;
  align-items: center;
  justify-content: flex-start; /* 👈 izquierda */
  gap: 12px;
  padding: 10px 16px;
  background-color: #0b1c2d;
  text-align: left;
}

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: center; /* centrado por defecto */
}

.logo-subtitle {
  font-family: 'Oswald', sans-serif;
  font-size: 1.50rem;
  color: #FFD700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}


/* Mobile: un pelín más grande */
@media (max-width: 768px) {
  .logo-subtitle {
    font-size: 0.8rem;
  }
}



.titulo-principal {
  text-align: center;
  margin-top: 15px;
  font-family: 'Impact', 'Arial Black', sans-serif;
}

.titulo-principal h1 {
  font-size: 3em;
  font-weight: bold;
  margin-bottom: 8px;
  color: #06080a; /* Azul Boca */
  text-shadow: 3px 3px 0 #fcbf00, 5px 5px 0 #000000; /* Amarillo y un toque de sombra negra */
  letter-spacing: 2px;
}

.titulo-principal p {
  font-size: 1.3em;
  font-weight: bold;
  color: #f7ae03; /* Amarillo Boca */
  text-shadow: 2px 2px 0 #0033a0, 4px 4px 0 #000000; /* Azul y sombra negra */
  letter-spacing: 1px;
}

  #contenedor {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin: 20px;
    max-width: 1100px;
    width: 100%;
    box-sizing: border-box;
  }
  #formacionSelector {
    flex: 1;
    max-width: 220px;
    display: flex;
    flex-direction: column;
  }
  #formacionSelector label {
    font-weight: 700;
    font-size: 1.1em;
  }
  #formacionSelector select,
  #formacionSelector input[type="text"] {
    margin-top: 8px;
    width: 100%;
    font-size: 1em;
    border-radius: 6px;
    border: none;
    padding: 8px;
    font-weight: 500;
    box-sizing: border-box;
  }
  #formacionSelector button {
    margin-top: 12px;
    width: 100%;
    font-weight: 700;
    padding: 12px;
    background-color: #F5B041;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }
  #formacionSelector button:hover {
    background-color: #d59431;
  }
  #formacionSelector button.firebase-btn {
    background-color: #1A73E8;
    color: white;
  }
  #formacionSelector button.firebase-btn:hover {
    background-color: #155cb0;
  }

#cancha {
  position: relative;
  flex: 3;
  background-color: #004400;
  border: 3px solid #F5B041; /* tu borde amarillo */
  border-radius: 14px;
  height: 650px;
  min-width: 480px;
  box-shadow: 0 0 10px #F5B041;
  overflow: hidden; /* para que nada se salga de la cancha */
}

/* Línea de mitad de cancha */
#cancha::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  border-top: 2px solid white;
}

/* Círculo central */
#cancha::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80px;   /* tamaño del círculo, podés ajustar */
  height: 80px;
  border: 2px solid white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}


#titulo-equipos { 
  background-color: #003060;
  color: #F5B041;
  padding: 10px 20px;
  border-radius: 8px;
  text-align: center;
  font-weight: 700;
  font-size: 1.5em;
  margin-bottom: 15px;
}


.posicion {
  position: absolute;
  background-color:  transparent;
  color: transparent;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.85em;
  font-weight: 700;
  width: auto;           /* ancho automático según el contenido */
  min-width: 80px;       /* opcional, evita que se achique demasiado */
  max-width: 180px;      /* opcional, limita extremos para no romper la cancha */
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-sizing: border-box;
  box-shadow: 0 0 6px rgba(0,0,0,0.4);
  white-space: nowrap;   /* evita salto de línea */
  text-align: center;    /* centra el texto */
  transform: translate(-50%, -50%); /* mantiene centrado en la posición */
}

  .posicion label {
    font-size: 0.75em;
  }
  select.jugador-select {
    font-size: 0.85em;
    border-radius: 6px;
    border: 1px solid #ccc;
    padding: 6px 8px;
    font-weight: 500;
  }

  
  #equipos-enviados {
    background-color: #001B3D;
    padding: 20px 30px;
    width: 100%;
    max-width: 1100px;
    box-sizing: border-box;
    border-radius: 14px;
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
  }
  #equipos-enviados h2 {
    color: #cad101;
    width: 100%;
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
    font-weight: 700;
    font-size: 1.5em;
  }

  .equipo-container {
    background-color: #080044fa;
    border-radius: 12px;
    padding: 15px 20px;
    width: 340px;
    margin: 12px 22px;
    box-sizing: border-box;
    box-shadow: 0 0 10px #F5B041AA;
    display: flex;
    flex-direction: column;
    align-items: center;
}

  

 .info-partido {
  background-color: #080044fa; /* azul intenso */
  padding: 4px 6px;         /* 🔽 menos padding → menos alto */
  border-radius: 4px;       /* 🔽 esquinas un poco más chicas */
  color: rgb(211, 226, 9);
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;         /* 🔽 menos pesado → menos "grita" */
  font-size: 0.8em;        /* 🔽 más chico para compactar */
  text-align: center;
  margin-bottom: 0.3rem;    /* 🔽 menos espacio debajo */
  line-height: 1.1;         /* 🔽 reduce el espacio entre líneas */
}



.mini-cancha {
  position: relative;
  width: 300px;
  height: 380px;
  margin-bottom: 15px;
  padding: 12px;

  /* 🌱 Césped con franjas COMPATIBLE con descarga */
  background-color: #0c5a31;
  background-image: linear-gradient(
    180deg,
    rgba(255,255,255,0.06) 50%,
    rgba(0,0,0,0.08) 50%
  );
  background-size: 100% 80px;

  border: 2px solid #ffffff;
  border-radius: 10px;
  box-shadow: none;

  display: flex;
  flex-direction: column;
  justify-content: center;
  perspective: 900px;
  transform: rotateX(20deg)scale(1.03);
  transform-origin: center;
}




.mini-cancha::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.7);
}

.mini-cancha .fila {
    display: flex;
    justify-content: center;
    gap: 40px; /* Aumentamos separación horizontal */
    margin: 12px 0; /* Aumentamos separación vertical */
}

.mini-cancha .jugador {
    background-color: #004400; 
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
    box-shadow: none;
}

.mini-cancha::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: bold;
  color: rgba(242, 255, 0, 0.85); /* Amarillo dorado con leve transparencia */
  pointer-events: none; /* No molesta */
}


  .mini-posicion {
  position: absolute;
  background: transparent !important;   /* 🔥 CLAVE */
  color: #fff;
  border-radius: 0;
  padding: 0 !important;                 /* 🔥 CLAVE */
  font-size: 0.7em;
  font-weight: 700;
  width: auto;
  min-width: 0;
  max-width: none;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: visible;
  text-align: center;
  transform: translate(-50%, -50%)scale(1.02); 
}


  .mini-posicion label {
    display: none;
}
  .mini-posicion span {
    display: block;
    margin-top: 3px;
  }

.mini-cancha .mini-carta-jugador {
  background: transparent;
  padding: 0;
  margin: 0;
  border-radius: 0;
  box-shadow: none;

  display: flex;
  flex-direction: column;
  align-items: center;

  transform:
    translateZ(60px)
    scale(1.45)
    scaleY(1.35);

  transform-origin: center bottom;
}



.mini-cancha .mini-foto-jugador {
  width: 100px;
  height: 200px;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.55));
}


.mini-cancha .mini-nombre-jugador {
  margin-top: 2px;
  font-size: 0.55em;
  font-weight: bold;
  color: #ffffff;
  background: transparent;
  padding: 0;
  border-radius: 0;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,0.7); /* 👈 opcional, queda FIFA */
}


  
/* Estilos para 11 ideal */
#once-ideal {
  background-color: #001B3D;
  width: 100%;
  max-width: 1100px;
  box-sizing: border-box;
  border-radius: 14px;
  margin-top: 40px;
  padding: 20px 30px;
  margin-bottom: 70px;
}



#once-ideal h2 {
  text-align: center;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  animation: brilloOnce 2.5s infinite;
}

@keyframes brilloOnce {
  0% { text-shadow: 0 0 6px #F5B041; }
  50% { text-shadow: 0 0 14px #FFD700; }
  100% { text-shadow: 0 0 6px #F5B041; }
}


#once-ideal h3 {
  text-align: center;
  font-weight: normal; /* opcional, si no lo querés tan marcado */
  margin-top: 5px;     /* podés ajustar el espacio */
  color: #F5B041; 
}

.once-ideal-titulo {
  display: flex;
  flex-direction: column; /* 🔑 logo arriba, texto abajo */
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  text-align: center;
}

.logo-once-ideal {
  height: 100px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(245,176,65,0.8));
}

/* Mobile */
@media (max-width: 480px) {
  .logo-once-ideal {
    height: 34px;
  }
}



#cancha-ideal {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 2 / 2.5;
  max-height: none;
  margin: 0 auto;
  position: relative;
  border-radius: 14px;
  border: 3px solid white;

  /* 🌱 CÉSPED CSS + LÍNEA CENTRAL */
  background:
  linear-gradient(white 2px, transparent 2px),
  repeating-linear-gradient(
    to bottom,
    #1e7f32 0px,
    #1e7f32 70px,
    #1b6e2c 70px,
    #1b6e2c 140px
  );
  background-size: 100% 2px, auto;
  background-position: center, center;
  background-repeat: no-repeat, repeat;

  /* 📐 Perspectiva */
  transform: perspective(1200px) rotateX(14deg);
  transform-style: preserve-3d;

  /* 🎥 Profundidad */
  box-shadow:
    inset 0 0 35px rgba(0,0,0,0.35),
    0 10px 25px rgba(0,0,0,0.5);
}



/* Círculo central */
#cancha-ideal::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60px;
  height: 60px;
  border: 2px solid white;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* Texto superior (ej: web) */
#cancha-ideal::after {
  content: "";
  position: absolute;
  top: 2%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  color: rgba(238, 207, 4, 0.87);
  font-weight: bold;
  pointer-events: none;
  white-space: nowrap;
  z-index: 0; /* detrás de los jugadores */
}

/* Arco inferior */
#cancha-ideal .arco-inferior {
  content: "";
  position: absolute;
  bottom: 2%;
  left: 50%;
  width: 80px;
  height: 8px;
  border: 2px solid white;
  border-radius: 40px 40px 0 0;
  transform: translateX(-50%);
}

/* ------------------------- */
/* POSICIÓN IDEAL - CANCHA   */
/* ------------------------- */

/* Media query para pantallas muy pequeñas */
@media (max-width: 480px) {
  #cancha-ideal {
    width: 100%;
    aspect-ratio: 2 / 4;           /* cancha más larga */
    max-height: calc(100vh - 200px); /* no invada otras secciones */
    height: auto;
    margin-bottom: 20px;           /* espacio seguro con sección inferior */
    position: relative;
    overflow: hidden;
  }

  #cancha-ideal::before {
    width: 50px;
    height: 50px;
  }

  #cancha-ideal::after {
    font-size: 12px;
    top: 5px;
  }

  #cancha-ideal .arco-inferior {
    width: 70px;
    height: 8px;
  }

  #cancha-ideal .posicion-ideal {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transform: translate(-50%, -50%);
    min-width: max-content;   /* 🔑 el contenedor se adapta al apellido */
}

#cancha-ideal .posicion-ideal span {
    margin-top: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.9);

    white-space: nowrap;      /* 🔑 no se parte en varias líneas */
    overflow: visible !important; /* 🔑 nunca lo corta */
}


}




.posicion-ideal {
  position: absolute;
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;

  transform: translate(-50%, -50%) translateZ(70px);
 
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 10;
}

.posicion-ideal img {
  width: 80px;   /* antes 55px */
  height: 80px;  /* antes 55px */
  border-radius: 50%;
  object-fit: cover;
  border: none;

  /* ✨ PROFUNDIDAD */
  filter: drop-shadow(0 14px 16px rgba(0, 0, 0, 0.65));
}


.posicion-ideal span {
  margin-top: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  color: white; /* 🔹 Apellido en blanco */
  text-shadow: 0 1px 3px rgba(0,0,0,0.8); /* mejor contraste sobre césped */
  white-space: nowrap; /* en escritorio, apellido en una línea */
  overflow: visible;
  text-overflow: clip;
}

/* Oculta los labels de posición (Vol1, Vol2, etc.) */
.posicion-ideal label,
.posicion-ideal .posicion-texto {
  display: none !important;
}


  #equipos-firebase {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding: 0.5rem;
}


@media (max-width: 768px) {
  #equipos-firebase {
    grid-template-columns: 1fr;
  }
}

.boton-me-gusta {
  background: linear-gradient(90deg, #0033A0 0%, #FFC72C 100%);
  border: none;
  color: #fff;
  padding: 6px 12px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  margin-top: 10px;
  transition: 0.3s ease;
  user-select: none;

  align-self: center; /* 🔥 clave */
}

.boton-me-gusta:hover {
  background: linear-gradient(90deg, #00277A 0%, #FFB800 100%);
}



.boton-compartir {
  background-color: #F5B041;
  color: #00215E;
  border: none;
  padding: 6px 12px;
  margin-top: 6px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.boton-compartir:hover {
  background-color: #d59431;
}
#modal-russo {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;              /* inicia invisible */
  transition: opacity 0.5s; /* transición de fade */
  pointer-events: none;    /* evita clics cuando está invisible */
  z-index: 9999;
}
 
#notas-jugadores {
  margin-top: 10px;
  background: #f9f9f9;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

/* Estilo para la lista */
#notas-jugadores ul {
  list-style-type: disc;
  padding-left: 20px;
  margin: 0;
}

#notas-jugadores li {
  margin-bottom: 4px;
}

.titulo-filtro {
  display: block;
  text-align: center;
  font-weight: 700;
  font-size: 1.1em;
  color: #F5B041; /* amarillo Boca */
  margin-bottom: 10px;
  font-family: 'Montserrat', sans-serif;
}

.select-filtro {
  display: block;
  margin: 0 auto 15px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 2px solid #F5B041;
  background-color: #001B3D; /* azul Boca */
  color: #F5B041;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  min-width: 140px;
  transition: all 0.3s ease;
}

.select-filtro:hover {
  background-color: #003080;
  border-color: #FFC72C;
}

.select-filtro option {
  color: #001B3D;
  background-color: #F5B041;
  font-weight: 600;
}

details {
  background-color: #000450; /* Azul Boca */
  border: 2px solid #ffcc00; /* Borde amarillo */
  border-radius: 8px;
  padding: 10px;
  margin: 10px 0;
  color: white;
  font-family: Arial, sans-serif;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

details[open] {
  background-color: #0044cc; /* Azul más claro cuando está abierto */
}

summary {
  font-weight: bold;
  cursor: pointer;
  list-style: none;
  color: #ffcc00; /* texto amarillo para el título */
}

summary::-webkit-details-marker {
  display: none; /* saca el triangulito default */
}

summary::before {
  content: "▶ "; /* icono flecha cerrada */
  color: #ffcc00;
  font-size: 14px;
}

details[open] summary::before {
  content: "▼ "; /* icono flecha abierta */
  color: #ffcc00;
}

@media (max-width: 768px) {
  #contenedor {
    flex-direction: column; /* formulario arriba, cancha abajo */
  }

  #formacionSelector {
    order: 1; 
    max-width: 100%; 
  }

  #cancha {
    order: 2; 
    min-width: auto; 
    width: 100%;       /* ocupa todo el ancho disponible */
    height: auto;      /* se ajusta automáticamente */
    aspect-ratio: 1 / 1; /* mantiene proporción cuadrada */
  }
}

@media (max-width: 768px) {
  /* Ajuste general del contenedor de 11 ideal */
  #once-ideal {
    width: 100%;       /* ocupa todo el ancho del dispositivo */
    height: auto;      /* altura automática */
    aspect-ratio: 1 / 1; /* mantiene proporción cuadrada si querés */
    margin: 10px 0;
    padding: 10px;
    box-sizing: border-box;
  }

  /* Si tenés un título dentro */
  #once-ideal h2,
  #once-ideal h3 {
    font-size: 1.2em;  /* más chico para mobile */
    text-align: center;
  }

  /* Ajuste de la cancha interna (si #cancha-ideal es el contenedor de los jugadores) */
  #cancha-ideal {
    width: 100%;
    height: 100%;
    position: relative;
  }

  /* Ajuste de las cartas de jugadores si las tenés */
  #cancha-ideal .carta-jugador {
    width: 12%;       /* más pequeño para que entren en mobile */
    height: auto;
  }
}

.carta-jugador {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #0b2f1a; /* mismo verde oscuro que la cancha */
  border-radius: 12px;
  padding: 2px;             /* Reduce espacio interno */
  width: 55px;              /* Más compacto */
  text-align: center;
  box-shadow: none !important;        /* 🔥 elimina sombra */
}

.carta-jugador img.foto-jugador {
  width: 70px;   /* antes 70px */
  height: 90px;
  border-radius: 10%;
  object-fit: contain; /* cambia cover por contain para no recortar */
  object-position: center;
  margin-bottom: 4px;
  background: transparent !important; /* 🔥 asegura PNG sin fondo */
  object-fit: contain;                /* para que no recorte silueta */
}

.carta-jugador .nombre-jugador {
  font-weight: 700;
  font-size: 0.95em;
  color: #ffffff;                 /* letras blancas */
  background: transparent;        /* 🔥 sin fondo */
  padding: 0;                     /* 🔥 sin caja */
  border-radius: 0;
  white-space: nowrap;
  text-align: center;

  /* mejora legibilidad sobre césped */
  text-shadow: 
    0 1px 2px rgba(0,0,0,0.9),
    0 0 6px rgba(0,0,0,0.6);
}



.carta-jugador label {
  font-size: 0.6em;
  color: #0f0b0b;
}

/* Ajuste para móviles */
@media (max-width: 600px) {
  .carta-jugador {
    width: 50px;
    padding: 2px;
  }

  .carta-jugador img.foto-jugador {
    width: 55px;
    height: 75px;
  }

  .carta-jugador .nombre-jugador {
    font-size: 0.6rem;
  }



  .posicion-ideal span {
    display: block !important; /* 🔥 vuelve a mostrarlos */
    font-size: 0.7rem;
    white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
  }
}



/* Contenedor principal */
#historial-partidos {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: #001B3D; /* Azul Boca */
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
  color: white;
  font-family: 'Montserrat', sans-serif;
  gap: 20px;
}

/* Cada equipo */
#historial-partidos .equipo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

/* Escudos */
#historial-partidos img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

/* Círculos */
#historial-partidos .circulo {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background-color: #F5B041; /* Amarillo Boca */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
  font-weight: bold;
  color: #001B3D; /* Azul oscuro */
  box-shadow: 0 0 8px rgba(0,0,0,0.4);
}

/* Empates al centro */
#historial-partidos .empates {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#historial-partidos .empates span {
  margin-top: 5px;
  font-size: 0.9em;
  color: #ccc;
}



/* Áreas grandes */
#cancha .area-superior,
#cancha .area-inferior {
  position: absolute;
  left: 25%;        /* centradas en el ancho de la cancha */
  width: 50%;       /* ancho del área grande */
  height: 20%;      /* alto del área grande */
  border: 2px solid white;
}

#cancha .area-superior {
  top: 0;
  border-top: none;
}

#cancha .area-inferior {
  bottom: 0;
  border-bottom: none;
}

/* Áreas chicas */
#cancha .chica-superior,
#cancha .chica-inferior {
  position: absolute;
  left: 37%;       /* más angostas que el área grande */
  width: 26%;
  height: 8%;
  border: 2px solid white;
}

#cancha .chica-superior {
  top: 0;
  border-top: none;
}

#cancha .chica-inferior {
  bottom: 0;
  border-bottom: none;
}

/* Áreas grandes */
#cancha-ideal .area-superior,
#cancha-ideal .area-inferior {
  position: absolute;
  left: 25%;        /* centradas en el ancho */
  width: 50%;       /* ancho del área grande */
  height: 20%;      /* alto del área grande */
  border: 2px solid white;
}

#cancha-ideal .area-superior {
  top: 0;
  border-top: none;
}

#cancha-ideal .area-inferior {
  bottom: 0;
  border-bottom: none;
}

/* Áreas chicas */
#cancha-ideal .chica-superior,
#cancha-ideal .chica-inferior {
  position: absolute;
  left: 37%;       /* más angostas */
  width: 26%;
  height: 8%;
  border: 2px solid white;
}

#cancha-ideal .chica-superior {
  top: 0;
  border-top: none;
}

#cancha-ideal .chica-inferior {
  bottom: 0;
  border-bottom: none;
}

/* Camiseta de Boca en cada posición */
.camiseta-posicion {
  position: absolute;
  top: 10%;            /* más arriba para no tapar label/select */
  left: 50%;
  width: 60px;         /* tamaño desktop */
  height: 100px;
  transform: translate(-50%, -50%);
  z-index: 1;          /* detrás de label y select */
  pointer-events: none; /* no interfiere con clicks */
}

/* Ajusta label y select para estar por encima */
.posicion label,
.posicion select {
  position: relative;
  z-index: 2;          /* encima de la camiseta */
  display: block;
  text-align: center;
  margin-top: 2px;
}

/* Responsive: para pantallas pequeñas */
@media (max-width: 480px) {
  .camiseta-posicion {
    width: 45px;
    height: 45px;
    top: 35%;           /* sube un poco más en mobile */
  }

  .posicion select {
    font-size: 0.7em;
    width: 70px;
  }

  .posicion label {
    font-size: 0.65em;
  }
}

.mini-carta-jugador {
  background: transparent !important;
  padding: 0 !important;
  width: auto;
  border-radius: 0;
  box-shadow: none !important;
  border: none !important;
}

.mini-carta-jugador img.mini-foto-jugador {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: contain;
  background: transparent !important;
  box-shadow: none !important;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
}



.mini-carta-jugador .mini-nombre-jugador {
  margin-top: 2px;
  background: transparent !important;
  padding: 0;
  border-radius: 0;

  font-weight: 700;
  font-size: 0.5rem;
  color: white;

  text-shadow:
    0 1px 2px rgba(0,0,0,0.9),
    0 0 6px rgba(0,0,0,0.6);

  white-space: nowrap;
}

.logo {
  height: 135px;
  width: auto;
}

@media (max-width: 768px) {
  .logo {
    height: 75px;
  }
}

@media (max-width: 480px) {
  .logo {
    height: 75px;
  }
}

.equipo-header {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}

.logo-equipo-enviado {
  width: 50px;
  height: auto;
  opacity: 0.9;
}


.contenedor-voto {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
}

/* Nombres en MAYÚSCULA – once ideal y equipos enviados */
.carta-jugador .nombre-jugador,
.mini-nombre-jugador {
  text-transform: uppercase;
  letter-spacing: 0.5px; /* opcional, queda más prolijo */
}

/* 🔥 ONCE IDEAL – jugadores flotando */
#cancha-ideal .carta-jugador {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.mini-cancha-wrap {
  perspective: 1000px;
}

.match-banner {
  width: 100%;
  padding: 35px 0;
  text-align: center;
  background: radial-gradient(circle at center, #002a75 0%, #001436 70%);
  position: relative;
  overflow: hidden;
}

/* Efecto brillo animado */
.match-banner::before {
  content: "";
  position: absolute;
  top: -100%;
  left: -50%;
  width: 200%;
  height: 300%;
  background: linear-gradient(120deg, transparent, rgba(255,215,0,0.15), transparent);
  transform: rotate(25deg);
  animation: shine 6s infinite linear;
}

@keyframes shine {
  0% { transform: translateX(-100%) rotate(25deg); }
  100% { transform: translateX(100%) rotate(25deg); }
}

.match-title {
  color: #FFD700;
  font-size: 24px;
  letter-spacing: 4px;
  margin-bottom: 25px;
  text-shadow: 0 0 15px rgba(255,215,0,0.6);
}

.match-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 2;
}

.match-escudo {
  width: 70px;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

.match-escudo:hover {
  transform: scale(1.12);
  filter: drop-shadow(0 15px 25px rgba(0,0,0,0.7));
}

/* Luz central dorada */
.match-glow {
  width: 6px;
  height: 100px;
  background: linear-gradient(to bottom, transparent, #FFD700, transparent);
  border-radius: 3px;
  box-shadow: 0 0 20px rgba(255,215,0,0.7);
}

.match-countdown {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
  color: white;
  font-family: 'Montserrat', sans-serif;
}

.match-countdown div {
  background: rgba(0,0,0,0.4);
  padding: 10px 14px;
  border-radius: 12px;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  text-align: center;
  min-width: 55px;
}

.match-countdown span {
  font-size: 28px;
  font-weight: bold;
  color: #FFD700;
  display: block;
}

.match-countdown small {
  font-size: 12px;
  letter-spacing: 1px;
  opacity: 0.8;
}


.seccion {
  display: none;
}

.seccion.active {
  display: block;
}

.carta-puntuacion {
  background: #0A1E3F;
  border: 2px solid #FFD700;
  border-radius: 12px;
  padding: 10px;
  margin: 10px;
  text-align: center;
  display: inline-block;
  width: 140px;
}

.foto-puntuar {
  width: 75px;           /* un poco más chica */
  height: 75px;
  object-fit: contain;   /* 👈 muestra la imagen completa */
  background-color: #0A1E3F; /* relleno si sobra espacio */
  border-radius: 50%;
  margin-bottom: 5px;
}

.nombre-puntuar {
  font-size: 14px;
  margin-bottom: 5px;
  color: white;
}

.select-nota {
  padding: 4px;
  border-radius: 6px;
}

/* CONTENEDOR GENERAL DE LA PANTALLA INICIAL */
.tabs {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: all 0.5s ease;
}

/* 👉 CUANDO YA SE HIZO CLICK EN UNA SECCIÓN */
.tabs.modo-seccion {
  min-height: auto;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
}

/* LOGO */
.logo-principal {
  width: 100px;
  margin-bottom: 60px;
  transition: all 0.5s ease;
}

/* 👉 LOGO MÁS CHICO CUANDO SE ENTRA A UNA SECCIÓN */
.tabs.modo-seccion .logo-principal {
  width: 60px;
  margin-bottom: 0;
}

/* BOTONES */
.tab-btn {
  width: 85%;
  max-width: 500px;
  padding: 30px;
  margin: 20px 0;

  font-family: 'Freshman', sans-serif;   /* 👈 ESTA LÍNEA */
  font-size: 26px;
  font-weight: bold;

  border-radius: 20px;
  border: none;

  cursor: pointer;
  transition: all 0.3s ease;

  background: linear-gradient(135deg, #00215E, #FDB913);
  color: #00215E;

  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.tab-btn:hover {
  transform: scale(1.05);
}

/* 👉 BOTONES MÁS CHICOS EN MODO SECCIÓN */
.tabs.modo-seccion .tab-btn {
  width: auto;
  max-width: none;
  padding: 12px 25px;
  font-size: 16px;
  margin: 0;
  border-radius: 12px;
}

#puntuar h2 {
  text-align: center;
  font-size: 28px;
  color: #f0bd06;
  padding: 15px;
  border-radius: 8px;
  margin: 20px auto;
  width: fit-content;
  font-family: 'Oswald', sans-serif;
}

#btn-enviar-puntajes {
  display: block;
  margin: 20px auto;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: bold;
  background: #FFD700;
  color: #00215E;
  border: none;
  border-radius: 8px;
  cursor: not-allowed;
  opacity: 0.6;
  transition: all 0.3s ease;
}

#btn-enviar-puntajes:not(:disabled) {
  cursor: pointer;
  opacity: 1;
}


.aclaracion-puntajes {
  font-size: 13px;
  opacity: 0.7;
  text-align: center;
  margin-top: 8px;
  font-style: italic;
}


#ranking-actual,
#ranking-historial {
  max-width: 620px;
  margin: 25px auto;
  font-family: 'Oswald', sans-serif;
  color: white;
}

/* fila ranking */

.ranking-item{
  display:flex;
  align-items:center;
  gap:14px;
  padding:12px 14px;
  border-radius:10px;
  margin-bottom:7px;
  background:rgba(255,255,255,0.05);
  transition:all .25s ease;
}

.ranking-item:hover{
  background:rgba(255,255,255,0.10);
  transform:translateY(-2px);
}

/* posición */

.ranking-posicion{
  font-size:18px;
  font-weight:600;
  width:30px;
  text-align:center;
}

/* avatar jugador */

.ranking-avatar{
  width:44px;
  height:44px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.ranking-avatar img{
  width:44px;
  height:auto;
  object-fit:contain;
  display:block;
}

/* nombre */

.ranking-nombre{
  flex:1;
  font-size:16px;
  font-weight:500;
  letter-spacing:.3px;
}

/* promedio */

.ranking-promedio{
  font-size:18px;
  font-weight:700;
  color:#ffd700;
}

/* TOP 3 fondos */

.ranking-item.top1{
  background:linear-gradient(90deg, rgba(255,215,0,0.25), rgba(255,215,0,0.05));
}

.ranking-item.top2{
  background:linear-gradient(90deg, rgba(192,192,192,0.25), rgba(192,192,192,0.05));
}

.ranking-item.top3{
  background:linear-gradient(90deg, rgba(205,127,50,0.25), rgba(205,127,50,0.05));
}

/* colores posición */

.ranking-item.top1 .ranking-posicion{
  color:#ffd700;
}

.ranking-item.top2 .ranking-posicion{
  color:#c0c0c0;
}

.ranking-item.top3 .ranking-posicion{
  color:#cd7f32;
}

/* corona líder */

.ranking-item.top1 .ranking-posicion::before{
  content:"👑 ";
}

/* animación entrada */

.ranking-item{
  animation: aparecer 0.4s ease;
}

@keyframes aparecer{
  from{
    opacity:0;
    transform:translateY(10px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

.ranking-partido{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;

  font-family:'Oswald', sans-serif;
  font-size:18px;
  font-weight:600;

  padding:8px 14px;
  margin-bottom:14px;

  background:linear-gradient(90deg,#001c54,#00308f,#001c54);
  border-radius:10px;

  box-shadow:0 0 8px rgba(0,80,255,0.6);

  width:fit-content;
  margin-left:auto;
  margin-right:auto;
}

.ranking-escudo{
  width:44px;
  height:44px;
  object-fit:contain;
}

.ranking-boca{
  color:#f5c542;
  letter-spacing:1px;
}

.ranking-rival{
  color:white;
  letter-spacing:1px;
}

.ranking-vs{
  opacity:0.8;
  font-weight:400;
}

@media (max-width: 768px) {

  /* Agrandar la cancha del once ideal */
  #cancha-ideal .mini-cancha {
    height: 520px !important;
    padding-top: 40px;
    padding-bottom: 40px;
  }

  /* Separar un poco más las posiciones */
  #cancha-ideal .posicion-ideal {
    transform: translate(-50%, -50%) scale(0.9);
  }

}

#btn-iniciar-votacion{
background:linear-gradient(135deg,#1f3c88,#2f5cff);
color:white;
border:none;
padding:14px 28px;
font-size:18px;
font-weight:bold;
border-radius:12px;
cursor:pointer;
display:block;
margin:20px auto;
box-shadow:0 6px 15px rgba(0,0,0,0.3);
transition:all 0.25s ease;
}

#btn-iniciar-votacion:hover{
transform:translateY(-2px);
box-shadow:0 10px 20px rgba(0,0,0,0.4);
background:linear-gradient(135deg,#2f5cff,#4f7cff);
}

#btn-iniciar-votacion:active{
transform:scale(0.97);
}


#carta{
display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
background:#0f1a2b;
border-radius:20px;
padding:30px;
max-width:320px;
margin:30px auto;
box-shadow:0 10px 25px rgba(0,0,0,0.4);
animation:aparecerCarta 0.4s ease;
}

#carta-img{
width:200px;
height:200px;
object-fit:contain;
margin-bottom:15px;
}

#carta-nombre{
color:white;
font-size:22px;
font-weight:bold;
margin-bottom:20px;
text-align:center;
}

#carta div{
display:grid;
grid-template-columns:repeat(5,1fr);
gap:10px;
}

#carta button{
background:#1f3c88;
color:white;
border:none;
border-radius:8px;
padding:10px;
font-size:16px;
cursor:pointer;
transition:0.2s;
}

#carta button:hover{
background:#2f5cff;
transform:scale(1.05);
}

@keyframes aparecerCarta{
from{
opacity:0;
transform:translateY(20px);
}
to{
opacity:1;
transform:translateY(0);
}
}
