/* ============================================
   FarmBrawl — Visual Overhaul (UI + World polish)
   Paleta obligatoria:
   #0A0A0A bg oscuro · #1A1A2E bg medio · #16213E bg secundario
   #E7C86A acento dorado · #B0A06A dorado apagado
   #E0E0E0 texto · #9E9E9E texto sec · #4A4A4A bordes
   #5D4037 tierra · #3E2723 tierra bloqueada
   ============================================ */

/* ─── TOPBAR JERARQUÍA ─── */
.game-topbar {
  background: #0A0A0A !important;
  border-bottom: 1px solid #1A1A2E !important;
  min-height: 48px;
  align-items: center;
}

#topbar-center {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

/* ── Base de todas las cards ── */
.hud-card {
  display: inline-flex;
  flex-direction: column;
  padding: 5px 10px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  opacity: 1;
}
.hud-card .hc-top {
  display: flex;
  align-items: center;
  gap: 4px;
}
.hud-card .hc-label {
  font-size: 11px;
  letter-spacing: 0.5px;
  color: #CFD8DC;
  text-transform: uppercase;
  font-weight: 600;
}
.hud-card .hc-value {
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0.3px;
}
.hud-card .hc-coin-icon {
  width: 14px;
  height: 14px;
  image-rendering: pixelated;
}

/* ── USDC — azul ── */
.hud-card.card-usdc {
  background: rgba(100, 181, 246, 0.10);
  border: 1px solid rgba(100, 181, 246, 0.30);
  box-shadow: inset 0 2px 0 #0D47A1;
}
.hud-card.card-usdc .hc-value { color: #64B5F6; }

/* ── BC — dorado ── */
.hud-card.card-bc {
  background: rgba(255, 213, 79, 0.10);
  border: 1px solid rgba(255, 213, 79, 0.30);
  box-shadow: inset 0 2px 0 #F9A825;
}
.hud-card.card-bc .hc-value { color: #FFD54F; }

/* ── GEMAS — verde ── */
.hud-card.card-gems {
  background: rgba(129, 199, 132, 0.10);
  border: 1px solid rgba(129, 199, 132, 0.30);
  box-shadow: inset 0 2px 0 #2E7D32;
}
.hud-card.card-gems .hc-value { color: #81C784; }

/* ── TASA — naranja ── */
.hud-card.card-tasa {
  background: rgba(255, 183, 77, 0.10);
  border: 1px solid rgba(255, 183, 77, 0.30);
  box-shadow: inset 0 2px 0 #E65100;
  margin-left: 8px;
}
.hud-card.card-tasa .hc-value { color: #FFB74D; }
.hud-card.card-tasa .hc-rate { color: #FFB74D; }

/* ── AGUA — cyan ── */
.hud-card.card-agua {
  background: rgba(77, 208, 225, 0.10);
  border: 1px solid rgba(77, 208, 225, 0.30);
  box-shadow: inset 0 2px 0 #00838F;
}
.hud-card.card-agua .hc-value { color: #4DD0E1; }
.hud-card.card-agua .hc-ic-img { width: 14px; height: 14px; }

/* ── FA icon alignment ── */
.hc-fa { font-size: 12px; width: 14px; text-align: center; }

/* CTA Depositar USDC — azul limpio */
.hud-deposit {
  margin-left: auto;
  background: #1565C0 !important;
  color: #FFFFFF !important;
  font-weight: bold !important;
  padding: 7px 14px !important;
  border-radius: 4px !important;
  border: 1px solid #1976D2 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease !important;
}
.hud-deposit:hover {
  background: #1976D2 !important;
}
.hud-deposit .hd-coin-icon {
  width: 14px;
  height: 14px;
  image-rendering: pixelated;
}
.hud-deposit .hd-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  text-align: left;
}
.hud-deposit .hd-top { font-size: 9px; color: rgba(255,255,255,0.8); }
.hud-deposit .hd-bottom { font-size: 10px; font-weight: 800; color: #FFFFFF; }

/* ── Player chip — tonos cálidos, no verde ── */
#account-header-chip {
  background: rgba(231, 200, 106, 0.08) !important;
  border: 1px solid rgba(231, 200, 106, 0.22) !important;
  box-shadow: none !important;
}
#account-header-chip:hover {
  background: rgba(231, 200, 106, 0.15) !important;
  border-color: rgba(231, 200, 106, 0.35) !important;
  box-shadow: 0 2px 8px rgba(231, 200, 106, 0.10) !important;
}
.profile-avatar {
  border-color: rgba(231, 200, 106, 0.30) !important;
  box-shadow: none !important;
}
.profile-wallet {
  color: #B0A06A !important;
}

/* ─── TOOLBAR INFERIOR ─── */
.game-toolbar {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 6px 8px;
  background: rgba(10, 10, 10, 0.88);
  border: 1px solid rgba(74, 74, 74, 0.6);
  border-radius: 4px;
  z-index: 31;
  backdrop-filter: blur(4px);
}
.game-toolbar .tool-slot {
  width: 40px;
  height: 40px;
  background: #16213E;
  border: 1px solid rgba(74, 74, 74, 0.5);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  image-rendering: pixelated;
  transition: filter 0.15s, opacity 0.15s, border-color 0.15s, background 0.15s;
}
.game-toolbar .tool-slot:hover {
  background: #1E2A4A;
  border-color: rgba(231, 200, 106, 0.3);
}
.game-toolbar .tool-slot img,
.game-toolbar .tool-slot canvas {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
  pointer-events: none;
}
.game-toolbar .tool-slot .slot-key {
  position: absolute;
  top: -7px;
  left: -3px;
  background: #E7C86A;
  color: #0A0A0A;
  font-family: 'Courier New', monospace;
  font-size: 8px;
  font-weight: bold;
  padding: 1px 3px;
  line-height: 1;
  box-shadow: 1px 1px 0 rgba(0,0,0,0.5);
}
.game-toolbar .tool-slot.inactive {
  background: #16213E;
  border: 1px solid #4A4A4A;
  opacity: 0.6;
  filter: grayscale(100%);
}
.game-toolbar .tool-slot.selected {
  background: #1E2A4A;
  border: 1px solid rgba(231, 200, 106, 0.5);
  box-shadow: inset 0 0 6px rgba(231, 200, 106, 0.15);
}
.game-toolbar .tool-slot.cooldown {
  filter: grayscale(100%);
  opacity: 0.4;
  pointer-events: none;
}

/* ─── SIDEBAR ÍCONOS: delegado a css/sidebar-premium.css ─── */

/* ─── TOOLTIP NPC (pixel art) ─── */
.npc-tooltip,
.npc-dialog-box,
.dialog-bubble,
#plot-tooltip {
  background: rgba(26, 26, 46, 0.95) !important;
  border: 2px solid #4A4A4A !important;
  border-radius: 0 !important;
  box-shadow: 4px 4px 0px 0px #000000 !important;
  color: #E0E0E0 !important;
  font-family: 'Courier New', monospace !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  padding: 8px 12px !important;
  max-width: 280px;
  position: relative;
}
.npc-tooltip .npc-name,
.dialog-bubble .npc-name,
.npc-dialog-name {
  color: #FFD700;
  font-weight: bold;
  border-bottom: 1px solid #4A4A4A;
  padding-bottom: 4px;
  margin-bottom: 4px;
  display: block;
}
/* Flecha indicadora */
.npc-tooltip::after,
.dialog-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 16px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #1A1A2E;
  filter: drop-shadow(0 2px 0 #4A4A4A);
}

/* ─── MINIMAP CONTAINER ─── */
#minimap-panel {
  background: rgba(10, 10, 10, 0.9);
  border: 2px solid #4A4A4A;
  border-radius: 0;
}
#minimap-canvas {
  image-rendering: pixelated;
  display: block;
}
