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

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

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

/* Botón de inicio con color específico */
.btn-home-minivoley {
  background-color: var(--primary-color);
}

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

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

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

.team,
.team-minivoley {
  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-minivoley:hover {
  transform: translateY(-5px);
}

.team-name,
.team-name-minivoley {
  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-minivoley:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.score,
.score-minivoley {
  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-minivoley {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Sets individuales - COMPATIBILIDAD */
.set,
.set-minivoley {
  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-minivoley.won {
  background-color: var(--success-color);
}

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

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

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

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

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

/* Optimización para modo horizontal (landscape) */
@media (orientation: landscape) and (max-height: 500px) {
  .app-header {
    display: none;
  }

  .scoreboard-minivoley {
    margin-bottom: 10px;
    gap: 10px;
  }

  .team-card-minivoley {
    padding: 8px;
  }

  .score-minivoley {
    font-size: 5.5rem !important;
    margin: 5px 0 !important;
  }

  .team-name-minivoley {
    font-size: 1.1rem !important;
  }
}

/* ===== BOTONES DE CONTROL MEJORADOS (MISMO ESTILO QUE VOLEIBOL) ===== */

/* 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 - Adaptados a minivoleibol */
.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;
  }
}

/* Barra de estado de transmisión en vivo */
.live-status-bar {
    background: linear-gradient(90deg, #e67e22, #d35400);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.live-status-content {
    display: flex;
    align-items: center;
    gap: 15px;
    overflow: hidden;
    min-width: 0; /* Permite que el contenido se encoja en flexbox */
    flex: 1;
}

.live-pulse {
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.live-pulse i {
    color: #fff;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0% { opacity: 1; text-shadow: 0 0 5px white; }
    50% { opacity: 0.5; }
    100% { opacity: 1; text-shadow: 0 0 5px white; }
}

.live-users {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.live-url {
    font-family: monospace;
    background: rgba(0,0,0,0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.live-status-actions {
    display: flex;
    gap: 8px;
    margin-left: 10px;
    flex-shrink: 0;
}

.btn-icon-small {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-icon-small:hover {
    background: rgba(255,255,255,0.4);
}

.btn-stop-live {
    background: rgba(231, 76, 60, 0.6);
    border: 1px solid rgba(231, 76, 60, 0.8);
}

.btn-stop-live:hover {
    background: rgba(231, 76, 60, 0.9);
}

/* Estilos para el QR */
#qrcode-container {
    background: white;
    padding: 15px;
    border-radius: 10px;
    display: inline-block;
    margin: 15px auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

#qrcode-container img {
    margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .live-status-content {
        gap: 10px;
    }
    .live-url {
        display: none; /* Ocultar URL en móviles para ganar espacio */
    }
    .live-pulse span {
        display: none; 
    }
    .btn-icon-small {
        width: 40px;
        height: 40px;
        font-size: 1.1rem; /* Iconos más grandes para tocar mejor */
    }
}

/* Ajustes para orientación horizontal en móviles */
@media (orientation: landscape) and (max-height: 500px) {
    .live-status-bar {
        margin-bottom: 5px;
        padding: 5px 10px;
    }
    .btn-icon-small {
        width: 32px;
        height: 32px;
    }
}

/* Grid de mensajes rápidos */
.quick-messages-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
