/* Panzer-Arena – Präfix .mg-tanks- */
.mg-tanks {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #2b2d42;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.mg-tanks [hidden] { display: none !important; }

.mg-tanks-stage { position: absolute; inset: 0; }

.mg-tanks-hud {
  position: absolute;
  top: calc(var(--safe-top, 0px) + 4px);
  left: calc(var(--safe-left, 0px) + 6px);
  right: calc(var(--safe-right, 0px) + 6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
  z-index: 2;
}
.mg-tanks-players {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}
.mg-tanks-chip {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px 1px 3px;
  background: var(--c-panel, #fff6e0);
  color: var(--c-ink, #1b1b2f);
  border: 3px solid var(--c-outline, #1b1b2f);
  border-left: 7px solid var(--mg-tanks-c, #3a86ff);
  border-radius: 10px;
  box-shadow: 0 3px 0 var(--c-outline, #1b1b2f);
  font-size: 12px;
  line-height: 1;
  transition: opacity .3s, filter .3s;
}
.mg-tanks-chip.is-me { background: #fff1a8; }
.mg-tanks-chip.is-out { opacity: .45; filter: grayscale(1); }
.mg-tanks-chip.is-offline { opacity: .65; }
.mg-tanks-face { display: inline-flex; width: 22px; height: 22px; }
.mg-tanks-face svg { width: 100%; height: 100%; }
.mg-tanks-face.is-dot {
  width: 14px; height: 14px; margin: 4px;
  border-radius: 50%;
  background: var(--mg-tanks-c, #3a86ff);
  border: 2px solid var(--c-outline, #1b1b2f);
}
.mg-tanks-name {
  display: none;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}
.mg-tanks-hearts { display: inline-flex; gap: 1px; }
.mg-tanks-heart {
  color: #ff4d4d;
  font-size: 15px;
  text-shadow: 0 0 1px #1b1b2f, 1px 1px 0 #1b1b2f;
  transition: color .2s, transform .2s;
}
.mg-tanks-heart.is-lost { color: #9aa5b1; opacity: .5; transform: scale(.8); }

.mg-tanks-timer {
  flex: none;
  padding: 4px 8px;
  background: var(--c-panel, #fff6e0);
  color: var(--c-ink, #1b1b2f);
  border: 3px solid var(--c-outline, #1b1b2f);
  border-radius: 10px;
  box-shadow: 0 3px 0 var(--c-outline, #1b1b2f);
  font-family: "Press Start 2P", "Courier New", ui-monospace, monospace;
  font-size: 13px;
  font-weight: 700;
  min-width: 56px;
  text-align: center;
}
.mg-tanks-timer.is-danger {
  background: var(--c-bad, #ff4d4d);
  color: #fff;
  animation: mg-tanks-pulse 1s ease-in-out infinite;
}
@keyframes mg-tanks-pulse { 50% { transform: scale(1.08); } }

.mg-tanks-toast {
  position: absolute;
  left: 50%;
  top: calc(var(--safe-top, 0px) + 52px);
  transform: translate(-50%, -10px);
  padding: 6px 14px;
  background: var(--c-outline, #1b1b2f);
  color: #fff;
  border: 3px solid #fff;
  border-radius: 12px;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 4;
}
.mg-tanks-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

.mg-tanks-banner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-3deg);
  padding: 14px 22px;
  background: var(--c-accent, #ff4d6d);
  color: #fff;
  border: 4px solid var(--c-outline, #1b1b2f);
  border-radius: 16px;
  box-shadow: 0 6px 0 var(--c-outline, #1b1b2f);
  font-family: "Press Start 2P", "Courier New", ui-monospace, monospace;
  font-size: 16px;
  text-align: center;
  text-shadow: 2px 2px 0 #1b1b2f;
  pointer-events: none;
  z-index: 4;
  animation: mg-tanks-pop .35s ease-out;
}
.mg-tanks-banner.is-small {
  top: auto;
  bottom: calc(var(--safe-bottom, 0px) + 10px);
  transform: translate(-50%, 0);
  padding: 6px 12px;
  font-size: 11px;
  background: var(--c-outline, #1b1b2f);
  opacity: .85;
  animation: none;
}
@keyframes mg-tanks-pop {
  from { transform: translate(-50%, -50%) scale(.4) rotate(-12deg); opacity: 0; }
}

.mg-tanks-controls { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.mg-tanks-controls > * { pointer-events: auto; }

/* Tablet: gleiche Weltsicht, nur größeres HUD */
.mg-tanks--tablet .mg-tanks-name { display: inline-block; }
.mg-tanks--tablet .mg-tanks-chip { font-size: 14px; padding: 2px 8px 2px 4px; }
.mg-tanks--tablet .mg-tanks-face { width: 28px; height: 28px; }
.mg-tanks--tablet .mg-tanks-heart { font-size: 19px; }
.mg-tanks--tablet .mg-tanks-timer { font-size: 16px; padding: 6px 10px; }
.mg-tanks--tablet .mg-tanks-toast { font-size: 17px; top: calc(var(--safe-top, 0px) + 64px); }
.mg-tanks--tablet .mg-tanks-banner { font-size: 22px; }

/* ---------- Dauerfeuer (gemeinsam für Panzer, Battle Royale, Schiffe versenken) ---------- */
.mg-tanks-rapid-hidden { display: none !important; }
.mg-tanks-rapid-badge {
  --mg-tanks-rapid-p: 1;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 8px;
  color: #1b1b2f;
  background:
    linear-gradient(#ffd23f, #ffd23f) padding-box,
    conic-gradient(#ff3d00 calc(var(--mg-tanks-rapid-p) * 360deg), #fff6e0 0) border-box;
  border: 4px solid transparent;
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--c-outline, #1b1b2f), 0 0 12px rgba(255, 123, 0, 0.8);
  font: 700 14px/1 "Press Start 2P", "Courier New", ui-monospace, monospace;
  white-space: nowrap;
  pointer-events: none;
  animation: mg-tanks-rapid-pulse 0.6s ease-in-out infinite alternate;
}
@keyframes mg-tanks-rapid-pulse { from { transform: scale(1); } to { transform: scale(1.06); } }
.kit-ctl-btn.mg-tanks-rapid-on,
.mg-tanks-rapid-btn.mg-tanks-rapid-on { background: #ff7b00; color: #fff; box-shadow: 0 0 14px #ff7b00; }
.kit-ctl-btn.mg-tanks-rapid-off { opacity: 0.55; }
.mg-tanks-rapid-btn {
  min-width: 48px;
  min-height: 48px;
  padding: 6px 14px;
  border: 3px solid var(--c-outline, #1b1b2f);
  border-radius: 12px;
  background: #ffd23f;
  color: #1b1b2f;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 3px 0 var(--c-outline, #1b1b2f);
  touch-action: manipulation;
}
.mg-tanks-rapid-btn:disabled { opacity: 0.6; }
@media (prefers-reduced-motion: reduce) { .mg-tanks-rapid-badge { animation: none; } }
