body {
  background-image: url(../img/diablo_reflejado.jpg);
  width: 100%;
  height: 100vh;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  font-family: "Ubuntu", sans-serif;
}
.player-button {
  width: 100%;
  margin: 0;
  padding: 10px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  /*transition: all 0.3s ease;*/
  transition: filter 300ms;
  text-align: center;
  background-color: white;
  position: relative;
  overflow: hidden;
}
.player-button.selected {
  background-color: #29b42d;
  color: white;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.player-button.reserve {
  background-color: #0e8bf3;
  color: white;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.player-button:hover {
  filter: drop-shadow(1px 2px 5px rgb(11, 105, 3));
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
.player-button:active {
  transform: translateY(1px);
}
.player-dorsal {
  display: block;
  font-weight: 500;
  margin-bottom: 2px;
}
.player-name {
  display: block;
  font-weight: 500;
  margin-bottom: 2px;
  font-size: 0.85rem;
}
.player-value {
  display: block;
  font-size: 1rem;
  opacity: 0.9;
}
.player-button.selected::before,
.player-button.reserve::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.5);
}
.player-button.selected .player-value,
.player-button.reserve .player-value {
  color: white;
  opacity: 0.9;
}

/* Asegurar que los botones vuelvan a su estado original */
.player-button {
  transition: all 0.3s ease;
}

.player-button:not(.selected):not(.reserve) {
  background-color: white;
  color: initial;
  border: 1px solid #8f028f;
  box-shadow: none;
}

.player-button:not(.selected):not(.reserve) .player-value {
  color: #b4089d;
  font-weight: bold;
}

/* Agregar animación de reset para los botones */
/*@keyframes reset-button {
  0% {
    transform: scale(0.95);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}*/

.player-button.reset {
  animation: reset-button 0.3s ease-out;
}

input,
button {
  margin-top: 10px;
  padding: 8px;
}
.container {
  display: flex;
  gap: 30px;
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}
.column {
  flex: 1;
  padding: 20px;
  border-radius: 8px;
  background-color: #d8e335;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.selection-column {
  max-height: 90vh;
  overflow-y: auto;
  padding: 15px;
}
.team-column {
  position: sticky;
  top: 20px;
}
.team-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.team-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background-color: #fff;
  border-radius: 4px;
}
#teamStatus {
  padding: 8px;
  border-radius: 4px;
  font-weight: bold;
}
#teamStatus.complete {
  background-color: red;
  color: white;
}
#teamStatus.incomplete {
  background-color: #71035d;
  color: white;
}
#teamTable {
  width: 100%;
  border-collapse: collapse;
  background-color: white;
}
#teamTable th,
#teamTable td {
  padding: 10px;
  border: 1px solid #dba5e9;
  text-align: center;
}
#teamTable th {
  background-color: #dba5e9;
}
.team-buttons {
  display: flex;
  gap: 10px;
}
.team-buttons button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  background-color: #b0cbe2;
}
#submitBtn {
  background-color: #f84eec;
  font-weight: 500;
  color: white;
  border-radius: 6px;
  border: 1px solid white;
  transition: all 0.6s;
}
#submitBtn:hover {
  background-color: white;
  border-radius: 6px;
  font-weight: 500;
  color: black;
  border: 2px solid black;
}
#submitBtn:disabled {
  background-color: #f4d7f2;
  border-radius: 6px;
  cursor: not-allowed;
}
.team-stats span {
  background: white;
  padding: 0px 5px;
  border: 2px solid #f84eec;
  font-family: 'Righteous', sans-serif;
  font-size: 1.2rem;
  font-weight: 500;
  color: #f84eec;
}
#limpiar {
  --color: #ca08ce;
    font-family: inherit;
    letter-spacing: 0.06em;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    color: var(--color);
    font-weight: 500;
    line-height: 1.4em;
    transition: all 0.3s;
    border: 2px solid var(--color);
    border-radius: 0.6em;
    background: white;
    box-shadow: inset 0 0 10px rgba(253, 27, 253, 0.4), 0 0 9px 3px rgba(27, 253, 156, 0.1);
}
#limpiar:hover {
  color: white;
  background: var(--color);
  box-shadow: inset 0 0 10px rgba(240, 229, 242, 0.6), 0 0 9px 3px rgba(246, 249, 247, 0.906);
}
#playersGrid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  padding: 10px;
}
.selection-column h2 {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid white;
}
.selection-column::-webkit-scrollbar {
  width: 8px;
}
.selection-column::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}
.selection-column::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}
.selection-column::-webkit-scrollbar-thumb:hover {
  background: #dbe703;
}
.selection-column {
  flex: 1.5;
}
.team-column {
  flex: 1;
}
.team-column h2 {
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid white;
}

/* Media Queries para diferentes dispositivos */
@media screen and (max-width: 1180px) {
  /* Tablet landscape */
  .container {
    padding: 15px;
    gap: 20px;
  }

  #playersGrid {
    grid-template-columns: repeat(4, 1fr); /* 2 columnas en tablet */
  }

  .player-button {
    padding: 8px 2px;
    font-size: 0.90em;
  }
}

@media screen and (max-width: 924px) {
  /* Tablet portrait */
  .container {
    flex-direction: column;
    gap: 15px;
  }
  .player-button {
    padding: 10px 6px;
    font-size: 1.2em;
  }

  .column {
    flex: none;
    width: 100%;
  }

  .selection-column {
    max-height: 50vh;
  }

  .team-column {
    position: static;
  }

  #playersGrid {
    grid-template-columns: repeat(3, 1fr); /* Mantener 2 columnas */
  }
}
#submitBtn {
    font-size: 14px;
  }
@media screen and (max-width: 480px) {
  /* Móvil */
  .container {
    padding: 10px;
  }

  #playersGrid {
    grid-template-columns: repeat(2, 1fr); /* 1 columna en móvil 1fr*/
    gap: 8px;
  }

  .player-button {
    padding: 6px 4px;
    font-size: 1em; /* Aumentar tamaño para mejor legibilidad en móvil */
  }

  .team-info {
    gap: 10px;
  }

  #teamTable {
    font-size: 0.9em;
  }

  #teamTable th,
  #teamTable td {
    padding: 8px 5px;
    width: 100vh;
  }

  .team-buttons {
    flex-direction: column;
    gap: 8px;
  }

  .team-buttons button {
    width: 100%;
  }

  .custom-alert .alert-content {
    width: 95%;
    padding: 15px;
  }
  #submitBtn {
    width: 100%;
    margin-top: 10px;
  }
  .team-stats {
  display: block;
  justify-content: space-between;
  align-items: center;
}
.team-stats span {
  padding: 0 15px;
  margin-left: 10px;
  margin-right: 10px;
}
.team-stats strong {
  margin-left: 60px;
}

}
/* Mejoras para la interacción táctil */
@media (hover: none) {
  .player-button {
    -webkit-tap-highlight-color: transparent;
  }

  .player-button:active {
    transform: scale(0.98);
    background-color: #f0f0f0;
  }
}

/* Orientación landscape en móviles */
@media screen and (max-height: 480px) and (orientation: landscape) {
  .container {
    flex-direction: row;
  }

  .selection-column {
    max-height: 80vh;
    overflow-y: auto;
  }

  #playersGrid {
    grid-template-columns: repeat(3, 1fr);
  }

  .team-column {
    max-height: 80vh;
    overflow-y: auto;
  }
}

/* Ajustes para mejor usabilidad */
input,
button,
select {
  font-size: 16px; /* Previene zoom automático en iOS */
}

/* Mejoras de accesibilidad para touch */
.player-button,
button,
input[type="text"] {
  min-height: 44px; /* Tamaño mínimo para elementos táctiles */
}

/* Optimizaciones de rendimiento */
.player-button {
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Ajustes para la tabla en dispositivos móviles */
@media screen and (max-width: 480px) {
  .team-info table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  /*.team-stats {
    display: block;
    flex-direction: row;
    align-items:center;
  }*/

  #teamStatus {
    width: 100%;
    margin-top: 5px;
    text-align: center;
  }
}

/* Mejoras de rendimiento para scroll */
.selection-column,
.team-column {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Ajustes para notificaciones en móvil */
@media screen and (max-width: 480px) {
  .custom-alert {
    align-items: flex-end;
  }

  .alert-content {
    border-radius: 12px 12px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Agregar estilos para el diálogo */
.custom-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.dialog-content {
  background-color: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  max-width: 400px;
  width: 90%;
}

.dialog-content h3 {
  margin: 0 0 20px 0;
  text-align: center;
  color: #333;
}

.dialog-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.dialog-btn {
  padding: 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1em;
  text-wrap: balance;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.dialog-btn i {
  font-size: 1.5em;
}

.download-btn {
  background-color: #04500a;
  color: white;
  grid-column: span 2;
}

.email-btn {
  background-color: #2196f3;
  color: white;
  grid-column: span 2;
}

.both-btn {
  background-color: #9c27b0;
  color: white;
  grid-column: span 2;
}

.cancel-btn {
  background-color: #fa1707;
  color: white;
  grid-column: span 2;
}

.dialog-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media screen and (max-width: 480px) {
  .dialog-content {
    padding: 20px;
    width: 95%;
  }

  .dialog-buttons {
    grid-template-columns: 1fr;
  }


  .dialog-btn {
    padding: 15px;
    font-size: 16px;
  }
}

/* Agregar estilos para el toast */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  animation: toast-in 0.3s ease-out;
}

.toast-hide {
  animation: toast-out 0.3s ease-in forwards;
}

@keyframes toast-in {
  from {
    transform: translate(-50%, 100%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

@keyframes toast-out {
  from {
    transform: translate(-50%, 0);
    opacity: 1;
  }
  to {
    transform: translate(-50%, 100%);
    opacity: 0;
  }
}

/* Estilos responsivos para el toast */
@media screen and (max-width: 480px) {
  .toast {
    width: 90%;
    text-align: center;
    padding: 15px;
    bottom: env(safe-area-inset-bottom, 20px);
  }
}


/*nuevo pie*/
.footer{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  align-items: flex-start;
  justify-content: center;
}

.footer ul {
  margin: auto;
  list-style: none;
}
.footer ul li p {
  color:#b6c212
}

footer {
  background: #111;
  color: #9f8807a4 !important;
  width: 100%;
  text-align: center;
  padding: 1em;
  align-self: flex-end;
  border-top: 3px solid yellow;
  
}
#tira-novedad {
  color: white;
}

/*Estilos del buscador de contenido*/
.search-container {
  margin: 10px auto;
  max-width: 600px;
  padding: 0 20px;
  }

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  }

.search-box:focus-within {
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transform: translateY(-1px);
  }

.search-icon {
  padding: 0 15px;
  color: #666;
  font-size: 1.2em;
  }

.search-input {
  flex: 1;
  padding: 10px 15px 10px 0;
  border: none;
  outline: none;
  font-size: 1.1em;
  background: transparent;
  }

.clear-search {
  background: none;
  border: none;
  padding: 10px 15px;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.3rem;
  }

.clear-search:hover {
  color: red;
  }

.search-stats {
  margin-top: 10px;
  text-align: center;
  color: white;
  font-size: 1em;
  }

        /* Estilos para los resultados de búsqueda */
        /*.player-button.highlight {
          animation: highlight 1s ease;
        }

        @keyframes highlight {
          0% { background-color: #fff3cd; }
          100% { background-color: white; }
        }*/

        /* Estilos responsivos */
@media screen and (max-width: 480px) {
  .search-container {
    padding: 0 10px;
    }

  .search-input {
    font-size: 1em;
    padding: 12px 12px 12px 0;
    }

  .search-icon {
    padding: 0 10px;
    }
 }
/*Agregar estilos para la alerta y el campo de error*/

.custom-alert {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
        }

.alert-content {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 400px;
  width: 90%;
  text-align: center;
}

.alert-content h3 {
  margin-top: 0;
  color: #ff5722;
}

.alert-content button {
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 15px;
}

.alert-content button:hover {
  background-color: #45a049;
}

.input-error {
  border: 2px solid #ff5722 !important;
  animation: shake 0.5s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

#teamName {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
        }

#teamName:focus {
  outline: none;
  border-color: #4CAF50;
}
input::placeholder {
  color: #2196f3;
}

    