/* ═══════════════════════════════════════════════════════
   DESAFIO TRILHA — CSS do Modo Desafio
   ═══════════════════════════════════════════════════════ */

:root {
  --des-primary: #8b5cf6;
  --des-primary-dark: #6d28d9;
  --des-green: #10b981;
  --des-red: #ef4444;
  --des-gold: #f59e0b;
  --des-gray: #6b7280;
  --des-light: #f3f4f6;
  --des-radius: 16px;
  --des-shadow: 0 4px 24px rgba(139,92,246,0.10);
}

/* ── Hero ────────────────────────────────────────────── */
.des-hero {
  background: linear-gradient(135deg, #7c3aed 0%, var(--des-primary-dark) 55%, #4c1d95 100%);
  color: #fff;
  padding: 1.2rem 0 1rem;
  position: sticky;
  top: 56px; /* abaixo da navbar */
  z-index: 90;
  box-shadow: 0 4px 20px rgba(76,29,149,0.28);
  overflow: hidden;
}
/* Brilho decorativo no canto (não interativo) */
.des-hero-glow {
  position: absolute;
  top: -60%;
  right: -8%;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle, rgba(196,181,253,0.35) 0%, rgba(196,181,253,0) 70%);
  pointer-events: none;
  z-index: 0;
}
.des-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  position: relative;
  z-index: 1;
}
.des-hero-brand { display: flex; align-items: center; gap: 0.8rem; min-width: 0; }
.des-hero-brand-text { min-width: 0; }
.des-hero-badge {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
/* Agrupa stats + botão, alinhados à direita e quebrando bem no mobile */
.des-hero-right {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.des-hero-tag {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  opacity: 0.9;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.des-hero-tag i { font-size: 0.62rem; }
.des-hero-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}
.des-hero-stats {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
  flex-wrap: wrap;
}
.des-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 0.3rem 0.7rem;
  min-width: 66px;
  backdrop-filter: blur(4px);
}
.des-stat-label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  opacity: 0.85;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  white-space: nowrap;
}
.des-stat-label i { font-size: 0.6rem; }
.des-stat-value { font-size: 1.05rem; font-weight: 800; line-height: 1.1; }
.des-hero-rank {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #78350f;
  border: none;
  border-radius: 12px;
  padding: 0.45rem 0.9rem;
  font-weight: 800;
  font-size: 0.82rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(245,158,11,0.35);
  transition: transform 0.15s, box-shadow 0.15s, filter 0.15s;
}
.des-hero-rank:hover {
  color: #78350f;
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 5px 16px rgba(245,158,11,0.45);
}
.des-hero-rank i { font-size: 0.85rem; }
.des-hero-rank-count {
  background: rgba(120,53,15,0.22);
  border-radius: 20px;
  padding: 0.05rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
}
.des-rank-chev { font-size: 0.62rem; opacity: 0.55; }

/* ── Hero hints (regras do jogo) ─────────────────────── */
.des-hero-hints {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding: 0.5rem 0 0.15rem;
}
.des-hero-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}
.des-hero-hint i { font-size: 0.65rem; }
.des-hero-hint.green { background: rgba(16,185,129,0.2); color: #a7f3d0; }
.des-hero-hint.red { background: rgba(239,68,68,0.2); color: #fecaca; }
.des-hero-hint.gold { background: rgba(245,158,11,0.2); color: #fde68a; }

/* ── Barra de progresso trilha ───────────────────────── */
.des-progress-bar {
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  height: 6px;
  width: 100%;
  margin-top: 0.7rem;
  overflow: hidden;
}
.des-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #34d399, #10b981);
  border-radius: 20px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}

/* Linha de progresso do hero: rótulo · barra · porcentagem */
.des-hero-progress-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 0.85rem;
}
.des-hero-progress-row .des-progress-bar {
  flex: 1;
  height: 8px;
  margin: 0;
}
.des-hero-progress-label {
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0.95;
}
.des-hero-progress-pct {
  font-size: 0.85rem;
  font-weight: 800;
  white-space: nowrap;
  min-width: 36px;
  text-align: right;
}

/* ── Mapa do Desafio: painel da trilha serpentina ─────── */
.des-map-panel {
  background: #fff;
  border-radius: var(--des-radius);
  box-shadow: var(--des-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-height: 75vh;
  margin-bottom: 1rem;
}
.des-map-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, var(--des-primary), var(--des-primary-dark));
  color: #fff;
  flex-shrink: 0;
}
.des-map-title {
  font-weight: 800;
  font-size: 0.92rem;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.des-map-progress {
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255,255,255,0.2);
  padding: 0.15rem 0.6rem;
  border-radius: 12px;
}
.des-map-close {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0 0.2rem;
  line-height: 1;
}
.des-map-body {
  overflow-y: auto;
  flex: 1;
  padding: 0.5rem 0 1rem;
}
.des-map-body::-webkit-scrollbar { width: 5px; }
.des-map-body::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.4); border-radius: 4px; }

/* ── Trilha serpentina (nós montados via JS) ──────────── */
.des-trail-vertical {
  position: relative;
  width: 100%;
  margin: 0 auto;
}
.des-trail-vertical svg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.dt-node {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  font-weight: 800;
  font-size: 1rem;
  color: #fff;
  z-index: 2;
}
.dt-node i { font-size: 1.05rem; }
.dt-done { background: var(--des-green); box-shadow: 0 5px 0 #059669; }
.dt-current {
  background: var(--des-primary);
  box-shadow: 0 5px 0 var(--des-primary-dark);
  cursor: pointer;
  width: 62px;
  height: 62px;
  font-size: 1.1rem;
  animation: dtIdle 2.6s ease-in-out infinite;
}
.dt-locked { background: var(--des-light); box-shadow: 0 5px 0 #cbd5e1; color: #9ca3af; }

/* Selos (cadeado/estrela) no canto dos nós bloqueados */
.dt-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  background: #94a3b8;
  color: #fff;
}
.dt-badge i { font-size: 0.5rem !important; }
.dt-badge-star { background: var(--des-gold); }

/* Marcos a cada 5 questões (dourados) */
.dt-milestone.dt-locked { background: #fef3c7; box-shadow: 0 5px 0 #fcd34d; color: #b45309; }
.dt-done.dt-milestone { background: linear-gradient(135deg, #fbbf24, #d97706); box-shadow: 0 5px 0 #92400e; }

/* Nó de chegada (última questão) */
.dt-finish { width: 66px; height: 66px; }
.dt-finish i { font-size: 1.35rem; }
.dt-finish.dt-locked { background: #fef3c7; color: #d97706; box-shadow: 0 5px 0 #fbbf24; }
.dt-finish.dt-done,
.dt-finish.dt-current { background: linear-gradient(135deg, #fbbf24, #d97706); box-shadow: 0 5px 0 #92400e; color: #fff; }

/* Flutuação sutil do nó atual (o translate de centragem é preservado). */
@keyframes dtIdle {
  0%, 100% { transform: translate(-50%, -50%); }
  50% { transform: translate(-50%, calc(-50% - 5px)); }
}
/* Nuvens à deriva (aplicado só a algumas, via classe no SVG). */
.des-cloud { animation: desCloudDrift 10s ease-in-out infinite alternate; }
@keyframes desCloudDrift {
  from { transform: translateX(0); }
  to { transform: translateX(16px); }
}
/* Cresce e volta sem sair do lugar (preserva o translate de centragem). */
@keyframes dtPop {
  0% { transform: translate(-50%, -50%) scale(1); }
  55% { transform: translate(-50%, -50%) scale(1.28); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

/* Flash dourado da explosão final do desafio. */
@keyframes desFlashFade {
  0% { opacity: 0; }
  25% { opacity: 1; }
  100% { opacity: 0; }
}
.dt-ring {
  position: absolute;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: 3px solid var(--des-primary);
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
  animation: dtPulse 2s ease-in-out infinite;
}
@keyframes dtPulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
  50% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
}
.dt-bubble {
  position: absolute;
  transform: translate(-50%, -100%);
  background: var(--des-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 0.35rem 0.75rem;
  border-radius: 12px;
  white-space: nowrap;
  z-index: 3;
  pointer-events: none;
  animation: dtFloat 2.6s ease-in-out infinite;
}
@keyframes dtFloat {
  0%, 100% { transform: translate(-50%, -100%); }
  50% { transform: translate(-50%, calc(-100% - 4px)); }
}
/* Acessibilidade: sem movimento contínuo p/ quem pediu menos animação. */
@media (prefers-reduced-motion: reduce) {
  .dt-current, .dt-bubble, .dt-ring, .des-cloud { animation: none; }
}
.dt-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--des-primary);
  border-bottom: 0;
}

/* ── Botão flutuante para abrir o mapa (mobile) ───────── */
.des-map-fab {
  display: none;
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 1500;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, var(--des-primary), var(--des-primary-dark));
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 0.7rem 1.15rem;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 6px 20px rgba(139,92,246,0.45);
  cursor: pointer;
}
.des-map-fab i { font-size: 0.95rem; }

body.des-map-open { overflow: hidden; }

/* No mobile/tablet o painel vira um mapa em tela cheia */
@media (max-width: 991.98px) {
  .des-map-fab { display: inline-flex; }
  .des-map-panel {
    position: fixed;
    inset: 0;
    z-index: 2000;
    max-height: none;
    border-radius: 0;
    margin: 0;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.3, 0.9, 0.3, 1);
    pointer-events: none;
  }
  .des-map-panel.open {
    transform: translateY(0);
    pointer-events: auto;
  }
  .des-map-close { display: block; }
}

/* ── Card da questão ─────────────────────────────────── */
.des-card {
  background: #fff;
  border-radius: var(--des-radius);
  box-shadow: var(--des-shadow);
  padding: 1.8rem;
  animation: desSlideIn 0.45s ease;
  position: relative;
  overflow: hidden;
}
.des-enunciado {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.6;
  color: #1f2937;
  margin-bottom: 1.5rem;
}
.des-questao-badge {
  display: inline-block;
  background: rgba(139,92,246,0.1);
  color: var(--des-primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
  margin-bottom: 0.8rem;
}

/* ── Opções ──────────────────────────────────────────── */
.des-opcoes {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.des-opcao {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
  color: #374151;
  position: relative;
}
.des-opcao:hover:not(.disabled) {
  border-color: var(--des-primary);
  background: rgba(139,92,246,0.04);
  transform: translateX(4px);
}
.des-opcao-letter {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background: var(--des-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--des-gray);
  transition: all 0.2s;
}
.des-opcao:hover:not(.disabled) .des-opcao-letter {
  background: var(--des-primary);
  color: #fff;
}
.des-opcao.selecionada {
  border-color: var(--des-primary);
  background: rgba(139,92,246,0.06);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
.des-opcao.selecionada .des-opcao-letter {
  background: var(--des-primary);
  color: #fff;
}

/* Botão confirmar */
.des-confirmar-wrap {
  margin-top: 1rem;
  text-align: center;
  animation: desFeedbackIn 0.25s ease;
}
.des-btn-confirmar {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 2rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--des-primary), #6d28d9);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(139,92,246,0.25);
}
.des-btn-confirmar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(139,92,246,0.35);
}
.des-btn-confirmar:active {
  transform: scale(0.97);
}

.des-opcao.correta {
  border-color: var(--des-green) !important;
  background: rgba(16,185,129,0.06);
}
.des-opcao.correta .des-opcao-letter {
  background: var(--des-green);
  color: #fff;
}
.des-opcao.errada {
  border-color: var(--des-red) !important;
  background: rgba(239,68,68,0.06);
}
.des-opcao.errada .des-opcao-letter {
  background: var(--des-red);
  color: #fff;
}
.des-opcao.disabled {
  pointer-events: none;
  opacity: 0.7;
}

/* ── Feedback ────────────────────────────────────────── */
.des-feedback {
  margin-top: 1.2rem;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  animation: desFeedbackIn 0.35s ease;
  display: none;
}
.des-feedback.show { display: block; }
.des-feedback.correta {
  background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(52,211,153,0.08));
  border: 1px solid rgba(16,185,129,0.2);
  color: #065f46;
}
.des-feedback.errada {
  background: linear-gradient(135deg, rgba(239,68,68,0.08), rgba(248,113,113,0.08));
  border: 1px solid rgba(239,68,68,0.2);
  color: #991b1b;
}
.des-feedback-title {
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.3rem;
}
.des-feedback-comment {
  font-size: 0.88rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0,0,0,0.06);
  color: #4b5563;
}

/* ── Sidebar gamificação ─────────────────────────────── */
.des-sidebar {
  background: #fff;
  border-radius: var(--des-radius);
  box-shadow: var(--des-shadow);
  padding: 1.2rem;
}
.des-sidebar-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--des-gray);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.8rem;
}
.des-sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.88rem;
}
.des-sidebar-item:last-child { border-bottom: none; }
.des-sidebar-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
.des-sidebar-icon.purple { background: rgba(139,92,246,0.1); color: var(--des-primary); }
.des-sidebar-icon.green { background: rgba(16,185,129,0.1); color: var(--des-green); }
.des-sidebar-icon.gold { background: rgba(245,158,11,0.1); color: var(--des-gold); }
.des-sidebar-icon.red { background: rgba(239,68,68,0.1); color: var(--des-red); }
.des-sidebar-value {
  font-weight: 700;
  margin-left: auto;
  font-size: 0.95rem;
}

/* ── Empty state ─────────────────────────────────────── */
.des-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--des-gray);
}
.des-empty i { font-size: 2.5rem; margin-bottom: 0.8rem; color: #d1d5db; }

/* ── Animações ───────────────────────────────────────── */
@keyframes desPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(139,92,246,0.25); }
  50% { box-shadow: 0 0 0 8px rgba(139,92,246,0.10); }
}
@keyframes desSlideIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes desFeedbackIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes desShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
@keyframes desBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ── Mini Ranking Sidebar ────────────────────────────── */
.des-mini-rank-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.35rem;
  border-radius: 8px;
  font-size: 0.8rem;
  transition: background 0.2s;
}
.des-mini-rank-item:hover { background: #f9fafb; }
.des-mini-rank-item.is-me { background: rgba(139,92,246,0.06); }

.des-mini-pos {
  width: 22px; height: 22px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.55rem; color: #fff; flex-shrink: 0;
}
.des-mini-pos.p1 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.des-mini-pos.p2 { background: linear-gradient(135deg, #94a3b8, #64748b); }
.des-mini-pos.p3 { background: linear-gradient(135deg, #d97706, #92400e); }
.des-mini-pos.pn { background: #e5e7eb; color: #64748b; }
.des-mini-pos i { font-size: 0.5rem; }

.des-mini-avatar {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #8b5cf6, #a78bfa); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.58rem; overflow: hidden;
}
.des-mini-avatar img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
}

.des-mini-name {
  flex: 1; font-weight: 600; color: #1f2937;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.des-mini-you {
  font-size: 0.5rem; background: #8b5cf6; color: #fff;
  padding: 0.04rem 0.25rem; border-radius: 4px; font-weight: 700;
  vertical-align: middle; margin-left: 0.15rem;
}

.des-mini-stars { display: flex; gap: 1px; flex-shrink: 0; }
.des-mini-stars .s-on { color: #fbbf24; font-size: 0.55rem; }
.des-mini-stars .s-off { color: #d1d5db; font-size: 0.55rem; }

.des-mini-resets {
  font-size: 0.65rem; color: #6b7280; font-weight: 600;
  flex-shrink: 0; min-width: 26px; text-align: right;
}
.des-mini-resets i { font-size: 0.48rem; }

.des-mini-me-sep {
  height: 1px; background: #e5e7eb; margin: 0.3rem 0.35rem;
}

.des-mini-footer {
  font-size: 0.68rem; color: #9ca3af; text-align: center;
  padding-top: 0.5rem; border-top: 1px dashed #e5e7eb; margin-top: 0.4rem;
}
.des-mini-footer i { margin-right: 0.2rem; }

/* ── Modal Top Jogadores ─────────────────────────────── */
.des-rank-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17,24,39,0.55);
  backdrop-filter: blur(4px);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: desRankFade 0.22s ease;
}
@keyframes desRankFade { from { opacity: 0; } to { opacity: 1; } }
.des-rank-modal {
  background: #fff;
  border-radius: 18px;
  width: 100%;
  max-width: 420px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35);
  animation: desSlideIn 0.28s ease;
}
.des-rank-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.1rem;
  background: linear-gradient(135deg, var(--des-primary), var(--des-primary-dark));
  color: #fff;
}
.des-rank-head-title {
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
}
.des-rank-head-title i { color: #fcd34d; }
.des-rank-head-count {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255,255,255,0.2);
  padding: 0.12rem 0.5rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}
.des-rank-head-count i { font-size: 0.62rem; }
.des-rank-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 0.15rem;
  opacity: 0.85;
}
.des-rank-close:hover { opacity: 1; }
.des-rank-body {
  padding: 0.6rem 0.8rem;
  overflow-y: auto;
  flex: 1;
}
.des-rank-body::-webkit-scrollbar { width: 5px; }
.des-rank-body::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.4); border-radius: 4px; }
.des-rank-empty {
  text-align: center;
  color: #9ca3af;
  padding: 2.2rem 1rem;
  font-size: 0.86rem;
}
.des-rank-empty i { font-size: 1.9rem; color: #d1d5db; margin-bottom: 0.6rem; }
.des-rank-empty p { margin: 0; line-height: 1.5; }
.des-rank-empty strong { color: var(--des-primary); }
.des-rank-full {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem;
  background: #f9fafb;
  border-top: 1px solid #eef2f7;
  color: var(--des-primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.15s;
}
.des-rank-full:hover { background: #f3f4f6; color: var(--des-primary-dark); }
.des-rank-full i:last-child { font-size: 0.7rem; opacity: 0.55; }

/* ── Responsivo ──────────────────────────────────────── */
@media (max-width: 767px) {
  .des-hero { top: 0; padding: 0.8rem 0; }
  .des-hero-title { font-size: 1rem; }
  .des-card { padding: 1.2rem; }
  .des-enunciado { font-size: 1rem; }
  .des-sidebar { margin-top: 1rem; }

  /* Centraliza os itens do hero no mobile */
  .des-hero-top { justify-content: center; text-align: center; }
  .des-hero-brand { flex: 1 1 100%; justify-content: center; }
  .des-hero-right { width: 100%; justify-content: center; }
  .des-hero-stats { justify-content: center; }
  .des-hero-progress-row { justify-content: center; }
}
