/* ESTILOS ESPECÍFICOS PARA TENIS POR PAREJAS */

/* Tema específico para tenis por parejas */
body.theme-tenis-parejas {
  background: linear-gradient(135deg, #9b59b6, #3498db, #2ecc71);
}

/* Reloj con color específico */
.clock-container-tenis {
  background-color: rgba(155, 89, 182, 0.8);
}

/* Reglas del juego - diseño específico */
.game-rules-tenis {
  color: #ffd700;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.game-rules-tenis i {
  color: var(--warning-color);
}

/* Información del set actual */
.current-set-info-tenis {
  background-color: rgba(255, 255, 255, 0.1);
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  font-size: 1rem;
}

/* Scoreboard */
.scoreboard-tenis {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  gap: 20px;
}

/* Equipo individual */
.team-tenis {
  flex: 1;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Cabecera del equipo con nombre y saque */
.team-header-tenis {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
  width: 100%;
}

/* Nombre del equipo/pareja */
.team-name-tenis {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 5px;
  color: var(--light-color);
  cursor: pointer;
  transition: var(--transition);
}

.team-name-tenis:hover {
  color: #ffd700;
}

/* Editable styling */
.team-name-tenis.editable {
  border-bottom: 2px dashed rgba(255, 255, 255, 0.5);
}

.team-name-tenis.editable:hover {
  border-bottom-color: #ffd700;
}

/* Contenedor de jugadores */
.players-container {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 15px;
  width: 100%;
}

/* Nombre de jugador individual */
.player-name {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: var(--transition);
  padding: 3px 8px;
  border-radius: 4px;
}

.player-name:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #ffd700;
}

.player-name.editable {
  border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
}

/* Indicador de saque */
.serve-indicator {
  color: rgba(255, 255, 255, 0.3);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
}

.serve-indicator.active {
  color: #ffd700;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
  border-color: #ffd700;
  animation: pulse 1.5s infinite;
  background-color: rgba(255, 215, 0, 0.1);
}

.serve-indicator:hover {
  color: #f39c12;
  transform: scale(1.1);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
  }
}

/* Puntaje principal */
.score-tenis {
  font-size: 3rem;
  font-weight: bold;
  margin: 15px 0;
  color: var(--light-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Puntaje de tie-break */
.tie-break-score {
  font-size: 1.5rem;
  color: var(--warning-color);
  margin-top: 10px;
  font-weight: bold;
}

/* Display de juegos ganados */
.games-display-tenis {
  font-size: 1.1rem;
  margin: 10px 0;
  color: var(--light-color);
  text-align: center;
}

.games-display-tenis strong {
  color: #ffd700;
  margin-right: 5px;
}

.games-display-tenis span {
  font-weight: bold;
  font-size: 1.3rem;
}

/* Contenedor de sets */
.sets-container-tenis {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* Set individual */
.set-box-tenis {
  width: 35px;
  height: 35px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--light-color);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Set ganado */
.set-won-tenis {
  background-color: #2ecc71 !important;
  color: white !important;
}

/* Controles de puntaje */
.score-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* Botones principales */
.btn-primary {
  background-color: #2ecc71;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: var(--transition);
  min-width: 80px;
}

.btn-primary:hover {
  background-color: #27ae60;
  transform: translateY(-2px);
}

.btn-primary:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
  transform: none;
}

/* Botones secundarios */
.btn-secondary {
  background-color: #f39c12;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  transition: var(--transition);
  min-width: 80px;
}

.btn-secondary:hover {
  background-color: #e67e22;
  transform: translateY(-2px);
}

.btn-secondary:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
  transform: none;
}

/* Controles del partido */
.control-group {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.control-group-label {
  text-align: center;
  margin-bottom: 15px;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--light-color);
}

/* Controles de partido */
.match-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  flex-direction: column;
}

/* Controles de saque */
.serve-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* Información de saque */
.serve-info-text {
  text-align: center;
  margin-top: 10px;
  font-size: 0.9rem;
  opacity: 0.8;
  color: var(--light-color);
}

/* Botones de saque */
.btn-serve {
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 80px;
}

.btn-serve:hover {
  background: linear-gradient(135deg, #8e44ad, #7d3c98);
  transform: translateY(-2px);
}

.btn-serve.active {
  background: linear-gradient(135deg, #ffd700, #f39c12);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.btn-serve-alternate {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 80px;
}

.btn-serve-alternate:hover {
  background: linear-gradient(135deg, #27ae60, #229954);
  transform: translateY(-2px);
}

.btn-serve-alternate.active {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
}

/* Botones de icono */
.btn-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 15px;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--light-color);
  text-decoration: none;
  transition: var(--transition);
  min-width: 80px;
}

.btn-icon:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.btn-icon i {
  font-size: 1.5rem;
}

.btn-icon span {
  font-size: 0.8rem;
  font-weight: bold;
}

/* Separador visual */
.control-separator {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  margin: 30px 0;
}

/* Controles de exportación */
.export-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* Botones de configuración de sets */
.btn-sets {
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-sets:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #8e44ad, #7d3c98);
}

.btn-sets.active {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
}

.btn-sets.active:hover {
  background: linear-gradient(135deg, #27ae60, #229954);
}

/* Historial */
.history {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.history h2 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--light-color);
}

.history-list {
  max-height: 300px;
  overflow-y: auto;
}

.match-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  border-left: 4px solid #9b59b6;
}

.match-item h3 {
  margin: 0 0 8px 0;
  color: var(--light-color);
  font-size: 1rem;
}

.match-item p {
  margin: 4px 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

/* Footer */
footer {
  margin-top: 40px;
  padding: 20px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links {
  margin: 10px 0;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin: 0 10px;
  transition: var(--transition);
}

.footer-links a:hover {
  color: #ffd700;
}

.version-info {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
  .scoreboard-tenis {
    flex-direction: column;
    gap: 15px;
  }

  .team-tenis {
    padding: 15px;
  }
  
  .team-header-tenis {
    flex-direction: column;
    gap: 5px;
  }
  
  .serve-indicator {
    font-size: 1rem;
    width: 25px;
    height: 25px;
  }

  .score-tenis {
    font-size: 2.5rem;
  }
  
  .players-container {
    flex-direction: column;
  }
  
  .player-name {
    font-size: 0.9rem;
  }

  .match-controls,
  .export-controls,
  .serve-controls {
    flex-direction: column;
    align-items: center;
  }

  .btn-icon,
  .btn-serve,
  .btn-serve-alternate {
    width: 100%;
    max-width: 200px;
  }
  
  .serve-info-text {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .team-header-tenis {
    flex-direction: column;
    gap: 3px;
  }
  
  .serve-indicator {
    font-size: 0.9rem;
    width: 22px;
    height: 22px;
  }
  
  .team-name-tenis {
    font-size: 1.1rem;
  }
  
  .player-name {
    font-size: 0.85rem;
  }
}
