/* ESTILOS ESPECÍFICOS PARA TENIS */
/* Compatibilidad con estructura antigua y modular */

/* Tema específico para tenis */
body.theme-tenis {
  background: var(--gradient);
}

/* Reloj con color específico */
.clock-container-tenis {
  background-color: rgba(52, 152, 219, 0.8);
}

/* Botón de inicio con color específico */
.btn-home-tenis {
  background-color: #9b59b6;
}

/* 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 específico - COMPATIBILIDAD CON CLASES ANTIGUAS */
.scoreboard,
.scoreboard-tenis {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  gap: 20px;
}

/* Equipo individual */
.team,
.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;
}

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

.team-name:hover,
.team-name-tenis:hover {
  color: var(--accent-color);
}

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

.team-name.editable:hover,
.team-name-tenis.editable:hover {
  border-bottom-color: var(--accent-color);
}

/* Contenedor de inputs de jugadores */
.players-input {
  margin-bottom: 15px;
}

.player-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--light-color);
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 5px;
}

.player-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.player-input:focus {
  outline: none;
  border-color: var(--accent-color);
  background-color: rgba(255, 255, 255, 0.2);
}

/* Puntaje principal */
.score,
.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: var(--accent-color);
  margin-right: 5px;
}

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

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

/* Set individual */
.set-box,
.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,
.set-won-tenis {
  background-color: var(--success-color) !important;
  color: white !important;
}

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

/* Botones principales */
.btn-primary {
  background-color: var(--success-color);
  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: var(--warning-color);
  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;
}

/* 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;
}

/* 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 var(--accent-color);
}

.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;
}

/* Botones de configuración de sets */
.btn-sets {
  background: linear-gradient(135deg, #3498db, #2980b9);
  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, #2980b9, #21618c);
}

.btn-sets.active {
  background: linear-gradient(135deg, #27ae60, #229954);
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.4);
}

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

/* 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: var(--accent-color);
}

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

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

  .team,
  .team-tenis {
    padding: 15px;
  }

  .score,
  .score-tenis {
    font-size: 2.5rem;
  }

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

  .btn-icon {
    width: 100%;
    max-width: 200px;
  }
}
