* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #05060f; color: #eef; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
canvas#jogo { position: fixed; inset: 0; display: block; cursor: crosshair; }

#hud { position: fixed; inset: 0; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; padding: 12px; gap: 8px; }
.painel { pointer-events: auto; background: rgba(12, 14, 30, 0.78); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 10px 12px; backdrop-filter: blur(8px); }
h1 { margin: 0 0 4px; font-size: 18px; letter-spacing: 0.02em; }
h2 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: #aab; }
.dica { font-weight: normal; text-transform: none; letter-spacing: 0; color: #889; font-size: 11px; }
#status { font-size: 12px; color: #9fb; }
#status.offline { color: #fb8; }

#topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
#rodape { display: flex; justify-content: center; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
#ajuda { align-self: center; font-size: 12px; color: #bbc; padding: 6px 10px; }
#ajuda b { color: #fff; }

#painel-planetas { min-width: 220px; max-width: 280px; }
#lista-planetas { list-style: none; margin: 0 0 8px; padding: 0; max-height: 30vh; overflow: auto; }
#lista-planetas li { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
#lista-planetas li:hover { background: rgba(255,255,255,0.08); }
#lista-planetas li.aqui { color: #9fb; }
.bolinha { width: 12px; height: 12px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 1px rgba(255,255,255,0.3); }
.linha { display: flex; gap: 6px; margin-top: 6px; }

button { font: inherit; font-size: 13px; color: #fff; background: #3b4a9a; border: 0; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
button:hover { background: #4b5cb8; }
button.secundario { background: #333a55; }
button.ativo { outline: 2px solid #ffd23f; }
input[type=text], input:not([type]) { font: inherit; font-size: 13px; color: #fff; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; padding: 6px 8px; width: 130px; }

.cores { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; max-width: 220px; }
.cor { width: 22px; height: 22px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; box-shadow: 0 0 0 1px rgba(255,255,255,0.25); }
.cor.ativa { border-color: #fff; transform: scale(1.12); }

#botoes-ferramentas { display: flex; flex-wrap: wrap; gap: 5px; }
#botoes-ferramentas button { background: #2a3050; display: flex; flex-direction: column; align-items: center; min-width: 58px; padding: 5px 6px; font-size: 11px; }
#botoes-ferramentas button span { font-size: 20px; line-height: 1; }
#botoes-ferramentas button.ativo { background: #3b4a9a; }

#itens-mochila { display: flex; gap: 6px; flex-wrap: wrap; min-width: 120px; }
#itens-mochila button { background: #2a3050; font-size: 16px; padding: 4px 8px; position: relative; }
#itens-mochila button i { position: absolute; right: -4px; top: -6px; font-style: normal; font-size: 11px; background: #ffd23f; color: #000; border-radius: 10px; padding: 0 5px; }

#aviso { align-self: center; pointer-events: none; background: rgba(255, 210, 63, 0.92); color: #000; padding: 6px 12px; border-radius: 10px; font-size: 14px; opacity: 0; transition: opacity 0.25s; }
#aviso.mostrar { opacity: 1; }

dialog { background: #141830; color: #eef; border: 1px solid rgba(255,255,255,0.15); border-radius: 14px; padding: 18px; min-width: 300px; }
dialog::backdrop { background: rgba(0,0,0,0.55); }
dialog label { display: block; margin: 10px 0; font-size: 13px; }
dialog input[type=range] { width: 100%; }
dialog .linha { justify-content: flex-end; }

@media (max-width: 760px) {
  #ajuda { display: none; }
  #painel-planetas { min-width: 160px; }
}
