/* =========================================================
   GLUB — HUD GERAL OFICIAL
   Camada única, transparente e independente das atividades.
   A arte-base está em assets/images/hud-geral-oficial/hud-global.png.
   Ícones e valores são sobrepostos pelo código e permanecem dinâmicos.
   ========================================================= */
#glub-hud-global{
  position:absolute; inset:0; z-index:10000; pointer-events:none;
  display:none; background-color:transparent;
  background-image:url('../assets/images/hud-geral-oficial/hud-global.png');
  background-size:100% 100%; background-repeat:no-repeat; background-position:center;
}
#glub-hud-global.glub-hud-visivel{display:block}

/* Os painéis cobrem os ícones/números impressos na arte antiga e recebem os oficiais. */
#glub-hud-global .glub-oficial-slot{
  position:absolute; top:0.2%; height:10.2%;
  display:flex; align-items:center; justify-content:center; gap:.25vw;
  overflow:hidden; color:#fff; font:bold clamp(13px,1.45vw,22px) Arial,sans-serif;
  text-shadow:1px 2px 2px #000; pointer-events:none;
}
#glub-hud-global .glub-oficial-slot img,
#glub-hud-global .glub-oficial-slot strong{position:relative;z-index:1}
#glub-hud-global .glub-oficial-slot img{object-fit:contain;filter:drop-shadow(0 2px 2px #0008);flex:0 0 auto}
#glub-hud-global .glub-oficial-slot strong{white-space:nowrap;line-height:1;flex:0 0 auto}

/* Tamanho visual individual: cada sprite respeita sua própria proporção. */
#glub-hud-global .glub-vidas img{width:31%;height:56%}
#glub-hud-global .glub-coroas img{width:29%;height:54%}
#glub-hud-global .glub-moedas img{width:30%;height:55%}
#glub-hud-global .glub-tempo img{width:23%;height:57%}
#glub-hud-global .glub-tesouros img{width:31%;height:51%}
#glub-hud-global .glub-mapas img{width:38%;height:54%}

/* Posições correspondentes às molduras do hud-global.png. */
#glub-hud-global .glub-vidas{left:20.8%;width:9.0%}
#glub-hud-global .glub-coroas{left:29.7%;width:9.0%}
#glub-hud-global .glub-moedas{left:38.6%;width:9.1%}
#glub-hud-global .glub-tempo{left:47.7%;width:12.0%}
#glub-hud-global .glub-tesouros{left:59.7%;width:9.2%}
#glub-hud-global .glub-mapas{left:68.8%;width:10.3%}

/* Acertos/erros: preserva os títulos da própria arte e substitui somente os números. */
#glub-hud-global .glub-oficial-placar{
  position:absolute; top:2.7%; height:5.2%; display:flex;align-items:center;justify-content:center;
  background:transparent; border-radius:6px; color:#fff; font:bold clamp(15px,1.8vw,28px) Arial,sans-serif;
  text-shadow:1px 2px 2px #000; pointer-events:none;
}
#glub-hud-global .glub-acertos{left:81.3%;width:7.7%;color:#79ef82}
#glub-hud-global .glub-erros{left:90.3%;width:7.4%;color:#ff9292}

/* Áreas clicáveis invisíveis sobre os botões desenhados na arte oficial. */
#glub-hud-global .glub-hotspot{position:absolute;left:1.3%;width:10.0%;height:12.0%;pointer-events:auto;background:transparent;border:0;cursor:pointer}
#glub-hud-global .glub-hotspot-pause{top:32.0%}
#glub-hud-global .glub-hotspot-save{top:44.5%}
#glub-hud-global .glub-hotspot-back{top:57.2%}
#glub-hud-global .glub-hotspot-exit{top:69.8%}
#glub-hud-global .glub-hotspot-pistas{top:82.0%;height:10.5%}
/* Figuras oficiais dos quatro botões do HUD global.
   Somente os círculos são posicionados aqui.
   As molduras de madeira e as áreas clicáveis não se movem. */
#glub-hud-global .glub-hotspot-imagem{
  display:block;
  width:52%;
  height:52%;
  object-fit:contain;
  pointer-events:none;
  user-select:none;

  position:absolute;

  /* Centraliza horizontalmente os círculos */
  left:48%;

  /* Desce os círculos para o centro das molduras */
  top:75%;

  transform:translate(-50%,-50%);

  -webkit-user-drag:none;
  filter:drop-shadow(0 3px 3px rgba(0,0,0,.28));
}

/* HUDs locais continuam no DOM para suas funções, mas não são desenhados. */
#tarefa1-tela .tarefa1-hud-estatisticas,#tarefa1-tela .tarefa1-hud-placar,#tarefa1-tela .tarefa1-hud-controles,
#tarefa2-tela .tarefa1-hud-estatisticas,#tarefa2-tela .tarefa1-hud-placar,#tarefa2-tela .tarefa1-hud-controles,
#tarefa1-tela .at1-logo-fixo,#tarefa2-tela .at2-logo-fixo{visibility:hidden!important}


/*=========================================================
   HUD — CENTRALIZAÇÃO DOS ÍCONES E VALORES
   ========================================================= */

/*
   O quadrinho inteiro controla a centralização vertical.
   Ícone + valor formam um único conjunto centralizado.
*/
#glub-hud-global .glub-oficial-slot{
    position:absolute;

    /* faixa interna dos quadrinhos superiores */
    top:0.2%;
    height:10.2%;

    display:flex;
    flex-direction:row;
    align-items:center;

    
    gap:4px;

    overflow:hidden;

    color:#fff;
    font:bold clamp(13px,1.45vw,22px) Arial,sans-serif;
    text-shadow:1px 2px 2px #000;

    pointer-events:none;
    /* Desce ícone + valor dentro das caixas */
  transform:translateY(14px);
    justify-content:center;
}

/* =========================================================
   CONFIGURAÇÃO COMUM
   ========================================================= */

#glub-hud-global .glub-oficial-slot img{
    position:relative;
    display:block;
    object-fit:contain;
    flex:0 0 auto;

    filter:drop-shadow(0 2px 2px #0008);
}

#glub-hud-global .glub-oficial-slot strong{
    position:relative;
    display:block;

    flex:0 0 auto;
    white-space:nowrap;

    line-height:1;
    margin:0;
    padding:0;
}


/* =========================================================
   VIDA
   ========================================================= */

#glub-hud-global .glub-vidas img{
    width:32%;
    height:54%;

    left:0;
    top:0;
}

#glub-hud-global .glub-vidas strong{
    left:0;
    top:0;
}

/* =========================================================
   COROA
   ========================================================= */

#glub-hud-global .glub-coroas img{
    width:45%;
    height:55%;

    /* Coroa centralizada, sem deslocamento para a esquerda. */
    left:0;
    top: 0;
}

#glub-hud-global .glub-coroas strong{
    /* Aproxima o contador da coroa. */
    left:-3%;
    top:0;
}
/* =========================================================
   MOEDA
   ========================================================= */

#glub-hud-global .glub-moedas img{
    width:30%;
    height:53%;

    /* moeda mais para a esquerda */
    left:0px;
    top:0;
}

#glub-hud-global .glub-moedas strong{
    /* Mais área útil para o acúmulo de moedas sem invadir o tempo. */
    left:-2px;
    top:0;
    min-width:58%;
    max-width:68%;
    text-align:center;
    font-size:clamp(12px,1.32vw,20px);
    letter-spacing:-0.3px;
}

/* =========================================================
   AMPULHETA + TEMPO
   ========================================================= */

#glub-hud-global .glub-tempo{
    gap:7px;
}

#glub-hud-global .glub-tempo img{
    width:22%;
    height:54%;

    left:0;
    top:0;
}

#glub-hud-global .glub-tempo strong{
    left:0;
    top:0;

    font-size:clamp(14px,1.35vw,21px);
}


/* =========================================================
   BAÚ — ACUMULA_TESOURO
   ========================================================= */

#glub-hud-global .glub-tesouros img{
    width:34%;
    height:50%;

    left:0;
    top:0;
}

#glub-hud-global .glub-tesouros strong{
    left:0;
    top:0;
}


/* =========================================================
   MAPA VOCÁLICO
   ========================================================= */

#glub-hud-global .glub-mapas{
    gap:3px;
}

#glub-hud-global .glub-mapas img{
    width:40%;
    height:52%;

    left:0;
    top:0;
}

#glub-hud-global .glub-mapas strong{
    left:0;
    top:0;
}


/* =========================================================
   ACERTOS / ERROS
   Centraliza somente os valores.
   Os títulos fazem parte da arte da moldura.
   ========================================================= */

#glub-hud-global .glub-oficial-placar{
    position:absolute;

    top:2.7%;
    height:5.2%;

    display:flex;
    align-items:center;
    justify-content:center;

    background:transparent;
    border-radius:6px;

    font:bold clamp(15px,1.8vw,28px) Arial,sans-serif;
    text-shadow:1px 2px 2px #000;

    pointer-events:none;
}

#glub-hud-global .glub-acertos{
    left:81.3%;
    width:7.7%;

    color:#79ef82;

    transform:translate(0, 0);
}

#glub-hud-global .glub-erros{
    left:90.3%;
    width:7.4%;

    color:#ff9292;

    transform:translate(0, 0);
}


/* =========================================================
   GLUB — NÚMEROS DO HUD GLOBAL
   Versão compacta para valores elevados
   ========================================================= */

/* Vidas, coroas, baús e mapas */
#glub-hud-global .glub-vidas strong,
#glub-hud-global .glub-coroas strong,
#glub-hud-global .glub-tesouros strong,
#glub-hud-global .glub-mapas strong {
    font-size:clamp(13px,1.30vw,19px);
    font-weight:800;
    line-height:1;
}

/* MOEDAS — até 100.000 */
#glub-hud-global .glub-moedas {
    gap:0;
}

#glub-hud-global .glub-moedas img {
    left:0px;
}

#glub-hud-global .glub-moedas strong {
    left:-2px;
    min-width:0;
    max-width:none;
    flex:0 1 auto;
    font-size:clamp(11px,1.10vw,16px);
    font-weight:800;
    letter-spacing:-0.6px;
    white-space:nowrap;
    font-variant-numeric:tabular-nums;
}

/* Tempo */
#glub-hud-global .glub-tempo strong {
    font-size:clamp(12px,1.20vw,18px);
    font-weight:800;
}

/* Acertos e erros */
#glub-hud-global .glub-oficial-placar {
    font-size:clamp(16px,1.55vw,23px);
    font-weight:800;
}


/* =========================================================
   GLUB — ÁREAS CLICÁVEIS TRANSPARENTES
   ========================================================= */

#glub-hud-global .glub-hotspot {
    position:absolute;

    left:3.0%;
    width:6.5%;
    height:12.0%;

    pointer-events:auto;
    cursor:pointer;

    background:transparent !important;
    border:none !important;
    outline:none !important;
    box-shadow:none !important;

    padding:0;
    -webkit-tap-highlight-color:transparent;
}

/* Remove os contornos ao clicar ou selecionar */
#glub-hud-global .glub-hotspot:focus,
#glub-hud-global .glub-hotspot:focus-visible,
#glub-hud-global .glub-hotspot:active {
    outline:none !important;
    border:none !important;
    box-shadow:none !important;
    background:transparent !important;
}

/* Seta de continuidade permanente no HUD (independente da fase). */
#glub-hud-global #glub-seta-global{
 position:absolute;right:12.5%;bottom:11%;width:7%;height:10%;z-index:20;
 display:flex;align-items:center;justify-content:center;pointer-events:auto;
 border:4px ridge #a86a22;border-radius:15px;
 background:linear-gradient(#a96a30,#653612);color:#ffe3a0;
 font:bold clamp(22px,3.4vw,48px) Arial,sans-serif;
 text-shadow:1px 3px 2px #2a1708;box-shadow:0 4px 8px #0008;
 cursor:pointer;opacity:.48;
}
#glub-hud-global #glub-seta-global.liberada{opacity:1;filter:drop-shadow(0 0 5px #ffd15a)}
#glub-hud-global #glub-seta-global:disabled{cursor:not-allowed}
/* As placas individuais das atividades permanecem visíveis. */

/* GLUB: seta de madeira sempre visivel e acima dos comandos de toque. */
#glub-hud-global #glub-seta-global {
  position:absolute;right:12.5%;bottom:11%;width:8%;height:11%;
  z-index:10020;display:flex;align-items:center;justify-content:center;
  padding:0;border:0;border-radius:0;background:transparent;
  box-shadow:none;text-shadow:none;opacity:1!important;filter:none;
  pointer-events:auto;cursor:pointer;
}
#glub-hud-global #glub-seta-global img {
  display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;
}
#glub-hud-global #glub-seta-global:disabled {
  opacity:1!important;filter:grayscale(.45) brightness(.85);cursor:not-allowed;
}
#glub-hud-global #glub-seta-global.liberada {
  opacity:1!important;filter:drop-shadow(0 0 7px #ffd15a);
}

/* Setas por atividade: a seta global fica desativada. */
#glub-hud-global #glub-seta-global{display:none!important}

/* Placar global: desce apenas os números, proporcionalmente à tela. */
#glub-hud-global .glub-oficial-placar { top: 6.2%; }

/* GLUB - ajuste vertical exclusivo das imagens dos slots oficiais. */
#glub-hud-global .glub-oficial-slot > img {
    translate: 0 10px;
}
/* Posição vertical dos ícones */
#glub-hud-global .glub-oficial-slot > img {
    translate: 0 10px;
}

/* Posição vertical dos valores numéricos */
#glub-hud-global .glub-oficial-slot > strong {
    translate: 0 10px;
}