/* Popup de Trivia en Vivo */
.live-trivia-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.live-trivia-overlay.active {
  display: flex;
  opacity: 1;
  animation: fadeIn 0.3s ease forwards;
}

.live-trivia-popup {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 750px;
  max-height: 90vh;
  position: relative;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.9);
  opacity: 0;
  animation: popupAppear 0.4s ease 0.1s forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popupAppear {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Botón de cierre */
.live-trivia-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 45px;
  height: 45px;
  background: rgba(150, 150, 255, 0.15);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 24px;
  color: #667eea;
  z-index: 10;
  transition: all 0.3s ease;
}

.live-trivia-close:hover {
  background: rgba(150, 150, 255, 0.25);
  transform: rotate(90deg) scale(1.05);
  color: #5568d3;
}

/* Contenido del popup */
.live-trivia-content {
  flex: 1;
  padding: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Header del popup con badge */
.live-trivia-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 25px 70px 15px 25px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Badge de "EN VIVO" */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ff4444;
  color: white;
  padding: 6px 18px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 10px rgba(255, 68, 68, 0.3);
  align-self: flex-start;
  animation: pulse 2s infinite;
}

.live-badge.status-3 {
  background: #ffa500;
  box-shadow: 0 3px 10px rgba(255, 165, 0, 0.3);
}

.live-badge.status-4 {
  background: #4CAF50;
  box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
}

.live-badge .pulse-dot {
  width: 10px;
  height: 10px;
  background: white;
  border-radius: 50%;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}

/* Título de la trivia */
.live-trivia-title {
  color: white;
  font-size: 1.4rem;
  font-weight: bold;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  line-height: 1.3;
}

/* Body del popup */
.live-trivia-body {
  padding: 25px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Sección de información */
.info-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Fila de información */
.info-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 12px;
  border-left: 4px solid #667eea;
  transition: all 0.3s ease;
}

.info-row:hover {
  background: #f0f1f5;
  transform: translateX(5px);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.info-row-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.info-row-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-row-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c757d;
  font-weight: 600;
}

.info-row-value {
  font-size: 1.1rem;
  font-weight: bold;
  color: #2c3e50;
}

/* Premio con imagen */
.prize-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  border: 2px solid #e3e6f0;
}

.prize-image-container {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  border-radius: 10px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.prize-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.prize-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.prize-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c757d;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.prize-label i {
  color: #ffd700;
}

.prize-name {
  font-size: 1.15rem;
  font-weight: bold;
  color: #2c3e50;
  margin: 0;
}

.prize-detail {
  font-size: 0.85rem;
  color: #6c757d;
  margin: 0;
}

/* Host con avatar */
.host-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.host-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid #667eea;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.host-name {
  font-size: 1.1rem;
  font-weight: bold;
  color: #2c3e50;
}

/* Pregunta Actual (solo para statust=5) */
.current-question-row {
  border-left-color: #ff4444 !important;
  background: linear-gradient(135deg, #fff5f5 0%, #ffe5e5 100%) !important;
}

.current-question-row .info-row-icon {
  background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%) !important;
}

.current-question-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.current-question-number {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ff4444;
}

.current-question-total {
  font-size: 0.95rem;
  color: #6c757d;
}

/* Footer con botón */
.live-trivia-footer {
  padding: 20px 25px;
  background: white;
  border-top: 1px solid #e3e6f0;
  display: flex;
  justify-content: center;
}

.btn-ver-trivia {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border: none;
  padding: 16px 40px;
  border-radius: 50px;
  font-size: 1.15rem;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 100%;
  max-width: 400px;
}

.btn-ver-trivia:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
  background: linear-gradient(135deg, #218838, #1aa179);
}

.btn-ver-trivia i {
  font-size: 1.2rem;
}

/* Scrollbar personalizado */
.live-trivia-content::-webkit-scrollbar {
  width: 8px;
}

.live-trivia-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.live-trivia-content::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 10px;
}

.live-trivia-content::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Responsive */
@media (max-width: 768px) {
  .live-trivia-popup {
    width: 95%;
    max-width: 95%;
    border-radius: 15px;
  }

  .live-trivia-header {
    padding: 20px 60px 12px 20px;
  }

  .live-trivia-title {
    font-size: 1.2rem;
  }

  .live-badge {
    font-size: 0.8rem;
    padding: 5px 15px;
  }

  .live-trivia-body {
    padding: 20px;
    gap: 15px;
  }

  .info-section {
    gap: 12px;
  }

  .info-row {
    padding: 12px;
    gap: 12px;
  }

  .info-row-icon {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }

  .info-row-value {
    font-size: 1rem;
  }

  .prize-row {
    padding: 12px;
  }

  .prize-image-container {
    width: 70px;
    height: 70px;
  }

  .prize-name {
    font-size: 1.05rem;
  }

  .host-avatar {
    width: 40px;
    height: 40px;
  }

  .host-name {
    font-size: 1rem;
  }

  .current-question-number {
    font-size: 1.3rem;
  }

  .btn-ver-trivia {
    padding: 14px 35px;
    font-size: 1.05rem;
    max-width: 100%;
  }

  .live-trivia-footer {
    padding: 18px 20px;
  }

  .live-trivia-close {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .live-trivia-header {
    padding: 18px 55px 10px 18px;
  }

  .live-trivia-title {
    font-size: 1.1rem;
  }

  .live-badge {
    font-size: 0.75rem;
    padding: 4px 12px;
  }

  .live-trivia-body {
    padding: 18px;
    gap: 12px;
  }

  .info-row {
    padding: 10px;
    gap: 10px;
  }

  .info-row-icon {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .info-row-label {
    font-size: 0.7rem;
  }

  .info-row-value {
    font-size: 0.95rem;
  }

  .prize-row {
    padding: 10px;
  }

  .prize-image-container {
    width: 60px;
    height: 60px;
  }

  .prize-name {
    font-size: 0.95rem;
  }

  .prize-detail {
    font-size: 0.8rem;
  }

  .host-avatar {
    width: 36px;
    height: 36px;
  }

  .host-name {
    font-size: 0.95rem;
  }

  .current-question-number {
    font-size: 1.2rem;
  }

  .btn-ver-trivia {
    font-size: 1rem;
    padding: 13px 30px;
  }

  .live-trivia-footer {
    padding: 15px 18px;
  }

  .live-trivia-close {
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
}

