/* Tank Duel — modern arcade canvas (shared multiplayer UI in ../mp.css) */

.tanks-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.canvas-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #cfe8ff;
}

#battle {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.turn-banner {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 8px 20px;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
  pointer-events: none;
  white-space: nowrap;
}

/* ---------- Fire controls ---------- */
.fire-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 18px;
  box-shadow: var(--shadow);
}

.weapon-seg {
  flex-shrink: 0;
}

.dial {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dial label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.dial label b {
  color: var(--ink);
  font-size: 0.9rem;
}

.dial input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 5px;
  background: var(--line);
  outline: none;
}

.dial input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

/* ---------- Driving ---------- */
.drive-group {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.drive-btn {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.drive-btn:active {
  background: var(--ink);
  color: #fff;
}

.drive-btn:disabled {
  opacity: 0.35;
}

.fuel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 86px;
}

.fuel label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  text-align: center;
}

.fuel-bar {
  height: 10px;
  border-radius: 5px;
  background: var(--line);
  overflow: hidden;
}

#fuelFill {
  height: 100%;
  width: 100%;
  border-radius: 5px;
  background: #3fa557;
  transition: width 0.12s linear;
}

#fuelFill.low {
  background: #e3a008;
}

.fire-btn {
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  padding: 16px 36px;
  background: #e8590c;
  border-color: #e8590c;
}

.fire-btn:disabled {
  opacity: 0.5;
}

@media (max-width: 900px) {
  .fire-bar {
    flex-wrap: wrap;
    gap: 12px;
  }

  .dial {
    min-width: 160px;
  }
}
