@font-face { font-family: 'Barlow Condensed'; font-weight: 800; src: url('assets/fonts/BarlowCondensed-ExtraBold.ttf'); font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('assets/fonts/Manrope.ttf'); font-display: swap; }
:root {
  --fundo: #07131d;
  --vidro: rgba(9, 24, 36, .9);
  --linha: rgba(224, 223, 196, .18);
  --texto: #eef2ea;
  --suave: #9fb2b8;
  --vermelho: #e63946;
  --ouro: #ffd166;
  --creme: #e0dfc4;
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--texto);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--fundo); }
button { font-family: inherit; color: inherit; }
#cena { position: fixed; inset: 0; }
#cena canvas { display: block; width: 100%; height: 100%; touch-action: none; }
h2, h3, .marca span, .titulo { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; letter-spacing: .01em; }

.vidro, #painel, .marca, #placar, #abas button, #feed li { background: var(--vidro); border: 1px solid var(--linha); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

#topo { position: fixed; top: 0; left: 0; right: 0; z-index: 5; display: flex; gap: 8px; align-items: center; padding: max(12px, env(safe-area-inset-top)) 16px 0; pointer-events: none; }
#topo > * { pointer-events: auto; }
.marca { display: flex; align-items: center; gap: 8px; border-radius: 999px; padding: 4px 14px 4px 4px; text-decoration: none; color: var(--texto); white-space: nowrap; }
.marca img { width: 34px; height: 34px; border-radius: 50%; }
.marca span { font-size: 21px; }
#busca { flex: 1; min-width: 0; max-width: 360px; position: relative; margin-left: auto; }
#q { width: 100%; font: 600 15px 'Manrope'; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--linha); background: var(--vidro); color: var(--texto); outline: none; }
#q::placeholder { color: var(--suave); }
#sugestoes { position: absolute; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none; background: var(--vidro); border: 1px solid var(--linha); border-radius: 14px; max-height: 50vh; overflow: auto; }
#sugestoes li { padding: 8px 10px; border-radius: 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; }
#sugestoes li:hover { background: rgba(255, 255, 255, .07); }
#sugestoes small { color: var(--suave); }

#placar { position: fixed; top: 72px; left: 16px; z-index: 4; border-radius: 14px; padding: 9px 13px; font-size: 13px; line-height: 1.45; max-width: 340px; }
#placar b { font-family: 'Barlow Condensed'; font-size: 17px; }
#placar .vivo { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--vermelho); margin-right: 6px; animation: pisca 1.2s infinite; }
@keyframes pisca { 50% { opacity: .25; } }

#feed { position: fixed; left: 16px; bottom: 88px; z-index: 4; list-style: none; margin: 0; padding: 0; width: min(330px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
#feed li { border-left: 4px solid var(--c, var(--creme)); border-radius: 10px; padding: 6px 10px; font-size: 12.5px; line-height: 1.35; animation: entra .35s ease-out; }
#feed li small { display: block; color: var(--suave); font-size: 11px; }
#feed li:nth-child(n+5) { display: none; }
@keyframes entra { from { opacity: 0; transform: translateX(-16px); } }

#abas { position: fixed; bottom: max(14px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); z-index: 5; display: flex; gap: 8px; }
#abas button { border-radius: 14px; padding: 7px 14px; cursor: pointer; font-weight: 700; font-size: 15px; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 92px; }
#abas button span { font-size: 12px; }
#abas button:hover { border-color: var(--creme); }

#painel { position: fixed; z-index: 6; right: 16px; top: 72px; width: min(390px, calc(100vw - 32px)); max-height: calc(100% - 160px); overflow: auto; border-radius: 18px; padding: 18px; }
#painel h2 { margin: 0 0 4px; font-size: 28px; line-height: 1.05; padding-right: 30px; }
#painel h3 { margin: 18px 0 6px; font-size: 16px; text-transform: uppercase; color: var(--suave); letter-spacing: .04em; }
#painel p { margin: 8px 0; line-height: 1.5; font-size: 14.5px; }
.fechar { position: absolute; right: 10px; top: 6px; border: 0; background: none; font-size: 28px; cursor: pointer; color: var(--suave); }
.sub { color: var(--suave); font-size: 13.5px; }
.linha { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(224, 223, 196, .1); font-size: 14px; }
.linha:last-child { border-bottom: 0; }
.barra { flex: 1; height: 8px; background: rgba(255, 255, 255, .08); border-radius: 99px; overflow: hidden; }
.barra i { display: block; height: 100%; border-radius: 99px; }
.uf { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 5px; border-radius: 6px; font: 800 12px 'Manrope'; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.tag { display: inline-block; border-radius: 999px; padding: 2px 9px; font-weight: 800; font-size: 12px; background: var(--vermelho); color: #fff; }
.btn { font: 800 16px 'Barlow Condensed'; letter-spacing: .03em; border: 0; border-radius: 12px; padding: 10px 16px; cursor: pointer; background: var(--vermelho); color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.btn.sec { background: rgba(255, 255, 255, .1); border: 1px solid var(--linha); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.bloco { border: 1px solid var(--linha); border-radius: 14px; padding: 10px 12px; margin: 10px 0; background: rgba(255, 255, 255, .04); }
.bloco.alerta { border-color: rgba(230, 57, 70, .6); background: rgba(230, 57, 70, .1); }
a.h { color: var(--ouro); font-weight: 700; cursor: pointer; text-decoration: none; }
ol.rank { padding-left: 24px; margin: 4px 0; font-size: 14px; }
ol.rank li { padding: 3px 0; }
label.r { font-size: 13px; font-weight: 700; display: block; margin-top: 8px; color: var(--suave); }
.campo, select { width: 100%; font: 600 15px 'Manrope'; background: rgba(255, 255, 255, .06); border: 1px solid var(--linha); color: var(--texto); border-radius: 10px; padding: 9px 11px; outline: none; margin: 4px 0; }
select option { color: #000; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin: 10px 0; cursor: pointer; }
.check input { flex: none; margin-top: 3px; }
.preco { font: 800 30px 'Barlow Condensed'; color: var(--ouro); }

#rotulos { position: fixed; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.rot { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font: 800 12px 'Manrope'; color: #fff; background: rgba(7, 19, 29, .78); border-radius: 7px; padding: 2px 7px; }
.rot.dom { background: var(--vermelho); }
.rot.vit { background: var(--ouro); color: #1c1c1c; }

#carregando { position: fixed; inset: 0; display: grid; place-items: center; background: var(--fundo); font: 800 24px 'Barlow Condensed'; z-index: 40; transition: opacity .5s; }

@media (max-width: 640px) {
  .marca span { display: none; }
  .marca { padding: 4px; }
  #placar { top: 64px; font-size: 12px; padding: 7px 10px; max-width: calc(100% - 32px); }
  #feed { bottom: 80px; }
  #feed li:nth-child(n+3) { display: none; }
  #painel { top: auto; bottom: 80px; left: 16px; right: 16px; width: auto; max-height: 62%; }
  #abas { left: 16px; right: 16px; transform: none; }
  #abas button { flex: 1; min-width: 0; }
}
