:root {
  --arc-bg-dark: rgba(14, 16, 20, 0.82);
  --arc-border: rgba(242, 232, 213, 0.25);
  --arc-cream: #f2e8d5;
  --arc-orange: #ff5500;
  --arc-yellow: #ffb800;
  --arc-cyan: #00e5ff;
  --arc-red: #ff2a4b;
  --font-mono: 'Consolas', 'SFMono-Regular', 'Roboto Mono', monospace;
  --font-sans: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #111418;
  font-family: var(--font-sans);
  color: var(--arc-cream);
}

#game-canvas {
  display: block;
  width: 100vw;
  height: 100vh;
}

/* Franjas retro Cassette Futurism decorativas en las esquinas */
.retro-stripes {
  display: flex;
  gap: 4px;
  height: 6px;
  margin-bottom: 6px;
}
.retro-stripes span {
  flex: 1;
  height: 100%;
}
.stripe-orange { background: var(--arc-orange); }
.stripe-yellow { background: var(--arc-yellow); }
.stripe-cyan { background: var(--arc-cyan); }
.stripe-cream { background: var(--arc-cream); }

/* Brújula Superior */
#compass-container {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 420px;
  background: var(--arc-bg-dark);
  border: 1px solid var(--arc-border);
  border-top: 3px solid var(--arc-orange);
  padding: 6px 14px;
  backdrop-filter: blur(6px);
  pointer-events: none;
  z-index: 10;
}

#compass-header {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: rgba(242, 232, 213, 0.7);
  margin-bottom: 4px;
}

#compass-bar {
  position: relative;
  height: 22px;
  overflow: hidden;
  border-top: 1px solid rgba(242, 232, 213, 0.15);
}

#compass-strip {
  position: absolute;
  top: 3px;
  left: 50%;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--arc-cream);
  transition: transform 0.04s linear;
}

#compass-center-marker {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 8px;
  background: var(--arc-orange);
}

/* Retícula central dinámica */
#crosshair {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  pointer-events: none;
  z-index: 10;
  transition: width 0.12s ease-out, height 0.12s ease-out, opacity 0.15s;
}

.ch-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: var(--arc-orange);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px var(--arc-orange);
}

.ch-line {
  position: absolute;
  background: rgba(242, 232, 213, 0.85);
}

.ch-top {
  top: 0;
  left: 50%;
  width: 2px;
  height: 7px;
  transform: translateX(-50%);
}
.ch-bottom {
  bottom: 0;
  left: 50%;
  width: 2px;
  height: 7px;
  transform: translateX(-50%);
}
.ch-left {
  left: 0;
  top: 50%;
  width: 7px;
  height: 2px;
  transform: translateY(-50%);
}
.ch-right {
  right: 0;
  top: 50%;
  width: 7px;
  height: 2px;
  transform: translateY(-50%);
}

/* Panel Inferior Izquierdo: Bloque Unificado [VIDA ESCUDO + VIDA HP] + Stamina */
#hud-bottom-left {
  position: fixed;
  bottom: 20px;
  left: 24px;
  width: 345px;
  background: var(--arc-bg-dark);
  border: 1px solid var(--arc-border);
  padding: 12px 14px;
  backdrop-filter: blur(6px);
  pointer-events: auto;
  z-index: 20;
}

.hud-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
}

.badge-state {
  background: var(--arc-orange);
  color: #111;
  font-weight: 800;
  padding: 2px 7px;
  font-size: 11px;
  letter-spacing: 1px;
}

.stamina-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.12);
  margin-bottom: 10px;
  overflow: hidden;
}

#stamina-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--arc-orange), var(--arc-yellow));
  transition: width 0.05s linear;
}

.telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(242, 232, 213, 0.8);
}

.telemetry-grid span.val {
  color: var(--arc-cyan);
  font-weight: 700;
}

/* Panel Superior Izquierdo: Controles */
#hud-controls {
  position: fixed;
  top: 18px;
  left: 24px;
  width: 280px;
  background: var(--arc-bg-dark);
  border: 1px solid var(--arc-border);
  padding: 12px 14px;
  backdrop-filter: blur(6px);
  font-size: 12px;
  z-index: 10;
  pointer-events: none;
}

#hud-controls h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--arc-yellow);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.control-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  font-size: 11.5px;
  color: rgba(242, 232, 213, 0.85);
}

.key-tag {
  font-family: var(--font-mono);
  background: rgba(242, 232, 213, 0.15);
  border: 1px solid rgba(242, 232, 213, 0.35);
  padding: 1px 6px;
  border-radius: 3px;
  color: var(--arc-cream);
  font-size: 10.5px;
}

/* Panel Derecho: Laboratorio de Experimentación en Vivo */
#hud-lab {
  position: fixed;
  top: 18px;
  right: 24px;
  width: 285px;
  background: var(--arc-bg-dark);
  border: 1px solid var(--arc-border);
  padding: 12px 14px;
  backdrop-filter: blur(6px);
  z-index: 20;
}

#hud-lab h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--arc-cyan);
  margin-bottom: 4px;
}

#hud-lab p.lab-hint {
  font-size: 11px;
  color: rgba(242, 232, 213, 0.6);
  margin-bottom: 10px;
}

.lab-row {
  margin-bottom: 8px;
}

.lab-row label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  margin-bottom: 3px;
}

.lab-row input[type="range"] {
  width: 100%;
  accent-color: var(--arc-orange);
  cursor: pointer;
}

#btn-reset-pos {
  width: 100%;
  margin-top: 6px;
  padding: 6px 10px;
  background: rgba(255, 85, 0, 0.2);
  border: 1px solid var(--arc-orange);
  color: var(--arc-cream);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s;
}

#btn-reset-pos:hover {
  background: var(--arc-orange);
  color: #111;
  font-weight: 700;
}

/* Banner de captura de ratón */
#pointer-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 85, 0, 0.92);
  color: #111;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1.5px;
  padding: 8px 18px;
  border: 1px solid var(--arc-cream);
  cursor: pointer;
  z-index: 25;
  transition: opacity 0.2s, transform 0.2s;
}

#pointer-banner.locked {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(10px);
}


/* ==========================================================================
   INTERFAZ LOADOUT / INVENTARIO (TECLA "1") + QUICK USE 5/5 (TECLA "Q" + FLECHAS)
   ========================================================================== */

.hidden {
  display: none !important;
}

#loadout-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(22, 27, 42, 0.96), rgba(9, 11, 18, 0.98));
  backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 34px;
  color: #e8e4dc;
}

.loadout-window {
  width: 100%;
  max-width: 1320px;
  height: 92vh;
  max-height: 830px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Topbar: Emblema + LOADOUT + Peso + Créditos + Controles Persistentes */
.loadout-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.loadout-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.raider-emblem {
  width: 46px;
  height: 46px;
}

.loadout-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #f5f2eb;
}

.loadout-stats {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.stat-weight {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ff5c5c;
}

.stat-credits {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e6dfd3;
}

.loadout-universal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.persist-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 1px;
  padding: 4px 8px;
  background: rgba(0, 230, 118, 0.14);
  border: 1px solid #00e676;
  color: #00e676;
  border-radius: 4px;
}

#universal-item-select {
  background: #141824;
  color: #f2e8d5;
  border: 1px solid rgba(242, 232, 213, 0.3);
  padding: 5px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.loadout-universal-bar button {
  background: #1c2233;
  color: #f2e8d5;
  border: 1px solid rgba(242, 232, 213, 0.3);
  padding: 5px 10px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: all 0.15s;
}

.loadout-universal-bar button:hover {
  background: var(--arc-orange);
  color: #111;
  border-color: var(--arc-orange);
  font-weight: 700;
}

/* Layout de 3 Columnas */
.loadout-grid-layout {
  display: grid;
  grid-template-columns: 335px 1fr 310px;
  gap: 34px;
  flex: 1;
  margin-top: 14px;
  overflow: hidden;
}

.loadout-col {
  display: flex;
  flex-direction: column;
}

.section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.4px;
  color: #e3ded5;
  margin-bottom: 10px;
}

.section-header strong {
  color: #f5f2eb;
  font-family: var(--font-mono);
}

.mt-section {
  margin-top: 18px;
}

/* Columna Izquierda: EQUIPMENT */
.equip-top-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.equip-small-slot {
  height: 96px;
}

.equip-weapon-slot {
  height: 194px;
  margin-bottom: 10px;
}

/* Columna Central: BACKPACK 24/24 (4x6) */
.backpack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 10px;
  flex: 1;
}

.bp-slot {
  min-height: 86px;
}

/* Columna Derecha: QUICK USE 5/5, AUGMENTED 1/1, SAFE POCKET 2/2 */
.quickuse-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.qu-slot, .aug-slot, .sp-slot {
  height: 94px;
}

.augmented-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.safepocket-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

/* Estilo Base de Tarjeta de Slot ARC Raiders */
.arc-slot {
  position: relative;
  border-radius: 8px;
  background: #121521;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.arc-slot:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.12);
}

.arc-slot.slot-picked {
  outline: 2px solid #00e5ff;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.55);
}

.arc-slot.slot-dragover {
  outline: 2px dashed #ffb800;
}

.slot-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.02) 6px,
    rgba(0, 0, 0, 0.15) 6px,
    rgba(0, 0, 0, 0.15) 12px
  );
  color: rgba(255, 255, 255, 0.25);
  font-family: var(--font-mono);
  font-size: 11px;
}

.aug-slot .slot-card {
  background: repeating-linear-gradient(
    -45deg,
    #141824,
    #141824 5px,
    #1b2030 5px,
    #1b2030 10px
  );
}

.slot-card {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(circle at 55% 40%, #1d2233 0%, #10131d 85%);
}

/* Esquina curva característica de Rareza (Abajo-Izquierda) */
.rarity-corner {
  position: absolute;
  bottom: -14px;
  left: -34px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.rarity-corner-lg {
  bottom: -36px;
  left: -64px;
  width: 142px;
  height: 142px;
}

/* Colores de Rareza idénticos a la imagen */
.rarity-epic {
  border-color: rgba(216, 27, 96, 0.72);
}
.rarity-epic .rarity-corner,
.rarity-epic .rarity-corner-mini {
  background: linear-gradient(135deg, #ff1e7a, #b01050);
}

.rarity-rare {
  border-color: rgba(0, 168, 255, 0.72);
}
.rarity-rare .rarity-corner,
.rarity-rare .rarity-corner-mini {
  background: linear-gradient(135deg, #00b4ff, #0077cc);
}

.rarity-uncommon {
  border-color: rgba(0, 230, 118, 0.72);
}
.rarity-uncommon .rarity-corner,
.rarity-uncommon .rarity-corner-mini {
  background: linear-gradient(135deg, #00e676, #00994d);
}

.rarity-legendary {
  border-color: rgba(255, 179, 0, 0.82);
}
.rarity-legendary .rarity-corner,
.rarity-legendary .rarity-corner-mini {
  background: linear-gradient(135deg, #ffc400, #d98200);
}

.rarity-common {
  border-color: rgba(120, 144, 156, 0.45);
}
.rarity-common .rarity-corner,
.rarity-common .rarity-corner-mini {
  background: linear-gradient(135deg, #78909c, #455a64);
}

/* Arte SVG dentro del Slot */
.slot-art {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  z-index: 2;
}

.bp-weapon-art {
  padding: 2px 6px 0 6px;
}

.bp-weapon-art .item-svg {
  max-height: 44px;
}

.item-svg {
  width: 100%;
  height: 100%;
  max-height: 62px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6));
}

.equip-small-art .item-svg {
  max-height: 74px;
}

.weapon-art-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px 0 20px;
  z-index: 2;
}

.weapon-art-wrap .item-svg {
  max-height: 102px;
}

/* 4 Mini-Slots de Accesorios debajo de cada Arma (1: Silenciador, 2: Agarrador, 3: Cargador, 4: Culata) */
.weapon-mods-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 2px 12px 10px 24px;
  z-index: 4;
}

.weapon-mod-box {
  position: relative;
  width: 42px;
  height: 38px;
  border-radius: 6px;
  background: #141824;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.weapon-mod-box:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.45);
  border-color: #00e5ff;
}

.weapon-mod-box.mod-empty {
  background: rgba(16, 20, 32, 0.78);
  border: 1px dashed rgba(255, 255, 255, 0.22);
}

.weapon-mod-box.rarity-epic {
  border-color: rgba(255, 30, 122, 0.85);
}
.weapon-mod-box.rarity-rare {
  border-color: rgba(0, 180, 255, 0.85);
}
.weapon-mod-box.rarity-uncommon {
  border-color: rgba(0, 230, 118, 0.85);
}
.weapon-mod-box.rarity-legendary {
  border-color: rgba(255, 196, 0, 0.9);
}

.mod-box-svg-wrap {
  width: 32px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.mod-box-svg-wrap .item-svg {
  width: 100%;
  height: 100%;
  max-height: 28px;
}

.mod-svg-ghost {
  opacity: 0.22;
  filter: grayscale(1);
}

/* Versión compacta de los 4 slots para armas guardadas en la Mochila */
.weapon-mods-row-compact {
  gap: 4px;
  padding: 0 4px 4px 10px;
}

.weapon-mods-row-compact .weapon-mod-box {
  width: 22px;
  height: 18px;
  border-radius: 3px;
}

.weapon-mods-row-compact .mod-box-svg-wrap {
  width: 16px;
  height: 14px;
}

.weapon-mods-row-compact .rarity-corner-mini {
  width: 12px;
  height: 12px;
  bottom: -6px;
  left: -6px;
}

.rarity-corner-mini {
  position: absolute;
  bottom: -9px;
  left: -9px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

.weapon-bullet-svg {
  width: 18px;
  height: 15px;
  display: block;
}

/* Barra Inferior de Metadatos en cada Slot */
.slot-meta-bar {
  height: 22px;
  background: rgba(8, 10, 16, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #dcd7cd;
  z-index: 3;
}

.weapon-meta-bar {
  height: 30px;
  font-size: 14px;
  font-weight: 700;
  padding: 0 12px;
}

.meta-left, .meta-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-icon {
  font-size: 10px;
  letter-spacing: -1px;
  color: #f2e8d5;
}

.meta-recycle {
  color: rgba(242, 232, 213, 0.55);
  font-size: 11px;
}

.meta-tier {
  font-family: Georgia, serif;
  font-weight: 700;
  color: rgba(242, 232, 213, 0.8);
  border-top: 1px solid rgba(242, 232, 213, 0.5);
  border-bottom: 1px solid rgba(242, 232, 213, 0.5);
  line-height: 1;
  padding: 1px 2px;
  font-size: 10px;
}

.weapon-tier {
  font-size: 13px;
}

.eye-badge {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 11px;
  z-index: 4;
  opacity: 0.85;
}

.qu-index-badge {
  position: absolute;
  top: 4px;
  left: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: #ffb800;
  background: rgba(0, 0, 0, 0.65);
  padding: 1px 5px;
  border-radius: 3px;
  z-index: 4;
}

.slot-tooltip {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 12, 18, 0.92);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
  z-index: 5;
}

.arc-slot:hover .slot-tooltip {
  opacity: 1;
}

.loadout-footer-hint {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: rgba(242, 232, 213, 0.75);
  text-align: center;
}

/* ==========================================================================
   BARRA TÁCTICA EN HUD PARA LOS 5 SLOTS DE USO RÁPIDO (TECLA "Q" + FLECHAS)
   ========================================================================== */

#quickuse-hud-bar {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(12, 15, 24, 0.92);
  border: 1.5px solid rgba(255, 184, 0, 0.65);
  border-top: 3px solid var(--arc-yellow);
  border-radius: 10px;
  padding: 12px 18px;
  backdrop-filter: blur(10px);
  z-index: 60;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75);
}

.qu-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(242, 232, 213, 0.85);
  margin-bottom: 10px;
}

.qu-active-name {
  color: var(--arc-yellow);
  font-weight: 800;
}

.qu-hud-slots {
  display: grid;
  grid-template-columns: repeat(5, 88px);
  gap: 10px;
}

.qu-hud-slot {
  height: 88px;
}

.qu-hud-slot.active-arrow-selection,
.qu-slot-selected {
  border: 2px solid #00e5ff !important;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.7);
  transform: translateY(-3px);
}

.qu-hud-footer {
  margin-top: 8px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: rgba(242, 232, 213, 0.65);
}

#arc-item-toast {
  position: fixed;
  top: 82px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 229, 255, 0.92);
  color: #090c12;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 12px;
  padding: 7px 16px;
  border-radius: 4px;
  z-index: 120;
  box-shadow: 0 4px 16px rgba(0, 229, 255, 0.4);
}


/* ==========================================================================
   CARTEL FLOTANTE DE RECOLECCIÓN Y FARMEO EN EL TERRENO ([E] RECOGER / FARMEAR)
   ========================================================================== */

#world-pickup-prompt {
  position: fixed;
  top: 57%;
  left: 54%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(12, 15, 24, 0.92);
  border: 1.5px solid rgba(242, 232, 213, 0.35);
  border-left: 4px solid var(--arc-orange);
  padding: 8px 14px;
  border-radius: 6px;
  backdrop-filter: blur(8px);
  pointer-events: none;
  z-index: 45;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65);
  animation: pulsePrompt 1.4s infinite ease-in-out;
}

@keyframes pulsePrompt {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.pickup-key-box {
  width: 30px;
  height: 30px;
  background: var(--arc-cream);
  color: #0e1016;
  font-family: var(--font-mono);
  font-weight: 900;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(242, 232, 213, 0.5);
}

.pickup-info {
  display: flex;
  flex-direction: column;
}

.pickup-title {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.pickup-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(242, 232, 213, 0.72);
  margin-top: 2px;
}

/* ==========================================================================
   SLOT DE CARGADOR (BÁSICO, MEDIO, ALTO) EN LAS 2 ARMAS EQUIPADAS Y HUD DE BALAS
   ========================================================================== */

.weapon-top-badges {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px 0 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  z-index: 3;
}

.wp-slot-tag {
  color: #f2e8d5;
  letter-spacing: 0.5px;
}

.wp-caliber-tag {
  background: rgba(0, 0, 0, 0.55);
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid currentColor;
}

.weapon-active-border {
  box-shadow: inset 0 0 0 2px #00e5ff, 0 0 16px rgba(0, 229, 255, 0.25);
}

.weapon-mag-slot {
  margin: 2px 10px 6px 10px;
  padding: 5px 10px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  z-index: 4;
  transition: all 0.15s;
}

.weapon-mag-slot.mag-empty {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(242, 232, 213, 0.32);
  color: rgba(242, 232, 213, 0.68);
}

.weapon-mag-slot.mag-empty:hover {
  border-color: var(--arc-cyan);
  color: var(--arc-cyan);
  background: rgba(0, 229, 255, 0.08);
}

.weapon-mag-slot.mag-equipped {
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.65);
  color: #e8f5e9;
}

.mag-unequip-btn {
  background: rgba(255, 59, 48, 0.25);
  border: 1px solid #ff5252;
  color: #ff8a80;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 800;
}

.mag-unequip-btn:hover {
  background: #ff5252;
  color: #111;
}

/* Panel Inferior Derecho: HUD de las 2 Armas Equipadas, Balas y Recarga [R] */
#hud-weapon-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 325px;
  background: var(--arc-bg-dark);
  border: 1px solid var(--arc-border);
  padding: 12px 15px;
  backdrop-filter: blur(6px);
  z-index: 20;
}

.wp-switch-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 9px;
}

.wp-tab {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(242, 232, 213, 0.2);
  color: rgba(242, 232, 213, 0.72);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  padding: 5px 8px;
  border-radius: 3px;
  cursor: pointer;
  text-align: center;
}

.wp-tab.active {
  background: rgba(0, 229, 255, 0.18);
  border-color: var(--arc-cyan);
  color: var(--arc-cyan);
}

.wp-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.wp-name {
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--arc-cream);
}

.wp-ammo-badge {
  display: inline-block;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border: 1px solid var(--arc-cyan);
  border-radius: 3px;
  background: rgba(0, 0, 0, 0.45);
}

.wp-mag-badge {
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.wp-counter-col {
  text-align: right;
}

.wp-clip-wrap {
  font-family: var(--font-mono);
  line-height: 1;
}

.wp-clip-big {
  font-size: 28px;
  font-weight: 900;
  color: var(--arc-cream);
}

.wp-clip-slash {
  font-size: 18px;
  color: rgba(242, 232, 213, 0.45);
  margin: 0 2px;
}

.wp-clip-max {
  font-size: 16px;
  font-weight: 700;
  color: var(--arc-cyan);
}

.wp-reserve-line {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: rgba(242, 232, 213, 0.78);
}

.wp-reload-wrap {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 184, 0, 0.4);
}

.wp-reload-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  color: var(--arc-yellow);
  margin-bottom: 4px;
}

.wp-reload-track {
  width: 100%;
  height: 7px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(255, 184, 0, 0.5);
  border-radius: 3px;
  overflow: hidden;
}

.wp-reload-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--arc-orange), var(--arc-yellow));
}

.wp-footer-hint {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: rgba(242, 232, 213, 0.68);
}

/* ==========================================================================
   BLOQUE UNIFICADO EN EL MISMO LUGAR:
   SUPERIOR: VIDA ESCUDO (VERDE: 5 CUADROS / AZUL: 12 CUADROS / ROJO: 15 CUADROS)
   INFERIOR (ABAJO DE ESE MISMO): VIDA HP DEL PERSONAJE
   ========================================================================== */

.rarity-crimson {
  border-color: rgba(255, 42, 75, 0.85);
}
.rarity-crimson .rarity-corner,
.rarity-crimson .rarity-corner-mini {
  background: linear-gradient(135deg, #ff2a4b, #99001b);
}
.weapon-mod-box.rarity-crimson {
  border-color: rgba(255, 42, 75, 0.85);
}

.vitals-unified-box {
  background: rgba(10, 13, 21, 0.92);
  border: 1px solid rgba(242, 232, 213, 0.25);
  border-left: 3px solid #00e676;
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hud-vitals-box {
  margin-bottom: 10px;
}

.loadout-vitals-box {
  margin-bottom: 10px;
}

.vitals-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
}

.vitals-shield-title {
  color: #00e676;
}

.vitals-shield-count {
  font-weight: 900;
}

/* Fila de Cuadros de Escudo (5 Verdes, 12 Azules o 15 Rojos) */
.shield-squares-row {
  display: flex;
  align-items: center;
  gap: 3px;
  width: 100%;
  height: 13px;
}

.shield-sq {
  flex: 1;
  height: 100%;
  border-radius: 2px;
  transition: background 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

/* Escudo Verde (5 Cuadros) */
.shield-sq-verde.sq-active {
  background: linear-gradient(180deg, #38ff9c 0%, #00c853 100%);
  border: 1px solid #80ffbe;
  box-shadow: 0 0 7px rgba(0, 230, 118, 0.65);
}
.shield-sq-verde.sq-empty {
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid rgba(0, 230, 118, 0.28);
}

/* Escudo Azul (12 Cuadros) */
.shield-sq-azul.sq-active {
  background: linear-gradient(180deg, #40c4ff 0%, #0088ff 100%);
  border: 1px solid #80d8ff;
  box-shadow: 0 0 7px rgba(0, 180, 255, 0.65);
}
.shield-sq-azul.sq-empty {
  background: rgba(0, 180, 255, 0.12);
  border: 1px solid rgba(0, 180, 255, 0.28);
}

/* Escudo Rojo (15 Cuadros) */
.shield-sq-rojo.sq-active {
  background: linear-gradient(180deg, #ff526b 0%, #d50026 100%);
  border: 1px solid #ff8a9b;
  box-shadow: 0 0 7px rgba(255, 42, 75, 0.72);
}
.shield-sq-rojo.sq-empty {
  background: rgba(255, 42, 75, 0.12);
  border: 1px solid rgba(255, 42, 75, 0.28);
}

.shield-no-unit {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px dashed rgba(255, 255, 255, 0.22);
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: rgba(242, 232, 213, 0.55);
}

/* Fila Inferior: VIDA HP del Personaje (Abajo del Escudo) */
.vitals-hp-row {
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.vitals-hp-title {
  color: #f5f2eb;
}

.vitals-hp-count {
  color: #4cd964;
  font-weight: 900;
}

.hp-bar-track {
  width: 100%;
  height: 11px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(242, 232, 213, 0.3);
  border-radius: 2px;
  overflow: hidden;
}

.hp-bar-fill {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #f2e8d5 0%, #30e875 100%);
  box-shadow: 0 0 8px rgba(48, 232, 117, 0.45);
  transition: width 0.15s ease-out;
}

/* Botones rápidos para alternar Escudo Verde (5), Azul (12), Rojo (15) y Daño/Curar */
.hud-shield-quickbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding-top: 3px;
}

.hud-sh-btn {
  font-family: var(--font-mono);
  font-size: 8.8px;
  font-weight: 800;
  padding: 3px 2px;
  border-radius: 3px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(20, 24, 36, 0.85);
  color: #f2e8d5;
  transition: all 0.12s;
}

.hud-sh-btn.sh-green {
  border-color: #00e676;
  color: #00e676;
}
.hud-sh-btn.sh-green:hover {
  background: #00e676;
  color: #09120c;
}

.hud-sh-btn.sh-blue {
  border-color: #00b4ff;
  color: #00b4ff;
}
.hud-sh-btn.sh-blue:hover {
  background: #00b4ff;
  color: #08121a;
}

.hud-sh-btn.sh-red {
  border-color: #ff2a4b;
  color: #ff2a4b;
}
.hud-sh-btn.sh-red:hover {
  background: #ff2a4b;
  color: #1a060a;
}

.hud-sh-btn.sh-dmg {
  border-color: #ffb800;
  color: #ffb800;
}
.hud-sh-btn.sh-dmg:hover {
  background: #ffb800;
  color: #111;
}

.hud-sh-btn.sh-heal {
  border-color: #e0f7fa;
  color: #e0f7fa;
}
.hud-sh-btn.sh-heal:hover {
  background: #e0f7fa;
  color: #111;
}

.btn-shield-preset.green {
  border-color: #00e676 !important;
  color: #00e676 !important;
}
.btn-shield-preset.blue {
  border-color: #00b4ff !important;
  color: #00b4ff !important;
}
.btn-shield-preset.red {
  border-color: #ff2a4b !important;
  color: #ff2a4b !important;
}

/* ==========================================================================
   TARJETA FLOTANTE DE ARRASTRE (SOSTENER Y DEJAR CAER / PICK Y MOVER)
   ========================================================================== */

#arc-drag-ghost.arc-drag-ghost {
  position: fixed;
  top: 0;
  left: 0;
  width: 245px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  background: rgba(14, 18, 28, 0.96);
  border: 2px solid #00e5ff;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.85), 0 0 18px rgba(0, 229, 255, 0.45);
  pointer-events: none !important;
  z-index: 9999;
  backdrop-filter: blur(8px);
}

.drag-ghost-art {
  width: 54px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.drag-ghost-art .item-svg {
  width: 100%;
  height: 100%;
  max-height: 42px;
}

.drag-ghost-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.drag-ghost-name {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
  color: #f5f2eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drag-ghost-hint {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  color: #00e676;
  line-height: 1.25;
}

/* Resaltado automático del SLOT CORRESPONDIENTE en cualquier arma al sostener una Parte */
.weapon-mod-box.mod-slot-valid-target {
  border: 2px solid #00e676 !important;
  background: rgba(0, 230, 118, 0.22) !important;
  box-shadow: 0 0 14px rgba(0, 230, 118, 0.75);
  animation: pulseModTarget 0.9s infinite alternate ease-in-out;
}

@keyframes pulseModTarget {
  from {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(0, 230, 118, 0.5);
  }
  to {
    transform: scale(1.08);
    box-shadow: 0 0 16px rgba(0, 230, 118, 0.95);
  }
}

.weapon-mod-box.slot-picked {
  outline: 2px solid #00e5ff !important;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.85) !important;
  transform: scale(1.08);
}

.weapon-mod-box.slot-dragover {
  border: 2px solid #ffb800 !important;
  background: rgba(255, 184, 0, 0.28) !important;
  box-shadow: 0 0 18px rgba(255, 184, 0, 0.95) !important;
  transform: scale(1.14) !important;
}

.arc-slot.slot-valid-target {
  border-color: rgba(0, 229, 255, 0.55);
  box-shadow: inset 0 0 10px rgba(0, 229, 255, 0.14);
}

.arc-slot.slot-dragover {
  outline: 2px solid #ffb800 !important;
  box-shadow: 0 0 20px rgba(255, 184, 0, 0.65) !important;
}



