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

/* Fondo degradado específico - ya se aplica desde themes.css */
body.theme-voleibol {
  background: var(--gradient);
}

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

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

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

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

/* Información del set actual */
.current-set-info-voleibol {
  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-voleibol {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  gap: 20px;
}

.team,
.team-voleibol {
  background-color: rgba(44, 62, 80, 0.9);
  border-radius: 15px;
  padding: 20px;
  text-align: center;
  flex: 1;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
}

.team:hover,
.team-voleibol:hover {
  transform: translateY(-5px);
}

.team-name,
.team-name-voleibol {
  font-size: 1.5rem;
  margin-bottom: 15px;
  font-weight: bold;
  cursor: pointer;
  padding: 5px;
  border-radius: 5px;
  transition: var(--transition);
}

.team-name:hover,
.team-name-voleibol:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.score,
.score-voleibol {
  font-size: 4rem;
  font-weight: bold;
  margin: 20px 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Contenedor de sets - COMPATIBILIDAD */
.sets,
.sets-container,
.sets-container-voleibol {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Sets individuales - COMPATIBILIDAD */
.set,
.set-voleibol {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.set.won,
.set-voleibol.won {
  background-color: var(--success-color);
}

/* Set actual */
.current-set {
  text-align: center;
  margin-bottom: 10px;
  font-size: 1.2rem;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 10px;
  border-radius: 8px;
}

/* COMPATIBILIDAD con controles de puntuación antiguos */
.score-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

/* COMPATIBILIDAD con botones antiguos */
.btn-small {
  padding: 8px 12px;
  font-size: 0.9rem;
}

/* COMPATIBILIDAD con entrada de ubicación */
.location-edit {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

#match-location-input {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 0.9rem;
}

/* COMPATIBILIDAD con historial */
.history-item {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.history-teams {
  flex: 1;
  min-width: 200px;
}

.history-score {
  font-weight: bold;
  font-size: 1.2rem;
  margin: 0 15px;
}

.history-info {
  font-size: 0.9rem;
  opacity: 0.8;
  width: 100%;
  margin-top: 5px;
}

.history-location {
  color: var(--primary-color);
  font-style: italic;
}

/* COMPATIBILIDAD con vista previa de compartir */
.share-preview {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 20px;
  margin-top: 20px;
  text-align: center;
}

.share-preview h3 {
  margin-bottom: 15px;
}

#share-text {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  text-align: left;
  font-family: monospace;
  white-space: pre-wrap;
  max-height: 200px;
  overflow-y: auto;
}

.empty-history {
  text-align: center;
  padding: 20px;
  opacity: 0.7;
}

/* Responsivo para voleibol - COMPATIBILIDAD */
@media (max-width: 768px) {
  .scoreboard,
  .scoreboard-voleibol {
    flex-direction: column;
  }

  .score,
  .score-voleibol {
    font-size: 3rem;
  }

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

@media (max-width: 480px) {
  .score,
  .score-voleibol {
    font-size: 2.5rem;
  }

  .current-set-info-voleibol {
    font-size: 0.9rem;
  }

  .history-item {
    flex-direction: column;
    text-align: center;
  }

  .history-score {
    margin: 10px 0;
  }

  .container {
    padding: 5px;
  }

  /* Ajustamos el marcador para que use todo el ancho */
  .scoreboard,
  .scoreboard-voleibol {
    margin-bottom: 10px;
    gap: 15px;
  }

  .team-card,
  .team-card-voleibol {
    padding: 10px;
    flex: 1;
  }

  /* El número del marcador ahora es el protagonista */
  .score,
  .score-voleibol {
    font-size: 6rem !important; /* Número mucho más grande */
    margin: 5px 0 !important;
    line-height: 1;
  }

  .team-name,
  .team-name-voleibol {
    font-size: 1.2rem !important;
    margin-bottom: 2px !important;
  }

  /* Botones de control en una sola línea o más compactos */
  .controls {
    display: flex;
    justify-content: center;
    gap: 20px;
  }

  .btn-score {
    padding: 10px 30px !important;
    font-size: 1.2rem !important;
  }
}

/* Modo Marcador Gigante para PWA */
@media (orientation: landscape) and (max-height: 500px) {
  /* 1. Escondemos el header para ganar espacio vertical */
  .app-header {
    display: none !important;
  }

  /* 2. Reducimos rellenos para que todo quepa en una pantalla corta */
  .container {
    padding: 5px !important;
  }

  .scoreboard-voleibol {
    margin-top: 10px;
    margin-bottom: 5px;
  }

  /* 3. El número se vuelve gigante */
  .score-voleibol {
    font-size: 7rem !important;
    margin: 0 !important;
    line-height: 1;
  }

  .team-name-voleibol {
    font-size: 1.2rem !important;
  }

  /* 4. Ajustamos controles para que no haya que hacer scroll */
  .controls {
    gap: 10px;
  }

  .btn-score {
    padding: 10px 25px !important;
  }
}

/* ===== BOTONES DE CONTROL MEJORADOS ===== */

/* Contenedor principal de controles */
.match-controls,
.export-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  flex-wrap: wrap;
}

/* Estilo para botones con iconos */
.btn-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  height: 90px;
  padding: 10px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  color: white;
  font-size: 0.8rem;
  text-align: center;
  gap: 8px;
  position: relative;
}

.btn-icon i {
  font-size: 1.8rem;
  margin: 0;
}

/* Colores específicos para cada botón */
.btn-new-set {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.btn-reset {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.btn-save {
  background: linear-gradient(135deg, #3498db, #2980b9);
}

.btn-share-current {
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.btn-share-history {
  background: linear-gradient(135deg, #34495e, #2c3e50);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
}

/* Efectos hover */
.btn-icon:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
  opacity: 0.95;
}

.btn-icon:active {
  transform: translateY(0);
}

/* Tooltips para los botones */
.btn-icon::after {
  content: attr(title);
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.btn-icon:hover::after {
  opacity: 1;
  visibility: visible;
  bottom: -35px;
}

/* Contenedor para grupos de botones */
.control-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 15px 0;
  width: 100%;
}

.control-group-label {
  font-size: 1rem;
  margin-bottom: 10px;
  color: white;
  font-weight: bold;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  padding: 5px 15px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  width: fit-content;
}

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

/* Responsive para botones */
@media (max-width: 768px) {
  .btn-icon {
    min-width: 80px;
    height: 80px;
    font-size: 0.75rem;
  }

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

  .match-controls,
  .export-controls {
    gap: 8px;
  }
}

@media (max-width: 480px) {
  .btn-icon {
    min-width: 70px;
    height: 70px;
    font-size: 0.7rem;
  }

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

  .control-group-label {
    font-size: 0.9rem;
  }
}

/* Modo landscape para móviles */
@media (orientation: landscape) and (max-height: 500px) {
  .btn-icon {
    min-width: 70px;
    height: 70px;
    font-size: 0.7rem;
    padding: 5px;
  }

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