* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

input, textarea {
  -webkit-user-select: text;
  user-select: text;
}

body, html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #121417;
  font-family: 'Rajdhani', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
  color: #ecf0f1;
}

#gameCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #1b1e23;
  cursor: crosshair;
}

/* Modais de Entrada e Respawn */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 12, 16, 0.88);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 0.3s ease;
}

.modal-content {
  background: linear-gradient(180deg, rgba(20, 25, 34, 0.97) 0%, rgba(12, 16, 22, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(230, 126, 34, 0.18);
  padding: 16px 26px;
  max-width: 940px;
  width: 94%;
  max-height: 96vh;
  overflow-y: hidden; /* Remove completamente a barra de rolagem */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE / Edge */
  text-align: center;
  box-sizing: border-box;
}

.modal-content::-webkit-scrollbar {
  display: none; /* Chrome, Edge, Safari */
}

@media (max-height: 680px) {
  .modal-content {
    overflow-y: auto;
    padding: 12px 18px;
  }
}

.modal-header .game-logo {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 2.1rem;
  letter-spacing: 2px;
  color: #f39c12;
  text-shadow: 0 0 16px rgba(243, 156, 18, 0.45);
  margin-bottom: 2px;
  margin-top: 0;
}

.modal-header .game-logo span {
  color: #e74c3c;
}

.game-subtitle {
  color: #95a5a6;
  font-size: 0.86rem;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

/* Barra Militar de Codinome / Callsign */
.callsign-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 5px 16px;
  max-width: 420px;
  margin: 0 auto 12px auto;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

.callsign-label {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: #bdc3c7;
  letter-spacing: 1px;
}

.callsign-bar input {
  background: rgba(0, 0, 0, 0.5);
  border: 1.5px solid #34495e;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 1.05rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  color: #fff;
  text-align: center;
  width: 210px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.callsign-bar input:focus {
  outline: none;
  border-color: #e67e22;
  box-shadow: 0 0 10px rgba(230, 126, 34, 0.5);
}

/* ========================================================================= */
/* SELEÇÃO DE FACÇÃO / BRASÕES HERÁLDICOS ORIGINAIS (AZUL VS VERMELHO)        */
/* ========================================================================= */
.faction-selection-title,
.class-selection-title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #dcdde1;
  margin-bottom: 8px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.title-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

.faction-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 680px) {
  .faction-cards-grid {
    grid-template-columns: 1fr;
  }
}

.faction-card {
  position: relative;
  background: rgba(16, 20, 26, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  text-align: left;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.faction-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.7);
}

/* Facção Azul */
.faction-card[data-faction="blue"]:hover {
  border-color: rgba(0, 210, 211, 0.6);
  box-shadow: 0 6px 20px rgba(0, 210, 211, 0.35);
}

.faction-card[data-faction="blue"].selected {
  border-color: #00d2d3;
  background: linear-gradient(135deg, rgba(15, 76, 129, 0.35) 0%, rgba(6, 22, 38, 0.95) 100%);
  box-shadow: 0 0 20px rgba(0, 210, 211, 0.4), inset 0 0 15px rgba(0, 210, 211, 0.12);
}

/* Facção Vermelha */
.faction-card[data-faction="red"]:hover {
  border-color: rgba(231, 76, 60, 0.6);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.35);
}

.faction-card[data-faction="red"].selected {
  border-color: #e74c3c;
  background: linear-gradient(135deg, rgba(150, 27, 32, 0.35) 0%, rgba(28, 8, 12, 0.95) 100%);
  box-shadow: 0 0 20px rgba(231, 76, 60, 0.4), inset 0 0 15px rgba(231, 76, 60, 0.12);
}

/* Showcase de Brasões Heráldicos Originais */
.faction-crest-showcase {
  width: 70px;
  height: 70px;
  flex-shrink: 0;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.25s ease, filter 0.25s ease;
}

.faction-blue-showcase {
  background: radial-gradient(circle, rgba(0, 210, 211, 0.28) 0%, rgba(15, 76, 129, 0.45) 55%, rgba(6, 18, 32, 0.9) 100%);
  border: 1.5px solid rgba(0, 210, 211, 0.45);
  box-shadow: 0 0 14px rgba(0, 210, 211, 0.35), inset 0 1px 3px rgba(255, 255, 255, 0.2);
}

.faction-red-showcase {
  background: radial-gradient(circle, rgba(231, 76, 60, 0.32) 0%, rgba(150, 27, 32, 0.45) 55%, rgba(28, 6, 8, 0.9) 100%);
  border: 1.5px solid rgba(231, 76, 60, 0.45);
  box-shadow: 0 0 14px rgba(231, 76, 60, 0.35), inset 0 1px 3px rgba(255, 255, 255, 0.2);
}

.faction-card:hover .faction-crest-showcase {
  transform: scale(1.08);
}

.faction-hero-crest {
  width: 52px;
  height: 52px;
  display: block;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.7));
}

.faction-card-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
  gap: 2px;
}

.faction-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faction-name {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 1px;
}

.faction-card[data-faction="blue"] .faction-name {
  color: #00cec9;
}

.faction-card[data-faction="red"] .faction-name {
  color: #ff6b6b;
}

.faction-sub {
  font-size: 0.78rem;
  color: #fdcb6e;
  font-weight: 600;
}

.faction-spawn-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin: 2px 0;
  align-self: flex-start;
  letter-spacing: 0.4px;
}

.faction-card[data-faction="blue"] .faction-spawn-tag {
  background: rgba(0, 210, 211, 0.2);
  color: #81ecec;
  border: 1px solid rgba(0, 210, 211, 0.4);
}

.faction-card[data-faction="red"] .faction-spawn-tag {
  background: rgba(231, 76, 60, 0.2);
  color: #fab1a0;
  border: 1px solid rgba(231, 76, 60, 0.4);
}

.faction-desc {
  font-size: 0.74rem;
  color: #a4b0be;
  line-height: 1.25;
  margin: 0;
}

.faction-select-indicator {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.6px;
  display: none;
}

.faction-card.selected .faction-select-indicator {
  display: inline-block;
}

.faction-card[data-faction="blue"].selected .faction-select-indicator {
  background: #0984e3;
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 210, 211, 0.6);
}

.faction-card[data-faction="red"].selected .faction-select-indicator {
  background: #d63031;
  color: #fff;
  box-shadow: 0 0 10px rgba(231, 76, 60, 0.6);
}

/* Badge de Facção no HUD */
.player-faction.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.player-faction.badge.blue {
  background: rgba(0, 210, 211, 0.18);
  color: #81ecec;
  border: 1px solid rgba(0, 210, 211, 0.45);
}

.player-faction.badge.red {
  background: rgba(231, 76, 60, 0.18);
  color: #fab1a0;
  border: 1px solid rgba(231, 76, 60, 0.45);
}

.hud-faction-icon {
  width: 13px !important;
  height: 13px !important;
  min-width: 13px !important;
  min-height: 13px !important;
  max-width: 13px !important;
  max-height: 13px !important;
  vertical-align: -1px;
  display: inline-block;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.8));
}

.death-spawn-hint {
  font-size: 0.95rem;
  color: #f1c40f;
  margin-bottom: 18px;
  padding: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 6px;
}

/* ========================================================================= */
/* SELEÇÃO DE CLASSES DE TANQUES                                             */
/* ========================================================================= */
.class-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

@media (max-width: 768px) {
  .class-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.class-card {
  background: rgba(24, 30, 38, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.class-card:hover {
  background: rgba(32, 40, 52, 0.95);
  border-color: rgba(230, 126, 34, 0.5);
  transform: translateY(-2px);
}

.class-card.selected {
  border-color: #e67e22;
  background: rgba(230, 126, 34, 0.14);
  box-shadow: 0 0 16px rgba(230, 126, 34, 0.35);
}

.class-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.class-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 3px 0 6px 0;
  height: 50px;
  background: rgba(8, 12, 16, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 5px;
  overflow: hidden;
}

.tank-preview-canvas {
  image-rendering: pixelated;
  display: block;
}

.class-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
}

.class-tag {
  font-size: 0.68rem;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(230, 126, 34, 0.25);
  color: #f39c12;
  font-weight: bold;
}

.class-desc {
  font-size: 0.74rem;
  color: #95a5a6;
  line-height: 1.25;
  margin-bottom: 6px;
  min-height: 32px;
  flex-grow: 1;
}

.class-stats-preview {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.7rem;
  color: #f1c40f;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 6px;
  border-radius: 4px;
}

.btn-primary {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  background: linear-gradient(135deg, #e67e22 0%, #d35400 50%, #c0392b 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 10px 36px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(211, 84, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.22s ease;
  text-transform: uppercase;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 50%, #d35400 100%);
  box-shadow: 0 6px 22px rgba(230, 126, 34, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateY(-2px) scale(1.02);
}

/* Modal de Morte */
.death-modal {
  max-width: 480px;
}

.death-title {
  font-family: 'Chakra Petch', sans-serif;
  color: #e74c3c;
  font-size: 2rem;
  margin-bottom: 12px;
}

.death-text {
  font-size: 1.2rem;
  color: #bdc3c7;
  margin-bottom: 24px;
}

/* HUD Overlay */
#hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none; /* Deixa cliques e mira passarem direto para o canvas */
}

/* Apenas painéis e controles interativos específicos capturam eventos do mouse */
.player-profile-card,
.leaderboard-card,
.hud-mid-left,
.chat-container,
.minimap-wrapper,
.hud-collapse-btn,
.upgrade-btn,
.zoom-btn,
.zoom-display {
  pointer-events: auto;
}

/* Topo Esquerda: Perfil e Barras */
/* Topo Esquerda: Perfil e Barras Compactas */
.hud-top-left {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 50;
}

.player-profile-card {
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  padding: 6px 12px;
  width: 290px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
  transition: width 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Quando estiver na BASE SEGURA (Fortaleza):
   A janela expande com conforto (385px), exibe o nome do comandante,
   o banner de reparos e os botões de Oficina, Tripulação, Calibração e Hangar perfeitamente alinhados */
.player-profile-card.in-base {
  width: 385px;
  border-color: rgba(46, 204, 113, 0.5);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.65), 0 0 16px rgba(46, 204, 113, 0.2);
}

/* Quando estiver em TERRENO PERIGOSO (Fora da base):
   Os botões de oficina/hangar, o banner de base segura e o nome do jogador
   somem completamente, mantendo a HUD limpa e focada no combate! */
.player-profile-card:not(.in-base) .hud-quick-actions,
.player-profile-card:not(.in-base) .safe-zone-badge,
.player-profile-card:not(.in-base) .player-name {
  display: none !important;
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.profile-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.player-name {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 0.90rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 85px;
  flex-shrink: 1;
}

.player-class.badge {
  font-size: 0.66rem;
  padding: 2px 7px;
  background: rgba(230, 126, 34, 0.22);
  border: 1px solid rgba(230, 126, 34, 0.55);
  border-radius: 4px;
  color: #f39c12;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.player-faction.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  flex-shrink: 0;
}

.player-faction.badge .hud-faction-icon {
  width: 16px;
  height: 16px;
}

/* Banner de Base Segura: elegante, largura total dentro do card, sem encavalar com o ouro */
.safe-zone-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.65rem;
  padding: 2px 8px;
  background: rgba(46, 204, 113, 0.16);
  border: 1px solid #2ecc71;
  border-radius: 4px;
  color: #2ecc71;
  font-weight: 800;
  letter-spacing: 0.6px;
  animation: safePulse 1.2s infinite alternate;
  width: 100%;
  box-sizing: border-box;
}

.safe-zone-badge.hidden {
  display: none !important;
}

.safe-zone-badge .badge-icon-svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

@keyframes safePulse {
  from { box-shadow: 0 0 2px rgba(46, 204, 113, 0.3); }
  to { box-shadow: 0 0 8px rgba(46, 204, 113, 0.7); }
}

.bar-container {
  position: relative;
  height: 14px;
  background: rgba(0, 0, 0, 0.72);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.6);
}

.bar-fill {
  height: 100%;
  transition: width 0.15s ease-out;
}

.hp-bar {
  height: 14px;
}

.hp-bar .bar-fill {
  background: linear-gradient(90deg, #c0392b, #e74c3c);
}

.shield-bar {
  height: 12px;
}

.shield-bar .bar-fill {
  background: linear-gradient(90deg, #0984e3, #00cec9);
}

.nitro-bar {
  height: 10px;
}

.nitro-bar .bar-fill {
  background: linear-gradient(90deg, #0984e3, #00cec9);
  box-shadow: 0 0 8px rgba(0, 206, 201, 0.6);
  transition: width 0.1s linear;
}

.nitro-bar.locked .bar-fill {
  background: linear-gradient(90deg, #d35400, #e67e22) !important;
  box-shadow: 0 0 8px rgba(230, 126, 34, 0.5) !important;
}

.nitro-bar.active .bar-fill {
  background: linear-gradient(90deg, #ff0844, #ff7675) !important;
  box-shadow: 0 0 14px rgba(255, 8, 68, 0.9) !important;
}

.bar-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 0 3px #000, 0 1px 2px #000, -1px 0 2px #000, 1px 0 2px #000, 0 -1px 2px #000;
  letter-spacing: 0.5px;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}

.hp-bar .bar-text {
  font-size: 0.70rem;
}

.shield-bar .bar-text {
  font-size: 0.66rem;
}

.nitro-bar .bar-text {
  font-size: 0.62rem;
}

/* Botões de Ação Rápida (Pills) no HUD */
.hud-quick-actions {
  display: flex;
  gap: 4px;
  margin-top: 2px;
  width: 100%;
}

.hud-pill-btn {
  flex: 1 1 0;
  min-width: 0;
  height: 25px;
  padding: 0 4px;
  white-space: nowrap;
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 5px;
  color: #cbd5e1;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.hud-pill-btn .pill-btn-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.hud-pill-btn:hover:not(:disabled) {
  background: rgba(243, 156, 18, 0.22);
  border-color: #f39c12;
  color: #f39c12;
  transform: translateY(-1px);
}

.hud-pill-btn.active {
  background: rgba(243, 156, 18, 0.35);
  border-color: #f39c12;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(243, 156, 18, 0.4);
}

.hud-pill-btn.hangar {
  border-color: rgba(0, 229, 255, 0.45);
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.12);
}

.hud-pill-btn.hangar:hover:not(:disabled) {
  background: rgba(0, 229, 255, 0.28);
  border-color: #00e5ff;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.45);
}

.hud-pill-btn.crew-btn {
  border-color: rgba(241, 196, 15, 0.45);
  color: #f1c40f;
  background: rgba(241, 196, 15, 0.12);
}

.hud-pill-btn.crew-btn:hover:not(:disabled) {
  background: rgba(241, 196, 15, 0.28);
  border-color: #f1c40f;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(241, 196, 15, 0.45);
}

.hud-pill-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.1);
  color: #64748b;
  background: rgba(15, 23, 42, 0.4);
  box-shadow: none;
}

/* Banner de Alerta de Bombardeio da Artilharia */
.artillery-warning {
  background: rgba(192, 57, 43, 0.9);
  border: 2px solid #e74c3c;
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  box-shadow: 0 0 20px rgba(231, 76, 60, 0.6);
  animation: pulseWarning 0.6s infinite alternate;
  text-align: center;
  max-width: 320px;
}

@keyframes pulseWarning {
  from { opacity: 0.75; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1.02); }
}

/* Topo Direita: Container HUD (Minimapa no Topo) */
.hud-top-right {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
  z-index: 100;
}

/* Botão Universal de Minimizar/Expandir Janelas do HUD */
.hud-collapse-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #bdc3c7;
  width: 20px;
  height: 20px;
  line-height: 18px;
  border-radius: 4px;
  font-family: 'Chakra Petch', monospace, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
  user-select: none;
}

.hud-collapse-btn:hover {
  background: rgba(243, 156, 18, 0.35);
  border-color: #f39c12;
  color: #f39c12;
  transform: scale(1.08);
}

.hud-collapse-btn.small {
  width: 17px;
  height: 17px;
  font-size: 0.75rem;
  line-height: 14px;
}

.leaderboard-card {
  background: rgba(18, 22, 28, 0.85);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  min-width: 220px;
  transition: all 0.2s ease;
}

.card-title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.95rem;
  color: #f39c12;
  font-weight: 700;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#leaderboardCard.collapsed {
  min-width: 170px;
  padding: 6px 12px;
}

#leaderboardCard.collapsed .card-title {
  margin-bottom: 0;
  border-bottom: none;
  padding-bottom: 0;
}

#leaderboardCard.collapsed #leaderboardList {
  display: none;
}

#leaderboardList {
  list-style: none;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#leaderboardList li {
  display: flex;
  justify-content: space-between;
  color: #bdc3c7;
}

#leaderboardList li.me {
  color: #f1c40f;
  font-weight: bold;
}

/* Drawer Deslizante / Modal Lateral de Upgrades RPG */
.upgrade-drawer {
  position: absolute;
  top: 106px;
  left: 14px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(10, 15, 29, 0.98) 100%);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(0, 229, 255, 0.35);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 395px;
  max-height: calc(100vh - 120px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.8), 0 0 24px rgba(0, 229, 255, 0.16);
  z-index: 90;
  pointer-events: auto;
  animation: drawerSlideIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.upgrade-drawer.hidden {
  display: none !important;
}

@keyframes drawerSlideIn {
  from {
    opacity: 0;
    transform: translateX(-15px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.upgrade-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 6px;
}

.upgrade-drawer-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: #f8fafc;
  letter-spacing: 0.5px;
}

.drawer-title-icon {
  width: 15px;
  height: 15px;
  color: #f39c12;
}

.drawer-close-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
  transition: all 0.15s ease;
}

.drawer-close-btn:hover {
  background: rgba(231, 76, 60, 0.35);
  border-color: #e74c3c;
  color: #ff7675;
  transform: scale(1.08);
}

/* Abas da Oficina (Tanque vs Tripulação) */
.drawer-tabs {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.45);
  padding: 3px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.drawer-tab-btn {
  flex: 1;
  padding: 5px 8px;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: #94a3b8;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.18s ease;
  user-select: none;
}

.drawer-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.drawer-tab-btn.active {
  background: rgba(0, 229, 255, 0.22);
  color: #00f2ff;
  border: 1px solid rgba(0, 229, 255, 0.5);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

/* Cartões da Tripulação Veterana */
.crew-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.crew-card:hover {
  border-color: rgba(243, 156, 18, 0.4);
  background: rgba(20, 30, 50, 0.85);
}

.crew-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.crew-card-role {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 0.80rem;
  color: #f1c40f;
}

.crew-card-level {
  font-size: 0.70rem;
  color: #94a3b8;
  font-weight: 600;
}

.crew-card-desc {
  font-size: 0.70rem;
  color: #cbd5e1;
  line-height: 1.25;
}

.crew-card-bonus {
  font-size: 0.68rem;
  color: #00cec9;
  font-weight: 600;
}

.crew-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3px;
}

.crew-pips {
  display: flex;
  gap: 4px;
}

.crew-pip {
  width: 14px;
  height: 8px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s ease;
}

.crew-pip.filled {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
  border-color: #f1c40f;
  box-shadow: 0 0 6px rgba(241, 196, 15, 0.6);
}

.points-badge {
  background: #27ae60;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  animation: pulsePoints 0.8s infinite alternate;
}

@keyframes pulsePoints {
  from { transform: scale(0.95); }
  to { transform: scale(1.05); }
}

.stats-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: rgba(243, 156, 18, 0.4) transparent;
}

.stats-list::-webkit-scrollbar {
  width: 4px;
}

.stats-list::-webkit-scrollbar-thumb {
  background: rgba(243, 156, 18, 0.4);
  border-radius: 4px;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

.stat-name {
  width: 155px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ecf0f1;
}

.stat-pips {
  display: flex;
  gap: 3px;
}

.stat-pip {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.15);
}

.stat-pip.filled {
  background: #f39c12;
  box-shadow: 0 0 5px rgba(243, 156, 18, 0.5);
}

.upgrade-btn {
  background: linear-gradient(135deg, #f39c12, #d35400);
  border: 1px solid #f1c40f;
  color: #fff;
  padding: 2px 8px;
  min-width: 62px;
  height: 22px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: 'Chakra Petch', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.15s ease;
  box-shadow: 0 0 6px rgba(243, 156, 18, 0.3);
}

.upgrade-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #f1c40f, #e67e22);
  box-shadow: 0 0 10px rgba(241, 196, 15, 0.6);
  transform: translateY(-1px);
}

.upgrade-btn:disabled {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.4);
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.5;
}

.upgrade-btn.locked-base {
  border-color: rgba(231, 76, 60, 0.4);
  background: rgba(192, 57, 43, 0.2);
  color: #ff7675;
}

/* Mostrador de Ouro e Status da Fortaleza */
.gold-container {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(241, 196, 15, 0.12);
  border: 1px solid rgba(241, 196, 15, 0.45);
  box-shadow: 0 0 8px rgba(241, 196, 15, 0.2);
  border-radius: 5px;
  padding: 1px 7px;
  font-family: 'Chakra Petch', sans-serif;
  flex-shrink: 0;
  white-space: nowrap;
}

.gold-icon-svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 3px rgba(241, 196, 15, 0.7));
}

.gold-amount {
  font-size: 0.88rem;
  font-weight: 800;
  color: #f1c40f;
  text-shadow: 0 0 5px rgba(241, 196, 15, 0.7);
  letter-spacing: 0.5px;
  line-height: 1;
}

.base-status-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.base-status-badge.in-base {
  background: rgba(46, 204, 113, 0.22);
  border: 1px solid #2ecc71;
  color: #2ecc71;
  box-shadow: 0 0 6px rgba(46, 204, 113, 0.3);
}

.base-status-badge.locked,
.base-status-badge.out-base {
  background: rgba(231, 76, 60, 0.2);
  border: 1px solid #e74c3c;
  color: #ff7675;
}

.base-workshop-banner {
  background: rgba(231, 76, 60, 0.16);
  border: 1px solid rgba(231, 76, 60, 0.35);
  color: #ff9f9f;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 6px;
  margin-bottom: 6px;
  border-radius: 4px;
  line-height: 1.2;
  text-align: center;
  letter-spacing: 0.3px;
}

/* Canto Inferior Esquerdo: Chat */
.hud-bottom-left {
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: auto;
  max-width: 320px;
  pointer-events: auto;
  z-index: 9960;
}

.chat-container {
  background: rgba(18, 22, 28, 0.75);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.2s ease;
}

.chat-container:not(.collapsed) {
  width: 320px;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 700;
  color: #bdc3c7;
  font-family: 'Chakra Petch', sans-serif;
  letter-spacing: 0.5px;
}

#chatContainer.collapsed,
.chat-container.collapsed {
  width: auto !important;
  max-width: fit-content !important;
  min-width: unset !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  display: inline-flex !important;
}

#chatContainer.collapsed .chat-header,
.chat-container.collapsed .chat-header {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 9px !important;
  background: rgba(15, 23, 42, 0.85) !important;
  padding: 3px 6px !important;
  font-size: 12px !important;
  gap: 4px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: 22px !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
}

#chatContainer.collapsed .chat-header:hover,
.chat-container.collapsed .chat-header:hover {
  background: rgba(20, 30, 50, 0.95) !important;
  border-color: rgba(243, 156, 18, 0.5) !important;
}

#chatContainer.collapsed .chat-header .chat-icon,
.chat-container.collapsed .chat-header .chat-icon {
  font-size: 13px !important;
  line-height: 1 !important;
}

#chatContainer.collapsed .chat-header .hud-collapse-btn,
.chat-container.collapsed .chat-header .hud-collapse-btn {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  font-size: 11px !important;
  line-height: 14px !important;
  border-radius: 3px !important;
  padding: 0 !important;
  margin: 0 !important;
}

#chatContainer.collapsed .chat-title-text,
.chat-container.collapsed .chat-title-text {
  display: none !important;
}

#chatContainer.collapsed .chat-messages,
#chatContainer.collapsed #chatForm,
.chat-container.collapsed .chat-messages,
.chat-container.collapsed #chatForm {
  display: none !important;
}

.chat-messages {
  height: 130px;
  overflow-y: auto;
  padding: 8px 10px;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-msg {
  line-height: 1.25;
  word-break: break-word;
}

.chat-msg .sender {
  font-weight: 700;
}

#chatInput {
  background: rgba(0, 0, 0, 0.4);
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 8px 10px;
  font-size: 0.85rem;
  font-family: inherit;
}

#chatInput:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.7);
}

/* Canto Inferior Direito: Minimapa e Dicas */
.hud-bottom-right {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none; /* Espaços vazios e gaps deixam o clique passar direto para o canvas */
}

.minimap-wrapper {
  background: rgba(18, 22, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition: width 0.2s ease, min-width 0.2s ease;
  width: 210px;
  box-sizing: border-box;
}

.minimap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.45);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  font-weight: 700;
  color: #3498db;
  font-family: 'Chakra Petch', sans-serif;
  letter-spacing: 0.5px;
  width: 100%;
  box-sizing: border-box;
}

.minimap-area-title {
  font-size: 10px;
  color: #00cec9;
  font-weight: normal;
  max-width: 68px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  vertical-align: bottom;
}

#minimapWrapper.collapsed {
  width: auto !important;
  min-width: unset !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

#minimapWrapper.collapsed .minimap-header {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  padding: 4px 8px;
  gap: 4px;
}

#minimapWrapper.collapsed .minimap-title-text,
#minimapWrapper.collapsed .minimap-mode-btn,
#minimapWrapper.collapsed .minimap-pos-btn {
  display: none !important;
}

#minimapWrapper.collapsed .minimap-body {
  display: none;
}

.minimap-body {
  position: relative;
  width: 210px;
  height: 210px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #060a0f;
  box-sizing: border-box;
}

#minimapCanvas {
  display: block;
  width: 210px;
  height: 210px;
}

.minimap-world-btn {
  background: rgba(243, 156, 18, 0.2);
  border: 1px solid rgba(243, 156, 18, 0.6);
  color: #f39c12;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  cursor: pointer;
  font-family: 'Chakra Petch', sans-serif;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
  line-height: 18px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.minimap-world-btn:hover {
  background: rgba(243, 156, 18, 0.4);
  border-color: #f1c40f;
  color: #ffffff;
  box-shadow: 0 0 8px rgba(243, 156, 18, 0.6);
  transform: translateY(-1px);
}

.minimap-mode-btn {
  background: rgba(0, 206, 201, 0.15);
  border: 1px solid rgba(0, 206, 201, 0.45);
  color: #00cec9;
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 4px;
  cursor: pointer;
  font-family: 'Chakra Petch', sans-serif;
  letter-spacing: 0.5px;
  transition: all 0.15s ease;
  line-height: 18px;
}

.minimap-mode-btn:hover {
  background: rgba(0, 206, 201, 0.35);
  border-color: #00cec9;
  color: #ffffff;
  box-shadow: 0 0 6px rgba(0, 206, 201, 0.4);
}

.minimap-pos-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #bdc3c7;
  width: 20px;
  height: 20px;
  line-height: 18px;
  border-radius: 4px;
  font-size: 0.65rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  padding: 0;
}

.minimap-pos-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #f1c40f;
  color: #ffffff;
  box-shadow: 0 0 6px rgba(241, 196, 15, 0.35);
}

.minimap-coords {
  position: absolute;
  bottom: 4px;
  left: 6px;
  font-size: 0.65rem;
  color: #95a5a6;
  font-weight: bold;
  font-family: 'Chakra Petch', monospace;
  pointer-events: none;
  text-shadow: 0 1px 2px #000;
}

.minimap-mode-hint {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-size: 0.6rem;
  color: #00cec9;
  font-weight: bold;
  font-family: 'Chakra Petch', monospace;
  opacity: 0.8;
  pointer-events: none;
  text-shadow: 0 1px 2px #000;
}

/* Widget Tático de Zoom */
.zoom-controller {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(18, 22, 28, 0.85);
  border: 1px solid rgba(243, 156, 18, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  padding: 4px 10px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  user-select: none;
  pointer-events: none; /* Deixa cliques e mira passarem direto para o canvas */
}

.zoom-icon {
  font-size: 0.85rem;
  opacity: 0.85;
  pointer-events: none;
}

.zoom-btn {
  background: rgba(45, 52, 60, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f1c40f;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
  line-height: 1;
  transition: all 0.15s ease;
  pointer-events: auto;
}

.zoom-btn:hover {
  background: rgba(243, 156, 18, 0.3);
  border-color: #f39c12;
  color: #ffffff;
  transform: scale(1.08);
}

.zoom-btn:active {
  transform: scale(0.95);
}

.zoom-display {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.82rem;
  font-weight: bold;
  color: #f39c12;
  min-width: 44px;
  text-align: center;
  cursor: pointer;
  letter-spacing: 0.5px;
  padding: 2px 4px;
  border-radius: 3px;
  transition: background 0.15s ease;
  pointer-events: auto;
}

.zoom-display:hover {
  background: rgba(243, 156, 18, 0.15);
  color: #ffffff;
}

.hidden {
  display: none !important;
}

@keyframes boatFloat {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-9px) rotate(-3deg);
  }
}

/* --- Botão do Hangar no Painel da Oficina --- */
.btn-hangar {
  width: calc(100% - 16px);
  margin: 6px 8px 10px 8px;
  padding: 8px 10px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1.5px solid #00e5ff;
  border-radius: 6px;
  color: #00e5ff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
  transition: all 0.2s ease;
}
.btn-hangar:hover:not(:disabled) {
  background: linear-gradient(135deg, #00e5ff, #0984e3);
  color: #fff;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.5);
  transform: translateY(-1px);
}
.btn-hangar:disabled {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(30, 41, 59, 0.5);
  color: #64748b;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.6;
}

/* --- Modal do Hangar de Blindados --- */
.hangar-modal {
  max-width: 740px;
  width: 95%;
  background: rgba(15, 23, 42, 0.96);
  border: 2px solid #00e5ff;
  border-radius: 12px;
  box-shadow: 0 0 35px rgba(0, 229, 255, 0.35);
  padding: 14px 20px;
  max-height: 94vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

.hangar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.hangar-title {
  margin: 0;
  color: #00e5ff;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 1.5px;
  font-size: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hangar-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
  transition: color 0.18s ease;
}
.hangar-close-btn:hover {
  color: #fff;
}

.hangar-desc {
  color: #94a3b8;
  font-size: 13px;
  margin-top: -4px;
  margin-bottom: 14px;
  line-height: 1.35;
}

.hangar-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 600px) and (orientation: portrait) {
  .hangar-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}
.hangar-card {
  background: rgba(15, 23, 42, 0.88);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.25s ease;
  position: relative;
  cursor: pointer;
  user-select: none;
}
.hangar-card:hover {
  border-color: rgba(0, 229, 255, 0.5);
  background: rgba(15, 23, 42, 0.95);
  transform: translateY(-3px);
}
.hangar-card.active-tank {
  border-color: #00e5ff;
  background: rgba(0, 229, 255, 0.1);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.28);
}
.hangar-card.selected-tank {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.45);
}
.hangar-card.active-tank.selected-tank {
  border-color: #00e5ff;
  box-shadow: 0 0 22px rgba(0, 229, 255, 0.5), inset 0 0 12px rgba(0, 229, 255, 0.15);
}
.hangar-card-badge {
  position: absolute;
  top: -9px;
  background: #00e5ff;
  color: #0b101b;
  font-family: 'Rajdhani', sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
}
.hangar-card-badge.selected {
  background: #f59e0b;
  color: #0b101b;
}
.hangar-tank-preview {
  width: 90px;
  height: 64px;
  margin: 6px 0;
}
.hangar-tank-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 2px;
}
.hangar-tank-role {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 8px;
  font-weight: 600;
}
.hangar-upgrades-info {
  font-size: 11px;
  background: rgba(241, 196, 15, 0.12);
  color: #f1c40f;
  border: 1px solid rgba(241, 196, 15, 0.35);
  border-radius: 5px;
  padding: 3px 8px;
  margin-bottom: 12px;
  font-weight: bold;
}
.hangar-btn-action {
  width: 100%;
  padding: 8px 0;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.hangar-btn-action.current {
  background: rgba(0, 229, 255, 0.2);
  color: #00e5ff;
  border: 1.5px solid #00e5ff;
  cursor: pointer;
}
.hangar-btn-action.current:hover {
  background: rgba(0, 229, 255, 0.35);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}
.hangar-btn-action.deploy {
  background: linear-gradient(135deg, #00b894, #00cec9);
  color: #0b101b;
  font-weight: 800;
}
.hangar-btn-action.deploy:hover {
  filter: brightness(1.2);
  box-shadow: 0 0 14px rgba(0, 206, 201, 0.6);
  transform: scale(1.02);
}

/* --- Mobile Landscape / Telas Baixas (Aparecer Inteira Normal sem Rolagem/Arrastar) --- */
@media (max-height: 560px), (max-height: 620px) and (max-width: 1024px), (max-width: 1024px) and (orientation: landscape) {
  .hangar-modal {
    max-width: 820px !important;
    width: 96vw !important;
    max-height: 96vh !important;
    padding: 6px 12px 14px 12px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
    touch-action: pan-y !important;
  }

  .hangar-modal::-webkit-scrollbar {
    width: 5px !important;
    display: block !important;
  }
  .hangar-modal::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.45) !important;
    border-radius: 4px !important;
  }
  .hangar-modal::-webkit-scrollbar-track {
    background: rgba(10, 15, 25, 0.5) !important;
  }

  .hangar-header {
    padding-bottom: 3px !important;
    margin-bottom: 4px !important;
  }

  .hangar-title {
    font-size: 13.5px !important;
    letter-spacing: 0.8px !important;
  }

  .hangar-close-btn {
    font-size: 18px !important;
    padding: 0 4px !important;
  }

  .hangar-tabs-nav {
    margin-bottom: 5px !important;
    padding-bottom: 3px !important;
    gap: 6px !important;
  }

  .hangar-tab-btn {
    font-size: 10.5px !important;
    padding: 3px 9px !important;
    border-radius: 4px !important;
    letter-spacing: 0.5px !important;
  }

  .hangar-desc {
    display: none !important; /* Oculta a descrição longa em landscape para economizar espaço vertical */
  }

  .hangar-cards-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 7px !important;
  }

  .hangar-card {
    padding: 4px 4px 5px 4px !important;
    border-radius: 8px !important;
  }

  .hangar-card-badge {
    top: -6px !important;
    font-size: 8px !important;
    padding: 1px 5px !important;
    letter-spacing: 0.4px !important;
  }

  .hangar-tank-preview {
    width: 68px !important;
    height: 42px !important;
    margin: 1px 0 2px 0 !important;
  }

  .hangar-tank-name {
    font-size: 11.5px !important;
    margin-bottom: 0px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
  }

  .hangar-tank-role {
    font-size: 8.5px !important;
    margin-bottom: 2px !important;
    line-height: 1 !important;
  }

  .hangar-upgrades-info {
    font-size: 9px !important;
    padding: 1px 4px !important;
    margin-bottom: 4px !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
  }

  .hangar-btn-action {
    padding: 3.5px 0 !important;
    font-size: 10.5px !important;
    font-weight: 800 !important;
    border-radius: 4px !important;
    letter-spacing: 0.3px !important;
  }

  /* Showroom e Skins na versão Mobile Landscape */
  .hangar-skin-showroom {
    padding: 4px 8px !important;
    margin-bottom: 5px !important;
    border-radius: 8px !important;
  }

  .showroom-pedestal {
    flex-direction: row !important;
    gap: 12px !important;
    align-items: center !important;
  }

  .skin-preview-canvas {
    width: 84px !important;
    height: 54px !important;
  }

  .showroom-tank-selector {
    gap: 4px !important;
    margin-bottom: 3px !important;
  }

  .showroom-tank-pill {
    font-size: 9.5px !important;
    padding: 2px 6px !important;
  }

  .showroom-skin-name {
    font-size: 13px !important;
    margin: 1px 0 !important;
  }

  .showroom-skin-desc {
    font-size: 9.5px !important;
    line-height: 1.15 !important;
    max-width: 280px !important;
  }

  .showroom-hint {
    display: none !important;
  }

  .hangar-skin-subtabs {
    gap: 6px !important;
    margin: 4px 0 6px 0 !important;
  }

  .hangar-skins-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important;
    gap: 6px !important;
    padding-bottom: 24px !important;
  }

  .skin-card {
    padding: 3px 2px 4px 2px !important;
    border-radius: 6px !important;
  }

  .skin-thumb-canvas {
    width: 56px !important;
    height: 36px !important;
  }

  .skin-card-title {
    font-size: 9.5px !important;
    margin-bottom: 2px !important;
  }

  .skin-btn-action {
    padding: 2px 0 !important;
    font-size: 9px !important;
  }
}

/* --- Abas do Hangar --- */
.hangar-tabs-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}
.hangar-tab-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}
.hangar-tab-btn:hover {
  background: rgba(0, 229, 255, 0.12);
  color: #00e5ff;
  border-color: rgba(0, 229, 255, 0.4);
}
.hangar-tab-btn.active {
  background: rgba(0, 229, 255, 0.2);
  color: #00e5ff;
  border-color: #00e5ff;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.3);
}

/* --- Palco de Inspeção (Showroom) --- */
.hangar-skin-showroom {
  background: radial-gradient(circle at center, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.95) 75%);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 10px;
  padding: 12px 18px;
  margin-bottom: 12px;
  box-shadow: inset 0 0 25px rgba(0, 229, 255, 0.1);
}
.showroom-pedestal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
@media (max-width: 600px) {
  .showroom-pedestal {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
}
.skin-preview-canvas {
  width: 140px;
  height: 96px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.6));
}
.showroom-info {
  display: flex;
  flex-direction: column;
}
.showroom-tank-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.showroom-tank-pill {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: #94a3b8;
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 4px 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.showroom-tank-pill:hover {
  background: rgba(0, 229, 255, 0.15);
  color: #00e5ff;
  border-color: rgba(0, 229, 255, 0.4);
}
.showroom-tank-pill.active {
  background: rgba(0, 229, 255, 0.25);
  color: #00e5ff;
  border-color: #00e5ff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.35);
}
.showroom-skin-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #00e5ff;
  margin: 2px 0 4px 0;
  letter-spacing: 0.5px;
}
.showroom-skin-desc {
  font-size: 12px;
  color: #cbd5e1;
  max-width: 320px;
  line-height: 1.35;
}
.showroom-hint {
  font-size: 12px;
  color: #94a3b8;
  margin: 0 0 12px 2px;
  line-height: 1.3;
}

/* --- Sub-Abas de Skins (Blindagem, Disparo, Rastro) --- */
.hangar-skin-subtabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 10px 0;
}

/* --- Grade de Cards de Skins --- */
.hangar-skins-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding-bottom: 20px;
}
@media (max-width: 768px) {
  .hangar-skins-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 480px) {
  .hangar-skins-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.skin-card {
  background: rgba(15, 23, 42, 0.90);
  border: 1.5px solid rgba(255, 255, 255, 0.10);
  border-radius: 10px;
  padding: 8px 6px 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}
.skin-card:hover {
  background: rgba(22, 33, 56, 0.95);
  border-color: rgba(0, 229, 255, 0.45);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}
.skin-card.selected {
  border-color: #00e5ff;
  background: rgba(0, 229, 255, 0.08);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.35);
}
.skin-card.equipped {
  border-color: rgba(34, 197, 94, 0.45);
}

/* Área de Miniatura do Tanque (Sem fundo colorido atrás) */
.skin-card-thumb-wrap {
  width: 100%;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  background: transparent;
}
.skin-thumb-canvas {
  width: 86px;
  height: 56px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.65));
  transition: transform 0.2s ease;
}
.skin-card:hover .skin-thumb-canvas {
  transform: scale(1.06);
}

.skin-card-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.skin-card-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.skin-card-footer {
  width: 100%;
  margin-top: 2px;
}

/* --- Botões Táticos de Ação de Skins (Comprar, Equipar, Equipado) --- */
.skin-btn-action {
  width: 100%;
  height: 32px;
  border-radius: 6px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.18s ease;
  outline: none;
  padding: 0 4px;
  box-sizing: border-box;
}

/* Botão: COMPRAR / ADQUIRIR (Estilo Ouro Tático com Borda Neon Amber) */
.skin-btn-action.buy {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.22) 0%, rgba(180, 83, 9, 0.40) 100%);
  border: 1.5px solid #f59e0b;
  color: #fbbf24;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}
.skin-btn-action.buy:hover {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  color: #0b101b;
  border-color: #fbbf24;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
  transform: translateY(-1px);
}
.skin-btn-action.buy .skin-btn-price {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: #fef08a;
}
.skin-btn-action.buy:hover .skin-btn-price {
  color: #0b101b;
}
.skin-btn-action.buy .skin-btn-label {
  font-size: 11px;
  letter-spacing: 0.5px;
}
.skin-btn-action.buy.disabled {
  opacity: 0.5;
  filter: grayscale(0.5);
  cursor: not-allowed;
  border-color: #64748b;
  color: #94a3b8;
  background: rgba(51, 65, 85, 0.3);
  box-shadow: none;
}
.skin-btn-action.buy.disabled:hover {
  transform: none;
  background: rgba(51, 65, 85, 0.3);
  color: #94a3b8;
  border-color: #64748b;
  box-shadow: none;
}

/* Botão: EQUIPAR (Estilo Ciano Elétrico) */
.skin-btn-action.equip {
  background: linear-gradient(180deg, rgba(0, 229, 255, 0.18) 0%, rgba(2, 132, 199, 0.35) 100%);
  border: 1.5px solid #00e5ff;
  color: #00e5ff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}
.skin-btn-action.equip:hover {
  background: linear-gradient(180deg, #00e5ff 0%, #0284c7 100%);
  color: #080d14;
  border-color: #38bdf8;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.65);
  transform: translateY(-1px);
}

/* Botão: EQUIPADO (Verde Tático Concluído) */
.skin-btn-action.equipped {
  background: rgba(34, 197, 94, 0.12);
  border: 1.5px solid rgba(34, 197, 94, 0.5);
  color: #4ade80;
  cursor: default;
  box-shadow: none;
  font-size: 11px;
}

/* Responsividade Mobile e Telas Menores */
@media (max-width: 768px) {
  .hud-top-left {
    top: 8px;
    left: 8px;
  }
  .player-profile-card {
    width: 225px;
    padding: 5px 8px;
  }
  .player-name {
    max-width: 65px;
    font-size: 0.82rem;
  }
  .player-class.badge {
    font-size: 0.58rem;
    padding: 1px 4px;
  }
  .hud-pill-btn {
    height: 28px;
    font-size: 0.68rem;
  }
  .upgrade-drawer {
    top: 85px;
    left: 8px;
    width: calc(100vw - 16px);
    max-width: 310px;
  }
  .leaderboard-card {
    min-width: 150px;
    padding: 8px 10px;
  }
  .chat-container {
    width: 240px;
  }
}

/* =========================================================================
   BOTÃO DE CONFIGURAÇÕES (Engrenagem ao lado do zoom)
   ========================================================================= */
.settings-btn {
  background: rgba(18, 22, 28, 0.88);
  border: 1px solid rgba(243, 156, 18, 0.4);
  border-radius: 6px;
  color: #f39c12;
  font-size: 1.1rem;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  transition: all 0.18s ease;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  padding: 0;
  line-height: 1;
}
.settings-btn:hover {
  background: rgba(243, 156, 18, 0.25);
  border-color: #f39c12;
  color: #fff;
  transform: rotate(45deg) scale(1.08);
}
.settings-btn:active {
  transform: rotate(90deg) scale(0.95);
}

/* =========================================================================
   MODAL DE CONFIGURAÇÕES
   ========================================================================= */
.settings-modal-content {
  background: rgba(12, 18, 28, 0.97);
  border: 2px solid rgba(243, 156, 18, 0.55);
  border-radius: 14px;
  box-shadow: 0 0 40px rgba(243, 156, 18, 0.25), 0 8px 32px rgba(0,0,0,0.6);
  width: 92%;
  max-width: 480px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: settingsModalIn 0.22s ease;
}
@keyframes settingsModalIn {
  from { opacity: 0; transform: scale(0.93) translateY(-10px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

.settings-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 12px;
  border-bottom: 1px solid rgba(243, 156, 18, 0.25);
  flex-shrink: 0;
}
.settings-modal-title {
  margin: 0;
  font-family: 'Rajdhani', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: #f39c12;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.settings-modal-close {
  background: transparent;
  border: none;
  color: #64748b;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s ease;
}
.settings-modal-close:hover {
  color: #f1c40f;
  background: rgba(243, 156, 18, 0.12);
}

.settings-body {
  overflow-y: auto;
  padding: 6px 0 4px;
  flex: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(243,156,18,0.35) transparent;
}
.settings-body::-webkit-scrollbar { width: 5px; }
.settings-body::-webkit-scrollbar-thumb { background: rgba(243,156,18,0.35); border-radius: 3px; }

.settings-section {
  padding: 12px 18px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.settings-section:last-child { border-bottom: none; }

.settings-section-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.settings-row:last-child { border-bottom: none; }

.settings-label {
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #cbd5e1;
  flex: 1;
  user-select: none;
}

/* Toggle switch (pill on/off) */
.settings-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.settings-toggle input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-track {
  width: 44px;
  height: 24px;
  background: rgba(50, 60, 80, 0.9);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
  display: block;
}
.settings-toggle input:checked + .toggle-track {
  background: rgba(46, 204, 113, 0.35);
  border-color: #2ecc71;
}
.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: #64748b;
  border-radius: 50%;
  transition: transform 0.2s ease, background 0.2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.settings-toggle input:checked + .toggle-track .toggle-thumb {
  transform: translateX(20px);
  background: #2ecc71;
}

/* Slider de volume */
.settings-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.settings-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 120px;
  height: 5px;
  border-radius: 3px;
  background: rgba(50, 60, 80, 0.9);
  outline: none;
  cursor: pointer;
  accent-color: #f39c12;
}
.settings-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #f39c12;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(243, 156, 18, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.settings-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.settings-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: #f39c12;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}
.settings-slider-val {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 12px;
  color: #f39c12;
  min-width: 36px;
  text-align: right;
  font-weight: bold;
}

/* Footer */
.settings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px 12px;
  border-top: 1px solid rgba(243, 156, 18, 0.2);
  flex-shrink: 0;
  gap: 8px;
}
.settings-footer-hint {
  font-family: 'Rajdhani', sans-serif;
  font-size: 11px;
  color: #475569;
  flex: 1;
}
.settings-reset-btn {
  background: transparent;
  border: 1px solid rgba(231, 76, 60, 0.45);
  color: #e74c3c;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 5px 12px;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.18s ease;
  flex-shrink: 0;
}
.settings-reset-btn:hover {
  background: rgba(231, 76, 60, 0.15);
  border-color: #e74c3c;
  color: #ff7675;
}

/* FPS overlay (centralizado no topo) */
#fpsDisplay {
  position: fixed;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #00e5ff;
  background: rgba(10, 14, 20, 0.72);
  padding: 2px 10px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 9980;
  letter-spacing: 0.8px;
  display: none;
}

/* =========================================================================
   CONTROLES TOUCH VIRTUAIS (APENAS DISPOSITIVOS MÓVEIS / TOUCHSCREEN)
   100% Invisíveis em Desktop / Mouse
   ========================================================================= */
.mobile-controls-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9950;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

/* Zonas de toque transparentes na metade inferior */
.touch-zone {
  position: absolute;
  bottom: 0;
  height: 55vh;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.touch-zone-left {
  left: 0;
  width: 48vw;
}
.touch-zone-right {
  right: 0;
  width: 48vw;
}

/* Base circular dos analógicos */
.touch-joy-base {
  position: fixed;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s ease, border-color 0.2s ease;
  opacity: 0.82;
  box-sizing: border-box;
}

/* Base de Movimento (Ciano Tecnológico) */
.joy-move-base {
  background: radial-gradient(circle, rgba(0, 229, 255, 0.18) 0%, rgba(10, 25, 38, 0.78) 70%, rgba(0, 229, 255, 0.4) 100%);
  border: 2.5px dashed rgba(0, 229, 255, 0.75);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.35), inset 0 0 14px rgba(0, 229, 255, 0.2);
  left: 20vw;
  top: 76vh;
}

/* Base de Mira & Tiro (Laranja de Fogo / Mira Tática) */
.joy-aim-base {
  background: radial-gradient(circle, rgba(243, 156, 18, 0.2) 0%, rgba(38, 22, 10, 0.78) 70%, rgba(243, 156, 18, 0.45) 100%);
  border: 2.5px dashed rgba(243, 156, 18, 0.8);
  box-shadow: 0 0 20px rgba(243, 156, 18, 0.35), inset 0 0 14px rgba(243, 156, 18, 0.2);
  left: 80vw;
  top: 76vh;
}

/* Knob / Manípulo deslizante central */
.touch-joy-knob {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
  box-sizing: border-box;
  pointer-events: none;
}

.joy-move-knob {
  background: radial-gradient(circle at 35% 35%, #00e5ff, #0984e3);
  border: 2px solid #ffffff;
  box-shadow: 0 0 14px rgba(0, 229, 255, 0.8), 0 4px 8px rgba(0, 0, 0, 0.5);
  color: #0b101b;
  font-size: 20px;
  font-weight: 900;
}

.joy-aim-knob {
  background: radial-gradient(circle at 35% 35%, #ff7675, #d63031);
  border: 2px solid #ffffff;
  box-shadow: 0 0 16px rgba(255, 118, 117, 0.85), 0 4px 8px rgba(0, 0, 0, 0.5);
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

/* Botão Redondo [X] de Cancelamento de Habilidade / Morteiro (Estilo MOBA / Pokémon Unite / Brawl Stars) */
.touch-aim-cancel-zone {
  position: fixed;
  right: 14vw;
  top: 14vh;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 12, 12, 0.88);
  border: 2px dashed rgba(231, 76, 60, 0.8);
  color: #ff7675;
  font-family: 'Rajdhani', sans-serif;
  font-size: 26px;
  font-weight: 900;
  pointer-events: none;
  z-index: 9980;
  transition: transform 0.16s ease-out, background 0.16s ease-out, border-color 0.16s ease-out;
  box-shadow: 0 0 16px rgba(231, 76, 60, 0.35);
}

.touch-aim-cancel-zone.active {
  background: rgba(231, 76, 60, 0.95);
  border: 2.5px solid #ffffff;
  color: #ffffff;
  transform: scale(1.25);
  box-shadow: 0 0 28px rgba(231, 76, 60, 0.95);
}

.touch-aim-cancel-zone .cancel-icon {
  line-height: 1;
  user-select: none;
}

.touch-aim-cancel-zone.hidden {
  display: none !important;
}

/* Barra de Ações Táticas Rápidas */
.mobile-action-bar {
  position: absolute;
  right: 18px;
  bottom: 38vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: auto;
  z-index: 9960;
}

.mobile-tactical-btn {
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 30px;
  padding: 8px 14px;
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.8px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  touch-action: manipulation;
  transition: all 0.15s ease;
}

.mobile-tactical-btn:active {
  transform: scale(0.92);
}

.mobile-tactical-btn.btn-nitro {
  border-color: #00cec9;
  background: linear-gradient(135deg, rgba(0, 206, 201, 0.3), rgba(9, 132, 227, 0.3));
  color: #00cec9;
}
.mobile-tactical-btn.btn-nitro.active {
  background: #00cec9;
  color: #0b101b;
  box-shadow: 0 0 18px rgba(0, 206, 201, 0.8);
  transform: scale(1.08);
}

.mobile-tactical-btn.btn-autoaim {
  border-color: rgba(231, 76, 60, 0.7);
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.12);
}
.mobile-tactical-btn.btn-autoaim.active {
  background: #e74c3c;
  color: #ffffff;
  border-color: #ff7675;
  box-shadow: 0 0 16px rgba(231, 76, 60, 0.85);
  transform: scale(1.06);
}

/* =========================================================================
   HUD MOBILE SLEEK & MINIMALISTA (Estilo Brawl Stars / Wild Rift)
   Desobstrui 70% da tela para visão tática máxima de combate
   ========================================================================= */

/* 1. Barra de Vida e Perfil Compacta (Topo Esquerdo) */
body.is-mobile-device .hud-top-left {
  top: 8px;
  left: 8px;
  gap: 3px;
  z-index: 90;
}

body.is-mobile-device .player-profile-card {
  width: 170px !important;
  max-width: 170px !important;
  padding: 3px 6px !important;
  gap: 2px !important;
  background: rgba(15, 23, 42, 0.68) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45) !important;
  backdrop-filter: blur(4px) !important;
}

body.is-mobile-device .player-profile-card.in-base {
  width: 215px !important;
  max-width: 215px !important;
}

body.is-mobile-device .hud-quick-actions {
  gap: 3px !important;
}

body.is-mobile-device .hud-pill-btn {
  height: 20px !important;
  font-size: 8px !important;
  padding: 1px 3px !important;
  gap: 2px !important;
}

body.is-mobile-device .profile-header {
  gap: 4px;
}

body.is-mobile-device .player-name {
  display: none !important;
}

body.is-mobile-device .player-class.badge {
  font-size: 0.52rem !important;
  padding: 1px 4px !important;
}

body.is-mobile-device .player-faction.badge {
  padding: 1px 3px !important;
}

body.is-mobile-device .gold-amount {
  font-size: 0.72rem !important;
}

body.is-mobile-device .gold-icon-svg {
  width: 12px !important;
  height: 12px !important;
}

body.is-mobile-device .bar-container {
  height: 8px !important;
  border-radius: 2.5px !important;
  border: 0.5px solid rgba(255, 255, 255, 0.12) !important;
}

body.is-mobile-device .bar-text {
  font-size: 7.5px !important;
  line-height: 8px !important;
  font-weight: 700 !important;
  text-shadow: 0 1px 2px #000 !important;
}

/* 2. Rádio / Chat Ultra Compacto (No canto inferior esquerdo, lá embaixo no cantinho) */
body.is-mobile-device .hud-bottom-left {
  position: fixed;
  bottom: 12px;
  top: auto;
  left: 12px;
  right: auto;
  width: auto !important;
  pointer-events: auto;
  z-index: 9960;
}

body.is-mobile-device #chatContainer.collapsed,
body.is-mobile-device .chat-container.collapsed {
  width: auto !important;
  min-width: unset !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body.is-mobile-device #chatContainer.collapsed .chat-header,
body.is-mobile-device .chat-container.collapsed .chat-header {
  background: rgba(15, 23, 42, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 9px !important;
  padding: 3px 6px !important;
  font-size: 12px !important;
  gap: 4px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45) !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: 22px !important;
  box-sizing: border-box !important;
}

body.is-mobile-device #chatContainer.collapsed .chat-header .chat-icon {
  font-size: 13px !important;
  line-height: 1 !important;
}

body.is-mobile-device #chatContainer.collapsed .chat-header .hud-collapse-btn {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  font-size: 11px !important;
  line-height: 14px !important;
  border-radius: 3px !important;
  padding: 0 !important;
}

body.is-mobile-device .chat-container.collapsed .chat-title-text {
  display: none !important;
}

body.is-mobile-device .chat-container:not(.collapsed) {
  width: 250px;
  max-height: 160px;
  background: rgba(15, 23, 42, 0.95);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

/* 3. Topo Direito: Minimapa Compacto, Zoom e Olhinho */
body.is-mobile-device .hud-top-right {
  position: fixed;
  top: 8px;
  right: 8px;
  transform: scale(0.75);
  transform-origin: top right;
  z-index: 100;
}

/* Quando o radar está minimizado, puxa zoom e olhinho para perto dele */
body.is-mobile-device .hud-bottom-right {
  position: fixed;
  top: 8px;
  right: 58px;
  bottom: auto;
  left: auto;
  transform: none !important;
  z-index: 100;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
  transition: right 0.2s ease;
}

/* Quando o radar está expandido, afasta os controles para não sobrepor o mapa */
body.is-mobile-device:has(#minimapWrapper:not(.collapsed)) .hud-bottom-right,
body.is-mobile-device.minimap-expanded .hud-bottom-right {
  right: 175px !important;
}

/* Botão de Opções / Configurações fixo no Canto Inferior Direito no Mobile */
body.is-mobile-device #btnOpenSettings,
html.is-mobile-device #btnOpenSettings {
  position: fixed !important;
  bottom: 12px !important;
  right: 12px !important;
  top: auto !important;
  left: auto !important;
  z-index: 10005 !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(15, 23, 42, 0.90) !important;
  border: 1.5px solid rgba(255, 255, 255, 0.25) !important;
  padding: 0 !important;
  font-size: 16px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6) !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
}

/* Botão de Missões Diárias posicionado ao lado do Botão de Opções no Mobile */
body.is-mobile-device #btnOpenQuests,
html.is-mobile-device #btnOpenQuests {
  position: fixed !important;
  bottom: 12px !important;
  right: 52px !important;
  top: auto !important;
  left: auto !important;
  z-index: 10005 !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(15, 23, 42, 0.90) !important;
  border: 1.5px solid rgba(0, 206, 201, 0.45) !important;
  padding: 0 !important;
  font-size: 16px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6), 0 0 8px rgba(0, 206, 201, 0.25) !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
}

/* Botão de Recompensas Diárias (Check-in) posicionado ACIMA do Botão de Opções no Mobile */
body.is-mobile-device #btnOpenDailyStreak,
html.is-mobile-device #btnOpenDailyStreak {
  position: fixed !important;
  bottom: 52px !important;
  right: 12px !important;
  top: auto !important;
  left: auto !important;
  z-index: 10005 !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(15, 23, 42, 0.90) !important;
  border: 1.5px solid rgba(241, 196, 15, 0.55) !important;
  padding: 0 !important;
  font-size: 16px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6), 0 0 8px rgba(241, 196, 15, 0.25) !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
}

body.is-mobile-device #btnOpenDailyStreak .daily-streak-badge-dot {
  top: -2px !important;
  right: -2px !important;
  width: 9px !important;
  height: 9px !important;
}

body.is-mobile-device #zoomController {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  gap: 4px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  pointer-events: auto;
}

body.is-mobile-device #zoomController .zoom-icon {
  display: none !important;
}

body.is-mobile-device #zoomController .zoom-btn {
  width: 26px !important;
  height: 26px !important;
  min-width: 26px !important;
  border-radius: 50% !important;
  background: rgba(45, 52, 60, 0.95) !important;
  border: 1px solid rgba(243, 156, 18, 0.5) !important;
  color: #f39c12 !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 24px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  touch-action: manipulation !important;
  padding: 0 !important;
}

body.is-mobile-device #zoomController .zoom-btn:active {
  transform: scale(0.9) !important;
  background: #f39c12 !important;
  color: #000 !important;
}

body.is-mobile-device #zoomController .zoom-display {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  color: #f1c40f !important;
  min-width: 32px !important;
  text-align: center !important;
  padding: 1px 2px !important;
  cursor: pointer !important;
  touch-action: manipulation !important;
}

body.is-mobile-device .settings-btn {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  border-radius: 50% !important;
  font-size: 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4) !important;
}

body.is-mobile-device #btnMinimapPos {
  display: none !important;
}

/* 4. Botões Táticos Touch Elegantes e Reduzidos */
body.is-mobile-device .mobile-action-bar {
  position: fixed;
  right: 18px;
  bottom: 38vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
  z-index: 9960;
}

body.is-mobile-device .mobile-tactical-btn {
  background: rgba(15, 23, 42, 0.72);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}

body.is-mobile-device .upgrade-drawer {
  width: calc(100vw - 20px);
  max-width: 320px;
  z-index: 10005;
  top: 50px;
  max-height: calc(100vh - 58px);
  padding: 8px 10px;
  overflow: hidden;
}

body.is-mobile-device .upgrade-drawer-header {
  margin-bottom: 2px;
}

body.is-mobile-device .stats-list {
  max-height: calc(100vh - 128px);
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y !important;
  padding-right: 2px;
}

body.is-mobile-device .drawer-tab-btn {
  font-size: 0.68rem;
  padding: 4px 6px;
}

body.is-mobile-device .crew-card {
  padding: 5px 7px;
  gap: 2px;
}

body.is-mobile-device .crew-card-role {
  font-size: 0.72rem;
}

body.is-mobile-device .crew-card-desc {
  font-size: 0.62rem;
  line-height: 1.15;
}

body.is-mobile-device .crew-card-bonus {
  font-size: 0.62rem;
}

body.is-mobile-device .crew-card-footer {
  margin-top: 1px;
}

body.is-mobile-device .crew-pip {
  width: 11px;
  height: 6px;
}

/* Modal de Morte Compacto no Celular */
body.is-mobile-device .death-modal {
  max-width: 320px !important;
  width: 88% !important;
  padding: 12px 16px !important;
  border-radius: 10px !important;
}
body.is-mobile-device .death-title {
  font-size: 1.15rem !important;
  margin-bottom: 4px !important;
}
body.is-mobile-device .death-text {
  font-size: 0.90rem !important;
  margin-bottom: 8px !important;
}
body.is-mobile-device #deathPenaltyBox {
  margin: 6px 0 !important;
  padding: 5px 8px !important;
  font-size: 11px !important;
}
body.is-mobile-device .death-spawn-hint {
  font-size: 10.5px !important;
  margin-bottom: 8px !important;
}
body.is-mobile-device #btnDeathRespawn {
  padding: 10px 12px !important;
  font-size: 12px !important;
}

/* =========================================================================
   MODOS DE VISIBILIDADE DA HUD (BOTÃO OLHINHO 👁️)
   ========================================================================= */
.hud-visibility-btn {
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hud-visibility-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(0, 206, 201, 0.6);
  transform: scale(1.05);
}

.hud-visibility-btn.active-mode-1 {
  border-color: #00cec9 !important;
  box-shadow: 0 0 8px rgba(0, 206, 201, 0.6) !important;
  background: rgba(0, 206, 201, 0.18) !important;
}

.hud-visibility-btn.active-mode-2 {
  border-color: #e74c3c !important;
  box-shadow: 0 0 8px rgba(231, 76, 60, 0.6) !important;
  background: rgba(231, 76, 60, 0.18) !important;
}

/* Modo 1 (Foco): Oculta Perfil (HP/Escudo/Ouro/Oficina), Rádio e Controles Secundários, mantendo Minimapa */
body.hud-mode-minimal .hud-top-left,
body.hud-mode-minimal .hud-bottom-left,
body.hud-mode-minimal #zoomController,
body.hud-mode-minimal #btnOpenSettings,
body.hud-mode-minimal #btnOpenQuests,
body.hud-mode-minimal #btnOpenDailyStreak,
body.hud-mode-minimal #controlsHint,
body.hud-mode-minimal #playerCountBadge,
body.hud-mode-minimal #pingDisplay {
  display: none !important;
}

/* Modo 2 (Imersivo / Tela Limpa): Oculta também o Minimapa */
body.hud-mode-clean .hud-top-left,
body.hud-mode-clean .hud-bottom-left,
body.hud-mode-clean .hud-top-right,
body.hud-mode-clean #minimapWrapper,
body.hud-mode-clean #zoomController,
body.hud-mode-clean #btnOpenSettings,
body.hud-mode-clean #btnOpenQuests,
body.hud-mode-clean #btnOpenDailyStreak,
body.hud-mode-clean #controlsHint,
body.hud-mode-clean #playerCountBadge,
body.hud-mode-clean #pingDisplay {
  display: none !important;
}

/* Garante que o botão do olhinho permaneça sempre acessível para alternar */
body.hud-mode-minimal .hud-bottom-right,
body.hud-mode-clean .hud-bottom-right {
  display: flex !important;
}

body.is-mobile-device.hud-mode-clean .hud-bottom-right {
  right: 12px !important;
}

/* ==========================================================================
   PAINEL DE AUTENTICAÇÃO E CONTA DE JOGADOR (SQLITE / GOOGLE / CONVIDADO)
   ========================================================================== */
.auth-section {
  width: 100%;
  margin-bottom: 18px;
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(0, 229, 255, 0.25);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(0, 229, 255, 0.05);
  backdrop-filter: blur(8px);
}

.auth-logged-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 8px;
  padding: 10px 14px;
}

.auth-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.auth-avatar {
  font-size: 26px;
  filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.6));
}

.auth-username {
  font-family: 'Rajdhani', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #00e5ff;
  letter-spacing: 1px;
  line-height: 1.2;
}

.auth-sub {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.auth-gold-badge {
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #f1c40f;
  background: rgba(241, 196, 15, 0.15);
  border: 1px solid rgba(241, 196, 15, 0.35);
  padding: 4px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #cbd5e1;
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-btn-ghost:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.auth-login-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 8px;
}

.auth-tab-btn {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  padding: 7px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}

.auth-tab-btn.active {
  background: rgba(0, 229, 255, 0.2);
  border-color: #00e5ff;
  color: #00e5ff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

.auth-tab-pane {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-tab-pane.hidden,
.auth-logged-card.hidden,
.auth-login-box.hidden,
.auth-error-msg.hidden {
  display: none !important;
}

.auth-field-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 4px 8px 4px 12px;
}

.auth-input-icon {
  font-size: 16px;
  user-select: none;
}

.auth-field-row input,
.auth-form-grid input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f8fafc;
  font-family: 'Rajdhani', sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.auth-field-row input::placeholder,
.auth-form-grid input::placeholder {
  color: #64748b;
  font-weight: 500;
}

.auth-action-btn {
  background: linear-gradient(135deg, #00e5ff, #0284c7);
  border: none;
  color: #041019;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 7px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-action-btn:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

.auth-hint {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
}

.auth-form-grid {
  display: flex;
  gap: 8px;
}

.auth-form-grid input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  padding: 8px 12px;
}

.auth-form-grid input:focus,
.auth-field-row:focus-within {
  border-color: #00e5ff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.25);
}

.auth-actions-row {
  display: flex;
  gap: 8px;
}

.auth-btn-primary {
  flex: 1;
  background: linear-gradient(135deg, #00e5ff, #0284c7);
  border: none;
  color: #041019;
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-btn-primary:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.4);
}

.auth-btn-secondary {
  flex: 1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-btn-secondary:hover {
  border-color: #00e5ff;
  color: #00e5ff;
  background: rgba(0, 229, 255, 0.1);
}

.auth-error-msg {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  text-align: center;
  font-weight: 600;
}

.google-sign-in-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.btn-google-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  color: #1f2937;
  border: none;
  border-radius: 6px;
  padding: 9px 20px;
  font-family: 'Roboto', 'Rajdhani', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-google-auth:hover {
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.25);
}

.google-g-icon {
  width: 18px;
  height: 18px;
}

/* ========================================================================= */
/* LOBBY MOBILE LANDSCAPE: SPLIT-SCREEN 2-COLUNAS (ZERO SCROLL)             */
/* PC Desktop permanece 100% inalterado via display: contents                */
/* ========================================================================= */
.lobby-top-bar,
.lobby-main-body,
.lobby-col-faction,
.lobby-col-tanks {
  display: contents;
}

/* Oculta botão de configurações (engrenagem), missões e check-in no lobby móvel para não sobrepor o botão Entrar */
body.is-mobile-device:has(#joinModal:not(.hidden)) #btnOpenSettings,
body.is-mobile-device:has(#joinModal:not(.hidden)) #btnOpenQuests,
body.is-mobile-device:has(#joinModal:not(.hidden)) #btnOpenDailyStreak,
html.is-mobile-device:has(#joinModal:not(.hidden)) #btnOpenSettings,
html.is-mobile-device:has(#joinModal:not(.hidden)) #btnOpenQuests,
html.is-mobile-device:has(#joinModal:not(.hidden)) #btnOpenDailyStreak,
body:has(#joinModal:not(.hidden)) #btnOpenSettings,
body:has(#joinModal:not(.hidden)) #btnOpenQuests,
body:has(#joinModal:not(.hidden)) #btnOpenDailyStreak {
  display: none !important;
}

/* ========================================================================= */
/* LOBBY ULTRA-COMPACTO: SMARTPHONES EM MODO PAISAGEM (ALTURA ≤ 520px)       */
/* Dispositivos maiores (Tablets e PC Desktop) utilizam o layout expansivo   */
/* e proporcional, evitando áreas vazias ou elementos espremidos.            */
/* ========================================================================= */
@media (max-height: 520px) {
  body.is-mobile-device #joinModal .modal-content,
  html.is-mobile-device #joinModal .modal-content {
    width: 98vw !important;
    max-width: 960px !important;
    height: 94vh !important;
    max-height: 94vh !important;
    padding: 6px 12px 6px 12px !important;
    overflow: hidden !important;
    overflow-y: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    gap: 4px !important;
  }

  /* 1. Barra de Topo Compacta */
  body.is-mobile-device .lobby-top-bar,
  html.is-mobile-device .lobby-top-bar {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    flex-shrink: 0 !important;
    padding-bottom: 2px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    min-height: 32px !important;
    max-height: 38px !important;
    overflow: hidden !important;
  }

  body.is-mobile-device .lobby-top-bar .modal-header,
  html.is-mobile-device .lobby-top-bar .modal-header {
    display: flex !important;
    align-items: center !important;
    text-align: left !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
  }

  body.is-mobile-device .lobby-top-bar .logo-title-row,
  html.is-mobile-device .lobby-top-bar .logo-title-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    margin: 0 !important;
    line-height: 1 !important;
  }

  body.is-mobile-device .lobby-top-bar .game-logo,
  html.is-mobile-device .lobby-top-bar .game-logo {
    font-size: 1.05rem !important;
    margin: 0 !important;
    letter-spacing: 1px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: baseline !important;
    gap: 3px !important;
  }

  body.is-mobile-device .lobby-top-bar .game-logo span,
  html.is-mobile-device .lobby-top-bar .game-logo span {
    font-size: 0.68rem !important;
    letter-spacing: 0.8px !important;
    opacity: 0.9 !important;
  }

  body.is-mobile-device .lobby-top-bar .game-subtitle,
  html.is-mobile-device .lobby-top-bar .game-subtitle {
    display: none !important;
  }

  body.is-mobile-device .lobby-patch-btn,
  html.is-mobile-device .lobby-patch-btn {
    padding: 2px 6px !important;
    font-size: 9.5px !important;
    height: 22px !important;
    border-radius: 12px !important;
    gap: 3px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  body.is-mobile-device .lang-selector-wrap,
  html.is-mobile-device .lang-selector-wrap {
    display: inline-flex !important;
    padding: 1px !important;
    gap: 1px !important;
    margin-left: 2px !important;
    border-radius: 12px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }

  body.is-mobile-device .lang-btn,
  html.is-mobile-device .lang-btn {
    font-size: 9px !important;
    padding: 2px 4px !important;
    border-radius: 10px !important;
    gap: 2px !important;
    line-height: 1 !important;
  }

body.is-mobile-device .lobby-top-bar .auth-section,
html.is-mobile-device .lobby-top-bar .auth-section {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  width: auto !important;
  max-width: 72% !important;
}

/* Isolamento estrito de abas e painéis ocultos */
body.is-mobile-device .auth-tab-pane.hidden,
html.is-mobile-device .auth-tab-pane.hidden,
body.is-mobile-device .auth-logged-card.hidden,
html.is-mobile-device .auth-logged-card.hidden,
body.is-mobile-device .auth-login-box.hidden,
html.is-mobile-device .auth-login-box.hidden,
body.is-mobile-device .auth-error-msg.hidden,
html.is-mobile-device .auth-error-msg.hidden {
  display: none !important;
}

/* Auth Logged Card no Top Bar */
body.is-mobile-device .auth-logged-card,
html.is-mobile-device .auth-logged-card {
  padding: 2px 7px !important;
  gap: 6px !important;
  background: rgba(0, 229, 255, 0.08) !important;
  border: 1px solid rgba(0, 229, 255, 0.3) !important;
  border-radius: 6px !important;
}

body.is-mobile-device .auth-avatar,
html.is-mobile-device .auth-avatar {
  font-size: 15px !important;
}

body.is-mobile-device .auth-username,
html.is-mobile-device .auth-username {
  font-size: 12.5px !important;
  line-height: 1.1 !important;
}

body.is-mobile-device .auth-sub,
html.is-mobile-device .auth-sub {
  display: none !important;
}

body.is-mobile-device .auth-gold-badge,
html.is-mobile-device .auth-gold-badge {
  font-size: 11px !important;
  padding: 2px 6px !important;
  border-radius: 12px !important;
}

body.is-mobile-device .auth-btn-ghost,
html.is-mobile-device .auth-btn-ghost {
  font-size: 9.5px !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
}

/* Auth Login Box no Top Bar */
body.is-mobile-device .auth-login-box,
html.is-mobile-device .auth-login-box {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 5px !important;
}

body.is-mobile-device .auth-tabs,
html.is-mobile-device .auth-tabs {
  display: flex !important;
  gap: 2px !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

body.is-mobile-device .auth-tab-btn,
html.is-mobile-device .auth-tab-btn {
  font-size: 9.5px !important;
  padding: 2px 5px !important;
  border-radius: 4px !important;
  white-space: nowrap !important;
}

body.is-mobile-device .auth-tab-pane:not(.hidden),
html.is-mobile-device .auth-tab-pane:not(.hidden) {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 4px !important;
}

body.is-mobile-device .auth-field-row,
html.is-mobile-device .auth-field-row {
  padding: 1px 5px !important;
  height: 25px !important;
  gap: 3px !important;
  border-radius: 5px !important;
}

body.is-mobile-device .auth-field-row input,
html.is-mobile-device .auth-field-row input {
  font-size: 11.5px !important;
  width: 100px !important;
  max-width: 120px !important;
}

body.is-mobile-device .auth-action-btn,
html.is-mobile-device .auth-action-btn {
  font-size: 9.5px !important;
  padding: 2px 8px !important;
  border-radius: 4px !important;
}

body.is-mobile-device .auth-hint,
html.is-mobile-device .auth-hint {
  display: none !important;
}

body.is-mobile-device .auth-form-grid,
html.is-mobile-device .auth-form-grid {
  display: flex !important;
  flex-direction: row !important;
  gap: 4px !important;
}

body.is-mobile-device .auth-form-grid input,
html.is-mobile-device .auth-form-grid input {
  font-size: 10px !important;
  width: 76px !important;
  max-width: 80px !important;
  padding: 2px 4px !important;
  background: rgba(0, 0, 0, 0.4) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 4px !important;
}

body.is-mobile-device .auth-form-grid input[type="password"],
html.is-mobile-device .auth-form-grid input[type="password"] {
  width: 66px !important;
  max-width: 70px !important;
}

body.is-mobile-device .auth-actions-row,
html.is-mobile-device .auth-actions-row {
  display: flex !important;
  gap: 3px !important;
  flex-shrink: 0 !important;
}

body.is-mobile-device .auth-btn-primary,
body.is-mobile-device .auth-btn-secondary,
html.is-mobile-device .auth-btn-primary,
html.is-mobile-device .auth-btn-secondary {
  font-size: 8.5px !important;
  padding: 2px 5px !important;
  border-radius: 4px !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

body.is-mobile-device .btn-google-auth,
html.is-mobile-device .btn-google-auth {
  padding: 2px 7px !important;
  font-size: 10.5px !important;
}

/* 2. Corpo Principal Dividido em 2 Colunas (Split-Screen) */
body.is-mobile-device .lobby-main-body,
html.is-mobile-device .lobby-main-body {
  display: flex !important;
  flex-direction: row !important;
  flex: 1 !important;
  min-height: 0 !important;
  width: 100% !important;
  gap: 8px !important;
  align-items: stretch !important;
}

/* Coluna Esquerda: Facções */
body.is-mobile-device .lobby-col-faction,
html.is-mobile-device .lobby-col-faction {
  display: flex !important;
  flex-direction: column !important;
  width: 29% !important;
  min-width: 175px !important;
  max-width: 225px !important;
  flex-shrink: 0 !important;
  justify-content: flex-start !important;
  gap: 4px !important;
}

body.is-mobile-device .lobby-col-faction .faction-selection-title,
html.is-mobile-device .lobby-col-faction .faction-selection-title {
  font-size: 0.68rem !important;
  margin-bottom: 2px !important;
  letter-spacing: 0.8px !important;
  white-space: nowrap !important;
}

body.is-mobile-device .lobby-col-faction .faction-cards-grid,
html.is-mobile-device .lobby-col-faction .faction-cards-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  flex: none !important;
  margin-bottom: 0 !important;
}

body.is-mobile-device .faction-card,
html.is-mobile-device .faction-card {
  padding: 5px 7px !important;
  gap: 6px !important;
  border-radius: 8px !important;
  min-height: 72px !important;
  max-height: 80px !important;
  box-sizing: border-box !important;
}

body.is-mobile-device .faction-crest-showcase,
html.is-mobile-device .faction-crest-showcase {
  width: 38px !important;
  height: 38px !important;
  border-radius: 6px !important;
}

body.is-mobile-device .faction-hero-crest,
html.is-mobile-device .faction-hero-crest {
  width: 28px !important;
  height: 28px !important;
}

body.is-mobile-device .faction-name,
html.is-mobile-device .faction-name {
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
}

body.is-mobile-device .faction-sub,
html.is-mobile-device .faction-sub {
  font-size: 0.60rem !important;
  line-height: 1.1 !important;
}

body.is-mobile-device .faction-spawn-tag,
html.is-mobile-device .faction-spawn-tag {
  font-size: 0.56rem !important;
  padding: 1px 4px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.1 !important;
}

body.is-mobile-device .faction-desc,
html.is-mobile-device .faction-desc {
  display: none !important;
}

body.is-mobile-device .faction-select-indicator,
html.is-mobile-device .faction-select-indicator {
  font-size: 0.54rem !important;
  padding: 1px 3px !important;
}

/* Coluna Direita: Seleção de Tanques e Botão Entrar */
body.is-mobile-device .lobby-col-tanks,
html.is-mobile-device .lobby-col-tanks {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  min-width: 0 !important;
  justify-content: space-between !important;
  gap: 4px !important;
}

body.is-mobile-device .lobby-col-tanks .class-selection-title,
html.is-mobile-device .lobby-col-tanks .class-selection-title {
  font-size: 0.68rem !important;
  margin-bottom: 2px !important;
  letter-spacing: 0.8px !important;
  white-space: nowrap !important;
}

body.is-mobile-device .class-cards-grid,
html.is-mobile-device .class-cards-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 5px !important;
  flex: 1 !important;
  min-height: 0 !important;
  margin-bottom: 0 !important;
  align-items: stretch !important;
}

body.is-mobile-device .class-card,
html.is-mobile-device .class-card {
  padding: 4px 5px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  border-radius: 6px !important;
  min-height: 155px !important;
  max-height: 172px !important;
  box-sizing: border-box !important;
}

body.is-mobile-device .class-card-header,
html.is-mobile-device .class-card-header {
  flex-direction: column !important;
  align-items: center !important;
  gap: 1px !important;
  margin-bottom: 2px !important;
}

body.is-mobile-device .class-title,
html.is-mobile-device .class-title {
  font-size: 0.74rem !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100% !important;
  line-height: 1.1 !important;
}

body.is-mobile-device .class-tag,
html.is-mobile-device .class-tag {
  font-size: 0.56rem !important;
  padding: 1px 4px !important;
  line-height: 1 !important;
}

body.is-mobile-device .class-preview,
html.is-mobile-device .class-preview {
  height: 38px !important;
  margin: 1px 0 !important;
}

body.is-mobile-device .tank-preview-canvas,
html.is-mobile-device .tank-preview-canvas {
  width: 70px !important;
  height: 35px !important;
}

body.is-mobile-device .class-desc,
html.is-mobile-device .class-desc {
  font-size: 0.58rem !important;
  line-height: 1.2 !important;
  height: 32px !important;
  max-height: 34px !important;
  margin: 1px 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

body.is-mobile-device .class-stats-preview,
html.is-mobile-device .class-stats-preview {
  font-size: 0.54rem !important;
  gap: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  margin-top: auto !important;
  padding-top: 2px !important;
}

body.is-mobile-device .class-stats-preview span,
html.is-mobile-device .class-stats-preview span {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  line-height: 1.1 !important;
}

/* Botão de Entrar Centralizado e Ergonômico */
body.is-mobile-device #btnStartGame,
html.is-mobile-device #btnStartGame {
  height: 42px !important;
  min-height: 42px !important;
  margin: 6px auto 0 auto !important;
  padding: 0 32px !important;
  font-size: 1.05rem !important;
  letter-spacing: 2.5px !important;
  border-radius: 8px !important;
  width: 88% !important;
  max-width: 560px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 0 20px rgba(230, 126, 34, 0.5) !important;
}
}

/* Adaptação para Telas Ultra-Baixas (≤ 380px) */
@media (max-height: 380px) {
  body.is-mobile-device .class-desc,
  html.is-mobile-device .class-desc {
    display: none !important;
  }
  body.is-mobile-device .class-preview,
  html.is-mobile-device .class-preview {
    height: 34px !important;
  }
  body.is-mobile-device .tank-preview-canvas,
  html.is-mobile-device .tank-preview-canvas {
    width: 60px !important;
    height: 30px !important;
  }
  body.is-mobile-device #btnStartGame,
  html.is-mobile-device #btnStartGame {
    height: 36px !important;
    min-height: 36px !important;
    font-size: 0.95rem !important;
  }
}

/* ==========================================================================
   SISTEMA DE NOVIDADES & NOTAS DE ATUALIZAÇÃO (PATCH NOTES)
   ========================================================================== */
.logo-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  flex-wrap: wrap;
}

.lobby-patch-btn {
  background: rgba(0, 206, 201, 0.12);
  border: 1px solid rgba(0, 206, 201, 0.45);
  border-radius: 16px;
  color: #00cec9;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  vertical-align: middle;
}
.lobby-patch-btn:hover {
  background: rgba(0, 206, 201, 0.25);
  border-color: #00cec9;
  box-shadow: 0 0 14px rgba(0, 206, 201, 0.35);
  transform: translateY(-1px);
}
.lobby-patch-btn:active {
  transform: translateY(1px);
}
.patch-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff4757;
  box-shadow: 0 0 8px #ff4757;
  display: none;
  animation: patchPulse 1.4s infinite ease-in-out;
}
@keyframes patchPulse {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* Seletor de Idioma no Topo do Lobby */
.lang-selector-wrap {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
  margin-left: 8px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
}

.lang-btn:hover {
  color: #f1f2f6;
  background: rgba(255, 255, 255, 0.10);
}

.lang-btn.active {
  color: #0d1117;
  background: #f6b93b;
  box-shadow: 0 0 10px rgba(246, 185, 59, 0.5);
}

/* Modal de Patch Notes */
.patch-modal-content {
  background: linear-gradient(180deg, #131b26 0%, #0c121a 100%);
  border: 2px solid #00cec9;
  border-radius: 12px;
  box-shadow: 0 0 45px rgba(0, 206, 201, 0.35), 0 20px 50px rgba(0, 0, 0, 0.85);
  width: 92%;
  max-width: 580px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: patchModalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes patchModalFadeIn {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.patch-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
.patch-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.patch-badge-ver {
  background: rgba(0, 206, 201, 0.2);
  border: 1px solid #00cec9;
  color: #00cec9;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 13px;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.patch-modal-title {
  margin: 0;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #f1f2f6;
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.patch-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.patch-modal-date {
  font-family: 'Rajdhani', sans-serif;
  font-size: 12px;
  color: #8892b0;
  font-weight: 600;
}

.patch-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.patch-modal-body::-webkit-scrollbar {
  width: 6px;
}
.patch-modal-body::-webkit-scrollbar-thumb {
  background: rgba(0, 206, 201, 0.4);
  border-radius: 3px;
}

.patch-section-title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #f6b93b;
  letter-spacing: 1.2px;
  margin-top: 10px;
  margin-bottom: 2px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 6px;
}
.patch-section-title:first-child {
  margin-top: 0;
}
.patch-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  color: #dfe4ea;
  line-height: 1.45;
  padding-left: 4px;
}
.patch-bullet {
  color: #00cec9;
  font-size: 12px;
  line-height: 1.6;
  flex-shrink: 0;
}
.patch-paragraph {
  font-family: 'Rajdhani', sans-serif;
  font-size: 14px;
  color: #a4b0be;
  line-height: 1.45;
}

.patch-modal-footer {
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}
.btn-patch-confirm {
  width: 100%;
  max-width: 380px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #00cec9 0%, #0984e3 100%);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(0, 206, 201, 0.4);
  transition: all 0.2s ease;
}
.btn-patch-confirm:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 24px rgba(0, 206, 201, 0.6);
  transform: translateY(-1px);
}
.btn-patch-confirm:active {
  transform: translateY(1px);
}

/* Ajustes Mobile para Patch Notes */
body.is-mobile-device .patch-modal-content,
html.is-mobile-device .patch-modal-content {
  max-height: 92vh !important;
  max-width: 95vw !important;
}
body.is-mobile-device .patch-modal-header,
html.is-mobile-device .patch-modal-header {
  padding: 8px 14px !important;
}
body.is-mobile-device .patch-modal-title,
html.is-mobile-device .patch-modal-title {
  font-size: 0.95rem !important;
}
body.is-mobile-device .patch-modal-body,
html.is-mobile-device .patch-modal-body {
  padding: 8px 14px !important;
  gap: 4px !important;
}
body.is-mobile-device .patch-modal-footer,
html.is-mobile-device .patch-modal-footer {
  padding: 8px 14px !important;
}
body.is-mobile-device .btn-patch-confirm,
html.is-mobile-device .btn-patch-confirm {
  padding: 8px 16px !important;
  font-size: 11px !important;
  letter-spacing: 1.5px !important;
}

/* ========================================================================= */
/* MODAL HOLOGRÁFICO: MAPA MUNDI / ATLAS GLOBAL (WARZONE 4x4)                */
/* ========================================================================= */

.worldmap-modal-card {
  width: 92vw;
  max-width: 860px;
  height: 86vh;
  max-height: 86vh;
  background: #0b0f19;
  border: 1px solid rgba(0, 206, 201, 0.45);
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(0, 206, 201, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: worldMapFadeIn 0.22s ease-out;
}

@keyframes worldMapFadeIn {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.worldmap-modal-header {
  padding: 8px 14px;
  background: #0e1422;
  border-bottom: 1px solid rgba(0, 206, 201, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.worldmap-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.worldmap-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 8px rgba(0, 206, 201, 0.5));
}

.worldmap-title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #00cec9;
  letter-spacing: 0.8px;
  margin: 0;
  line-height: 1.15;
}

.worldmap-subtitle {
  font-size: 0.65rem;
  font-weight: 600;
  color: #747d8c;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.worldmap-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.worldmap-header-actions .modal-close-btn,
.worldmap-header-actions .hangar-close-btn {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 24px !important;
  cursor: pointer;
  line-height: 1 !important;
  padding: 0 6px !important;
  transition: color 0.18s ease;
}

.worldmap-header-actions .modal-close-btn:hover,
.worldmap-header-actions .hangar-close-btn:hover {
  color: #fff !important;
}

.worldmap-hotkey-badge {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: #f1c40f;
  background: rgba(241, 196, 15, 0.12);
  border: 1px solid rgba(241, 196, 15, 0.35);
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.worldmap-modal-body {
  padding: 10px 14px 14px 14px;
  overflow: hidden;
  flex: 1;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.worldmap-content-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 10px;
  align-items: stretch;
  flex: 1;
  height: 100%;
  min-height: 0;
}

/* Painel da Grade 4x4 */
.worldmap-grid-pane {
  background: rgba(12, 17, 27, 0.85);
  border: 1px solid rgba(0, 206, 201, 0.22);
  border-radius: 6px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
}

.worldmap-grid-matrix {
  display: grid;
  grid-template-columns: 22px repeat(4, minmax(0, 1fr));
  grid-template-rows: 20px repeat(4, 1fr);
  gap: 5px;
  align-items: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.worldmap-header-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: #00cec9;
  text-transform: uppercase;
  padding: 1px 0;
  user-select: none;
}

.worldmap-header-cell.corner {
  visibility: hidden;
}

.worldmap-row-label {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: #00cec9;
  background: rgba(0, 206, 201, 0.08);
  border: 1px solid rgba(0, 206, 201, 0.2);
  border-radius: 4px;
  height: 100%;
  min-height: 0;
  width: 22px;
  box-sizing: border-box;
  user-select: none;
}

.worldmap-sector-cell {
  position: relative;
  height: 100%;
  min-height: 0;
  min-width: 0 !important; /* CRUCIAL: impede que o texto expanda a coluna da grade! */
  background: rgba(18, 24, 38, 0.7);
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  padding: 4px 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  cursor: pointer;
  box-sizing: border-box;
  overflow: hidden;
}

.worldmap-sector-cell:hover {
  border-color: rgba(0, 206, 201, 0.6);
  background: rgba(0, 206, 201, 0.06);
  transform: translateY(-1px);
}

.worldmap-sector-cell.occupied {
  border: 1px solid rgba(0, 206, 201, 0.4);
  background: linear-gradient(145deg, #131b28, #0d131d);
}

.worldmap-sector-cell.occupied:hover {
  border-color: #00cec9;
  box-shadow: 0 0 12px rgba(0, 206, 201, 0.35);
}

.worldmap-sector-cell.selected-sector {
  border: 2px solid #f1c40f !important;
  box-shadow: 0 0 14px rgba(241, 196, 15, 0.45) !important;
}

.worldmap-sector-cell.is-current {
  border: 2px solid #2ecc71 !important;
  box-shadow: 0 0 15px rgba(46, 204, 113, 0.5), inset 0 0 10px rgba(46, 204, 113, 0.2);
  animation: activeSectorPulse 2.4s infinite ease-in-out;
}

@keyframes activeSectorPulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(46, 204, 113, 0.4), inset 0 0 6px rgba(46, 204, 113, 0.2);
  }
  50% {
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.8), inset 0 0 12px rgba(46, 204, 113, 0.4);
  }
}

.worldmap-sector-cell .cell-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  flex-shrink: 0;
}

.worldmap-sector-cell .cell-coord {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: #747d8c;
  background: rgba(0, 0, 0, 0.45);
  padding: 1px 4px;
  border-radius: 3px;
}

.worldmap-sector-cell.occupied .cell-coord {
  color: #00cec9;
  background: rgba(0, 206, 201, 0.15);
}

.worldmap-sector-cell.is-current .cell-coord {
  color: #2ecc71;
  background: rgba(46, 204, 113, 0.2);
}

.worldmap-sector-cell .cell-name {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin: 2px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.worldmap-sector-cell .cell-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 3px;
  width: 100%;
  margin-top: auto;
  flex-shrink: 0;
}

.worldmap-sector-cell .cell-biome-tag {
  font-size: 8.5px;
  color: #a4b0be;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}

.worldmap-sector-cell .cell-status-badge {
  font-size: 7.5px;
  font-weight: 700;
  font-family: 'Chakra Petch', sans-serif;
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.cell-status-badge.badge-here {
  background: rgba(46, 204, 113, 0.25);
  border: 1px solid rgba(46, 204, 113, 0.6);
  color: #2ecc71;
}

.cell-status-badge.badge-connected {
  background: rgba(52, 152, 219, 0.2);
  border: 1px solid rgba(52, 152, 219, 0.5);
  color: #3498db;
}

.worldmap-sector-cell.empty {
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(10, 14, 22, 0.55);
}

.worldmap-sector-cell.empty .empty-label {
  font-size: 9px;
  color: #57606f;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

/* Painel de Detalhes Táticos do Setor */
.worldmap-details-pane {
  background: rgba(12, 17, 27, 0.85);
  border: 1px solid rgba(0, 206, 201, 0.22);
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  overflow-y: auto;
}

.sector-details-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #747d8c;
  padding: 12px;
}

.sector-details-empty p {
  font-size: 0.78rem;
  margin-top: 6px;
  line-height: 1.35;
}

.sector-details-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: detailsFadeIn 0.2s ease-out;
}

@keyframes detailsFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.sector-details-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 5px;
}

.sector-details-tag {
  display: inline-block;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 10px;
  font-weight: 700;
  color: #f1c40f;
  background: rgba(241, 196, 15, 0.15);
  border: 1px solid rgba(241, 196, 15, 0.35);
  padding: 1px 6px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.sector-details-title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.sector-details-desc {
  font-size: 0.76rem;
  color: #a4b0be;
  line-height: 1.35;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 8px;
  border-radius: 5px;
  border-left: 3px solid #00cec9;
}

.sector-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.sector-stat-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  padding: 4px 6px;
}

.sector-stat-label {
  font-size: 8px;
  font-weight: 700;
  color: #747d8c;
  text-transform: uppercase;
  margin-bottom: 1px;
}

.sector-stat-val {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  color: #00cec9;
  line-height: 1.2;
}

.sector-teleport-info {
  background: rgba(52, 152, 219, 0.12);
  border: 1px solid rgba(52, 152, 219, 0.35);
  border-radius: 5px;
  padding: 6px 8px;
  font-size: 10px;
  color: #74b9ff;
  line-height: 1.3;
}

/* Responsividade Mobile para o Mapa Mundi */
@media (max-width: 820px), (max-height: 540px) {
  .worldmap-modal-card {
    width: 96vw;
    max-width: 96vw;
    height: 94vh;
    max-height: 94vh;
    border-radius: 6px;
  }
  .worldmap-modal-header {
    padding: 5px 10px;
  }
  .worldmap-icon {
    font-size: 1.2rem;
  }
  .worldmap-title {
    font-size: 0.9rem;
  }
  .worldmap-subtitle {
    display: none !important;
  }
  .worldmap-hotkey-badge {
    display: none !important;
  }
  .worldmap-header-actions .modal-close-btn,
  .worldmap-header-actions .hangar-close-btn {
    font-size: 19px !important;
    padding: 0 4px !important;
  }
  .worldmap-modal-body {
    padding: 6px 8px 8px 8px;
  }
  .worldmap-content-layout {
    gap: 6px;
  }
  .worldmap-grid-pane {
    padding: 4px;
  }
  .worldmap-grid-matrix {
    grid-template-columns: 18px repeat(4, minmax(0, 1fr));
    grid-template-rows: 16px repeat(4, 1fr);
    gap: 3px;
  }
  .worldmap-header-cell {
    font-size: 8.5px;
    padding: 0 0 2px 0;
  }
  .worldmap-row-label {
    height: 100%;
    min-height: 0;
    width: 18px;
    font-size: 9px;
  }
  .worldmap-sector-cell {
    height: 100%;
    min-height: 0;
    padding: 2px 4px;
    border-radius: 4px;
  }
  .worldmap-sector-cell .cell-coord {
    font-size: 7.5px;
    padding: 0 2px;
  }
  .worldmap-sector-cell .cell-name {
    font-size: 9.5px;
    line-height: 1.15;
    margin: 1px 0;
    -webkit-line-clamp: 2;
  }
  .worldmap-sector-cell .cell-footer-row {
    gap: 2px;
  }
  .worldmap-sector-cell .cell-biome-tag {
    font-size: 7px;
  }
  .worldmap-sector-cell .cell-status-badge {
    font-size: 6.5px;
    padding: 0 2px;
  }
  .worldmap-details-pane {
    padding: 6px 8px;
  }
  .sector-details-tag {
    font-size: 8.5px;
    padding: 1px 4px;
    margin-bottom: 2px;
  }
  .sector-details-title {
    font-size: 0.92rem;
  }
  .sector-details-desc {
    font-size: 8.5px;
    padding: 4px 6px;
    max-height: 42px;
    overflow-y: auto;
  }
  .sector-stats-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
  }
  .sector-stat-box {
    padding: 3px 4px;
  }
  .sector-stat-label {
    font-size: 7px;
  }
  .sector-stat-val {
    font-size: 8.5px !important;
  }
  .sector-teleport-info {
    padding: 3px 5px;
    font-size: 8.5px;
    line-height: 1.2;
  }
}

/* Modo retrato em telas finas (celular em pé) */
@media (max-width: 580px) and (orientation: portrait) {
  .worldmap-content-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 1.5fr 1fr;
    overflow-y: auto;
  }
  .worldmap-grid-matrix {
    grid-template-rows: 18px repeat(4, 1fr);
  }
  .worldmap-sector-cell {
    height: 100%;
    min-height: 0;
  }
  .worldmap-row-label {
    height: 100%;
    min-height: 0;
  }
}

/* =========================================================================
   SISTEMA DE MISSÕES DIÁRIAS (DAILY QUESTS) - UI MODERNA & MOBILE LEVE
   ========================================================================= */

.quests-btn {
  position: relative !important;
}

.quests-badge-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e74c3c;
  border: 1.5px solid #0f172a;
  box-shadow: 0 0 6px #e74c3c;
  animation: pulseBadgeDot 1.5s infinite;
}

@keyframes pulseBadgeDot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.25); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

#dailyQuestsModal {
  z-index: 10008 !important;
}

body.daily-quests-open #mobileControls,
body.daily-quests-open .mobile-controls-layer {
  display: none !important;
  pointer-events: none !important;
}

.daily-quests-modal-content {
  max-width: 540px;
  width: 90%;
  max-height: 90vh;
  background: rgba(13, 19, 29, 0.97);
  border: 1px solid rgba(0, 206, 201, 0.4);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.85), 0 0 24px rgba(0, 206, 201, 0.15);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.daily-quests-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.daily-quests-header .hangar-close-btn {
  background: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  font-size: 24px !important;
  cursor: pointer;
  line-height: 1 !important;
  padding: 0 6px !important;
  transition: color 0.18s ease;
}

.daily-quests-header .hangar-close-btn:hover {
  color: #fff !important;
}

.gold-coin-inline {
  width: 15px;
  height: 15px;
  vertical-align: -2.5px;
  display: inline-block;
  margin-left: 2px;
  filter: drop-shadow(0 0 4px rgba(241, 196, 15, 0.45));
}

.daily-quests-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.daily-quests-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(0, 206, 201, 0.18);
  color: #00cec9;
  border: 1px solid rgba(0, 206, 201, 0.4);
  letter-spacing: 1px;
}

.daily-quests-reset {
  font-size: 11px;
  color: #94a3b8;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
}

.daily-quests-title {
  margin: 0;
  font-size: 19px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.5px;
}

.daily-quests-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 52vh;
  padding-right: 4px;
}

.quest-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 11px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.quest-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 206, 201, 0.3);
}

.quest-card.completed {
  border-color: rgba(46, 204, 113, 0.4);
  background: rgba(46, 204, 113, 0.04);
}

.quest-card.claimed {
  opacity: 0.55;
  filter: grayscale(0.5);
}

.quest-info {
  flex: 1;
  min-width: 0;
}

.quest-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.quest-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.3px;
}

.quest-desc {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 7px;
  line-height: 1.3;
}

.quest-progress-bg {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.45);
  border-radius: 3px;
  overflow: hidden;
}

.quest-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #0984e3, #00cec9);
  transition: width 0.3s ease;
  border-radius: 3px;
}

.quest-card.completed .quest-progress-bar {
  background: linear-gradient(90deg, #2ecc71, #27ae60);
}

.quest-progress-text {
  font-size: 10px;
  font-weight: 700;
  color: #cbd5e1;
  margin-top: 3px;
  text-align: right;
  font-family: 'Rajdhani', sans-serif;
}

.quest-action {
  flex-shrink: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.quest-rewards {
  font-size: 11.5px;
  font-weight: 700;
  color: #f1c40f;
  font-family: 'Rajdhani', sans-serif;
}

.btn-claim-quest {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.btn-claim-quest.ready {
  background: linear-gradient(135deg, #f1c40f, #e67e22);
  color: #0b0f19;
  box-shadow: 0 0 10px rgba(241, 196, 15, 0.45);
  cursor: pointer;
  animation: pulseClaimBtn 1.6s infinite;
}

.btn-claim-quest.ready:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 14px rgba(241, 196, 15, 0.7);
}

.btn-claim-quest.locked {
  background: rgba(255, 255, 255, 0.08);
  color: #64748b;
  cursor: default;
}

.btn-claim-quest.claimed {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
  cursor: default;
}

@keyframes pulseClaimBtn {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* Card do Baú do Comando */
.daily-bonus-card {
  background: linear-gradient(135deg, rgba(241, 196, 15, 0.08), rgba(230, 126, 34, 0.05));
  border: 1px solid rgba(241, 196, 15, 0.35);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.daily-bonus-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.daily-bonus-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.daily-bonus-title {
  font-size: 13px;
  font-weight: 700;
  color: #f1c40f;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.5px;
}

.daily-bonus-desc {
  font-size: 10.5px;
  color: #94a3b8;
  line-height: 1.25;
}

.daily-bonus-action {
  text-align: right;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.daily-bonus-reward {
  font-size: 12px;
  font-weight: 800;
  color: #f1c40f;
  font-family: 'Rajdhani', sans-serif;
}

.btn-claim-bonus {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 800;
  border-radius: 4px;
  border: none;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.08);
  color: #64748b;
  cursor: default;
}

.btn-claim-bonus.ready {
  background: linear-gradient(135deg, #00cec9, #0984e3);
  color: #fff;
  box-shadow: 0 0 12px rgba(0, 206, 201, 0.5);
  cursor: pointer;
  animation: pulseClaimBtn 1.6s infinite;
}

.btn-claim-bonus.claimed {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
  cursor: default;
}

/* Responsividade Mobile: Ajuste para celulares em Paisagem e Retrato */
@media (max-width: 768px) {
  .daily-quests-modal-content {
    width: 95%;
    max-height: 94vh;
    padding: 12px 14px;
    gap: 8px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
  .daily-quests-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
  }
  .daily-quests-title {
    font-size: 16px;
  }
  .quest-card {
    padding: 8px 10px;
    gap: 8px;
  }
  .quest-title {
    font-size: 12px;
  }
  .quest-desc {
    font-size: 10px;
    margin-bottom: 5px;
  }
  .daily-bonus-icon {
    font-size: 20px;
  }
}

/* Modo Ultra-Compacto para Smartphones em Paisagem (Altura <= 520px) */
@media (max-height: 520px) {
  .daily-quests-modal-content {
    max-height: 96vh !important;
    padding: 8px 12px !important;
    gap: 5px !important;
    width: 96% !important;
    max-width: 520px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
  }
  .daily-quests-header {
    padding-bottom: 4px !important;
  }
  .daily-quests-title {
    font-size: 14px !important;
  }
  .daily-quests-reset {
    font-size: 10px !important;
  }
  .daily-quests-list {
    gap: 5px !important;
    max-height: 48vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
  }
  .quest-card {
    padding: 5px 8px !important;
    gap: 6px !important;
  }
  .quest-title {
    font-size: 11.5px !important;
  }
  .quest-desc {
    font-size: 9px !important;
    margin-bottom: 3px !important;
    line-height: 1.2 !important;
  }
  .quest-progress-bg {
    height: 4px !important;
  }
  .quest-progress-text {
    font-size: 8.5px !important;
  }
  .quest-rewards {
    font-size: 10.5px !important;
  }
  .btn-claim-quest {
    padding: 3px 8px !important;
    font-size: 9.5px !important;
  }
  .daily-bonus-card {
    padding: 5px 8px !important;
    gap: 6px !important;
  }
  .daily-bonus-icon {
    font-size: 16px !important;
  }
  .daily-bonus-title {
    font-size: 11px !important;
  }
  .daily-bonus-desc {
    font-size: 9px !important;
    line-height: 1.15 !important;
  }
  .daily-bonus-reward {
    font-size: 10.5px !important;
  }
  .btn-claim-bonus {
    padding: 3px 8px !important;
    font-size: 9.5px !important;
  }
}

/* =========================================================================
   SPLASH SCREEN OFICIAL (TELA DE ABERTURA CINEMATOGRÁFICA)
   ========================================================================= */
.game-splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0b0f15;
  user-select: none;
  overflow: hidden;
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.65s ease;
}

.game-splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('panzerfall_cover.jpg');
  background-size: cover;
  background-position: 48% 68%;
  background-repeat: no-repeat;
  transform-origin: 48% 68%;
  transform: scale(1.02);
  animation: splashZoomIn 14s ease-out forwards;
}

@keyframes splashZoomIn {
  0% { transform: scale(1.0); }
  100% { transform: scale(1.05); }
}

.splash-vignette {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 48% 62%, rgba(11, 15, 21, 0.05) 25%, rgba(9, 12, 17, 0.50) 65%, rgba(6, 8, 12, 0.90) 100%),
              linear-gradient(180deg, rgba(6, 8, 12, 0.78) 0%, rgba(11, 15, 21, 0.0) 30%, rgba(6, 8, 12, 0.88) 100%);
  pointer-events: none;
}

.splash-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 90%;
  max-width: 680px;
  width: 90%;
  text-align: center;
  pointer-events: none;
}

.splash-logo-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 0;
}

.splash-badge {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #f6b93b;
  background: rgba(246, 185, 59, 0.12);
  border: 1px solid rgba(246, 185, 59, 0.45);
  padding: 4px 14px;
  border-radius: 4px;
  margin-bottom: 8px;
  text-transform: uppercase;
  box-shadow: 0 0 16px rgba(246, 185, 59, 0.25);
}

.splash-title {
  margin: 0;
  font-family: 'Russo One', sans-serif;
  font-size: clamp(38px, 8vw, 68px);
  font-weight: 900;
  letter-spacing: 6px;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.9), 0 0 35px rgba(246, 185, 59, 0.4);
  line-height: 1;
}

.splash-subtitle {
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(12px, 2.5vw, 16px);
  font-weight: 700;
  letter-spacing: 6px;
  color: #00cec9;
  text-transform: uppercase;
  margin-top: 8px;
  text-shadow: 0 0 12px rgba(0, 206, 201, 0.6);
}

.splash-loading-box {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.splash-status-text {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #cbd5e1;
  text-transform: uppercase;
  min-height: 16px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.splash-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 206, 201, 0.15);
  position: relative;
}

.splash-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f6b93b, #00cec9, #0984e3);
  border-radius: 6px;
  transition: width 0.35s ease-out;
  box-shadow: 0 0 12px rgba(0, 206, 201, 0.8);
}

.splash-version-tag {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 9px;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.45);
}

/* =========================================================================
   BANNER DE RECONEXÃO SUAVE DA REDE (HUD FLUTUANTE)
   ========================================================================= */
.network-reconnect-banner {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  background: rgba(18, 14, 10, 0.94);
  border: 1.5px solid #f39c12;
  border-radius: 20px;
  padding: 6px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 0 15px rgba(243, 156, 18, 0.45);
  backdrop-filter: blur(8px);
  animation: reconnectBannerDrop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.3s ease;
  user-select: none;
}

.network-reconnect-banner.success {
  border-color: #2ecc71;
  background: rgba(10, 24, 16, 0.94);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8), 0 0 15px rgba(46, 204, 113, 0.45);
}

.network-reconnect-banner.hidden {
  display: none !important;
}

@keyframes reconnectBannerDrop {
  0% { transform: translate(-50%, -20px); opacity: 0; }
  100% { transform: translate(-50%, 0); opacity: 1; }
}

.reconnect-radar-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f39c12;
  box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.7);
  animation: radarPulse 1.4s infinite;
}

.network-reconnect-banner.success .reconnect-radar-pulse {
  background: #2ecc71;
  box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  animation: none;
}

@keyframes radarPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.7);
  }
  70% {
    transform: scale(1.15);
    box-shadow: 0 0 0 8px rgba(243, 156, 18, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(243, 156, 18, 0);
  }
}

.reconnect-icon {
  font-size: 14px;
}

.reconnect-text {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

@media (max-height: 540px) and (orientation: landscape) {
  .splash-backdrop {
    background-position: 48% 74% !important;
    transform-origin: 48% 74% !important;
  }
  .splash-content {
    height: 94% !important;
  }
  .splash-logo-container {
    margin-top: 2px !important;
  }
  .splash-badge {
    font-size: 9px !important;
    padding: 2px 10px !important;
    margin-bottom: 2px !important;
  }
  .splash-title {
    font-size: clamp(24px, 6.2vw, 38px) !important;
  }
  .splash-subtitle {
    font-size: 10px !important;
    margin-top: 2px !important;
    letter-spacing: 4px !important;
  }
  .splash-loading-box {
    margin-bottom: 4px !important;
    gap: 4px !important;
  }
}

/* ==========================================================================
   SISTEMA DE RECOMPENSAS DIÁRIAS (7-DAY DAILY STREAK)
   ========================================================================== */

/* Botão no HUD Topo Direito */
.daily-streak-btn {
  position: relative;
  background: rgba(20, 29, 43, 0.85);
  border: 1px solid rgba(241, 196, 15, 0.45);
  border-radius: 8px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), inset 0 0 8px rgba(241, 196, 15, 0.15);
}

.daily-streak-btn:hover {
  background: rgba(241, 196, 15, 0.2);
  border-color: #f1c40f;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(241, 196, 15, 0.4);
}

.daily-streak-btn-icon {
  font-size: 19px;
  line-height: 1;
}

.daily-streak-btn * {
  pointer-events: none;
}

/* Bolinha indicadora de notificação piscante */
.daily-streak-badge-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  background: #f1c40f;
  border: 2px solid #0f172a;
  border-radius: 50%;
  box-shadow: 0 0 10px #f1c40f;
  animation: dailyDotPulse 1.4s infinite ease-in-out;
}

@keyframes dailyDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; box-shadow: 0 0 6px #f1c40f; }
  50% { transform: scale(1.35); opacity: 0.8; box-shadow: 0 0 14px #f39c12; }
}

/* Botão Pílula na Base Segura */
.daily-rewards-pill {
  position: relative;
  border-color: rgba(241, 196, 15, 0.5) !important;
}

.daily-rewards-pill:hover {
  background: rgba(241, 196, 15, 0.25) !important;
  border-color: #f1c40f !important;
}

/* Modal Overlay & Container */
#dailyRewardsModal {
  z-index: 10009 !important;
}

body.daily-rewards-open #mobileControls,
body.daily-rewards-open .mobile-controls-layer {
  display: none !important;
  pointer-events: none !important;
}

.daily-rewards-modal-content {
  max-width: 860px;
  width: 94%;
  max-height: 90vh;
  background: rgba(11, 16, 26, 0.98);
  border: 1.5px solid rgba(241, 196, 15, 0.4);
  border-radius: 14px;
  padding: 18px 22px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.9), 0 0 32px rgba(241, 196, 15, 0.18);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  backdrop-filter: blur(8px);
}

.daily-rewards-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}

.daily-rewards-title-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.daily-rewards-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.daily-rewards-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(241, 196, 15, 0.18);
  color: #f1c40f;
  border: 1px solid rgba(241, 196, 15, 0.4);
  letter-spacing: 1px;
}

.daily-rewards-streak-counter {
  font-size: 12px;
  color: #f8fafc;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.daily-rewards-streak-counter strong {
  color: #f39c12;
  font-size: 14px;
}

.daily-rewards-title {
  margin: 0;
  font-size: 21px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.8px;
  text-shadow: 0 0 12px rgba(241, 196, 15, 0.4);
}

.daily-rewards-subtitle {
  margin: 0;
  font-size: 11.5px;
  color: #94a3b8;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
}

/* Grid de Cards dos 7 Dias */
.daily-cards-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin: 4px 0;
}

/* Estilo do Card Individual */
.daily-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  min-height: 145px;
  position: relative;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  overflow: hidden;
}

.daily-card-day {
  font-size: 11px;
  font-weight: 800;
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 1px;
  color: #94a3b8;
  text-transform: uppercase;
}

.daily-card-icon-wrap {
  position: relative;
  margin: 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.daily-card-icon {
  font-size: 26px;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.daily-card-reward {
  font-size: 13.5px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 800;
  color: #f1c40f;
  display: flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}

.daily-card-tag {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  font-family: 'Rajdhani', sans-serif;
  text-transform: uppercase;
}

/* Card States */
/* 1. Coletado */
.daily-card.claimed {
  opacity: 0.6;
  border-color: rgba(46, 204, 113, 0.35);
  background: rgba(46, 204, 113, 0.04);
}

.daily-card.claimed .daily-card-tag {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  border: 1px solid rgba(46, 204, 113, 0.4);
}

.daily-card.claimed .daily-card-day {
  color: #2ecc71;
}

/* 2. Disponível para Coletar Hoje */
.daily-card.available {
  border-color: #f1c40f;
  background: linear-gradient(180deg, rgba(241, 196, 15, 0.16) 0%, rgba(243, 156, 18, 0.08) 100%);
  box-shadow: 0 0 20px rgba(241, 196, 15, 0.35), inset 0 0 14px rgba(241, 196, 15, 0.15);
  transform: translateY(-3px);
  animation: dailyCardPulse 2s infinite ease-in-out;
}

@keyframes dailyCardPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(241, 196, 15, 0.3), inset 0 0 10px rgba(241, 196, 15, 0.1); }
  50% { box-shadow: 0 0 26px rgba(241, 196, 15, 0.6), inset 0 0 16px rgba(241, 196, 15, 0.25); }
}

.daily-card.available .daily-card-day {
  color: #ffd700;
  font-weight: 900;
}

.daily-card.available .daily-card-icon-wrap {
  border-color: #f1c40f;
  background: rgba(241, 196, 15, 0.15);
  box-shadow: 0 0 12px rgba(241, 196, 15, 0.4);
}

.daily-card.available .daily-card-tag {
  background: #f1c40f;
  color: #0b101a;
  font-weight: 900;
  box-shadow: 0 2px 8px rgba(241, 196, 15, 0.4);
}

/* 3. Bloqueado / Dias Futuros */
.daily-card.locked {
  opacity: 0.45;
  filter: grayscale(0.6);
  border-color: rgba(255, 255, 255, 0.06);
}

.daily-card.locked .daily-card-tag {
  background: rgba(255, 255, 255, 0.05);
  color: #64748b;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 4. Destaque Especial: Dia 7 (Grande Caixa Militar) */
.daily-card.final-day {
  border: 1.5px solid #f39c12;
  background: linear-gradient(180deg, rgba(243, 156, 18, 0.16) 0%, rgba(211, 84, 0, 0.08) 100%);
  position: relative;
}

.daily-card.final-day::before {
  content: '★ MEGA';
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 7.5px;
  font-weight: 900;
  color: #ffd700;
  background: rgba(0, 0, 0, 0.4);
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.5px;
}

.daily-card.final-day .daily-card-icon {
  font-size: 32px;
  filter: drop-shadow(0 0 10px rgba(243, 156, 18, 0.6));
}

.daily-card.final-day .daily-card-reward {
  color: #ffd700;
  font-size: 15px;
  text-shadow: 0 0 8px rgba(241, 196, 15, 0.6);
}

/* Rodapé do Modal */
.daily-rewards-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 12px;
}

.daily-rewards-status-box {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
}

.daily-rewards-status-icon {
  font-size: 18px;
}

/* Botão de Resgate */
.btn-claim-daily {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #f1c40f 0%, #e67e22 100%);
  color: #0b101a;
  border: none;
  border-radius: 8px;
  padding: 11px 26px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 800;
  font-size: 14.5px;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(241, 196, 15, 0.4);
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
}

.btn-claim-daily:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(241, 196, 15, 0.65);
  filter: brightness(1.1);
}

.btn-claim-daily:disabled {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #64748b !important;
  cursor: not-allowed;
  box-shadow: none !important;
  opacity: 0.6;
}

.btn-claim-daily.pulse {
  animation: dailyBtnPulse 1.8s infinite ease-in-out;
}

@keyframes dailyBtnPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 18px rgba(241, 196, 15, 0.4); }
  50% { transform: scale(1.03); box-shadow: 0 6px 26px rgba(241, 196, 15, 0.7); }
}

/* ==========================================================================
   RESPONSIVIDADE: MOBILE & TABLETS (1 Row no PC, 2 Rows no Mobile)
   ========================================================================== */
@media (max-width: 768px), (max-height: 540px) and (orientation: landscape) {
  .daily-rewards-modal-content {
    max-width: 95%;
    max-height: 98vh !important;
    padding: 8px 14px !important;
    gap: 4px !important;
    overflow-y: visible !important;
  }

  .daily-rewards-header {
    padding-bottom: 3px !important;
  }

  .daily-rewards-title-box {
    gap: 1px !important;
  }

  .daily-rewards-badge-row {
    gap: 6px !important;
  }

  .daily-rewards-badge {
    font-size: 8.5px !important;
    padding: 1px 6px !important;
  }

  .daily-rewards-streak-counter {
    font-size: 10px !important;
    padding: 1px 6px !important;
  }

  .daily-rewards-streak-counter strong {
    font-size: 11px !important;
  }

  .daily-rewards-title {
    font-size: 15px !important;
  }

  .daily-rewards-subtitle {
    display: none !important; /* Oculta em landscape para caber perfeitamente na janela sem scroll */
  }

  .daily-rewards-header .hangar-close-btn {
    font-size: 20px !important;
    padding: 0 4px !important;
  }

  /* Grid com 4 colunas: Linha 1 = 1, 2, 3, 4 | Linha 2 = 5, 6, 7 (span 2) */
  .daily-cards-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 5px !important;
    margin: 2px 0 !important;
  }

  .daily-card {
    min-height: 64px !important;
    max-height: 80px !important;
    padding: 4px 2px !important;
    border-radius: 8px !important;
  }

  .daily-card-day {
    font-size: 9px !important;
    line-height: 1 !important;
  }

  .daily-card-icon-wrap {
    width: 26px !important;
    height: 26px !important;
    margin: 2px 0 !important;
  }

  .daily-card-icon {
    font-size: 14px !important;
  }

  .daily-card-reward {
    font-size: 11px !important;
    margin-bottom: 2px !important;
    gap: 2px !important;
    line-height: 1 !important;
  }

  .daily-card-reward .gold-coin-inline {
    width: 12px !important;
    height: 12px !important;
    vertical-align: -1.5px !important;
  }

  .daily-card-tag {
    font-size: 7.5px !important;
    padding: 1px 4px !important;
    line-height: 1.1 !important;
  }

  /* Dia 7 ocupa 2 colunas para fechar a segunda linha perfeitamente */
  .daily-card.final-day {
    grid-column: span 2 !important;
    flex-direction: row !important;
    justify-content: space-around !important;
    align-items: center !important;
    padding: 4px 10px !important;
  }

  .daily-card.final-day::before {
    font-size: 6.5px !important;
    top: 2px !important;
    right: 3px !important;
  }

  .daily-card.final-day .daily-card-icon-wrap {
    width: 30px !important;
    height: 30px !important;
    margin: 0 !important;
  }

  .daily-card.final-day .daily-card-icon {
    font-size: 17px !important;
  }

  .daily-card.final-day .daily-card-reward {
    font-size: 13px !important;
    margin-bottom: 0 !important;
  }

  /* Rodapé em Linha Horizontal no Landscape para exibir texto e botão perfeitamente */
  .daily-rewards-footer {
    padding-top: 5px !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 10px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .daily-rewards-status-box {
    justify-content: flex-start !important;
    font-size: 11px !important;
    gap: 5px !important;
    flex: 1 !important;
  }

  .daily-rewards-status-icon {
    font-size: 14px !important;
  }

  .btn-claim-daily {
    padding: 7px 22px !important;
    font-size: 12px !important;
    width: auto !important;
    flex-shrink: 0 !important;
    letter-spacing: 0.5px !important;
  }
}

@media (max-width: 480px) and (orientation: portrait) {
  .daily-rewards-subtitle {
    display: block !important;
  }
  .daily-card {
    min-height: 80px !important;
  }
  .daily-rewards-footer {
    flex-direction: column !important;
  }
  .btn-claim-daily {
    width: 100% !important;
  }
}

/* =========================================================================
   BANCADA DE CALIBRAÇÃO MECÂNICA & LOJA DE FERRAMENTAS DA BASE
   ========================================================================= */

.hud-pill-btn.calib-btn {
  border-color: rgba(0, 206, 201, 0.45);
  color: #00cec9;
  background: rgba(0, 206, 201, 0.12);
}

.hud-pill-btn.calib-btn:hover:not(:disabled) {
  background: rgba(0, 206, 201, 0.28);
  border-color: #00cec9;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 206, 201, 0.45);
}

.drawer-tab-btn#tabBtnCalibration.active {
  background: rgba(0, 206, 201, 0.22);
  color: #00cec9;
  border-color: rgba(0, 206, 201, 0.6);
  box-shadow: 0 0 8px rgba(0, 206, 201, 0.3);
}

/* Container de Calibração */
.calib-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* Loja de Ferramentas da Base */
.calib-shop-box {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(20, 32, 50, 0.85) 100%);
  border: 1px solid rgba(0, 206, 201, 0.35);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calib-shop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calib-shop-title {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 0.80rem;
  color: #00cec9;
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.5px;
}

.calib-my-tools {
  background: rgba(0, 206, 201, 0.15);
  border: 1px solid rgba(0, 206, 201, 0.4);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #81ecec;
  display: flex;
  align-items: center;
  gap: 4px;
}

.calib-shop-desc {
  font-size: 0.68rem;
  color: #94a3b8;
  line-height: 1.25;
}

.calib-buy-actions {
  display: flex;
  gap: 6px;
}

.calib-buy-btn {
  flex: 1;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 5px;
  color: #f1c40f;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 6px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: all 0.18s ease;
}

.calib-buy-btn:hover:not(:disabled) {
  background: rgba(241, 196, 15, 0.2);
  border-color: #f1c40f;
  transform: translateY(-1px);
  box-shadow: 0 0 8px rgba(241, 196, 15, 0.35);
}

.calib-buy-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.08);
  color: #64748b;
  transform: none;
}

.calib-buy-qty {
  color: #ffffff;
  font-size: 0.74rem;
}

/* Seletor de Tanques para Calibração com Miniaturas Visuais */
.calib-tank-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.calib-tank-tab {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 5px 3px 4px 3px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.2s ease;
  position: relative;
  user-select: none;
}

.calib-tank-tab:hover {
  border-color: rgba(0, 206, 201, 0.45);
  background: rgba(20, 35, 55, 0.85);
  transform: translateY(-1px);
}

.calib-tank-tab.active {
  background: rgba(0, 206, 201, 0.18);
  border-color: #00cec9;
  box-shadow: 0 0 10px rgba(0, 206, 201, 0.35);
}

.calib-tank-thumb {
  width: 58px;
  height: 38px;
  display: block;
}

.calib-tank-name-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: #e2e8f0;
  white-space: nowrap;
}

.calib-tank-lvl-tag {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  color: #00cec9;
}

.calib-active-field-badge {
  position: absolute;
  top: -4px;
  right: -3px;
  background: #2ed573;
  color: #041019;
  font-size: 0.52rem;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 3px;
  letter-spacing: 0.3px;
  box-shadow: 0 0 6px rgba(46, 213, 115, 0.6);
}

/* Card Principal de Calibração */
.calib-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(0, 206, 201, 0.25);
  border-radius: 8px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.25s ease;
}

.calib-card.flash-success {
  animation: calibSuccessFlash 0.8s ease-out;
}

.calib-card.shake-fail {
  animation: calibShake 0.4s ease-in-out;
}

@keyframes calibSuccessFlash {
  0% { box-shadow: 0 0 25px rgba(46, 213, 115, 0.85); border-color: #2ed573; }
  100% { box-shadow: none; border-color: rgba(0, 206, 201, 0.25); }
}

@keyframes calibShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.calib-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calib-tank-title {
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.calib-level-badge {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  color: #00cec9;
  background: rgba(0, 206, 201, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(0, 206, 201, 0.3);
}

.calib-bonus-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px 10px;
  border-radius: 5px;
  border-left: 3px solid #00cec9;
}

.calib-bonus-label {
  font-size: 0.72rem;
  color: #94a3b8;
}

.calib-bonus-val {
  font-family: 'Rajdhani', sans-serif;
  font-size: 0.90rem;
  font-weight: 800;
  color: #00cec9;
  text-shadow: 0 0 8px rgba(0, 206, 201, 0.5);
}

/* Medidor de 10 Pips */
.calib-pips-meter {
  display: flex;
  gap: 3px;
  width: 100%;
}

.calib-pip {
  flex: 1;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  transition: all 0.25s ease;
  position: relative;
}

.calib-pip.filled {
  background: linear-gradient(180deg, #00cec9 0%, #0984e3 100%);
  border-color: #81ecec;
  box-shadow: 0 0 6px rgba(0, 206, 201, 0.6);
}

.calib-pip.maxed {
  background: linear-gradient(180deg, #ffd700 0%, #f39c12 100%);
  border-color: #f1c40f;
  box-shadow: 0 0 8px rgba(241, 196, 15, 0.7);
}

.calib-pip.target-next {
  border-color: #00cec9;
  animation: calibPulseTarget 1.2s infinite ease-in-out;
}

@keyframes calibPulseTarget {
  0%, 100% { background: rgba(0, 206, 201, 0.2); }
  50% { background: rgba(0, 206, 201, 0.45); }
}

/* Detalhes de Custo e Chance */
.calib-details-box {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.calib-detail-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  color: #cbd5e1;
}

.calib-detail-line .val {
  font-weight: 700;
}

.calib-chance-val {
  color: #2ed573;
}

.calib-pity-tag {
  color: #f1c40f;
  font-size: 0.68rem;
  margin-left: 4px;
}

/* Botão de Upgrade Estruturado */
.btn-calibrate-action {
  width: 100%;
  background: linear-gradient(135deg, #00cec9 0%, #0984e3 100%);
  border: none;
  border-radius: 6px;
  color: #0b0f19;
  font-family: 'Rajdhani', sans-serif;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 206, 201, 0.35);
}

.btn-calibrate-action:hover:not(:disabled) {
  filter: brightness(1.15);
  box-shadow: 0 0 16px rgba(0, 206, 201, 0.6);
  transform: translateY(-1px);
}

.btn-calibrate-action:disabled {
  background: rgba(51, 65, 85, 0.6);
  color: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-calibrate-action.maxed-state {
  background: linear-gradient(135deg, rgba(241, 196, 15, 0.25) 0%, rgba(243, 156, 18, 0.25) 100%);
  border: 1px solid #f1c40f;
  color: #f1c40f;
  cursor: default;
}

.calib-btn-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 8px;
}

.calib-btn-left {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  white-space: nowrap;
}

.calib-btn-cost-tag {
  background: rgba(11, 15, 25, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffd700;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Responsividade Mobile */
body.is-mobile-device .calib-card,
body.is-mobile-device .calib-shop-box {
  padding: 6px 8px;
  gap: 5px;
}

body.is-mobile-device .calib-shop-title,
body.is-mobile-device .calib-tank-title {
  font-size: 0.72rem;
}

body.is-mobile-device .calib-shop-desc {
  font-size: 0.60rem;
}

body.is-mobile-device .calib-buy-btn {
  padding: 4px 2px;
  font-size: 0.62rem;
}

body.is-mobile-device .calib-buy-qty {
  font-size: 0.68rem;
}

body.is-mobile-device .calib-tank-thumb {
  width: 44px;
  height: 28px;
}

body.is-mobile-device .calib-tank-name-row {
  font-size: 0.58rem;
}

body.is-mobile-device .calib-pip {
  height: 7px;
}

body.is-mobile-device .btn-calibrate-action {
  font-size: 0.75rem;
  padding: 6px 10px;
}

body.is-mobile-device .calib-btn-left {
  font-size: 0.78rem;
}

body.is-mobile-device .calib-btn-cost-tag {
  font-size: 0.72rem;
  padding: 1px 6px;
}
