/* =====================================================
   GAMIFICAÇÃO - Estilos
   Sistema de XP, Níveis, Conquistas e Missões
   ===================================================== */

/* ========================================
   Widget de Gamificação
   ======================================== */

.gamificacao-widget {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  padding: 20px;
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.gamificacao-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.nivel-badge {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 12px 20px;
  backdrop-filter: blur(10px);
}

.nivel-numero {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.xp-info {
  font-size: 14px;
  opacity: 0.9;
}

.sequencia-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 107, 0, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  backdrop-filter: blur(10px);
}

.sequencia-icone {
  font-size: 24px;
}

.sequencia-numero {
  font-size: 24px;
  font-weight: 700;
}

.sequencia-label {
  font-size: 12px;
  opacity: 0.9;
}

/* Barra de Progresso do Nível */
.nivel-progresso {
  margin-top: 16px;
}

.progresso-bar {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  height: 12px;
  overflow: hidden;
  margin-bottom: 8px;
}

.progresso-fill {
  background: linear-gradient(90deg, #10b981, #34d399);
  height: 100%;
  border-radius: 10px;
  transition: width 0.5s ease;
}

.progresso-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  opacity: 0.9;
}

.progresso-porcentagem {
  font-weight: 600;
}

/* Conquistas Recentes */
.conquistas-recentes {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.conquistas-recentes h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  opacity: 0.9;
}

.conquistas-lista {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.conquista-item {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  backdrop-filter: blur(10px);
}

.conquista-item.raro {
  background: rgba(59, 130, 246, 0.3);
}

.conquista-item.epico {
  background: rgba(168, 85, 247, 0.3);
}

.conquista-item.lendario {
  background: rgba(245, 158, 11, 0.3);
}

.conquista-icone {
  font-size: 16px;
}

.conquista-nome {
  font-weight: 500;
}

/* ========================================
   Missões Diárias
   ======================================== */

.missoes-widget {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.missoes-widget h4 {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 16px;
}

.missoes-lista {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.missao-item {
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  transition: all 0.2s;
}

.missao-item:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.missao-item.completa {
  background: #f0fdf4;
  border-color: #10b981;
}

.missao-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.missao-icone {
  font-size: 24px;
}

.missao-info {
  flex: 1;
}

.missao-nome {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.missao-progresso {
  font-size: 13px;
  color: #6b7280;
}

.missao-xp {
  font-size: 13px;
  font-weight: 600;
  color: #667eea;
  background: rgba(102, 126, 234, 0.1);
  padding: 4px 8px;
  border-radius: 6px;
}

.missao-check {
  font-size: 20px;
  color: #10b981;
}

.missao-barra {
  background: #f3f4f6;
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
  margin-top: 8px;
}

.missao-fill {
  background: linear-gradient(90deg, #667eea, #764ba2);
  height: 100%;
  transition: width 0.5s ease;
}

/* ========================================
   Notificações de XP
   ======================================== */

.xp-notification {
  position: fixed;
  top: 100px;
  right: -300px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  transition: right 0.3s ease;
}

.xp-notification.show {
  right: 20px;
}

.xp-notif-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.xp-icone {
  font-size: 24px;
}

.xp-texto {
  font-size: 16px;
  font-weight: 600;
}

/* ========================================
   Modal de Subida de Nível
   ======================================== */

.nivel-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.3s;
}

.nivel-modal.show {
  opacity: 1;
}

.nivel-modal-content {
  background: white;
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.nivel-modal-header h2 {
  font-size: 28px;
  color: #1f2937;
  margin-bottom: 24px;
}

.nivel-badge-grande {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 8px 16px rgba(102, 126, 234, 0.4);
}

.nivel-badge-grande .nivel-numero {
  font-size: 32px;
  font-weight: 700;
  color: white;
}

.nivel-modal-body p {
  font-size: 18px;
  color: #4b5563;
  margin-bottom: 12px;
}

.xp-total {
  font-size: 16px;
  color: #667eea;
  font-weight: 600;
}

.nivel-modal-footer {
  margin-top: 24px;
}

/* ========================================
   Modal de Conquista
   ======================================== */

.conquista-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.3s;
}

.conquista-modal.show {
  opacity: 1;
}

.conquista-modal-content {
  background: white;
  border-radius: 16px;
  padding: 32px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  border: 3px solid #e5e7eb;
}

.conquista-modal-content.raro {
  border-color: #3b82f6;
}

.conquista-modal-content.epico {
  border-color: #a855f7;
}

.conquista-modal-content.lendario {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.conquista-modal-header h2 {
  font-size: 24px;
  color: #1f2937;
  margin-bottom: 20px;
}

.conquista-icone-grande {
  font-size: 80px;
  margin-bottom: 16px;
}

.conquista-modal-body h3 {
  font-size: 22px;
  color: #1f2937;
  font-weight: 700;
  margin-bottom: 12px;
}

.conquista-modal-body p {
  font-size: 16px;
  color: #6b7280;
  margin-bottom: 16px;
}

.conquista-xp {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  margin-bottom: 12px;
}

.conquista-raridade {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}

.conquista-modal-content.comum .conquista-raridade {
  background: #f3f4f6;
  color: #6b7280;
}

.conquista-modal-content.raro .conquista-raridade {
  background: #dbeafe;
  color: #3b82f6;
}

.conquista-modal-content.epico .conquista-raridade {
  background: #f3e8ff;
  color: #a855f7;
}

.conquista-modal-content.lendario .conquista-raridade {
  background: #fef3c7;
  color: #f59e0b;
}

/* ========================================
   Notificação de Missão
   ======================================== */

.missao-notification {
  position: fixed;
  top: 100px;
  right: -400px;
  background: white;
  border: 2px solid #10b981;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  transition: right 0.3s ease;
}

.missao-notification.show {
  right: 20px;
}

.missao-notif-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.missao-notif-content .missao-icone {
  font-size: 28px;
}

.missao-texto {
  display: flex;
  flex-direction: column;
}

.missao-texto strong {
  font-size: 16px;
  color: #1f2937;
  margin-bottom: 4px;
}

.missao-texto span {
  font-size: 14px;
  color: #10b981;
  font-weight: 600;
}

/* ========================================
   Responsivo
   ======================================== */

@media (max-width: 768px) {
  .gamificacao-widget {
    padding: 16px;
  }
  
  .gamificacao-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .missoes-widget {
    padding: 16px;
  }
  
  .xp-notification,
  .missao-notification {
    right: -350px;
    max-width: 90%;
  }
  
  .xp-notification.show,
  .missao-notification.show {
    right: 5%;
  }
}
