html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #000; user-select: none; }
    canvas { display: block; position: fixed; inset: 0; width: 100vw; height: 100dvh; }
    
    /* Menu Principal Modernizado */
    #menu-overlay {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: linear-gradient(135deg, rgba(15, 5, 5, 0.98), rgba(30, 10, 10, 0.98));
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      z-index: 10;
      overflow-y: auto;
      padding: 20px;
      box-sizing: border-box;
    }
    #menu-box {
      text-align: center;
      padding: 40px 60px;
      background: rgba(255, 0, 0, 0.02);
      border-radius: 20px;
      box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
      backdrop-filter: blur(12px);
      border: 1px solid rgba(255, 51, 51, 0.15);
      max-width: 500px;
      width: 100%;
      box-sizing: border-box;
    }
    #menu-box h1 {
      color: #fff;
      font-size: 3rem;
      margin: 0 0 5px 0;
      letter-spacing: 4px;
      text-transform: uppercase;
      background: linear-gradient(45deg, #00ffff, #0088ff);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.4));
    }
    #menu-box p {
      color: #8a8a93;
      font-size: 0.95rem;
      margin-bottom: 25px;
      line-height: 1.4;
    }

    /* Input de Nickname */
    .input-container {
      margin-bottom: 25px;
    }
    .input-container label {
      display: block;
      color: #00ffff;
      font-size: 0.9rem;
      font-weight: bold;
      text-transform: uppercase;
      margin-bottom: 8px;
      letter-spacing: 1px;
    }
    #nickname-input {
      background: rgba(0, 0, 0, 0.7);
      border: 1px solid rgba(0, 255, 255, 0.3);
      padding: 12px 20px;
      border-radius: 30px;
      color: #fff;
      font-size: 1.1rem;
      width: 80%;
      text-align: center;
      outline: none;
      transition: border-color 0.2s, box-shadow 0.2s;
    }
    #nickname-input:focus {
      border-color: #00ffff;
      box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
    }
    

    /* Painel de cadastro/login global */
    #auth-panel {
      background: rgba(0, 0, 0, 0.55);
      border: 1px solid rgba(0, 255, 255, 0.16);
      border-radius: 14px;
      padding: 14px;
      margin: 18px 0 18px;
      box-shadow: inset 0 0 18px rgba(0, 255, 255, 0.04);
    }
    #auth-title {
      color: #00ffff;
      font-weight: bold;
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-bottom: 8px;
    }
    #auth-status {
      color: #9aa;
      font-size: 0.9rem;
      margin-bottom: 10px;
      min-height: 18px;
    }
    #auth-user, #auth-pass {
      background: rgba(0, 0, 0, 0.74);
      border: 1px solid rgba(0, 255, 255, 0.28);
      padding: 10px 14px;
      border-radius: 24px;
      color: #fff;
      font-size: 0.95rem;
      width: 82%;
      text-align: center;
      outline: none;
      margin: 4px 0;
      box-sizing: border-box;
    }
    #auth-user:focus, #auth-pass:focus {
      border-color: #00ffff;
      box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
    }
    .auth-buttons {
      display: flex;
      gap: 8px;
      justify-content: center;
      margin-top: 8px;
      flex-wrap: wrap;
    }
    .auth-btn {
      min-width: 130px;
      padding: 10px 16px;
      font-size: 0.82rem;
    }
    #auth-panel.auth-ok { border-color: rgba(0, 255, 170, 0.34); }
    #auth-panel.auth-error { border-color: rgba(255, 60, 60, 0.42); }


    /* Placar de Líderes */
    #scoreboard-container {
      background: rgba(0, 0, 0, 0.6);
      border-radius: 12px;
      padding: 15px;
      margin-bottom: 30px;
      border: 1px solid rgba(0, 255, 255, 0.1);
      max-height: 180px;
      overflow-y: auto;
    }
    #scoreboard-title {
      color: #0088ff;
      font-weight: bold;
      font-size: 1.1rem;
      margin-bottom: 10px;
      letter-spacing: 1px;
      text-transform: uppercase;
    }
    .score-row {
      display: flex;
      justify-content: space-between;
      color: #bbb;
      padding: 6px 10px;
      font-size: 0.95rem;
      border-bottom: 1px solid rgba(0, 255, 255, 0.05);
    }
    .score-row:last-child { border-bottom: none; }
    .score-row.top-three { color: #00ffff; font-weight: bold; }
    .no-scores { color: #555; font-style: italic; font-size: 0.9rem; padding: 10px 0; }

    /* Grupo de botões */
    .btn-group {
      display: flex;
      flex-direction: column;
      gap: 12px;
      align-items: center;
    }

    .btn {
      background: linear-gradient(45deg, #005599, #00ffff);
      color: white;
      border: none;
      padding: 14px 40px;
      font-size: 1.2rem;
      font-weight: bold;
      border-radius: 40px;
      cursor: pointer;
      box-shadow: 0 5px 25px rgba(0, 255, 255, 0.3);
      transition: transform 0.2s, box-shadow 0.2s;
      width: 85%;
    }
    .btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 30px rgba(0, 255, 255, 0.5);
    }
    .btn.btn-danger {
      background: linear-gradient(45deg, #aa0000, #ff3333);
      box-shadow: 0 5px 25px rgba(255, 0, 0, 0.3);
    }
    .btn.btn-danger:hover {
      box-shadow: 0 8px 30px rgba(255, 50, 50, 0.5);
    }
    .btn.btn-secondary {
      background: linear-gradient(45deg, #333, #555);
      box-shadow: none;
    }
    
    /* HUD */
    #hud {
      position: absolute;
      z-index: 20;
      top: 20px;
      left: 20px;
      color: white;
      pointer-events: none;
      display: none;
      width: 260px;
    }
    #round-info { font-size: 1.4rem; font-weight: bold; margin-bottom: 2px; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }
    #score-info { font-size: 1.2rem; color: #eaff00; margin-bottom: 8px; font-weight: 600; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }
    #health-bar { font-size: 1.8rem; letter-spacing: 3px; margin-bottom: 12px; filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.8)); }
    #buff-info { font-size: 1rem; color: #00ffff; font-weight: bold; margin-top: 5px; text-shadow: 1px 1px 2px #000; display: none; line-height: 1.35; }
    #buff-info .buff-line { display: block; white-space: nowrap; margin-top: 2px; }
    
    /* Elementos de HUD */
    .hud-stat { font-size: 1.1rem; font-weight: bold; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); margin-top: 4px; display: flex; align-items: center; }
    #ammo-display { color: #006eff; white-space: nowrap; font-size: 1.0rem; min-width: 310px; }
    #grenade-display { color: #00ff00; }
    #flashlight-display { color: #ffffff; }

    /* Estamina */
    .stamina-container { width: 100%; height: 12px; background: rgba(0, 0, 0, 0.6); border-radius: 5px; border: 1px solid rgba(255, 255, 255, 0.15); overflow: hidden; margin-bottom: 8px; }
    #stamina-bar { width: 100%; height: 100%; background: linear-gradient(90deg, #00ffff, #005599); color: #fff; font-size: 8px; line-height: 12px; text-align: center; font-weight: 900; text-shadow: 0 0 4px #000; white-space: nowrap; }

    /* BARRA DO BOSS */
    #boss-hud { position: absolute; top: 25px; left: 50%; transform: translateX(-50%); width: 450px; text-align: center; display: none; pointer-events: none; z-index: 4; }
    #boss-label { color: #f5d400; font-weight: bold; font-size: 1.3rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 6px; text-shadow: 0 0 10px rgba(255, 0, 0, 0.6), 2px 2px 4px #000; }
    .boss-life-container { width: 100%; height: 16px; background: rgba(0, 0, 0, 0.7); border: 2px solid #f5d400; border-radius: 4px; overflow: hidden; box-shadow: 0 0 15px rgba(255, 0, 0, 0.3); }
    #boss-life-bar { width: 100%; height: 100%; background: linear-gradient(90deg, #9c6f00, #f5d400); transition: width 0.1s ease-out; }

    /* HUD de Contagem Regressiva */
    #countdown-overlay {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      color: #00ffff;
      font-size: 3.9rem;
      font-weight: bold;
      text-shadow: 0 0 20px rgba(0, 255, 255, 0.8), 4px 4px 10px #000;
      pointer-events: none;
      z-index: 8;
      display: none;
      text-transform: uppercase;
      letter-spacing: 2px;
    }

    /* Danos */
    #damage-flash { position: absolute; z-index: 19; top: 0; left: 0; width: 100%; height: 100%; box-shadow: inset 0 0 100px rgba(255, 0, 0, 0); pointer-events: none; z-index: 2; transition: box-shadow 0.1s ease-out; }

    /* Menu de Pausa Estruturado */
    #pause-menu { 
      position: absolute; 
      top: 50%; 
      left: 50%; 
      transform: translate(-50%, -50%); 
      background: rgba(15, 5, 5, 0.98); 
      padding: 30px; 
      border-radius: 16px; 
      color: white; 
      text-align: center; 
      display: none; 
      border: 1px solid rgba(0,255,255,0.15); 
      z-index: 15; 
      width: 460px;
      max-height: 88vh;
      overflow-y: auto;
      box-shadow: 0 20px 50px rgba(0,0,0,0.9);
      backdrop-filter: blur(10px);
    }
    #pause-menu h2 { margin-top: 0; font-size: 2rem; letter-spacing: 2px; color: #00ffff; text-transform: uppercase; margin-bottom: 20px; }
    
    /* Abas Internas do Menu de Pausa */
    .pause-tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; }
    .tab-btn { background: none; border: none; color: #888; font-weight: bold; cursor: pointer; font-size: 1rem; padding: 5px 15px; transition: color 0.2s; text-transform: uppercase; }
    .tab-btn.active { color: #00ffff; border-bottom: 2px solid #00ffff; }
    .tab-content { display: none; text-align: left; margin-bottom: 25px; min-height: 160px; max-height: 46vh; overflow-y: auto; padding-right: 6px; }
    .tab-content.active { display: block; }

    /* Itens de Configuração */
    .config-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; color: #ccc; font-size: 1rem; }
    .config-row select, .config-row input { background: #111; border: 1px solid #00ffff; color: white; padding: 6px 12px; border-radius: 4px; outline: none; cursor: pointer; }


    /* Menu Secreto DEV */
    #dev-menu {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 430px;
      background: rgba(5, 5, 10, 0.96);
      color: #00ffff;
      border: 1px solid rgba(0,255,255,0.45);
      border-radius: 14px;
      padding: 22px;
      z-index: 40;
      display: none;
      box-shadow: 0 0 35px rgba(0,255,255,0.25), 0 20px 50px rgba(0,0,0,0.9);
      font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
      backdrop-filter: blur(10px);
    }
    #dev-menu h3 {
      margin: 0 0 12px 0;
      color: #fff;
      letter-spacing: 2px;
      text-transform: uppercase;
      text-shadow: 0 0 12px rgba(0,255,255,0.55);
    }
    #dev-menu p {
      margin: 8px 0;
      color: #aaa;
      font-size: 0.92rem;
    }
    #dev-password, #dev-command {
      width: 100%;
      box-sizing: border-box;
      background: #050505;
      border: 1px solid rgba(0,255,255,0.55);
      color: #fff;
      padding: 10px 12px;
      border-radius: 8px;
      outline: none;
      margin-top: 8px;
      font-size: 1rem;
    }
    #dev-command-wrap { display: none; }
    #dev-output {
      min-height: 22px;
      margin-top: 10px;
      color: #f5d400;
      font-size: 0.92rem;
      white-space: pre-wrap;
    }
    .dev-command-list {
      color: #00ffaa !important;
      font-family: Consolas, monospace;
      line-height: 1.5;
    }

    /* Mira */
    #crosshair { position: absolute; z-index: 21; top: 50%; left: 50%; width: 6px; height: 6px; border: 2px solid rgba(0, 255, 255, 0.6); border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; display: none; }


/* v1.9.178 - sliders do menu de vídeo */
.slider-row { gap: 12px; }
.slider-row label { flex: 1; }
.slider-row input[type="range"] { width: 150px; accent-color: #00ffff; cursor: pointer; }
.slider-row span { color: #00ffff; font-weight: bold; }

#countdown-overlay.countdown-action { font-size: 3.2rem; letter-spacing: 1px; }

/* v1.9.20 - Ranking, patentes e estatísticas públicas */
.rank-lv {
  color: #7dff00;
  text-shadow: 0 0 8px rgba(125,255,0,.65);
  margin: 0 4px;
}
.player-info-btn {
  margin-left: 6px;
  border: 1px solid rgba(0,255,255,.45);
  background: rgba(0,0,0,.45);
  color: #00ffff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  cursor: pointer;
  font-weight: bold;
  box-shadow: 0 0 8px rgba(0,255,255,.18);
}
.player-info-btn:hover { background: rgba(0,255,255,.16); transform: scale(1.08); }
#player-info-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.76);
  z-index: 99999;
  backdrop-filter: blur(3px);
}
.player-info-box {
  width: min(92vw, 420px);
  background: linear-gradient(180deg, rgba(8,14,18,.98), rgba(20,0,0,.96));
  border: 1px solid rgba(0,255,255,.42);
  box-shadow: 0 0 30px rgba(0,255,255,.20), inset 0 0 18px rgba(255,0,0,.10);
  border-radius: 16px;
  padding: 24px;
  color: #ddd;
  position: relative;
  text-align: center;
}
#player-info-close {
  position: absolute;
  right: 12px;
  top: 10px;
  background: transparent;
  border: none;
  color: #00ffff;
  font-size: 28px;
  cursor: pointer;
}
.player-info-box h2 { margin: 4px 0 8px; color: #00ffff; text-transform: none; }
.player-rank-title { color: #7dff00; font-weight: 800; margin-bottom: 14px; }
.xp-bar { height: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(125,255,0,.25); border-radius: 999px; overflow: hidden; margin: 8px 0; }
.xp-bar > div { height: 100%; background: linear-gradient(90deg, #4cff00, #c8ff00); box-shadow: 0 0 14px rgba(125,255,0,.7); }
.player-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 16px; }
.player-stat-grid div { background: rgba(0,255,255,.06); border: 1px solid rgba(0,255,255,.12); border-radius: 12px; padding: 10px; }
.player-stat-grid b { display: block; color: #fff; font-size: 1.25rem; }
.player-stat-grid span { display: block; color: #9fb; font-size: .78rem; margin-top: 4px; }

/* v1.9.20.1 - Correção do botão (i), alinhamento e tela de sincronização */
.score-player-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  text-align: left;
}
.score-player-name {
  display: inline-block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.player-info-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  line-height: 1 !important;
  padding: 0 !important;
  min-width: 20px;
  flex: 0 0 20px;
  font-family: Arial, sans-serif;
  font-size: 13px;
  transform: translateY(0);
}
.player-info-btn:hover { transform: scale(1.08); }
#menu-box p b { color: #7dff00; }

/* v1.9.20.2 - Tela de progresso pós-morte */
.etrom-wait-panel {
  width: 100%;
  box-sizing: border-box;
  color: #cfffff;
  text-align: center;
}
.etrom-wait-subtitle {
  color: #9fbac0;
  font-size: .92rem;
  line-height: 1.35;
  margin: 0 0 12px;
}
.etrom-wait-rank {
  color: #7dff00;
  font-weight: 900;
  text-shadow: 0 0 10px rgba(125,255,0,.6);
  margin: 6px 0 10px;
  letter-spacing: .8px;
}
.etrom-wait-xpbar {
  height: 18px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(125,255,0,.35);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 0 12px rgba(0,0,0,.65), 0 0 12px rgba(125,255,0,.12);
  margin: 10px auto 6px;
  max-width: 380px;
}
.etrom-wait-xpbar > div {
  height: 100%;
  background: linear-gradient(90deg, #2fff00, #baff00, #ffffff);
  box-shadow: 0 0 18px rgba(125,255,0,.75);
  transition: width .08s linear;
}
.etrom-wait-xptext {
  color: #dfffff;
  font-size: .88rem;
  margin-bottom: 12px;
}
.etrom-wait-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.etrom-wait-grid div {
  background: rgba(0,255,255,.055);
  border: 1px solid rgba(0,255,255,.12);
  border-radius: 12px;
  padding: 9px 6px;
}
.etrom-wait-grid b {
  display: block;
  color: #fff;
  font-size: 1.18rem;
  text-shadow: 0 0 8px rgba(0,255,255,.4);
}
.etrom-wait-grid span {
  display: block;
  color: #95dede;
  font-size: .72rem;
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.etrom-wait-loading {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 12px;
}
.etrom-wait-loading span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7dff00;
  box-shadow: 0 0 10px rgba(125,255,0,.8);
  animation: etromWaitPulse .8s infinite alternate;
}
.etrom-wait-loading span:nth-child(2) { animation-delay: .14s; }
.etrom-wait-loading span:nth-child(3) { animation-delay: .28s; }
@keyframes etromWaitPulse {
  from { opacity: .35; transform: translateY(0) scale(.8); }
  to { opacity: 1; transform: translateY(-5px) scale(1.05); }
}
.player-info-btn {
  position: relative !important;
  top: 0 !important;
  margin-left: 5px !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  flex-basis: 18px !important;
  font-size: 12px !important;
  line-height: 18px !important;
}

/* v1.9.20.3 - tela separada de progresso e botão (i) alinhado */
.etrom-wait-panel {
  background: radial-gradient(circle at top, rgba(125,255,0,.10), rgba(0,0,0,.25) 55%, rgba(0,0,0,.55));
  border: 1px solid rgba(125,255,0,.28);
  border-radius: 16px;
  padding: 18px 16px;
  margin-top: 14px;
  box-shadow: inset 0 0 20px rgba(125,255,0,.06), 0 0 24px rgba(0,255,255,.08);
}
.player-info-btn {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  min-height: 18px !important;
  padding: 0 !important;
  margin: 0 0 0 5px !important;
  line-height: 18px !important;
  font-size: 12px !important;
  border-radius: 50% !important;
  transform: translateY(0) !important;
}
.score-player-cell { align-items: center !important; }
