/* Large Precision Spin Modal */
.spin-modal-card {
  padding: 24px 36px;
  gap: 14px;
}

.spin-pad-wrap {
  position: relative;
  width: 248px;
  height: 248px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spin-dir {
  position: absolute;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted);
  pointer-events: none;
}

.spin-dir.top { top: 0; left: 50%; transform: translateX(-50%); }
.spin-dir.bottom { bottom: 0; left: 50%; transform: translateX(-50%); }
.spin-dir.left { left: 0; top: 50%; transform: translateY(-50%); }
.spin-dir.right { right: 0; top: 50%; transform: translateY(-50%); }

.spin-ball-large {
  width: 196px;
  height: 196px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #ffffff 0%, #e2e8f0 58%, #94a3b8 100%);
  position: relative;
  cursor: crosshair;
  box-shadow: inset -8px -10px 18px rgba(0, 0, 0, 0.38), 0 12px 32px rgba(0, 0, 0, 0.65);
  touch-action: none;
}

.spin-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(15, 23, 42, 0.22);
  pointer-events: none;
}

.spin-ring.ring-outer { inset: 16%; }
.spin-ring.ring-inner { inset: 34%; }

.spin-dot-large {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ef4444;
  border: 2.5px solid #ffffff;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
}

.spin-readout {
  font-size: 12px;
  font-weight: 700;
  color: #fde047;
  font-variant-numeric: tabular-nums;
}

/* Bottom HUD */
.hud-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 8px 18px;
  flex-shrink: 0;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ctrl-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
}

.spin-ball {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e2e8f0 60%, #94a3b8 100%);
  position: relative;
  cursor: pointer;
  box-shadow: inset -2px -2px 5px rgba(0, 0, 0, 0.35), 0 2px 6px rgba(0, 0, 0, 0.5);
  transition: transform 0.15s, box-shadow 0.15s;
}

.spin-ball:hover {
  transform: scale(1.08);
  box-shadow: inset -2px -2px 5px rgba(0, 0, 0, 0.35), 0 0 12px rgba(234, 179, 8, 0.55);
}

.spin-crosshair {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.spin-crosshair::before,
.spin-crosshair::after {
  content: "";
  position: absolute;
  background: rgba(15, 23, 42, 0.22);
}

.spin-crosshair::before {
  left: 50%;
  top: 4px;
  bottom: 4px;
  width: 1px;
  transform: translateX(-0.5px);
}

.spin-crosshair::after {
  top: 50%;
  left: 4px;
  right: 4px;
  height: 1px;
  transform: translateY(-0.5px);
}

.spin-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  border: 1.5px solid #fff;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.power-control {
  flex: 0 1 360px;
}

.power-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 150px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e 0%, #eab308 55%, #ef4444 100%);
  outline: none;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.power-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f8fafc;
  border: 2.5px solid #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
  cursor: grab;
  transition: transform 0.1s;
}

.power-slider::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.power-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #f8fafc;
  border: 2.5px solid #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
  cursor: grab;
}

.power-pct {
  font-size: 13px;
  font-weight: 800;
  width: 30px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #fef08a;
}
.power-pct.cm {
  width: 62px;
  color: #7dd3fc;
}

/* Tirar: only on touch screens (iPad / phones), big enough for a finger */
.btn-shoot {
  display: none;
  min-width: 96px;
  min-height: 44px;
  padding: 8px 20px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.4px;
}
body.touch-device .btn-shoot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.status-hint {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  flex: 1;
}

/* Centered Quick Power Overlay (while adjusting power) */
.power-hud-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  width: 280px;
  max-width: 80vw;
  padding: 12px 18px 14px;
  border-radius: 16px;
  background: rgba(11, 16, 26, 0.72);
  backdrop-filter: blur(4px);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  z-index: 15;
  opacity: 0;
  transition: opacity 0.14s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.power-hud-overlay.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.power-hud-overlay.hidden {
  display: none;
}

.power-hud-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.power-hud-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #cbd5e1;
}

.power-hud-num {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #fde047;
}

.power-hud-track {
  position: relative;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.power-hud-fill {
  height: 100%;
  width: 50%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e 0%, #eab308 55%, #ef4444 100%);
  transition: width 0.05s linear;
}

.power-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1.5px;
  background: rgba(9, 12, 18, 0.55);
}

@media (max-width: 900px) {
  .status-hint {
    display: none;
  }
}

/* ---- CPU at the controls: visible spin readout & control focus ---- */
.spin-hud-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: 16px;
  background: rgba(11, 16, 26, 0.72);
  backdrop-filter: blur(4px);
  border: 1.5px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  pointer-events: none;
  z-index: 15;
  opacity: 0;
  transition: opacity 0.14s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.spin-hud-overlay.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.spin-hud-overlay.hidden {
  display: none;
}
.spin-hud-ball {
  position: relative;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e2e8f0 60%, #94a3b8 100%);
  box-shadow: inset -3px -3px 8px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(0, 0, 0, 0.5);
}
.spin-hud-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #ef4444;
  border: 2px solid #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}
.spin-hud-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 128px;
}
.spin-hud-readout {
  font-weight: 700;
  font-size: 15px;
  color: #f8fafc;
}

/* The control the CPU is currently "touching" glows like a focused input */
.spin-ball.cpu-focus {
  transform: scale(1.12);
  box-shadow: inset -2px -2px 5px rgba(0, 0, 0, 0.35), 0 0 0 3px rgba(234, 179, 8, 0.85), 0 0 14px rgba(234, 179, 8, 0.6);
}
.power-control.cpu-focus .power-slider {
  box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.75), 0 0 14px rgba(234, 179, 8, 0.5);
}

/* Concentración (◎): once per game; glows while it is on */
.btn-focus {
  margin-left: 6px;
  min-width: 30px;
  font-size: 15px;
  line-height: 1;
  color: #bfe3ff;
  border-color: rgba(150, 205, 255, 0.45);
}
.btn-focus:disabled {
  opacity: 0.35;
  cursor: default;
}
.btn-focus.on {
  background: rgba(120, 180, 255, 0.25);
  box-shadow: 0 0 12px rgba(150, 205, 255, 0.55);
  opacity: 1;
}
