:root {
  --panel: rgba(14, 14, 20, 0.9);
  --panel-2: rgba(34, 34, 46, 0.92);
  --line: rgba(255, 255, 255, 0.09);
  --text: #f2f2f2;
  --muted: #a3a6b1;
  --accent: #ffb300;
  --accent-2: #ff6d3a;
  --danger: #ef4c43;
  --good: #7bd36b;
  --hp: #e84a3c;
  --armor: #46a6ff;
  --pixel: 'VT323', ui-monospace, Consolas, monospace;
  --title: 'Press Start 2P', 'VT323', monospace;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #0b0d12; color: var(--text);
  font-family: var(--pixel); font-size: 21px; line-height: 1.15;
  user-select: none; -webkit-user-select: none;
}
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
b { color: var(--accent); font-weight: normal; }
img.icon { image-rendering: pixelated; }

.screen { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 30; }
.panel {
  position: relative;
  background: var(--panel);
  border: 3px solid #000;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.07), 0 24px 70px rgba(0, 0, 0, 0.55);
  padding: 24px 28px;
}
.panel.center { text-align: center; min-width: 360px; }
h1, h2, h3 { font-family: var(--title); font-weight: normal; margin: 0 0 14px; letter-spacing: 1px; }
h2 { font-size: 18px; color: var(--accent); }
h3 { font-size: 11px; color: var(--muted); margin: 14px 0 8px; }
.small { font-size: 17px; color: var(--muted); margin: 0 0 8px; }

.btn {
  font-family: var(--title); font-size: 13px; color: #fff; cursor: pointer;
  background: linear-gradient(#6d6f78, #4b4d55);
  border: 3px solid #000;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.25), inset 0 -3px 0 rgba(0, 0, 0, 0.35);
  padding: 12px 18px; text-shadow: 2px 2px 0 #000;
  transition: transform 0.06s, filter 0.1s;
}
.btn:hover { filter: brightness(1.2); }
.btn:active { transform: translateY(2px); }
.btn.big {
  font-size: 18px; padding: 16px 26px; width: 100%;
  background: linear-gradient(#ffb74d, #f57c00);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.35), inset 0 -4px 0 rgba(0, 0, 0, 0.3);
}
.btn:disabled { filter: grayscale(1) brightness(0.6); cursor: not-allowed; }

/* ------------------------------------------------------------ menu */
#menu { z-index: 40; }
.menu-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(8, 10, 16, 0.55), rgba(8, 10, 16, 0.9)),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 48px),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0 2px, transparent 2px 48px),
    linear-gradient(#5d9e3a 0 22%, #86603f 22% 60%, #6f6f6f 60%);
  animation: pan 40s linear infinite;
}
@keyframes pan { from { background-position: 0 0; } to { background-position: 480px 0; } }
.menu-panel { width: min(940px, 96vw); max-height: 96vh; overflow-y: auto; padding: 18px 24px 16px; }
.menu-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.menu-brand { text-align: left; min-width: 0; }
.menu-brand .logo { margin: 2px 0 0; }
.menu-brand .tagline { margin: 4px 0 0; font-size: 20px; }
.menu-cols { display: grid; grid-template-columns: minmax(250px, 320px) 1fr; gap: 22px; margin-top: 12px; align-items: start; }
.menu-col { min-width: 0; }
.menu-match { background: rgba(255, 255, 255, 0.03); border: 2px solid var(--line); padding: 4px 14px 12px; }
.menu-you #ranking-btn { width: 100%; margin-top: 4px; }
.menu-sec { margin-top: 10px; border: 2px solid var(--line); background: rgba(255, 255, 255, 0.03); text-align: left; }
.menu-sec > summary { cursor: pointer; list-style: none; padding: 9px 12px; font-family: var(--title); font-size: 11px; color: #d7dae2; }
.menu-sec > summary::-webkit-details-marker { display: none; }
.menu-sec > summary::after { content: ' +'; color: var(--muted); }
.menu-sec[open] > summary::after { content: ' −'; }
.menu-sec > summary:hover { color: var(--accent); }
#room-box { padding: 0 12px 10px; text-align: left; }
#room-line { font-size: 20px; color: #d7dae2; margin-bottom: 8px; }
#room-line a { color: var(--accent); cursor: pointer; text-decoration: underline; margin-left: 6px; }
.room-row, #room-invite { display: flex; gap: 8px; align-items: stretch; }
#room-invite { margin-top: 8px; }
#room-box .btn, #ranking-btn, #pause-copy { font-size: 10px; padding: 9px 10px; }
#room-code, #invite-link {
  flex: 1; min-width: 0; font-family: var(--pixel); font-size: 22px; color: #fff; text-transform: uppercase;
  background: #07080c; border: 3px solid #000; box-shadow: inset 0 0 0 2px #3a3d48; padding: 4px 10px; outline: none;
}
#invite-link { text-transform: none; font-size: 19px; color: var(--accent); }
#room-code:focus { box-shadow: inset 0 0 0 2px var(--accent); }
.menu-panel .privacy { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
#server-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
#server-pick .field { margin: 0 4px 0 0; }
#server-pick button small { color: var(--muted); font-size: 13px; }
#server-pick button.sel small { color: #fff; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
#pause-room { margin: 6px 0 4px; font-size: 21px; color: #d7dae2; }
#pause-copy { margin-left: 8px; vertical-align: middle; }
#ranking { z-index: 45; background: rgba(5, 6, 10, 0.7); }
/* ------------------------------------------------------------ perfil, nível e XP */
#profile { z-index: 60; background: rgba(5, 6, 10, 0.7); }
.pc-chal { font-size: 15px; color: #9fd8ff; margin-top: 2px; }
.chal-head { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 0 4px; }
.chal-head h3 { margin: 0; font-size: 12px; color: var(--accent); }
.chal-head span { font-size: 15px; color: var(--muted); }
.chal { background: rgba(255, 255, 255, 0.04); border: 2px solid #000; padding: 5px 8px; margin-bottom: 5px; }
.chal .ct { display: flex; justify-content: space-between; gap: 8px; font-size: 18px; }
.chal .cx { color: #ffd54f; white-space: nowrap; }
.chal .cbar { position: relative; height: 16px; background: rgba(255, 255, 255, 0.08); margin-top: 3px; }
.chal .cbar i { display: block; height: 100%; background: #4fc3f7; }
.chal .cbar span { position: absolute; inset: 0; text-align: center; font-size: 13px; line-height: 16px; text-shadow: 1px 1px 0 #000; }
.chal.done { opacity: 0.65; }
.cos-title { margin: 10px 0 4px; font-size: 12px; color: var(--accent); }
.acct { display: flex; align-items: center; gap: 10px; background: rgba(79, 195, 247, 0.08); border: 2px solid #000; padding: 6px 8px; margin-bottom: 6px; font-size: 17px; }
.acct span { flex: 1; min-width: 0; }
.acct .btn { font-size: 10px; padding: 8px 10px; white-space: nowrap; }
.acct .btn.g { background: #fff; color: #222; }
.acct.on { background: rgba(102, 187, 106, 0.1); }
.acct-msg { font-size: 16px; color: #9fd8ff; margin: -2px 0 6px; }
.cos-wrap { display: flex; gap: 10px; align-items: flex-start; }
#cos-preview { width: 150px; height: 178px; flex: none; background: radial-gradient(circle at 50% 40%, rgba(255, 213, 79, 0.18), rgba(0, 0, 0, 0.25)); border: 2px solid #000; }
.cos-rows { flex: 1; min-width: 0; }
.cos-rows .field { margin: 2px 0; }
.cos-list { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.cos { position: relative; display: flex; flex-direction: column; align-items: center; width: 64px; padding: 3px 2px; font: inherit; color: #fff;
  background: rgba(255, 255, 255, 0.05); border: 2px solid #000; cursor: pointer; }
.cos:hover:not(:disabled) { background: rgba(255, 179, 0, 0.18); }
.cos.sel { box-shadow: inset 0 0 0 2px var(--accent); background: rgba(255, 179, 0, 0.14); }
.cos .ic { font-size: 22px; line-height: 1.1; }
.cos .nm { font-size: 12px; line-height: 1.1; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60px; }
/* aparência: amostras de cor (pele, cabelo, olhos) e o botão de sortear */
.look-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 4px; }
.look-head h4, .look-sep { margin: 4px 0; font-size: 18px; color: var(--accent); font-weight: normal; }
.look-rand { font-size: 16px; padding: 2px 10px; }
.cos.swb { width: 34px; padding: 3px; }
.cos .sw { display: block; width: 24px; height: 24px; border: 2px solid #000; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.cos .sw.eye { background: #fff; display: flex; align-items: center; justify-content: center; }
.cos .sw.eye i { display: block; width: 10px; height: 10px; }
.cos.locked { cursor: default; opacity: 0.5; }
.cos.locked .ic { filter: grayscale(1); }
.cos .lk { position: absolute; top: 1px; right: 2px; font-size: 11px; color: #ffd54f; }
@media (max-width: 560px) { .cos-wrap { flex-direction: column; align-items: center; } }
.chal.done .cbar i { background: #66bb6a; }
.profile-panel { width: min(560px, 94vw); max-height: 92vh; overflow-y: auto; }
#profile-card { display: flex; align-items: center; gap: 10px; margin: 2px 0 10px; }
#profile-card .pc-bar { flex: 1; min-width: 0; }
#profile-btn { font-size: 10px; padding: 8px 10px; white-space: nowrap; }
.lvl-line { display: flex; justify-content: space-between; font-size: 19px; }
.lvl-line .lv { color: #ffd54f; }
.lvl-line .xp { color: var(--muted); }
.lvl-bar { height: 10px; background: rgba(255, 255, 255, 0.1); border: 2px solid #000; margin-top: 2px; }
.lvl-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffb300, #ffd54f); transition: width 0.8s; }
.prof-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 12px 0; }
.prof-stats .st { background: rgba(255, 255, 255, 0.05); border: 2px solid #000; padding: 6px 4px; text-align: center; }
.prof-stats .st b { display: block; font-size: 24px; color: #fff; }
.prof-stats .st span { font-size: 15px; color: var(--muted); }
.prof-note { color: var(--muted); }
#hide-blind { position: absolute; inset: 0; background: #05060a; display: flex; align-items: center; justify-content: center; z-index: 3; pointer-events: none; }
#hide-blind .hb-box { text-align: center; text-shadow: 3px 3px 0 #000; }
#hide-blind h2 { font-size: clamp(16px, 3vw, 26px); color: var(--accent); }
#hide-blind p { font-size: 64px; color: #fff; margin: 6px 0 0; font-family: var(--title); }
#xp-pop { position: absolute; left: 50%; top: calc(50% + 34px); transform: translateX(-50%); font-size: 22px; color: #ffd54f;
  text-shadow: 2px 2px 0 #000; opacity: 0; pointer-events: none; white-space: nowrap; }
#xp-pop.show { animation: xppop 1.4s ease-out; }
@keyframes xppop { 0% { opacity: 0; transform: translate(-50%, 6px); } 12% { opacity: 1; transform: translate(-50%, 0); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -14px); } }
#end-xp { width: min(420px, 90vw); margin: 4px auto 6px; }
#end-xp:empty { display: none; }
#end-xp .gain { font-size: 26px; color: #ffd54f; }
#end-xp .parts { font-size: 15px; color: var(--muted); margin-top: 2px; }
#score-body .lvb { display: inline-block; min-width: 26px; margin-right: 4px; padding: 0 3px; font-size: 14px; color: #1a1300; background: #ffd54f; text-align: center; }
/* ------------------------------------------------------------ controles de toque */
#touch-ui { position: fixed; inset: 0; z-index: 9; touch-action: none; -webkit-user-select: none; user-select: none; }
#touch-ui.off { display: none; }
body.touch #game, body.touch #hud { touch-action: none; }
body.touch #hotbar .slot { pointer-events: auto; }
body.touch #keys-hint, body.touch #info { display: none; }
#touch-ui .stick { position: absolute; width: 124px; height: 124px; margin: -62px 0 0 -62px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.08); border: 3px solid rgba(255, 255, 255, 0.28); pointer-events: none; }
#touch-ui .knob { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255, 179, 0, 0.55); border: 3px solid rgba(0, 0, 0, 0.5); transform: translate(-50%, -50%); }
.tbtn { position: absolute; width: 62px; height: 62px; border-radius: 50%; border: 3px solid rgba(0, 0, 0, 0.55);
  background: rgba(20, 22, 30, 0.45); color: #fff; font-size: 28px; line-height: 1; padding: 0;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.18); touch-action: none; }
.tbtn.on { background: rgba(255, 179, 0, 0.55); }
.tbtn.big { width: 86px; height: 86px; font-size: 38px; }
.tbtn.small { width: 52px; height: 52px; font-size: 24px; }
.tbtn.top { width: 46px; height: 46px; font-size: 21px; border-radius: 10px; }
/* pular (▲) e agachar (▼): setas empilhadas na mesma coluna, ao lado do tiro */
.tbtn.arrow { width: 58px; height: 52px; border-radius: 12px; font-size: 26px; }
.tbtn[data-act=fire] { right: 22px; bottom: 104px; }
.tbtn[data-act=jump] { right: 122px; bottom: 164px; }
.tbtn[data-act=crouch] { right: 122px; bottom: 104px; }
.tbtn[data-act=aim] { right: 194px; bottom: 104px; }
.tbtn[data-act=reload] { right: 198px; bottom: 176px; }
.tbtn[data-act=nade] { right: 266px; bottom: 140px; }
.tbtn[data-act=pause] { right: 12px; top: 12px; }
.tbtn[data-act=score] { right: 64px; top: 12px; }
.tbtn[data-act=chat] { right: 116px; top: 12px; }
.tbtn[data-act=voice] { right: 168px; top: 64px; }
/* segunda fileira: oficina, loja e rádio (a de cima deixa espaço para a barra da partida) */
.tbtn[data-act=craft] { right: 12px; top: 64px; }
.tbtn[data-act=shop] { right: 64px; top: 64px; }
.tbtn[data-act=radio] { right: 116px; top: 64px; }
#rotate-hint { display: none; position: absolute; left: 50%; top: 38%; transform: translateX(-50%); background: rgba(10, 12, 18, 0.8);
  padding: 8px 14px; border: 2px solid var(--accent); font-size: 20px; pointer-events: none; white-space: nowrap; }
@media (orientation: portrait) { #rotate-hint { display: block; } }
#craft-close { position: absolute; right: 10px; top: 10px; font-size: 14px; padding: 8px 12px; }
body.touch #killfeed { right: 12px; top: 118px; }
body.touch #match-bar { left: calc(50% - 50px); } /* deixa espaço para os botões do topo à direita */
body.touch #vote-box { top: 72px; right: auto; left: 50%; transform: translateX(-50%); }
body.touch #ammo { bottom: 6px; right: 8px; }
body.touch #ammo .name { display: none; }

/* ------------------------------------------------------------ Sabotagem */
#sab-money { position: absolute; right: 22px; bottom: 124px; font-size: 32px; color: #ffd54f; text-shadow: 2px 2px 0 #000; }
#sab-carry { position: absolute; right: 22px; bottom: 164px; padding: 2px 10px; background: #b3261e; border: 2px solid #000; font-family: var(--title); font-size: 11px; text-shadow: 1px 1px 0 #000; animation: carry 1.2s ease-in-out infinite; }
@keyframes carry { 50% { filter: brightness(1.35); } }
#sab-hint { position: absolute; left: 50%; bottom: 150px; transform: translateX(-50%); padding: 4px 14px; background: rgba(8, 10, 16, 0.6); border-left: 3px solid var(--accent); font-size: 22px; text-shadow: 1px 1px 0 #000; white-space: nowrap; }
#act-bar { position: absolute; left: 50%; top: 60%; transform: translateX(-50%); width: min(340px, 70vw); height: 26px; background: rgba(0, 0, 0, 0.6); border: 3px solid #000; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12); }
#act-bar .fill { height: 100%; width: 0; background: linear-gradient(#ffb74d, #f57c00); }
#act-bar.defuse .fill { background: linear-gradient(#64b5f6, #1e88e5); }
/* Um Tiro Só: as vidas na barra de cima */
.hearts { color: #ff5252; letter-spacing: 2px; }
/* Battle Royale: tela arroxeada fora da zona */
#zone-tint { position: fixed; inset: 0; background: radial-gradient(ellipse at center, rgba(150, 60, 220, 0.12), rgba(110, 20, 170, 0.5)); pointer-events: none; z-index: 4; }
#zone-tint.hidden { display: none; }
/* O Chão é Lava: tela alaranjada com a câmera dentro da lava */
#lava-tint { position: fixed; inset: 0; background: radial-gradient(ellipse at center, rgba(255, 140, 20, 0.55), rgba(200, 40, 0, 0.85)); pointer-events: none; z-index: 4; }
#lava-tint.hidden { display: none; }
/* Detetive e Assassino: o seu papel na barra de cima */
.mmrole { font-weight: normal; }
.mmrole.murderer { color: #ff6b5f; }
.mmrole.sheriff, .mmrole.hero { color: #5aaeff; }
.mmrole.innocent { color: #9cff9c; }
/* Dominação: letras dos pontos na barra de cima */
.dchips { display: inline-flex; gap: 5px; vertical-align: middle; margin-right: 4px; }
.dchip { display: inline-block; width: 24px; height: 24px; line-height: 20px; text-align: center; font-family: var(--title); font-size: 10px; font-weight: normal; color: #fff; text-shadow: 1px 1px 0 #000; background: var(--dc); border: 2px solid var(--dk); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.dchip.cap { animation: dchip-pulse 0.8s ease-in-out infinite alternate; }
.dchip.fight { border-color: #ffeb3b; animation: dchip-pulse 0.35s steps(2) infinite; }
@keyframes dchip-pulse { from { filter: brightness(1); } to { filter: brightness(1.6); } }
#act-bar.dom .fill { background: var(--ac, #fff); box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.35); }
/* Dominação: cartões de classe no painel da loja */
.cls-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.cls-card { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 10px 12px; background: rgba(255, 255, 255, 0.06); border: 3px solid #000; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.1); color: inherit; font: inherit; cursor: pointer; }
.cls-card:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.cls-card.sel { box-shadow: inset 0 0 0 3px var(--good); background: rgba(102, 187, 106, 0.12); }
.cls-card .nm { font-size: 13px; }
.cls-card .cur { color: var(--good); font-size: 16px; }
.cls-card .its { display: flex; flex-direction: column; gap: 2px; font-size: 17px; color: var(--muted); }
.cls-card .it { display: flex; align-items: center; gap: 6px; }
.cls-card .it img { width: 26px; height: 26px; }
#act-bar span { position: absolute; inset: 0; text-align: center; font-family: var(--title); font-size: 10px; line-height: 20px; text-shadow: 1px 1px 0 #000; }
#round-banner { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); text-align: center; padding: 12px 28px; background: rgba(6, 8, 14, 0.72); border: 3px solid #000; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.1); animation: bannerin 0.35s ease-out; }
#round-banner .t { font-family: var(--title); font-size: clamp(18px, 3vw, 32px); text-shadow: 3px 3px 0 #000; }
#round-banner.win .t { color: #7bd36b; }
#round-banner.lose .t { color: #ef4c43; }
#round-banner .s { margin-top: 8px; font-size: 24px; color: #e8e8e8; }
#round-banner .sc { font-size: 30px; }
@keyframes bannerin { from { opacity: 0; transform: translate(-50%, -12px); } }
#shop { z-index: 35; background: rgba(5, 6, 10, 0.55); }
.shop-panel { width: min(820px, 96vw); max-height: 94vh; overflow-y: auto; }
.shop-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.shop-head h2 { margin: 0; }
#shop-money { font-size: 30px; color: #ffd54f; }
.shop-head .hint { color: var(--muted); font-size: 18px; margin-left: auto; margin-right: 48px; }
#shop-close { position: absolute; right: 10px; top: 10px; font-size: 14px; padding: 8px 12px; }
.shop-cat h3 { margin: 10px 0 6px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.shop-item { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left;
  font-family: var(--pixel); color: #fff; background: #14161d; border: 3px solid #000; box-shadow: inset 0 0 0 2px #3a3d48; padding: 6px; cursor: pointer; }
.shop-item:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.shop-item img { grid-row: span 2; width: 44px; height: 44px; }
.shop-item .nm { font-size: 19px; line-height: 1; }
.shop-item .pr { font-size: 19px; color: #ffd54f; }
.shop-item.off { opacity: 0.45; cursor: not-allowed; }
.shop-item.have { opacity: 0.8; }
.shop-item.have .pr { color: var(--good); }

#voice-hud { position: absolute; left: 14px; top: 226px; font-size: 20px; text-shadow: 2px 2px 0 #000; pointer-events: none; }
#voice-hud div { background: rgba(10, 12, 18, 0.6); padding: 2px 8px; margin-top: 3px; color: #7bd36b; width: max-content; }
#voice-hud .me { color: #0b0d12; background: #7bd36b; }
.ranking-panel { width: min(720px, 96vw); text-align: center; }
.rank-scroll { max-height: 60vh; overflow-y: auto; margin: 10px 0 16px; }
.ranking-panel table { width: 100%; border-collapse: collapse; font-size: 21px; }
.ranking-panel th { font-family: var(--title); font-size: 9px; color: var(--muted); padding: 6px 4px; font-weight: normal; }
.ranking-panel td { padding: 4px; text-align: center; border-top: 1px solid var(--line); }
.ranking-panel .l { text-align: left; }
.ranking-panel tr.top1 td { color: #ffd54f; }
.ranking-panel tr.top2 td { color: #e0e0e0; }
.ranking-panel tr.top3 td { color: #ffab66; }
.ranking-panel tr.me td { background: rgba(255, 179, 0, 0.12); }
.logo {
  font-size: clamp(26px, 6.2vw, 46px); margin: 6px 0 6px; white-space: nowrap;
  color: #ffcf40;
  text-shadow: 3px 3px 0 #d84315, 6px 6px 0 #6d1b00, 10px 10px 0 rgba(0, 0, 0, 0.45);
}
.logo span { color: #ffe9a6; }
.vt { font-family: var(--pixel) !important; letter-spacing: 2px; }
h2.vt { font-size: 32px; }
h3.vt { font-size: 22px; letter-spacing: 1px; }
.tagline { color: var(--muted); font-size: 24px; margin: 8px 0 22px; letter-spacing: 3px; }
.field { display: block; text-align: left; color: var(--muted); margin: 10px 0 6px; }
.field input, #chat-input {
  display: block; width: 100%; margin-top: 6px;
  font-family: var(--pixel); font-size: 26px; color: #fff;
  background: #07080c; border: 3px solid #000; box-shadow: inset 0 0 0 2px #3a3d48;
  padding: 8px 12px; outline: none;
}
.field input:focus { box-shadow: inset 0 0 0 2px var(--accent); }
#colors { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
#colors button {
  width: 38px; height: 38px; border: 3px solid #000; cursor: pointer;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.3), inset 0 -3px 0 rgba(0, 0, 0, 0.3);
}
#colors button.sel { outline: 3px solid #fff; outline-offset: 2px; }
#match-setup { margin: 0 0 12px; text-align: left; }
.pick.modes { display: grid; grid-template-columns: repeat(3, 1fr); }
.pick.modes button { font-size: 18px; padding: 6px 4px 5px; }
.pick.maps { flex-wrap: wrap; }
.pick.maps button { display: flex; flex-direction: column; align-items: flex-start; text-align: left; padding: 6px 10px; flex: 1 1 30%; }
.pick.maps button small { font-size: 15px; color: var(--muted); line-height: 1.15; }
.pick.maps button.sel small { color: #3a2a00; }
#match-setup .field { margin: 8px 0 6px; }
.pick { display: flex; gap: 6px; }
.pick button {
  flex: 1; min-width: 0; cursor: pointer; font-family: var(--pixel); font-size: 20px; color: #e8e8e8;
  background: #14161d; border: 3px solid #000; box-shadow: inset 0 0 0 2px #3a3d48; padding: 6px 4px; line-height: 1.1;
}
.pick button .ic { display: block; font-size: 24px; }
.pick button.sel { color: #000; background: var(--accent); box-shadow: inset 0 0 0 2px #ffe08a; }
.pick.small button { font-size: 18px; padding: 6px 2px; }
#mode-desc { margin: 6px 0 0; font-size: 17px; color: var(--muted); min-height: 20px; }
.setup-row { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: end; }
.stepper { display: flex; align-items: stretch; }
.stepper button {
  width: 38px; cursor: pointer; font-family: var(--pixel); font-size: 26px; color: #fff; line-height: 1;
  background: linear-gradient(#6d6f78, #4b4d55); border: 3px solid #000;
}
.stepper span { min-width: 46px; text-align: center; font-size: 28px; background: #07080c; border-top: 3px solid #000; border-bottom: 3px solid #000; padding: 2px 6px; }
#setup-note { margin: 10px 0 0; font-size: 18px; color: #cfd2da; }
#match-setup.locked .pick, #match-setup.locked .stepper, #match-setup.locked #mode-desc { opacity: 0.4; pointer-events: none; }
#match-setup.locked #setup-note { color: var(--accent); }
#server-status { margin-top: 12px; color: var(--muted); font-size: 19px; min-height: 22px; }
#touch-warn { margin-top: 10px; color: var(--accent); font-size: 20px; }
.how { text-align: left; font-size: 19px; color: #cfd2da; padding: 0 12px 10px; }
.how div { margin: 5px 0; }

/* ------------------------------------------------------------ carregando */
.loadbar { width: 320px; height: 16px; background: #000; margin: 18px auto; box-shadow: inset 0 0 0 2px #333; overflow: hidden; }
.loadbar div { height: 100%; width: 40%; background: repeating-linear-gradient(45deg, var(--accent) 0 10px, #f57c00 10px 20px); animation: load 1s linear infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
#loading-msg { color: var(--muted); }

/* ------------------------------------------------------------ pausa */
#pause { background: rgba(0, 0, 0, 0.45); }
.pause-panel { width: min(560px, 94vw); text-align: center; max-height: 96vh; overflow-y: auto; }
.pause-panel .sub { color: var(--muted); margin: -4px 0 16px; }
#lock-error { color: var(--accent); }
#fallback-note { font-size: 18px; color: #cfd2da; text-align: left; background: rgba(255, 179, 0, 0.08); border-left: 3px solid var(--accent); padding: 8px 12px; margin: 14px 0 0; }
#game.free-look { cursor: none; }
.settings { margin: 18px 0; text-align: left; }
.settings label { display: grid; grid-template-columns: 170px 1fr 56px; align-items: center; gap: 10px; margin: 8px 0; color: #ddd; }
.settings span { color: var(--accent); text-align: right; }
.settings span.lbl { color: inherit; text-align: left; }
.settings .lang-row { display: grid; grid-template-columns: 170px 1fr; align-items: center; gap: 10px; margin: 8px 0; color: #ddd; }
.settings .lang-row .lang-pick { justify-content: flex-start; }
/* seletor de idioma (menu e pausa) */
.lang-pick { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.lang-pick button {
  cursor: pointer; font-family: var(--pixel); font-size: 17px; line-height: 1; color: #cfd2da;
  background: #14161d; border: 2px solid #000; box-shadow: inset 0 0 0 2px #3a3d48; padding: 4px 8px;
}
.lang-pick button:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.lang-pick button.sel { color: #000; background: var(--accent); box-shadow: inset 0 0 0 2px #ffe08a; }
.menu-panel > .lang-pick { margin: -4px -4px 2px 0; }
.settings label.check { grid-template-columns: 170px auto 1fr; }
.settings label.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.settings label.check .hint { color: #8a8f9c; font-size: 15px; text-align: left; }
input[type=range] { accent-color: var(--accent); width: 100%; }
.controls { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; text-align: left; font-size: 18px; color: #cfd2da; margin: 12px 0 18px; }
/* painel de controles (pausa): esquema, lista de ações com a tecla de cada uma e opções do personalizado */
.controls-cfg { text-align: left; margin: 12px 0 18px; }
.controls-cfg .ctl-desc { font-size: 16px; color: var(--muted); margin: 4px 0 6px; }
.ctl-list { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; }
.ctl-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: none; border: 0; padding: 2px 4px;
  font: inherit; font-size: 17px; color: #cfd2da; text-align: left; cursor: default; border-radius: 3px; }
.ctl-row.edit { cursor: pointer; }
.ctl-row.edit:hover { background: rgba(255, 255, 255, 0.07); }
.ctl-row kbd { font-family: var(--pixel); font-size: 15px; background: #2a2d36; border: 2px solid #000; box-shadow: inset 0 -2px 0 rgba(0,0,0,0.4);
  padding: 1px 7px; color: #fff; min-width: 26px; text-align: center; white-space: nowrap; }
.ctl-row.wait kbd { background: var(--accent); color: #2a1d00; }
.ctl-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; margin-top: 8px; font-size: 16px; color: #cfd2da; }
.ctl-opts .btn { font-size: 16px; padding: 4px 10px; margin-left: auto; }
.controls-cfg .ctl-fixed { font-size: 15px; color: var(--muted); margin: 8px 0 0; }
@media (max-width: 560px) { .ctl-list { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ morte */
#death { background: radial-gradient(ellipse at center, rgba(120, 0, 0, 0.25), rgba(60, 0, 0, 0.75)); z-index: 25; pointer-events: none; }
.death-box { text-align: center; text-shadow: 3px 3px 0 #000; }
.death-box h1 { font-size: clamp(56px, 9vw, 104px); line-height: 1; color: #ff5b4f; text-shadow: 4px 4px 0 #3b0000, 8px 8px 0 rgba(0, 0, 0, 0.35); }
#death-by { font-size: 30px; }
#death-by img { width: 40px; height: 40px; vertical-align: middle; }
#death-tip { color: #ffd; font-size: 22px; opacity: 0.85; }
#death-info { font-size: 22px; color: #ffcdd2; margin: -4px 0 8px; }
#death-info:empty { display: none; }
#death-timer { font-size: 28px; color: var(--accent); margin-top: 24px; }
#death.spec { background: none; align-items: flex-end; }
#death.spec .death-box { margin-bottom: 150px; padding: 4px 18px; background: rgba(8, 10, 16, 0.6); border-left: 3px solid var(--accent); }
#death.spec .death-box h1, #death.spec #death-by, #death.spec #death-tip, #death.spec #death-info { display: none; }
#death.spec #death-timer { margin: 2px 0; font-size: 22px; }
#death.spec #death-spec { margin: 2px 0; }

/* ------------------------------------------------------------ HUD */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#crosshair { position: absolute; left: 50%; top: 50%; --gap: 6px; }
#crosshair i { position: absolute; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6); }
#crosshair .ct, #crosshair .cb { width: 2px; height: 9px; left: -1px; }
#crosshair .cl, #crosshair .cr { height: 2px; width: 9px; top: -1px; }
#crosshair .ct { bottom: var(--gap); }
#crosshair .cb { top: var(--gap); }
#crosshair .cl { right: var(--gap); }
#crosshair .cr { left: var(--gap); }
#crosshair .cd { width: 2px; height: 2px; left: -1px; top: -1px; }
#crosshair.dot .ct, #crosshair.dot .cb, #crosshair.dot .cl, #crosshair.dot .cr { display: none; }
#crosshair.dot .cd { width: 4px; height: 4px; left: -2px; top: -2px; }

#hitmarker { position: absolute; left: 50%; top: 50%; opacity: 0; }
#hitmarker i { position: absolute; width: 11px; height: 2px; background: #fff; box-shadow: 0 0 2px #000; }
#hitmarker i:nth-child(1) { transform: translate(5px, -8px) rotate(-45deg); }
#hitmarker i:nth-child(2) { transform: translate(-16px, -8px) rotate(45deg); }
#hitmarker i:nth-child(3) { transform: translate(5px, 6px) rotate(45deg); }
#hitmarker i:nth-child(4) { transform: translate(-16px, 6px) rotate(-45deg); }
#hitmarker.head i { background: #ffd54f; }
#hitmarker.kill i { background: #ff3b30; width: 14px; }
#hitmarker.show { animation: hm 0.28s ease-out; }
@keyframes hm { 0% { opacity: 1; transform: scale(1.35); } 100% { opacity: 0; transform: scale(1); } }

#killconfirm { position: absolute; left: 0; right: 0; top: 60%; text-align: center; font-family: var(--pixel); font-size: 28px; letter-spacing: 1px; color: #fff; text-shadow: 2px 2px 0 #000; opacity: 0; }
#killconfirm.show { animation: kc 1.6s ease-out; }
#killconfirm em { color: var(--danger); font-style: normal; }
@keyframes kc { 0% { opacity: 0; transform: scale(1.4); } 12% { opacity: 1; transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; } }

#scope { position: absolute; inset: 0; background: radial-gradient(circle at center, transparent 0 34vh, #000 34.3vh); }
#scope::before, #scope::after { content: ''; position: absolute; background: rgba(0, 0, 0, 0.85); }
#scope::before { left: 50%; top: 16vh; bottom: 16vh; width: 2px; margin-left: -1px; }
#scope::after { top: 50%; left: calc(50% - 34vh); right: calc(50% - 34vh); height: 2px; margin-top: -1px; }
#scope .lens { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; background: #ff3b30; border-radius: 50%; }

#damage-flash, #heal-flash, #lowhp { position: absolute; inset: 0; opacity: 0; }
#smoke-veil, #flash-veil, #bubble-veil { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
#bubble-veil { background: radial-gradient(circle at 50% 45%, rgba(186, 230, 255, 0.18), rgba(30, 136, 229, 0.55)); }
#flash-veil { background: #fff; }
#damage-flash { background: radial-gradient(ellipse at center, transparent 45%, rgba(220, 0, 0, 0.55)); }
#damage-flash.show { animation: flash 0.45s ease-out; }
#heal-flash { background: radial-gradient(ellipse at center, transparent 50%, rgba(80, 255, 120, 0.4)); }
#heal-flash.show { animation: flash 0.7s ease-out; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
#lowhp { background: radial-gradient(ellipse at center, transparent 40%, rgba(160, 0, 0, 0.6)); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.35; } 50% { opacity: 0.9; } }

#dmg-dirs { position: absolute; left: 50%; top: 50%; }
#dmg-dirs i {
  position: absolute; left: -60px; top: -130px; width: 120px; height: 26px;
  border-top: 6px solid rgba(255, 40, 30, 0.85); border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  transform-origin: 60px 130px; animation: dd 1.3s ease-out forwards;
}
@keyframes dd { 0% { opacity: 1; } 100% { opacity: 0; } }

/* ------------------------------------------------------------ partida */
#match-bar { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); display: flex; align-items: stretch; gap: 6px; text-shadow: 2px 2px 0 #000; }
#match-bar .mid { background: rgba(0, 0, 0, 0.55); padding: 4px 14px; text-align: center; min-width: 150px; border: 2px solid rgba(0, 0, 0, 0.6); }
#match-bar .mode { font-size: 17px; color: var(--muted); letter-spacing: 1px; }
#match-bar .time { font-size: 30px; line-height: 1; }
#match-bar .time.low { color: var(--danger); }
#match-bar .sub { font-size: 17px; color: #ddd; }
#match-bar .team { display: flex; flex-direction: column; justify-content: center; min-width: 150px; padding: 4px 12px; background: rgba(0, 0, 0, 0.55); border: 2px solid rgba(0, 0, 0, 0.6); border-top: 4px solid var(--tc); }
#match-bar .team.me { box-shadow: inset 0 0 0 2px var(--tc); }
#match-bar .team.out { opacity: 0.45; }
#match-bar .team .tn { font-size: 18px; color: var(--tc); display: flex; justify-content: space-between; gap: 10px; }
#match-bar .team .sc { font-size: 30px; line-height: 1; }
#match-bar .team .corebar { height: 8px; background: rgba(255, 255, 255, 0.12); margin-top: 3px; position: relative; }
#match-bar .team .corebar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--tc); transition: width 0.2s; }
#match-bar .team .coreinfo { font-size: 16px; color: #ddd; margin-top: 2px; }
#match-bar .team.hit .corebar { animation: corehit 0.4s; }
@keyframes corehit { 0% { background: #fff; } 100% { background: rgba(255, 255, 255, 0.12); } }
#spectate { position: absolute; bottom: 170px; left: 0; right: 0; text-align: center; font-size: 24px; text-shadow: 2px 2px 0 #000; }
#death-spec { font-size: 22px; color: #9fd8ff; }

#endscreen { background: radial-gradient(ellipse at center, rgba(10, 12, 20, 0.55), rgba(0, 0, 0, 0.85)); z-index: 36; align-items: flex-start; overflow-y: auto; }
.end-box { text-align: center; width: min(760px, 94vw); text-shadow: 3px 3px 0 #000; margin: auto; padding: 10px 0; } /* margem automática: centraliza e rola quando não cabe */
#end-title { font-size: clamp(56px, 9vw, 110px); line-height: 1; margin-bottom: 6px; }
#end-title.win { color: #ffd54f; text-shadow: 4px 4px 0 #8a4b00, 8px 8px 0 rgba(0, 0, 0, 0.4); }
#end-title.lose { color: #ff5b4f; text-shadow: 4px 4px 0 #3b0000, 8px 8px 0 rgba(0, 0, 0, 0.4); }
#end-title.draw { color: #cfd8dc; }
#end-sub { font-size: 24px; color: #ddd; margin: 0 0 16px; }
#podium { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin: 8px 0 10px; }
#podium .pd { width: 170px; background: rgba(255, 255, 255, 0.06); border: 2px solid #000; padding: 8px 6px 10px; }
#podium .pd .md { font-size: 34px; }
#podium .pd .nm { font-size: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#podium .pd .kd { font-size: 18px; color: var(--muted); }
#podium .pd.p1 { padding-bottom: 30px; background: rgba(255, 213, 79, 0.12); }
#podium .pd.p2 { padding-bottom: 18px; }
#end-me { font-size: 21px; color: #ddd; }
#medals { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 0 4px; }
#medals .mdl { width: 118px; background: rgba(255, 213, 79, 0.08); border: 2px solid #000; box-shadow: inset 0 0 0 1px rgba(255, 213, 79, 0.25); padding: 4px 4px 5px; text-shadow: 1px 1px 0 #000; }
#medals .mdl.me { box-shadow: inset 0 0 0 2px var(--accent); background: rgba(255, 179, 0, 0.16); }
#medals .mdl .ti { font-size: 17px; color: #ffe082; line-height: 1.1; }
#medals .mdl .nm { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#medals .mdl .ds { font-size: 14px; color: var(--muted); line-height: 1.1; }
/* muitos modos: cartões compactos em 5 colunas; a descrição aparece ao passar o mouse (title) */
#vote-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 8px 0; }
.vote-card { background: rgba(255, 255, 255, 0.06); border: 3px solid #000; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.06); padding: 6px 4px; cursor: pointer; position: relative; text-align: center; }
.vote-card:hover { background: rgba(255, 255, 255, 0.1); }
.vote-card.mine { box-shadow: inset 0 0 0 3px var(--accent); background: rgba(255, 179, 0, 0.12); }
.vote-card .k { position: absolute; left: 6px; top: 2px; color: var(--accent); font-size: 20px; }
.vote-card .ic { font-size: 26px; }
.vote-card .nm { font-size: 18px; line-height: 1.05; }
.vote-card .ds { display: none; }
.vote-card .vc { font-size: 16px; color: #fff; margin-top: 2px; }
#end-timer { font-size: 22px; color: var(--accent); }
.vote-card .maps { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; margin-top: 4px; }
.vote-card .maps button { font: inherit; font-size: 13px; color: #fff; background: rgba(0, 0, 0, 0.35); border: 2px solid #000; padding: 1px 4px; cursor: pointer; }
.vote-card .maps button:hover { background: rgba(255, 179, 0, 0.2); }
.vote-card .maps button.mine { box-shadow: inset 0 0 0 2px var(--accent); }
.vote-card .maps button b { color: var(--accent); }

#nade-warn { position: absolute; left: 50%; top: 50%; }
#nade-warn .rot { position: absolute; left: 0; top: 0; }
#nade-warn .arrow {
  position: absolute; left: -10px; top: -112px; width: 0; height: 0;
  border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 16px solid #ffb300;
  filter: drop-shadow(0 0 3px #000);
}
#nade-warn img { position: absolute; left: -20px; top: 44px; width: 40px; height: 40px; animation: pulse 0.5s ease-in-out infinite; filter: drop-shadow(0 0 4px #ff3b30); }

#topleft { position: absolute; left: 14px; top: 14px; }
#minimap-wrap { position: relative; width: 150px; height: 150px; border: 3px solid #000; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12); background: #000; }
#minimap-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
#minimap-wrap .north { position: absolute; top: -4px; left: 50%; transform: translateX(-50%); font-family: var(--title); font-size: 9px; color: #fff; text-shadow: 1px 1px 0 #000; }
#info { margin-top: 6px; font-size: 18px; color: #e8e8e8; text-shadow: 2px 2px 0 #000; white-space: pre; }

#killfeed { position: absolute; right: 14px; top: 14px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
#killfeed .kf { background: rgba(0, 0, 0, 0.55); padding: 3px 10px; display: flex; align-items: center; gap: 8px; font-size: 21px; text-shadow: 1px 1px 0 #000; animation: kfin 0.25s ease-out; }
#killfeed .kf.me { box-shadow: inset 0 0 0 2px var(--accent); }
#killfeed .kf img { width: 34px; height: 34px; }
#killfeed .kf.fade { opacity: 0; transition: opacity 0.6s; }
@keyframes kfin { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

#announce { position: absolute; top: 18%; left: 0; right: 0; margin: 0 auto; width: fit-content; max-width: min(64vw, 900px); text-align: center; font-family: var(--pixel); font-size: clamp(22px, 2.4vw, 34px); letter-spacing: 1px; color: #ffe082; text-shadow: 3px 3px 0 #000; opacity: 0; padding: 4px 16px; background: rgba(0, 0, 0, 0.35); }
#announce.show { animation: ann 4.5s ease-out; }
@keyframes ann { 0% { opacity: 0; transform: translateY(-10px); } 8% { opacity: 1; transform: none; } 85% { opacity: 1; } 100% { opacity: 0; } }

#toast { position: absolute; bottom: 176px; left: 0; right: 0; text-align: center; font-size: 24px; color: #fff; text-shadow: 2px 2px 0 #000; opacity: 0; }
#toast.show { animation: ann 2.2s ease-out; }

#chat { position: absolute; left: 14px; bottom: 170px; width: min(460px, 60vw); }
#chat-log { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
#chat-log div { background: rgba(0, 0, 0, 0.45); padding: 2px 8px; font-size: 20px; text-shadow: 1px 1px 0 #000; width: fit-content; max-width: 100%; word-break: break-word; transition: opacity 0.8s; }
#chat-log div.sys { color: #ffe082; }
#chat-log div.old { opacity: 0; }
#chat.open #chat-log div.old { opacity: 1; }
#chat-input { display: none; pointer-events: auto; font-size: 22px; }
#chat.open #chat-input { display: block; }

#pickups { position: absolute; right: 14px; bottom: 150px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
#pickups .pk { display: flex; align-items: center; gap: 8px; background: rgba(0, 0, 0, 0.5); padding: 2px 10px 2px 4px; font-size: 22px; text-shadow: 1px 1px 0 #000; animation: pkin 2.6s ease-out forwards; }
#pickups .pk img { width: 30px; height: 30px; }
#pickups .pk b { color: var(--good); }
@keyframes pkin { 0% { opacity: 0; transform: translateX(20px); } 10% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; } }

#protect { position: absolute; top: 26%; left: 0; right: 0; text-align: center; font-family: var(--pixel); font-size: 26px; letter-spacing: 2px; color: #7fe3ff; text-shadow: 2px 2px 0 #000; }
#target-name { position: absolute; top: calc(50% + 22px); left: 0; right: 0; text-align: center; font-size: 19px; color: rgba(255, 255, 255, 0.75); text-shadow: 1px 1px 0 #000; }
#reload { position: absolute; top: calc(50% + 46px); left: 50%; width: 140px; margin-left: -70px; height: 8px; background: rgba(0, 0, 0, 0.6); }
#reload .fill { height: 100%; background: var(--accent); width: 0; }
#reload span { position: absolute; top: 10px; left: 0; right: 0; text-align: center; font-size: 17px; color: var(--accent); text-shadow: 1px 1px 0 #000; }

#bottom { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; }
#held-name { font-size: 24px; text-shadow: 2px 2px 0 #000; height: 28px; opacity: 0; }
#held-name.show { animation: ann 1.8s ease-out; }
#vitals { display: flex; gap: 16px; margin-bottom: 8px; }
.bar { display: flex; align-items: center; gap: 6px; width: 250px; }
.bar b { width: 22px; text-align: center; text-shadow: 1px 1px 0 #000; }
.bar .track { flex: 1; height: 14px; background: rgba(0, 0, 0, 0.6); border: 2px solid #000; position: relative; overflow: hidden; }
.bar .fill { height: 100%; transition: width 0.15s; }
.bar.hp .fill { background: linear-gradient(#ff7a6b, var(--hp)); }
.bar.ar .fill { background: linear-gradient(#8fd0ff, var(--armor)); }
.bar.jet { width: 120px; }
.bar.jet .fill { background: linear-gradient(#ffcc80, #ff7a1a); transition: none; }
.bar .v { width: 36px; font-size: 22px; text-shadow: 2px 2px 0 #000; }
.bar.ar.none { opacity: 0.35; }

#hotbar { display: flex; gap: 4px; }
.slot {
  position: relative; width: 56px; height: 56px;
  background: rgba(0, 0, 0, 0.55); border: 3px solid rgba(20, 20, 20, 0.9);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.08);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.08s;
}
.slot img { width: 44px; height: 44px; image-rendering: pixelated; filter: drop-shadow(1px 2px 0 rgba(0, 0, 0, 0.5)); }
.slot .k { position: absolute; left: 3px; top: 0; font-size: 15px; color: rgba(255, 255, 255, 0.55); }
.slot .n { position: absolute; right: 3px; bottom: -1px; font-size: 20px; text-shadow: 2px 2px 0 #000; }
.slot.sel { border-color: #fff; background: rgba(255, 255, 255, 0.14); transform: translateY(-5px); }
.slot.empty img { display: none; }

#ammo { position: absolute; right: 22px; bottom: 16px; text-align: right; text-shadow: 3px 3px 0 #000; }
#ammo .mag { font-size: 64px; line-height: 0.9; }
#ammo .mag.low { color: var(--danger); }
#ammo .res { font-size: 30px; color: var(--muted); margin-left: 6px; }
#ammo .name { font-size: 22px; color: #ddd; }
#keys-hint { position: absolute; left: 14px; bottom: 12px; font-size: 17px; color: rgba(255, 255, 255, 0.55); text-shadow: 1px 1px 0 #000; }

/* ------------------------------------------------------------ placar */
#scoreboard { position: fixed; inset: 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; z-index: 15; pointer-events: none; }
#scoreboard .panel { min-width: min(620px, 94vw); }
#scoreboard table { width: 100%; border-collapse: collapse; font-size: 23px; }
#scoreboard th { color: var(--muted); font-weight: normal; padding: 4px 10px; text-align: center; border-bottom: 2px solid var(--line); }
#scoreboard th.l, #scoreboard td.l { text-align: left; }
#scoreboard td { padding: 4px 10px; text-align: center; }
#scoreboard tr.me td { background: rgba(255, 179, 0, 0.14); }
#scoreboard .sw { display: inline-block; width: 14px; height: 14px; border: 2px solid #000; }
#scoreboard .bot { color: var(--muted); font-size: 17px; }
#scoreboard tr.team-row td { text-align: left; font-size: 20px; padding-top: 10px; border-bottom: 2px solid var(--line); }
#scoreboard tr.dead td { opacity: 0.5; }

/* ------------------------------------------------------------ oficina */
#craft { background: rgba(0, 0, 0, 0.55); z-index: 35; }
.craft-panel { width: min(1180px, 96vw); height: min(720px, 92vh); display: flex; flex-direction: column; padding: 18px 20px; }
.craft-head { display: flex; align-items: baseline; justify-content: space-between; }
.craft-head .hint { color: var(--muted); font-size: 18px; }
.craft-body { flex: 1; display: grid; grid-template-columns: 380px 1fr; gap: 18px; min-height: 0; }
.craft-left { overflow-y: auto; padding-right: 4px; }
#backpack { display: grid; grid-template-columns: repeat(6, 56px); gap: 4px; }
#backpack .cell, #craft-hotbar .slot { cursor: pointer; pointer-events: auto; }
.cell {
  position: relative; width: 56px; height: 56px; background: rgba(0, 0, 0, 0.5);
  border: 3px solid #111; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.07);
  display: flex; align-items: center; justify-content: center;
}
.cell img { width: 42px; height: 42px; image-rendering: pixelated; }
.cell .n { position: absolute; right: 3px; bottom: -1px; font-size: 19px; text-shadow: 2px 2px 0 #000; }
.cell:hover, #craft-hotbar .slot:hover { border-color: #888; }
.cell.picked { border-color: var(--accent); background: rgba(255, 179, 0, 0.18); }
#craft-hotbar { display: flex; gap: 4px; flex-wrap: wrap; }
#craft-hotbar .slot { width: 38px; height: 38px; border-width: 2px; }
#craft-hotbar .slot img { width: 30px; height: 30px; }
#craft-hotbar .slot .k { font-size: 13px; }
#item-info { margin-top: 14px; min-height: 60px; color: #ddd; font-size: 19px; }
#item-info .t { color: var(--accent); font-size: 22px; }
.craft-right { display: flex; flex-direction: column; min-height: 0; }
#recipe-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 10px; }
#recipe-tabs button {
  font-family: var(--pixel); font-size: 19px; color: #ddd; cursor: pointer;
  background: rgba(255, 255, 255, 0.06); border: 2px solid #000; padding: 4px 12px;
}
#recipe-tabs button.sel { background: var(--accent); color: #000; }
#recipes { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-right: 6px; }
.recipe {
  display: grid; grid-template-columns: 58px 1fr auto auto; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, 0.04); border: 2px solid #000; padding: 6px 10px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.03);
}
.recipe.ok { box-shadow: inset 0 0 0 2px rgba(123, 211, 107, 0.45); background: rgba(123, 211, 107, 0.07); }
.recipe.owned { opacity: 0.55; }
.recipe .out { position: relative; width: 54px; height: 54px; background: rgba(0, 0, 0, 0.45); display: flex; align-items: center; justify-content: center; border: 2px solid #111; }
.recipe .out img { width: 44px; height: 44px; image-rendering: pixelated; }
.recipe .out .n { position: absolute; right: 2px; bottom: -2px; font-size: 18px; text-shadow: 2px 2px 0 #000; }
.recipe .nm { font-size: 24px; }
.recipe .ds { font-size: 17px; color: var(--muted); }
.recipe .ins { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.chip { display: flex; align-items: center; gap: 2px; background: rgba(0, 0, 0, 0.45); padding: 1px 8px 1px 2px; font-size: 20px; border: 2px solid #111; }
.chip img { width: 28px; height: 28px; image-rendering: pixelated; }
.chip.miss { color: var(--danger); }
.chip.have { color: var(--good); }
.recipe .acts { display: flex; gap: 4px; }
.recipe .acts .btn { font-size: 10px; padding: 10px 10px; pointer-events: auto; }
.recipe .acts .btn.go { background: linear-gradient(#8bd66f, #4c9a38); }

#disconnected { background: rgba(0, 0, 0, 0.7); z-index: 50; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.3); }
::-webkit-scrollbar-thumb { background: #555; border: 2px solid #000; }

@media (max-width: 800px) {
  .craft-body { grid-template-columns: 1fr; overflow-y: auto; }
  .bar { width: 170px; }
  .slot { width: 44px; height: 44px; }
  .slot img { width: 34px; height: 34px; }
  #keys-hint { display: none; }
}

/* telas baixas (celular deitado): HUD compacto */
@media (max-height: 520px) {
  #minimap-wrap { width: 96px; height: 96px; }
  #topleft { left: 8px; top: 8px; }
  #chat { bottom: 118px; width: min(340px, 46vw); }
  #chat-log div { font-size: 16px; }
  #chat-log div:nth-last-child(n+5) { display: none; }
  #toast { bottom: 118px; font-size: 19px; }
  #announce { top: 24%; font-size: 19px; max-width: 58vw; }
  #match-bar { top: 6px; }
  #match-bar .mid { min-width: 110px; padding: 2px 8px; }
  #match-bar .time { font-size: 22px; }
  #match-bar .mode, #match-bar .sub { font-size: 13px; }
  #match-bar .team { min-width: 90px; padding: 2px 6px; }
  #match-bar .team .sc { font-size: 22px; }
  #match-bar .team .tn, #match-bar .team .coreinfo { font-size: 13px; }
  #killfeed { top: 8px; }
  #killfeed .kf { font-size: 15px; padding: 2px 6px; }
  #killfeed .kf img { width: 24px; height: 24px; }
  #pickups { bottom: 96px; }
  #pickups .pk { font-size: 16px; }
  #pickups .pk img { width: 22px; height: 22px; }
  #bottom { bottom: 6px; }
  #held-name { font-size: 18px; height: 22px; }
  #vitals { margin-bottom: 4px; }
  .slot { width: 40px; height: 40px; }
  .slot img { width: 30px; height: 30px; }
  .slot .n { font-size: 16px; }
  .bar { width: 150px; }
  .slot .k { font-size: 12px; }
  #ammo { bottom: 8px; right: 12px; }
  #ammo .mag { font-size: 40px; }
  #ammo .res { font-size: 20px; }
  #ammo .name { font-size: 15px; }
  #voice-hud { top: 112px; left: 8px; font-size: 16px; }
}

/* celular em pé: a linha de sala quebra em duas */
@media (max-width: 480px) {
  .room-row { flex-wrap: wrap; }
  #room-create { flex: 1 1 100%; }
  .menu-panel { padding: 14px 16px; }
}
/* tela estreita: uma coluna só (partida primeiro, depois você) */
@media (max-width: 760px) {
  .menu-cols { grid-template-columns: 1fr; gap: 10px; }
  .menu-match { order: -1; }
  .menu-top { align-items: center; }
}
/* tela baixa (celular deitado, janela pequena): logo menor e o JOGAR grudado embaixo, sempre à vista */
@media (max-height: 540px) {
  .menu-panel { padding: 10px 16px; }
  .menu-brand .logo { font-size: 26px; }
  .menu-brand .tagline { display: none; }
  .menu-cols { margin-top: 6px; }
  .field { margin: 6px 0 4px; }
  .pick.modes button .ic { font-size: 18px; }
  #play-btn { position: sticky; bottom: 0; z-index: 2; }
}
/* celular em pé: idioma em cima do logo, modos com letra menor, bots e dificuldade um embaixo do outro */
@media (max-width: 480px) {
  .menu-top { flex-direction: column-reverse; align-items: stretch; gap: 4px; }
  .menu-brand .tagline { font-size: 16px; }
  .pick.modes button { font-size: 15px; padding: 4px 2px; overflow-wrap: anywhere; }
  .pick.modes button .ic { font-size: 20px; }
  .setup-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ------------------------------------------------------------ sala: painel do dono, votação, rádio e salas abertas */
#room-btn { margin-top: 10px; font-size: 12px; padding: 10px 14px; }
#roompanel { z-index: 36; background: rgba(0, 0, 0, 0.45); }
.room-panel { width: min(640px, 96vw); max-height: 94vh; overflow-y: auto; text-align: left; }
.room-panel h2 { text-align: center; margin: 0 0 4px; }
.room-panel .sub { text-align: center; color: var(--muted); margin: 0 0 10px; font-size: 18px; }
.rp-sec { margin: 10px 0; padding-top: 8px; border-top: 2px solid var(--line); }
.rp-restart { margin-top: 8px; width: 100%; font-size: 11px; padding: 9px 10px; }
.rp-bots { display: grid; gap: 8px; }
.rp-step { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 20px; color: #ddd; }
.rp-step .pick { flex: 0 1 300px; }
.rp-step .stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.rp-row { display: flex; gap: 8px; }
.rp-row .btn { flex: 1; font-size: 10px; padding: 9px 8px; }
.rp-row .btn.on { background: linear-gradient(#ffb74d, #f57c00); }
.rp-players { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.rp-pl { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, 0.04); padding: 3px 6px; font-size: 20px; }
.rp-pl .sw { width: 14px; height: 14px; border: 2px solid #000; flex: none; }
.rp-pl .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-pl .bot { font-size: 12px; color: #000; background: #9aa0ad; padding: 0 4px; }
.rp-pl .acts { display: flex; gap: 4px; }
.rp-pl .btn { font-size: 9px; padding: 6px 8px; }
.rp-tip { margin: 10px 0; text-align: center; }
#vote-box {
  position: absolute; right: 14px; top: 30%; width: min(330px, 44vw); padding: 8px 12px; pointer-events: auto;
  background: rgba(8, 10, 16, 0.78); border: 3px solid #000; box-shadow: inset 0 0 0 2px var(--accent); text-shadow: 1px 1px 0 #000;
}
#vote-box .q { font-size: 22px; color: #ffe082; }
#vote-box .c { font-size: 17px; color: #cfd2da; margin: 2px 0 6px; }
#vote-box .b { display: flex; gap: 6px; }
#vote-box .btn { flex: 1; font-size: 10px; padding: 8px 6px; }
#vote-box .btn.sel { background: linear-gradient(#ffb74d, #f57c00); }
#radio {
  position: absolute; left: 14px; top: 34%; padding: 6px 10px; pointer-events: auto;
  background: rgba(8, 10, 16, 0.78); border: 3px solid #000; box-shadow: inset 0 0 0 2px #3a3d48; text-shadow: 1px 1px 0 #000;
}
#radio .rt { font-family: var(--title); font-size: 11px; color: var(--accent); margin-bottom: 4px; }
#radio .ri { font-size: 21px; padding: 1px 4px; cursor: pointer; }
#radio .ri:hover { background: rgba(255, 179, 0, 0.18); }
#radio .ri b { display: inline-block; width: 18px; }
#radio .rh { font-size: 15px; color: var(--muted); margin-top: 4px; }
#chat-log div.radio { color: #ffe082; }
#open-rooms { margin-top: 10px; }
#open-rooms .ttl { color: var(--muted); font-size: 18px; margin-bottom: 2px; }
#open-rooms .or { display: flex; align-items: center; gap: 8px; font-size: 19px; padding: 3px 6px; background: rgba(255, 255, 255, 0.04); margin-top: 3px; }
#open-rooms .or .inf { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#open-rooms .or .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#open-rooms .or .ct { color: var(--muted); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#open-rooms .or .here { color: var(--accent); font-size: 16px; white-space: nowrap; }
#open-rooms .or .btn { font-size: 9px; padding: 6px 8px; }

/* Primeiros passos */
#tut { position: absolute; left: 14px; top: 250px; max-width: 400px; padding: 6px 10px 8px; pointer-events: auto;
  background: rgba(8, 10, 16, 0.62); border-left: 3px solid #7cc4ff; text-shadow: 1px 1px 0 #000; }
#tut .tt { font-family: var(--title); font-size: 11px; color: #9fd8ff; display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
#tut .tt .n { color: #fff; }
#tut .x { margin-left: auto; background: none; border: 0; color: #aaa; font-size: 16px; cursor: pointer; padding: 0 2px; }
#tut .x:hover { color: #fff; }
#tut .ti { font-size: 17px; line-height: 1.3; color: #eee; }
#tut .ti.ok { color: #8f8; opacity: 0.6; }
#tut .ti.flash { animation: tutflash 0.8s; }
#tut .ti b { color: var(--accent); }
@keyframes tutflash { 0% { background: rgba(120, 255, 120, 0.45); } 100% { background: none; } }
body.touch #tut { top: 128px; left: 8px; max-width: 280px; }

/* telas baixas (celular deitado): rádio, votação e killfeed compactos */
@media (max-height: 520px) {
  #radio { top: 108px; padding: 4px 8px; }
  #radio .ri { font-size: 16px; }
  #radio .rt { font-size: 9px; margin-bottom: 2px; }
  #radio .rh { display: none; }
  #vote-box { width: min(300px, 52vw); padding: 5px 8px; }
  #vote-box .q { font-size: 17px; }
  #vote-box .c { font-size: 14px; margin-bottom: 4px; }
  body.touch #killfeed .kf:nth-last-child(n+4) { display: none; }
  #medals { gap: 4px; margin: 4px 0 2px; }
  #medals .mdl { width: 96px; padding: 2px 3px; }
  #medals .mdl .ti, #medals .mdl .nm { font-size: 14px; }
  #medals .mdl .ds { display: none; }
  #death-info { font-size: 18px; }
  /* primeiros passos: só o próximo item */
  #tut { padding: 3px 8px 4px; top: 172px; }
  body.touch #tut { top: 108px; max-width: 360px; }
  #tut .tt { white-space: nowrap; font-size: 9px; margin-bottom: 1px; }
  #tut .ti { font-size: 15px; }
  #tut .ti.ok, #tut .ti:not(.ok) ~ .ti:not(.ok) { display: none; }
  /* tela final compacta: 4 cartões por linha, sem descrição */
  #end-title { font-size: 40px; margin-bottom: 2px; }
  #end-sub { font-size: 16px; margin-bottom: 4px; }
  #podium { margin: 4px 0; }
  #podium .pd { width: 120px; padding: 3px 4px 5px; }
  #podium .pd .md { font-size: 22px; }
  #podium .pd .nm { font-size: 16px; }
  #podium .pd .kd { font-size: 13px; }
  #podium .pd.p1 { padding-bottom: 12px; }
  #podium .pd.p2 { padding-bottom: 8px; }
  #end-me { font-size: 16px; }
  #endscreen h3 { font-size: 11px; margin: 4px 0; }
  #vote-cards { grid-template-columns: repeat(5, 1fr); gap: 5px; margin: 4px 0; }
  .vote-card { padding: 3px 4px; }
  .vote-card .ds { display: none; }
  .vote-card .ic { font-size: 20px; }
  .vote-card .nm { font-size: 14px; }
  .vote-card .vc { font-size: 13px; margin-top: 1px; }
  .vote-card .k { font-size: 14px; }
  .vote-card .maps button { font-size: 11px; padding: 1px 3px; }
  #end-timer { font-size: 16px; }
  #end-xp .gain { font-size: 18px; }
  #end-xp .parts { display: none; }
  .prof-stats { grid-template-columns: repeat(3, 1fr); }
}
