/* ============================================================
   BALONCESTO — LIGA ESCOLAR · DISEÑO RENOVADO (GLASSMORPISM)
   Adaptado del estilo Minivoley Moderno con Naranja y Negro
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Outfit:wght@300;400;500;600;700&display=swap');

body.theme-baloncesto {
  --c-local:       #ff4757; /* Rojo vibrante Minivoley */
  --c-local-glow:  rgba(255, 71, 87, 0.35);
  --c-visitor:     #1e90ff; /* Azul vibrante Minivoley */
  --c-visitor-glow:rgba(30, 144, 255, 0.35);
  --c-gold:        #ffd700;
  --c-gold-dim:    rgba(255, 215, 0, 0.15);
  --c-accent:      #ffd700;
  --c-glass:       rgba(255, 255, 255, 0.05);
  --c-glass-b:     rgba(255, 255, 255, 0.09);
  --c-glass-border:rgba(255, 255, 255, 0.11);
  --c-text:        #f0f4ff;
  --c-muted:       rgba(240, 244, 255, 0.5);
  --c-muted2:      rgba(240, 244, 255, 0.25);
  --font-display:  'Bebas Neue', sans-serif;
  --font-body:     'Outfit', 'Segoe UI', sans-serif;

  font-family: var(--font-body);
  color: var(--c-text);
  min-height: 100vh;
  margin: 0;
  padding: 15px;
  background:
    radial-gradient(ellipse 70% 50% at 15% 10%, rgba(255, 71, 87, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 60% 45% at 85% 85%, rgba(30, 144, 255, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(255, 215, 0, 0.08) 0%, transparent 60%),
    linear-gradient(160deg, #07091c 0%, #0d0a28 40%, #100c30 100%) !important;
}

.game-info-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--c-glass);
  border: 1px solid var(--c-glass-border);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  padding: 18px;
  margin: 20px auto;
  flex-wrap: wrap;
  gap: 15px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}

.quarter-display,
.timer-display,
.period-info {
  flex: 1;
  min-width: 180px;
  text-align: center;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
}

.quarter-number {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-family: var(--font-display);
  color: var(--c-gold);
  margin: 10px 0;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.timer-count {
  font-size: clamp(2.5rem, 8vw, 3.5rem);
  font-family: var(--font-display);
  color: #fff;
  margin: 10px 0;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Circular Timer Widget */
.circular-timer-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 150px;
  margin: 10px auto;
}

.circular-timer-wrapper .timer-count {
  margin: 0 !important;
  font-size: clamp(2.2rem, 7vw, 3.2rem) !important;
  font-family: var(--font-display) !important;
  color: #fff;
  line-height: 1;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
  position: relative;
  z-index: 2;
}

.circular-timer-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.quarter-controls,
.timer-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.btn-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: linear-gradient(145deg, #2c3e50, #000);
  color: var(--c-text);
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.btn-icon:hover:not(:disabled) {
  transform: scale(1.1);
  border-color: var(--c-accent);
  box-shadow: 0 0 12px var(--c-visitor-glow);
}

.btn-icon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== MARCADOR PRINCIPAL ===== */
.scoreboard-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px minmax(0, 1fr);
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  margin: 30px 0;
  min-height: 300px;
}

.team-scoreboard {
  flex: 1;
  background: var(--c-glass);
  border: 1px solid var(--c-glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 18px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
  transition: transform 0.25s ease;
  position: relative;
  overflow: hidden;
  min-height: 280px;
}

.team-scoreboard:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
}

.team-scoreboard.team-local::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--c-local), rgba(255, 71, 87, 0.4));
  border-radius: 18px 18px 0 0;
}

.team-scoreboard.team-visitor::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--c-visitor), rgba(30, 144, 255, 0.4));
  border-radius: 18px 18px 0 0;
}

.team-scoreboard.team-local {
  background: linear-gradient(160deg, rgba(255, 71, 87, 0.07) 0%, rgba(255, 255, 255, 0.03) 60%);
}

.team-scoreboard.team-visitor {
  background: linear-gradient(160deg, rgba(30, 144, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 60%);
}

.team-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.team-name {
  font-size: clamp(1rem, 3vw, 1.3rem);
  text-align: center;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.team-name:hover {
  color: var(--c-text);
  background: rgba(255,255,255,0.08);
}

.btn-edit-name {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 1rem;
  padding: 5px;
}

.team-score {
  font-family: var(--font-display) !important;
  font-size: clamp(5.5rem, 18vw, 9rem) !important;
  line-height: 1 !important;
  margin: 6px 0 !important;
  letter-spacing: 0.02em;
  text-shadow: none;
}

.team-local .team-score {
  color: var(--c-local);
  filter: drop-shadow(0 0 18px var(--c-local-glow));
}

.team-visitor .team-score {
  color: var(--c-visitor);
  filter: drop-shadow(0 0 18px var(--c-visitor-glow));
}

/* Animación de destello al anotar un punto */
@keyframes scoreFlash {
  0% {
    transform: scale(1);
    filter: brightness(1) drop-shadow(0 0 15px currentColor);
  }
  50% {
    transform: scale(1.08);
    filter: brightness(1.5) drop-shadow(0 0 25px currentColor);
  }
  100% {
    transform: scale(1);
    filter: brightness(1) drop-shadow(0 0 15px currentColor);
  }
}

.team-score.score-flash {
  animation: scoreFlash 0.3s ease-out;
}

/* Botones de puntos */
.points-controls {
  display: flex;
  gap: 10px;
  width: 100%;
  justify-content: center;
  margin: 15px 0;
}

.btn-point {
  flex: 1;
  padding: 12px 5px;
  border-radius: 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--c-text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  min-height: 60px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.btn-point:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}

.btn-point[data-points='1'] {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  border-color: #2ecc71;
  box-shadow: 0 4px 14px rgba(46, 204, 113, 0.3);
}

.btn-point[data-points='2'] {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  border-color: #f39c12;
  box-shadow: 0 4px 14px rgba(243, 156, 18, 0.3);
}

.btn-point[data-points='3'] {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  border-color: #e74c3c;
  box-shadow: 0 4px 14px rgba(231, 76, 60, 0.3);
}

.point-value {
  font-size: 1.5rem;
  font-weight: bold;
  font-family: var(--font-display);
}

.point-value {
  font-size: 1.5rem;
  font-weight: bold;
}

.point-label {
  font-size: 0.8rem;
  opacity: 0.9;
  margin-top: 5px;
}

/* Faltas por equipo */
.team-fouls-display {
  text-align: center;
  margin-top: 15px;
  width: 100%;
}

.fouls-count {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  font-family: var(--font-display);
  color: var(--c-accent);
  margin: 10px 0;
  text-shadow: 0 0 10px var(--c-visitor-glow);
}

/* VS Central */
.vs-container {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.vs-text {
  font-size: 2.5rem;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
}

.game-status {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  backdrop-filter: blur(8px);
  padding: 8px 16px;
  border-radius: 50px;
  text-align: center;
  margin: 0;
  font-weight: bold;
  color: var(--c-text);
}

/* ===== SISTEMA DE FALTAS POR DORSAL ===== */
.fouls-management {
  background: var(--c-glass);
  border: 1px solid var(--c-glass-border);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  padding: 22px;
  margin: 25px 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}

.fouls-input-section {
  margin-bottom: 25px;
}

.input-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.input-dorsal {
  flex: 1;
  min-width: 120px;
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: var(--c-text);
  font-size: 1.2rem;
  text-align: center;
}

.select-team {
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: var(--c-text);
  font-size: 1rem;
  min-width: 140px;
}

.btn-foul-add {
  padding: 12px 25px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: #fff;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  box-shadow: 0 4px 14px rgba(231, 76, 60, 0.3);
}

.btn-foul-add:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

.help-text {
  text-align: center;
  margin-top: 10px;
  opacity: 0.8;
  font-size: 0.9rem;
}

/* Lista de jugadores */
.players-fouls-container {
  display: flex;
  gap: 20px;
  margin-top: 20px;
}

@media (orientation: portrait) {
  .players-fouls-container {
    flex-direction: column;
  }
}

.players-team {
  flex: 1;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.players-team h4 {
  text-align: center;
  margin-bottom: 15px;
  color: var(--c-muted);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.players-list {
  max-height: 200px;
  overflow-y: auto;
}

.player-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.05);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: background 0.3s;
}

.player-item:hover {
  background: rgba(255, 255, 255, 0.15);
}

.player-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-dorsal {
  background: var(--c-accent);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(243, 156, 18, 0.3);
}

.player-fouls {
  display: flex;
  gap: 5px;
}

.foul-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(240,244,255,0.2);
}

.foul-dot.active {
  background: var(--c-accent);
  box-shadow: 0 0 8px var(--c-visitor-glow);
}

.foul-dot.expelled {
  background: #e74c3c;
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.4);
}

.btn-remove-foul {
  background: transparent;
  border: none;
  color: var(--c-muted);
  cursor: pointer;
  padding: 5px;
  font-size: 0.9rem;
}

.btn-remove-foul:hover {
  color: #e74c3c;
}

/* Jugadores expulsados */
.expelled-container {
  margin-top: 25px;
  background: rgba(231, 76, 60, 0.08);
  border-radius: 12px;
  padding: 15px;
  border: 1px solid rgba(231, 76, 60, 0.3);
  box-shadow: 0 2px 10px rgba(231, 76, 60, 0.2);
}

.expelled-container h4 {
  color: var(--danger-color);
  text-align: center;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.expelled-player {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  margin-bottom: 8px;
  background: rgba(231, 76, 60, 0.2);
  border-radius: 8px;
}

/* ===== GRÁFICO HISTORIAL DE PUNTOS (PIZARRA OSCURA) ===== */
.score-history-chart-card {
  background: rgba(13, 17, 34, 0.75);
  border: 1px solid var(--c-glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 18px;
  padding: 20px;
  margin: 25px auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.score-history-chart-card .chart-header h3 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--c-text);
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-history-chart-card .chart-header h3 i {
  color: var(--c-gold);
}

.score-history-chart-container {
  position: relative;
  width: 100%;
  height: clamp(230px, 36vw, 330px);
}

/* ===== HISTORIAL ===== */
.game-history {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  padding: 20px;
  margin: 30px 0;
}

.history-log {
  max-height: 200px;
  overflow-y: auto;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
  padding: 15px;
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 20px;
}

.history-entry {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  gap: 10px;
}

.history-time {
  color: var(--c-accent);
  font-weight: bold;
  min-width: 70px;
}

.history-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.btn-reset-game,
.btn-save-game,
.btn-share-game {
  padding: 12px 25px;
  border-radius: 16px;
  cursor: pointer;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}

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

.btn-save-game {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  color: #fff;
}

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

.btn-reset-game:hover,
.btn-save-game:hover,
.btn-share-game:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}

/* ===== MODALES ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-content {
  background: linear-gradient(160deg, #141030, #0d0a28);
  border-radius: 18px;
  padding: 30px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ===== RESPONSIVE EXTREMO ===== */
@media (max-width: 768px) {
  .scoreboard-container {
    grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr);
    gap: 8px;
  }

  .team-scoreboard {
    min-width: 0;
    padding: 15px 8px;
  }

  .vs-text {
    font-size: 1.6rem;
  }

  .game-status {
    white-space: nowrap;
    font-size: 0.68rem;
    padding: 7px 3px;
  }

  .game-info-container {
    flex-direction: column;
  }

  .quarter-display,
  .timer-display,
  .period-info {
    width: 100%;
  }

  .quarter-number {
    font-size: clamp(2rem, 7vw, 2.8rem);
  }

  .timer-count {
    font-size: clamp(2rem, 7vw, 2.8rem);
  }

  .team-score {
    font-size: 4rem;
  }

  .points-controls {
    flex-direction: column;
  }

  .btn-point {
    min-height: 60px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 5px;
  }

  .scoreboard-container {
    grid-template-columns: minmax(0, 1fr) 60px minmax(0, 1fr);
    gap: 5px;
  }

  .team-scoreboard {
    padding: 15px;
  }

  .team-score {
    font-size: clamp(3rem, 12vw, 4rem);
  }

  .input-group {
    flex-direction: column;
  }

  .input-dorsal,
  .select-team,
  .btn-foul-add {
    width: 100%;
  }
}

/* ===== ANIMACIONES ===== */
@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  } 
  100% {
    transform: scale(1);
  }
}

.pulse {
  animation: pulse 0.5s ease;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.bounce {
  animation: bounce 0.5s ease;
}

/* ===== SCROLLBAR PERSONALIZADO ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--c-accent);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #e67e22;
}

/* ===== GRUPOS DE CONTROL Y COMPARTIR RESULTADOS ===== */
.control-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px 0 16px;
  width: 100%;
}

.control-group-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  background: none;
  padding: 0 0 10px;
  width: auto;
  border-radius: 0;
  margin-bottom: 0;
}

.export-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
}

.control-separator {
  width: 90%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  margin: 18px auto;
}

/* ── BOTONES DE ICONO (ESTILO MINIVOLEY) ───────────────────── */
.btn-icon {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 80px;
  height: 80px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  color: #fff !important;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  gap: 7px;
  position: relative;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

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

.btn-icon:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.35) !important;
}

.btn-icon:active {
  transform: scale(0.97);
}

.btn-whatsapp {
  background: linear-gradient(145deg, #0e7736, #25d366) !important;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35) !important;
}

.btn-share-current {
  background: linear-gradient(145deg, #6c3483, #9b59b6) !important;
  box-shadow: 0 4px 14px rgba(155, 89, 182, 0.35) !important;
}

.btn-share-history {
  background: linear-gradient(145deg, #1c2833, #34495e) !important;
  box-shadow: 0 4px 14px rgba(52, 73, 94, 0.35) !important;
}

.btn-broadcast.btn-icon {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  background: linear-gradient(145deg, #a04000, #e67e22) !important;
  box-shadow: 0 4px 14px rgba(230, 126, 34, 0.35) !important;
}

@media (max-width: 480px) {
  .btn-icon {
    min-width: 70px;
    height: 70px;
    font-size: 0.65rem;
    gap: 5px;
  }
  .btn-icon i {
    font-size: 1.3rem;
  }
}

/* ── MODAL COMPARTIR PREVIEW ──────────────────────────────── */
.share-preview {
  margin: 15px 0;
  text-align: left;
}

.share-preview h3 {
  font-size: 0.9rem;
  color: #f0f4ff;
  margin-bottom: 8px;
  font-weight: 600;
}

#share-text {
  white-space: pre-wrap;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 14px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #f0f4ff;
  text-align: left;
  max-height: 240px;
  overflow-y: auto;
  font-family: inherit;
}

/* ===== RETRANSMISIÓN EN VIVO Y COMENTARISTA IA ===== */
.btn-broadcast {
  background: linear-gradient(135deg, #e67e22, #d35400) !important;
  color: white !important;
  border: none !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-broadcast:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4);
}

.pulse-animation {
  animation: liveBroadcastPulse 2s infinite;
}

@keyframes liveBroadcastPulse {
  0% { box-shadow: 0 0 0 0 rgba(230, 126, 34, 0.7); }
  70% { box-shadow: 0 0 0 10px rgba(230, 126, 34, 0); }
  100% { box-shadow: 0 0 0 0 rgba(230, 126, 34, 0); }
}

.live-status-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(90deg, rgba(230, 126, 34, 0.9), rgba(211, 84, 0, 0.9));
  border-radius: 12px;
  border: 1px solid rgba(255, 160, 100, 0.35);
  backdrop-filter: blur(10px);
  padding: 8px 14px;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(211, 84, 0, 0.3);
}

.live-status-content {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
  flex: 1 1 auto;
}

.live-status-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex: 0 0 auto;
}

.live-pulse {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  color: #fff;
}

.live-pulse i {
  color: #fff;
  font-size: 0.7rem;
  animation: livePulseDot 1.5s ease-in-out infinite;
}

@keyframes livePulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.85); }
}

.live-users {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.2);
  padding: 3px 8px;
  border-radius: 12px;
}

.btn-icon-small {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}

.btn-icon-small:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-icon-small.btn-stop-live {
  background: rgba(192, 57, 43, 0.6);
  border-color: rgba(231, 76, 60, 0.4);
}

.btn-icon-small.btn-stop-live:hover {
  background: rgba(192, 57, 43, 0.95);
}

#qrcode-container {
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  display: inline-block;
  margin: 10px auto;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Modal de Mensajes y Comentarista IA */
.modal-live-msg {
  max-width: 500px;
  width: 92%;
}

.modal-subtitle {
  font-size: 0.85rem;
  color: var(--c-muted);
  margin-top: -6px;
  margin-bottom: 14px;
}

.ai-commentator-card {
  background: rgba(230, 126, 34, 0.12);
  border: 1px solid rgba(230, 126, 34, 0.35);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.ai-commentator-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  gap: 8px;
}

.ai-commentator-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #f39c12;
}

.ai-commentator-title i {
  color: #e67e22;
}

.ai-context-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}

.btn-ai-suggest {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #e67e22, #d35400);
  border: none;
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.2s;
}

.btn-ai-suggest:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-ai-suggest:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ai-suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 44px;
}

.ai-suggestions-placeholder {
  font-size: 0.78rem;
  color: var(--c-muted);
  font-style: italic;
  padding: 8px 4px;
  line-height: 1.3;
}

.ai-loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #f39c12;
  padding: 12px 6px;
}

.ai-suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  transition: background 0.2s, border-color 0.2s;
}

.ai-suggestion-item:hover {
  background: rgba(230, 126, 34, 0.2);
  border-color: rgba(230, 126, 34, 0.4);
}

.ai-suggestion-icon {
  color: #f39c12;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.ai-suggestion-text {
  flex: 1;
  font-size: 0.82rem;
  color: #f5f5f5;
  cursor: pointer;
  line-height: 1.3;
}

.btn-ai-direct-send {
  background: rgba(46, 204, 113, 0.2);
  border: 1px solid rgba(46, 204, 113, 0.4);
  color: #2ecc71;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, transform 0.15s;
}

.btn-ai-direct-send:hover {
  background: #2ecc71;
  color: #ffffff;
  transform: scale(1.1);
}

.quick-messages-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--c-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.quick-messages-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}

.quick-messages-grid .btn {
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.quick-messages-grid .btn:hover {
  background: rgba(230, 126, 34, 0.3);
  border-color: rgba(230, 126, 34, 0.4);
}

