/* =======================
   BAZĂ & CONTAINER
   ======================= */
.wpsp {
  font-family: system-ui, Arial, sans-serif;
  display: flex;
  justify-content: center;
  padding: 16px;
  color: #cfe4ff;
  width: 100%;
  box-sizing: border-box;
}

.wpsp .frame {
  background: radial-gradient(120% 120% at 50% 0%, #0d1218 0%, #070a0f 60%, #05070b 100%);
  padding: 14px;
  width: 100%;
  max-width: 80%;
  box-sizing: border-box;
  border-radius: 18px;
}

/* =======================
   CANVAS WRAP (responsive 560:300)
   ======================= */
.wpsp .canvas-wrap {
  position: relative;
  border: 1px solid #183427;   /* scoate linia dacă nu vrei contur extern */
  border-radius: 14px;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  aspect-ratio: 560 / 300;
  background: #0b0f14;
  display: block;
}

/* PIXI setează width/height inline; forțăm 100% */
.wpsp canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* =======================
   HUD V2 — 2025 clean
   (doar pentru markup-ul din mesajul tău)
   ======================= */

/* Paletă locală (nu poluează global) */
.hud-v2 {
  --card-bg: rgba(17, 27, 23, 0.85);
  --card-bd: rgba(134, 220, 178, 0.18);
  --card-shadow: 0 6px 18px rgba(0,0,0,0.35);
  --text-dim: #86dcb2;
  --text-bright: #e6fff5;
  --btn-bg: rgba(18, 30, 26, 0.9);
  --btn-bd: rgba(134, 220, 178, 0.25);
  --btn-shadow: 0 6px 14px rgba(0,0,0,0.35);
  --focus: 0 0 0 2px rgba(47, 255, 166, 0.35);
}

/* grid general: info sus + controale jos */
.hud-v2 {
  display: grid;
  grid-template-rows: auto auto;
  gap: 16px;
  margin-top: 14px;
  color: var(--text-dim);
  font-family: inherit;
}

/* partea de sus: 2 coloane egale (stânga / dreapta) */
.hud-v2 .hud-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.hud-v2 .hud-left,
.hud-v2 .hud-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* card-urile cu valori */
.hud-v2 .meter {
  background: var(--card-bg);
  border: 1px solid var(--card-bd);
  border-radius: 12px;
  padding: 5px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--card-shadow);
  box-sizing: border-box;
}

.hud-v2 .meter label {
  font-size: 12px;
  letter-spacing: .4px;
  color: var(--text-dim);
  text-transform: uppercase;
  opacity: .95;
}

.hud-v2 .meter .val {
  margin-left: auto;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-bright);
}

/* =======================
   CONTROALE: [-] [SPIN IMG] [+]
   ======================= */
.hud-v2 .ctrl-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* minus | spin | plus */
  align-items: center;
  gap: 16px;
}

/* butoanele - / + (mai mici & simple) */
.hud-v2 .pill {
  appearance: none;
  background: var(--btn-bg);
  color: var(--text-bright);
  border: 1px solid var(--btn-bd);
  border-radius: 10px;
  padding: 10px 12px;             /* mai mic decât înainte */
  min-height: 40px;               /* mai mic */
  font-size: 14px;                /* mai mic */
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--btn-shadow);
  transition: transform .06s ease, box-shadow .2s ease, opacity .2s ease, filter .2s ease;
}
.hud-v2 .pill:hover { transform: translateY(-1px); filter: brightness(1.06); }
.hud-v2 .pill:active { transform: translateY(0); filter: brightness(0.96); }
.hud-v2 .pill:disabled { opacity: .55; cursor: not-allowed; }
.hud-v2 .pill:focus-visible { outline: none; box-shadow: var(--btn-shadow), var(--focus); }

/* buton mare SPIN cu imagine (dominant) */
.hud-v2 .spin-big {
  position: relative;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: clamp(160px, 35vw, 260px);
  height: clamp(160px, 35vw, 260px);  /* pătrat, mare și vizibil */
  justify-self: center;
  filter: drop-shadow(0 14px 32px rgba(30,215,96,.35));
  transition: transform .08s ease, filter .2s ease, opacity .2s ease;
  user-select: none;
}
.hud-v2 .spin-big img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;           /* să nu fie „selectabilă” imaginea */
}
.hud-v2 .spin-big:hover { transform: scale(1.05) translateY(-2px); }
.hud-v2 .spin-big:active { transform: scale(0.97) translateY(1px); filter: drop-shadow(0 10px 20px rgba(30,215,96,.28)); }
.hud-v2 .spin-big:disabled { opacity: .6; cursor: not-allowed; }
.hud-v2 .spin-big:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 12px; }

/* text SR-only (accesibilitate) */
.hud-v2 .visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* =======================
   RESPONSIVE
   ======================= */
@media (max-width: 640px) {
  .hud-v2 { gap: 14px; }
  .hud-v2 .hud-top {
    grid-template-columns: 1fr;   /* stivuim grupurile stânga/dreapta */
    gap: 12px;
  }
  .hud-v2 .ctrl-row { gap: 12px; }
    .hud-v2 .spin-big {
        width: clamp(120px, 30vw, 220px);
        height: clamp(120px, 30vw, 220px);
    }
  .hud-v2 .pill {
    padding: 9px 12px;
    min-height: 38px;
    font-size: 13px;
  }
}

/* motion friendly */
@media (prefers-reduced-motion: reduce) {
  .hud-v2 .pill,
  .hud-v2 .spin-big { transition: none; }
}

/* =======================
   RESPONSIVE
   ======================= */
@media (max-width: 640px) {
  .wpsp { padding: 12px; }
  .wpsp .frame { 
      max-width: 100%;
      padding: 10px; 
  }
}

@media (max-width: 400px) {
  .wpsp { padding: 8px; }
  .wpsp .frame { padding: 8px; }
}
