/* Migs Arena – In-Game-HUD (nur HUD; Präfix .mp-). Dunkles Neon-Arcade-Design. */

.mp-hud-root { pointer-events: none; }

.mp-hud {
  position: absolute; inset: 0; overflow: hidden; z-index: 5;
  pointer-events: none; user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  font-family: 'Fredoka', 'Baloo 2', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #fff; line-height: 1.2;
}
.mp-hud * { box-sizing: border-box; }
.mp-hidden { display: none !important; }

/* ---------- Buttons ---------- */
.mp-btn {
  pointer-events: auto; cursor: pointer; font: inherit; color: #fff;
  border: 1px solid rgba(160, 175, 255, .22); border-radius: 12px;
  background: rgba(14, 16, 42, .72);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  touch-action: manipulation;
}
.mp-btn:hover { background: rgba(44, 50, 110, .88); box-shadow: 0 0 14px rgba(110, 140, 255, .35); }
.mp-btn:active { transform: scale(.93); }
.mp-btn:focus-visible { outline: 2px solid #7dfcff; outline-offset: 2px; }

/* ---------- oben links: Zähler, Rang, Kombo ---------- */
.mp-tl {
  position: absolute; left: 14px; top: 12px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
}
.mp-tl-btns { display: flex; gap: 6px; margin-bottom: 6px; }
.mp-exit, .mp-pausebtn { width: 34px; height: 34px; padding: 0; border-radius: 50%; font-size: 14px; line-height: 1; }
.mp-exit:hover { background: rgba(200, 30, 70, .8); }

.mp-me { --mp-c: #3d8bff; --mp-g: #9cc4ff; display: flex; align-items: baseline; gap: 8px; }
.mp-count {
  font-size: 56px; font-weight: 700; line-height: 1; letter-spacing: 1px;
  color: var(--mp-c); font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px var(--mp-g), 0 0 4px var(--mp-c), 0 3px 0 rgba(0, 0, 0, .5);
  transform-origin: 0 100%;
}
.mp-count.mp-bump { animation: mp-bump .18s ease-out; }
.mp-count-lbl {
  font-size: 14px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: var(--mp-g); opacity: .8;
}
.mp-rank { font-size: 17px; font-weight: 600; opacity: .92; text-shadow: 0 2px 6px rgba(0, 0, 0, .7); }
.mp-rank.mp-rank-1 { color: #ffd84a; text-shadow: 0 0 12px rgba(255, 200, 40, .75), 0 2px 4px #000; }

.mp-combo {
  margin-top: 6px; font-size: 24px; font-weight: 700; letter-spacing: 1px;
  color: #7dfcff; text-shadow: 0 0 14px #00e5ff, 0 2px 0 rgba(0, 0, 0, .55);
  transform-origin: 0 50%;
}
.mp-combo.mp-pop { animation: mp-pop .22s ease-out; }
.mp-combo.mp-combo-hot { color: #ffe066; text-shadow: 0 0 18px #ff8a00, 0 0 4px #ffb300, 0 2px 0 rgba(0, 0, 0, .55); }

/* ---------- oben Mitte: Timer, Ziel, Kill-Feed ---------- */
.mp-tc {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: min(46vw, 440px);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.mp-timer {
  font-size: 34px; font-weight: 700; padding: 2px 18px; border-radius: 16px;
  font-variant-numeric: tabular-nums;
  background: rgba(10, 12, 34, .58); border: 1px solid rgba(130, 150, 255, .28);
  text-shadow: 0 0 12px rgba(140, 170, 255, .85);
}
.mp-timer.mp-urgent {
  color: #ff4d6d; border-color: rgba(255, 77, 109, .7);
  text-shadow: 0 0 16px #ff1744, 0 0 4px #ff4d6d;
  box-shadow: 0 0 18px rgba(255, 23, 68, .35);
  animation: mp-pulse 1s ease-in-out infinite;
}
.mp-goal {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 15px; padding: 4px 12px; border-radius: 12px;
  background: rgba(10, 12, 34, .58); border: 1px solid rgba(255, 216, 74, .3);
}
.mp-goal b { color: #ffd84a; }
.mp-goal-stars { margin-left: 4px; letter-spacing: 1px; color: #ffd84a; text-shadow: 0 0 8px rgba(255, 200, 40, .65); }

.mp-feed { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 100%; }
.mp-feed-item {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 14px; padding: 3px 12px; border-radius: 10px;
  background: rgba(8, 10, 30, .62); border: 1px solid rgba(255, 255, 255, .08);
  text-shadow: 0 1px 2px #000;
  animation: mp-slide-in .25s ease-out;
  transition: opacity .55s ease, transform .55s ease;
}
.mp-feed-item b { font-weight: 700; }
.mp-feed-item.mp-out { opacity: 0; transform: translateY(-6px); }
.mp-feed-you { border-color: rgba(125, 252, 255, .55); box-shadow: 0 0 10px rgba(0, 229, 255, .25); }
.mp-feed-bad { border-color: rgba(255, 77, 109, .6); box-shadow: 0 0 10px rgba(255, 23, 68, .25); }

/* ---------- oben rechts: Rangliste, Raum, Ping ---------- */
.mp-tr {
  position: absolute; right: 12px; top: 12px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.mp-board {
  min-width: 196px; padding: 6px 8px; border-radius: 14px;
  background: rgba(10, 12, 34, .58); border: 1px solid rgba(130, 150, 255, .2);
}
.mp-board:empty { display: none; }
.mp-row { display: flex; align-items: center; gap: 7px; padding: 2px 4px; border-radius: 8px; font-size: 14px; }
.mp-row.mp-you { font-weight: 600; background: rgba(125, 252, 255, .14); box-shadow: inset 0 0 0 1px rgba(125, 252, 255, .45); }
.mp-row.mp-dead { opacity: .5; }
.mp-pos { width: 20px; text-align: center; font-size: 13px; opacity: .85; }
.mp-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 6px rgba(255, 255, 255, .45); }
.mp-name { flex: 1; max-width: 124px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-num { min-width: 34px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.mp-row-sep { text-align: center; font-size: 12px; line-height: 1; opacity: .5; }

.mp-room { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.mp-room-code {
  pointer-events: auto; display: flex; align-items: center; gap: 8px;
  padding: 5px 6px 5px 12px; border-radius: 14px;
  background: rgba(10, 12, 34, .72); border: 1px solid rgba(167, 125, 255, .5);
  box-shadow: 0 0 14px rgba(167, 125, 255, .28);
}
.mp-room-lbl { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; opacity: .7; }
.mp-room-val { font-size: 20px; letter-spacing: 3px; color: #d6c2ff; text-shadow: 0 0 10px #a77dff; }
.mp-copy { padding: 5px 10px; border-radius: 10px; font-size: 13px; }
.mp-ping {
  padding: 2px 8px; border-radius: 8px; font-size: 12px;
  background: rgba(10, 12, 34, .5); color: #8dffb0;
}
.mp-ping.mp-ping-ok { color: #ffd84a; }
.mp-ping.mp-ping-bad { color: #ff6b81; }

/* ---------- Power-ups unten Mitte ---------- */
.mp-powers {
  position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 10px;
}
.mp-pw {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 14px;
  background: rgba(10, 12, 34, .68); border: 1px solid rgba(255, 255, 255, .18);
  animation: mp-pop .25s ease-out;
}
.mp-pw-ico { font-size: 22px; line-height: 1; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .55)); }
.mp-pw-bar { width: 72px; height: 8px; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, .12); }
.mp-pw-bar i { display: block; width: 100%; height: 100%; border-radius: 4px; transition: width .1s linear; }
.mp-pw-speed { border-color: rgba(255, 196, 0, .5); }
.mp-pw-speed .mp-pw-bar i { background: linear-gradient(90deg, #ff9100, #ffe066); box-shadow: 0 0 8px #ffb300; }
.mp-pw-magnet { border-color: rgba(255, 106, 213, .5); }
.mp-pw-magnet .mp-pw-bar i { background: linear-gradient(90deg, #d500f9, #ff6ad5); box-shadow: 0 0 8px #ff6ad5; }
.mp-pw-shield { border-color: rgba(0, 229, 255, .5); }
.mp-pw-shield .mp-pw-bar i { background: linear-gradient(90deg, #00b8d4, #7dfcff); box-shadow: 0 0 8px #00e5ff; }
.mp-pw.mp-pw-low { animation: mp-blink .45s steps(2) infinite; }
.mp-pw.mp-pw-unknown .mp-pw-bar i { animation: mp-blink .9s ease-in-out infinite; }

/* ---------- große Meldungen ---------- */
.mp-center {
  position: absolute; left: 50%; top: 28%; transform: translate(-50%, -50%);
  width: 92vw; display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
}
.mp-msg { animation: mp-msg-in .38s cubic-bezier(.2, 1.6, .4, 1); transition: opacity .35s ease, transform .35s ease; }
.mp-msg.mp-out { opacity: 0; transform: scale(.9) translateY(-10px); }
.mp-msg-main {
  font-size: 40px; font-weight: 700; line-height: 1.1;
  text-shadow: 0 0 22px rgba(120, 160, 255, .9), 0 4px 0 rgba(0, 0, 0, .5);
}
.mp-msg-sub { margin-top: 4px; font-size: 17px; opacity: .92; text-shadow: 0 2px 6px #000, 0 0 2px #000; }
.mp-msg-title { order: -1; }
.mp-msg-title .mp-msg-main { font-size: 34px; color: #ffd84a; text-shadow: 0 0 20px rgba(255, 170, 0, .8), 0 3px 0 rgba(0, 0, 0, .5); }
.mp-msg-count .mp-msg-main { font-size: 124px; text-shadow: 0 0 30px #00e5ff, 0 0 60px #3d8bff, 0 6px 0 rgba(0, 0, 0, .5); }
.mp-msg-go .mp-msg-main { font-size: 100px; color: #8dff5a; text-shadow: 0 0 30px #5dff2a, 0 0 70px #2ecc40, 0 6px 0 rgba(0, 0, 0, .5); }
.mp-msg-good .mp-msg-main { color: #7dfcff; text-shadow: 0 0 22px #00e5ff, 0 4px 0 rgba(0, 0, 0, .5); }
.mp-msg-bad .mp-msg-main { color: #ff6b81; text-shadow: 0 0 22px #ff1744, 0 4px 0 rgba(0, 0, 0, .5); }
.mp-msg-gold .mp-msg-main { color: #ffd84a; text-shadow: 0 0 24px #ffab00, 0 4px 0 rgba(0, 0, 0, .5); }
.mp-msg-win .mp-msg-main { font-size: 66px; color: #ffd84a; text-shadow: 0 0 30px #ffab00, 0 0 70px #ff6d00, 0 5px 0 rgba(0, 0, 0, .5); }
.mp-msg-warn .mp-msg-main { color: #ff8a65; text-shadow: 0 0 22px #ff3d00, 0 4px 0 rgba(0, 0, 0, .5); }
.mp-msg-big .mp-msg-main { font-size: 66px; }
.mp-msg-power .mp-msg-main { font-size: 30px; }
.mp-msg-info .mp-msg-main { font-size: 30px; color: #cfd8ff; animation: mp-breathe 1.6s ease-in-out infinite; }

/* ---------- Vignette & Tod ---------- */
.mp-vignette {
  position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(ellipse at center, rgba(255, 0, 40, 0) 52%, rgba(255, 0, 40, .55) 100%);
  transition: opacity .12s linear;
}
.mp-death {
  position: absolute; left: 50%; top: 62%; transform: translateX(-50%);
  width: max-content; max-width: 90vw; box-sizing: border-box; padding: 14px 26px; border-radius: 18px; text-align: center;
  background: rgba(22, 4, 16, .74); border: 1px solid rgba(255, 77, 109, .55);
  box-shadow: 0 0 30px rgba(255, 23, 68, .3);
  animation: mp-msg-in .4s cubic-bezier(.2, 1.6, .4, 1);
}
.mp-death-title { font-size: 26px; font-weight: 700; }
.mp-death-title b { color: #ff6b81; }
.mp-death-sub { margin-top: 4px; font-size: 18px; opacity: .85; }

/* ---------- Emotes unten rechts ---------- */
.mp-emotes {
  position: absolute; right: 12px; bottom: 14px;
  display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 6px;
}
.mp-emote-toggle { display: none; width: 52px; height: 52px; padding: 0; border-radius: 50%; font-size: 26px; }
.mp-emote-list { display: grid; grid-template-columns: repeat(4, 44px); gap: 6px; }
.mp-emote { position: relative; width: 44px; height: 44px; padding: 0; border-radius: 12px; font-size: 22px; line-height: 1; }
.mp-emote.mp-flash { animation: mp-pop .3s ease-out; background: rgba(125, 252, 255, .35); }
.mp-key { position: absolute; right: 4px; bottom: 2px; font-size: 9px; opacity: .55; }
.mp-touch .mp-emote-toggle { display: block; }
.mp-touch .mp-emote-list { display: none; }
.mp-touch .mp-emotes.mp-open .mp-emote-list { display: grid; grid-template-columns: repeat(2, 48px); }
.mp-touch .mp-emote { width: 48px; height: 48px; }
.mp-touch .mp-key { display: none; }

/* ---------- Touch-Joystick ---------- */
.mp-joy {
  position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%;
  border: 2px solid rgba(125, 252, 255, .45);
  background: radial-gradient(circle, rgba(125, 252, 255, .1), rgba(125, 252, 255, .02) 70%);
  box-shadow: 0 0 18px rgba(0, 229, 255, .25), inset 0 0 18px rgba(0, 229, 255, .15);
}
.mp-joy-knob {
  position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px;
  border-radius: 50%; opacity: .88;
  background: radial-gradient(circle at 35% 35%, #c8fbff, #00b8d4);
  box-shadow: 0 0 16px #00e5ff;
}

/* ---------- Overlays (Pause, Bestätigung) ---------- */
.mp-overlay {
  position: absolute; inset: 0; z-index: 3; pointer-events: auto;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 5, 18, .62);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: mp-fade .2s ease-out;
}
.mp-panel {
  min-width: 280px; max-width: 90vw; padding: 24px 26px; border-radius: 22px; text-align: center;
  background: linear-gradient(160deg, rgba(32, 36, 90, .96), rgba(14, 16, 46, .96));
  border: 1px solid rgba(130, 150, 255, .38);
  box-shadow: 0 0 40px rgba(80, 110, 255, .3), 0 20px 50px rgba(0, 0, 0, .5);
  animation: mp-msg-in .3s cubic-bezier(.2, 1.5, .4, 1);
}
.mp-panel-title { font-size: 34px; font-weight: 700; text-shadow: 0 0 16px rgba(120, 160, 255, .9); }
.mp-panel-sub { margin: 6px 0 18px; font-size: 15px; opacity: .8; }
.mp-panel-btns { display: flex; flex-direction: column; gap: 10px; }
.mp-big { padding: 12px 20px; border-radius: 14px; font-size: 20px; font-weight: 700; }
.mp-primary {
  background: linear-gradient(180deg, #4ce06a, #1fa84a); border-color: #8dff9e;
  box-shadow: 0 0 18px rgba(76, 224, 106, .45), 0 4px 0 #137a33;
}
.mp-primary:hover { background: linear-gradient(180deg, #5cf07a, #26b955); }
.mp-danger { background: linear-gradient(180deg, #ff5b77, #c81d45); border-color: #ff9fb0; box-shadow: 0 4px 0 #861332; }
.mp-danger:hover { background: linear-gradient(180deg, #ff7088, #d92a52); }
.mp-ghost { background: rgba(255, 255, 255, .06); }

/* ---------- Animationen ---------- */
@keyframes mp-bump { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes mp-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes mp-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@keyframes mp-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes mp-breathe { 0%, 100% { opacity: .65; } 50% { opacity: 1; } }
@keyframes mp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mp-slide-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes mp-msg-in { 0% { opacity: 0; transform: scale(.5); } 100% { opacity: 1; transform: scale(1); } }

/* ---------- Responsiv ---------- */
@media (max-width: 760px), (max-height: 520px) {
  .mp-tl { left: 10px; top: 8px; }
  .mp-count { font-size: 38px; }
  .mp-count-lbl { font-size: 11px; }
  .mp-rank { font-size: 14px; }
  .mp-combo { font-size: 18px; }
  .mp-tc { top: 8px; width: min(44vw, 300px); gap: 4px; }
  .mp-timer { font-size: 24px; padding: 1px 12px; }
  .mp-goal { font-size: 12px; padding: 3px 8px; }
  .mp-feed-item { font-size: 12px; padding: 2px 8px; }
  .mp-feed-item:nth-child(n+3) { display: none; }
  .mp-tr { right: 8px; top: 8px; }
  .mp-board { min-width: 138px; padding: 4px 5px; }
  .mp-row { font-size: 12px; gap: 5px; }
  .mp-name { max-width: 78px; }
  .mp-num { min-width: 26px; }
  .mp-powers { left: auto; right: 74px; bottom: 16px; transform: none; flex-direction: column-reverse; align-items: flex-end; gap: 6px; }
  .mp-pw { padding: 4px 8px; }
  .mp-pw-ico { font-size: 18px; }
  .mp-pw-bar { width: 48px; }
  .mp-msg-main { font-size: 28px; }
  .mp-msg-sub { font-size: 14px; }
  .mp-msg-title .mp-msg-main { font-size: 24px; }
  .mp-msg-count .mp-msg-main { font-size: 84px; }
  .mp-msg-go .mp-msg-main { font-size: 68px; }
  .mp-msg-win .mp-msg-main, .mp-msg-big .mp-msg-main { font-size: 44px; }
  .mp-death-title { font-size: 20px; }
  .mp-death-sub { font-size: 15px; }
  .mp-room-val { font-size: 16px; letter-spacing: 2px; }
}
@media (max-width: 520px) {
  /* Hochformat: Ziel & Kill-Feed unter die Rangliste schieben */
  .mp-board .mp-row:nth-child(n+4):not(.mp-you) { display: none; }
  .mp-name { max-width: 64px; }
  .mp-tc { width: 62vw; }
  .mp-timer { margin-bottom: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .mp-timer.mp-urgent, .mp-pw.mp-pw-low, .mp-msg-info .mp-msg-main { animation: none; }
}

/* =====================================================================
   V2: Modi, Herausforderung, Zuschauer, Twitch, Lobby, Gamepad
   ===================================================================== */

/* ---------- Modus-Chip & Modus-Box (unter dem Timer) ---------- */
.mp-modechip {
  margin-top: -2px; padding: 1px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .5px;
  background: rgba(10, 12, 34, .55); border: 1px solid rgba(255, 255, 255, .14); opacity: .9;
}
.mp-modebox { width: 100%; display: flex; flex-direction: column; align-items: center; }

/* Team-Schlacht: Balken Blau | Rot */
.mp-teams { width: min(100%, 360px); }
.mp-teambar {
  display: flex; height: 14px; border-radius: 8px; overflow: hidden; gap: 2px;
  background: rgba(10, 12, 34, .7); border: 1px solid rgba(255, 255, 255, .18);
  box-shadow: 0 0 14px rgba(0, 0, 0, .4);
}
.mp-teambar i { display: block; height: 100%; transition: flex-grow .35s ease; min-width: 6px; opacity: .85; }
.mp-teambar i.mp-tlead { opacity: 1; box-shadow: inset 0 0 10px rgba(255, 255, 255, .55); animation: mp-shine 1.6s ease-in-out infinite; }
.mp-teamlbl { display: flex; justify-content: space-between; margin-top: 3px; font-size: 13px; font-weight: 600; text-shadow: 0 1px 3px #000; }
.mp-tname b { font-variant-numeric: tabular-nums; }
.mp-tname.mp-tmine { text-shadow: 0 0 10px currentColor, 0 1px 3px #000; }

/* Letzter Schwarm: Sturm-Timer */
.mp-storm {
  display: flex; gap: 12px; align-items: center; padding: 3px 12px; border-radius: 12px; font-size: 15px;
  background: rgba(30, 8, 50, .7); border: 1px solid rgba(178, 107, 255, .45); color: #e4d2ff;
}
.mp-storm b { color: #fff; font-variant-numeric: tabular-nums; }
.mp-storm.mp-storm-on { border-color: rgba(214, 120, 255, .85); box-shadow: 0 0 16px rgba(178, 107, 255, .45); }
.mp-alive { opacity: .92; }

/* Nestkönig: Punkte-Rennen */
.mp-koth {
  width: min(100%, 320px); padding: 5px 9px; border-radius: 12px;
  background: rgba(6, 28, 26, .66); border: 1px solid rgba(46, 230, 184, .4);
}
.mp-khead { font-size: 12px; text-align: center; margin-bottom: 3px; opacity: .9; }
.mp-khead b { color: #2ee6b8; }
.mp-krow { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 1px 0; }
.mp-krow.mp-you { font-weight: 700; }
.mp-kname { width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-kbar { flex: 1; height: 8px; border-radius: 4px; overflow: hidden; background: rgba(255, 255, 255, .1); }
.mp-kbar i { display: block; height: 100%; border-radius: 4px; transition: width .2s linear; }
.mp-krow.mp-kown .mp-kbar { box-shadow: 0 0 0 1px #ffd84a, 0 0 10px rgba(255, 216, 74, .55); }
.mp-kval { width: 26px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.mp-kstat { margin-top: 3px; text-align: center; font-size: 13px; }
.mp-kstat.mp-kmine { color: #ffd84a; font-weight: 700; text-shadow: 0 0 12px rgba(255, 200, 40, .8); animation: mp-breathe 1.2s ease-in-out infinite; }
.mp-kstat.mp-kfree { color: #8dffdf; }

/* Zombie-Migs: Menschen vs. Zombies */
.mp-inf { width: min(100%, 320px); }
.mp-inf-wait {
  padding: 4px 12px; border-radius: 12px; text-align: center; font-size: 15px;
  background: rgba(14, 32, 8, .7); border: 1px solid rgba(125, 220, 58, .5); animation: mp-breathe 1s ease-in-out infinite;
}
.mp-ibar { display: flex; height: 12px; gap: 2px; border-radius: 7px; overflow: hidden; background: rgba(10, 12, 34, .7); border: 1px solid rgba(255, 255, 255, .16); }
.mp-ibar i { display: block; height: 100%; transition: flex-grow .35s ease; }
.mp-ih { background: linear-gradient(90deg, #4fa3ff, #9cc4ff); }
.mp-iz { background: linear-gradient(90deg, #4f9a1c, #7ddc3a); box-shadow: inset 0 0 8px rgba(255, 40, 40, .5); }
.mp-ilbl { display: flex; justify-content: space-between; font-size: 13px; margin-top: 2px; text-shadow: 0 1px 3px #000; }
/* Rollen-Zeile als kleine Pille, damit sie über großen Schwärmen lesbar bleibt */
.mp-irole {
  width: fit-content; margin: 4px auto 0; padding: 2px 12px; border-radius: 999px;
  text-align: center; font-size: 13px; font-weight: 600; color: #9cc4ff;
  background: rgba(8, 10, 30, .62); border: 1px solid rgba(156, 196, 255, .22); text-shadow: 0 1px 2px #000;
}
.mp-irole.mp-izombie { color: #9dff5c; text-shadow: 0 0 10px rgba(125, 220, 58, .8); border-color: rgba(125, 220, 58, .4); }

/* Turbo */
.mp-rush {
  padding: 2px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; letter-spacing: .5px;
  color: #ffb27a; background: rgba(40, 14, 4, .66); border: 1px solid rgba(255, 122, 69, .55);
  text-shadow: 0 0 10px #ff7a45; animation: mp-breathe 1.4s ease-in-out infinite;
}

/* ---------- Herausforderung: Live-Vergleich ---------- */
.mp-chal {
  position: relative; max-width: 100%; padding: 4px 12px 8px; border-radius: 12px; font-size: 15px; white-space: nowrap;
  background: rgba(10, 12, 34, .7); border: 1px solid rgba(255, 106, 213, .5);
  box-shadow: 0 0 14px rgba(255, 106, 213, .2); overflow: hidden;
}
.mp-chal b { color: #ffd84a; font-variant-numeric: tabular-nums; }
.mp-chal .mp-chal-me { color: #7dfcff; }
.mp-chal-who { color: #ff9be4; font-weight: 600; margin-right: 4px; }
.mp-chal-up { color: #8dff5a; font-weight: 700; }
.mp-chal-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .08); }
.mp-chal-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff6ad5, #7dfcff); transition: width .2s linear; }
.mp-chal.mp-chal-win { border-color: rgba(141, 255, 90, .75); box-shadow: 0 0 18px rgba(141, 255, 90, .35); }
.mp-chal.mp-chal-win .mp-chal-bar i { background: linear-gradient(90deg, #8dff5a, #ffd84a); }

/* ---------- Rangliste: Zusätze ---------- */
.mp-num-u { font-style: normal; font-size: 10px; opacity: .7; margin-left: 1px; }
.mp-row.mp-zombie .mp-name { color: #9dff5c; }
.mp-me.mp-me-zombie .mp-count { color: #9dff5c; text-shadow: 0 0 18px #4f9a1c, 0 0 4px #9dff5c, 0 3px 0 rgba(0, 0, 0, .5); }

/* ---------- Meldungs-Varianten ---------- */
.mp-msg-zombie .mp-msg-main { color: #9dff5c; text-shadow: 0 0 24px #4f9a1c, 0 0 6px #ff3030, 0 4px 0 rgba(0, 0, 0, .5); }
.mp-msg-storm .mp-msg-main { color: #e4c2ff; text-shadow: 0 0 24px #b26bff, 0 0 60px #6a1fd1, 0 4px 0 rgba(0, 0, 0, .5); }
.mp-feed-tw { border-color: rgba(145, 70, 255, .6); box-shadow: 0 0 10px rgba(145, 70, 255, .3); }
.mp-feed-zombie { border-color: rgba(125, 220, 58, .55); }
.mp-feed-storm { border-color: rgba(178, 107, 255, .55); }
.mp-feed-chat { white-space: normal; text-align: left; border-color: rgba(125, 252, 255, .25); }

/* ---------- Modus-Intro-Banner ---------- */
.mp-intro {
  --mp-mc: #7dfcff;
  position: absolute; left: 50%; top: 60%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px; max-width: min(620px, 92vw);
  width: max-content; box-sizing: border-box;   /* sonst schrumpft der Kasten ab left:50% auf die halbe Breite (Handy) */
  padding: 14px 24px 14px 18px; border-radius: 22px;
  background: linear-gradient(120deg, rgba(10, 12, 34, .9), rgba(24, 18, 60, .86));
  border: 2px solid var(--mp-mc);
  box-shadow: 0 0 28px rgba(125, 252, 255, .25), 0 16px 40px rgba(0, 0, 0, .5);
  transition: opacity .4s ease, transform .4s ease;
}
.mp-intro.mp-intro-on { animation: mp-intro-in .6s cubic-bezier(.2, 1.5, .4, 1); }
.mp-intro.mp-out { opacity: 0; transform: translateX(-50%) translateY(14px) scale(.96); }
.mp-intro-ico { font-size: 64px; line-height: 1; filter: drop-shadow(0 0 14px var(--mp-mc)); animation: mp-wobble 1.4s ease-in-out infinite; }
.mp-intro-kicker { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; opacity: .7; }
.mp-intro-name { font-size: 34px; font-weight: 700; line-height: 1.05; color: var(--mp-mc); text-shadow: 0 0 18px var(--mp-mc), 0 3px 0 rgba(0, 0, 0, .5); }
.mp-intro-desc { margin-top: 4px; font-size: 16px; opacity: .95; }
.mp-intro-tip { margin-top: 6px; font-size: 14px; opacity: .8; }

/* ---------- Twitch-Alert ---------- */
.mp-alert {
  --mp-ac: #9146ff;
  position: absolute; left: 50%; top: 17%; transform: translateX(-50%); z-index: 2;
  display: flex; align-items: center; gap: 16px; max-width: min(760px, 94vw);
  width: max-content; box-sizing: border-box;
  padding: 14px 26px 14px 16px; border-radius: 22px;
  background: linear-gradient(110deg, rgba(60, 20, 120, .95), rgba(145, 70, 255, .9) 55%, rgba(60, 20, 120, .95));
  background-size: 220% 100%;
  border: 2px solid #c9a4ff;
  box-shadow: 0 0 40px rgba(145, 70, 255, .75), 0 0 0 6px rgba(145, 70, 255, .18), 0 18px 40px rgba(0, 0, 0, .5);
  transition: opacity .4s ease, transform .4s ease;
}
.mp-alert.mp-alert-on { animation: mp-alert-in .7s cubic-bezier(.2, 1.6, .4, 1), mp-alert-sweep 2.4s linear infinite; }
.mp-alert.mp-out { opacity: 0; transform: translateX(-50%) translateY(-16px) scale(.95); }
/* Während ein Twitch-Banner steht: Meldungen unter den Banner schieben, Feed zurücknehmen (nichts liegt übereinander) */
.mp-alerting .mp-center { top: 40%; transition: top .3s ease; }
.mp-alerting .mp-center .mp-msg-main { font-size: 30px; }
.mp-alerting .mp-feed { opacity: .25; transition: opacity .3s ease; }
.mp-alert-ico {
  flex: none; width: 72px; height: 72px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 44px; background: radial-gradient(circle, var(--mp-ac), rgba(0, 0, 0, .25) 72%);
  box-shadow: 0 0 22px var(--mp-ac); animation: mp-wobble 1s ease-in-out infinite;
}
.mp-alert-main { font-size: 26px; font-weight: 700; line-height: 1.15; text-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.mp-alert-main b { color: #ffe066; }
.mp-alert-main span { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .45); text-underline-offset: 4px; }
.mp-alert-sub { margin-top: 4px; font-size: 15px; opacity: .9; }

/* ---------- Sturm-Warnung ---------- */
.mp-stormvig {
  position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .3s ease;
  background: radial-gradient(ellipse at center, rgba(120, 30, 200, 0) 45%, rgba(120, 30, 200, .6) 100%);
}
.mp-stormvig.mp-on { opacity: 1; animation: mp-breathe 1s ease-in-out infinite; }
.mp-stormwarn {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%);
  width: max-content; max-width: 92vw; box-sizing: border-box;
  display: flex; align-items: center; gap: 14px; padding: 10px 20px; border-radius: 18px;
  background: rgba(40, 6, 60, .82); border: 2px solid #d678ff;
  box-shadow: 0 0 30px rgba(178, 107, 255, .6); animation: mp-warn-pulse .9s ease-in-out infinite;
}
.mp-storm-arrow { font-size: 40px; line-height: 1; color: #ffe066; text-shadow: 0 0 14px #ffb300; transition: transform .15s linear; }
.mp-storm-main { font-size: 24px; font-weight: 700; color: #ffd0ff; }
.mp-storm-sub { font-size: 14px; opacity: .9; }

/* ---------- Zuschauer ---------- */
.mp-spectating .mp-me, .mp-spectating .mp-rank, .mp-spectating .mp-combo, .mp-spectating .mp-powers,
.mp-spectating .mp-emotes, .mp-watch .mp-emotes, .mp-watch .mp-powers { display: none !important; }
.mp-spec { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; max-width: 230px; }
.mp-spec-chip {
  align-self: flex-start; padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: rgba(10, 12, 34, .78); border: 1px solid rgba(125, 252, 255, .55); box-shadow: 0 0 12px rgba(0, 229, 255, .25);
}
.mp-spec-chip b { color: #7dfcff; }
.mp-spec-list { display: flex; flex-direction: column; gap: 3px; }
.mp-spec-row, .mp-spec-auto {
  display: flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 9px; font-size: 13px; text-align: left;
}
.mp-spec-row.mp-on, .mp-spec-auto.mp-on { background: rgba(125, 252, 255, .2); border-color: rgba(125, 252, 255, .6); }
.mp-spec-row.mp-dead { opacity: .5; }
.mp-spec-hint { font-size: 11px; opacity: .55; }
.mp-touch .mp-spec-hint { display: none; }

/* ---------- Toasts ---------- */
.mp-toasts {
  position: absolute; left: 50%; bottom: 74px; transform: translateX(-50%);
  width: max-content; max-width: 92vw;
  display: flex; flex-direction: column-reverse; align-items: center; gap: 6px;
}
.mp-toast {
  padding: 7px 16px; border-radius: 14px; font-size: 15px; font-weight: 600; white-space: nowrap;
  background: rgba(14, 16, 42, .9); border: 1px solid rgba(125, 252, 255, .45);
  box-shadow: 0 0 16px rgba(0, 229, 255, .25); animation: mp-slide-up .3s ease-out;
  transition: opacity .4s ease, transform .4s ease;
}
.mp-toast.mp-out { opacity: 0; transform: translateY(8px); }

/* ---------- Chat im Spiel ---------- */
.mp-chatbox { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); width: min(460px, 90vw); }
.mp-chat-input, .mp-lobby-input {
  width: 100%; font: inherit; font-size: 16px; color: #fff; padding: 9px 14px; border-radius: 12px; outline: none;
  background: rgba(10, 12, 34, .92); border: 1px solid rgba(125, 252, 255, .55); box-shadow: 0 0 16px rgba(0, 229, 255, .25);
}

/* ---------- OBS-Overlay: schlankes HUD + Mitmachen-Kasten ---------- */
.mp-obs .mp-emotes, .mp-obs .mp-pausebtn { display: none !important; }
.mp-obs .mp-feed-item:nth-child(n+3) { display: none; }
.mp-obs .mp-board .mp-row:nth-child(n+4):not(.mp-you) { display: none; }
.mp-join {
  position: absolute; right: 14px; bottom: 14px; padding: 10px 12px; border-radius: 18px; max-width: 330px;
  background: linear-gradient(150deg, rgba(60, 20, 120, .92), rgba(16, 12, 40, .92));
  border: 2px solid #9146ff; box-shadow: 0 0 26px rgba(145, 70, 255, .55);
}
.mp-join-title { font-size: 22px; font-weight: 700; color: #e9dcff; text-shadow: 0 0 12px #9146ff; margin-bottom: 6px; }
.mp-join-row { display: flex; gap: 10px; align-items: center; }
.mp-join-qr { flex: none; width: 116px; height: 116px; border-radius: 8px; background: #fff; image-rendering: pixelated; }
.mp-join-url { font-size: 15px; font-weight: 700; word-break: break-all; color: #ffe066; }
.mp-join-hint { margin-top: 4px; font-size: 13px; opacity: .9; }

/* ---------- Raum-Chip Twitch ---------- */
.mp-room-val.mp-room-tw { color: #e3d2ff; text-shadow: 0 0 10px #9146ff; letter-spacing: 1px; }

/* ---------- Lobby (eingebaut, wenn die App keine eigene zeigt) ---------- */
.mp-in-lobby .mp-tl > :not(.mp-tl-btns), .mp-in-lobby .mp-tc, .mp-in-lobby .mp-board, .mp-in-lobby .mp-powers,
.mp-in-lobby .mp-emotes, .mp-in-lobby .mp-death, .mp-in-lobby .mp-stormwarn, .mp-in-lobby .mp-intro { display: none !important; }
.mp-lobby-app > :not(.mp-toasts):not(.mp-alert):not(.mp-overlay) { display: none !important; }
.mp-lobbyov {
  position: absolute; inset: 0; z-index: 2; pointer-events: auto; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(20, 22, 70, .55), rgba(4, 5, 18, .82));
}
.mp-lobby {
  width: min(620px, 94vw); max-height: 92vh; overflow: auto; padding: 18px 20px; border-radius: 24px;
  background: linear-gradient(160deg, rgba(32, 36, 90, .97), rgba(14, 16, 46, .97));
  border: 1px solid rgba(130, 150, 255, .45); box-shadow: 0 0 46px rgba(80, 110, 255, .35), 0 20px 50px rgba(0, 0, 0, .5);
  animation: mp-msg-in .35s cubic-bezier(.2, 1.5, .4, 1);
}
.mp-lobby-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.mp-lobby-kicker { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; opacity: .7; }
.mp-lobby-code { font-size: 46px; font-weight: 700; letter-spacing: 8px; line-height: 1; color: #d6c2ff; text-shadow: 0 0 18px #a77dff; }
.mp-lobby-copy { padding: 10px 14px; border-radius: 12px; font-size: 15px; font-weight: 600; }
.mp-lobby-members { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.mp-lm {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; font-size: 16px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08);
}
.mp-lm.mp-you { border-color: rgba(125, 252, 255, .5); }
.mp-lm.mp-lm-ok { background: rgba(76, 224, 106, .1); }
.mp-lm-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-lm-ready { font-size: 13px; opacity: .85; }
.mp-lm-kick { width: 28px; height: 28px; padding: 0; border-radius: 50%; font-size: 12px; }
.mp-lset-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.mp-lchip { padding: 6px 10px; border-radius: 999px; font-size: 14px; }
.mp-lchip.mp-on { background: linear-gradient(180deg, #4c6cff, #2a3cc0); border-color: #9fb2ff; box-shadow: 0 0 12px rgba(80, 110, 255, .55); }
.mp-lchip[disabled] { cursor: default; opacity: .6; }
.mp-lchip.mp-on[disabled] { opacity: 1; }
.mp-lobby-hint { font-size: 13px; opacity: .7; margin: 2px 0 6px; }
.mp-lobby-btns { display: flex; gap: 10px; margin: 10px 0; }
.mp-lobby-btns .mp-big { flex: 1; }
.mp-lobby-ready.mp-on { background: linear-gradient(180deg, #4ce06a, #1fa84a); border-color: #8dff9e; }
.mp-lobby-start.mp-pulse { animation: mp-pulse 1s ease-in-out infinite; }
.mp-lobby-chat {
  height: 110px; overflow-y: auto; padding: 6px 10px; border-radius: 12px; font-size: 14px; margin-bottom: 6px;
  background: rgba(4, 5, 18, .55); border: 1px solid rgba(255, 255, 255, .08);
}
.mp-lc-line { padding: 1px 0; word-break: break-word; }
.mp-lobby-chatrow { display: flex; gap: 6px; }
.mp-lobby-send { width: 44px; border-radius: 12px; font-size: 18px; }
.mp-lobby-pad, .mp-panel-pad { display: none; margin-top: 8px; font-size: 12px; opacity: .6; text-align: center; }
.mp-has-pad .mp-lobby-pad, .mp-has-pad .mp-panel-pad { display: block; }

/* ---------- Gamepad-Fokus in Dialogen ---------- */
.mp-btn.mp-padfocus { outline: none; box-shadow: 0 0 0 3px #7dfcff, 0 0 22px rgba(0, 229, 255, .8); }
.mp-has-pad .mp-btn.mp-padfocus { transform: scale(1.04); }

/* ---------- Animationen V2 ---------- */
@keyframes mp-intro-in { 0% { opacity: 0; transform: translateX(-50%) translateY(30px) scale(.7); } 100% { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes mp-alert-in { 0% { opacity: 0; transform: translateX(-50%) translateY(-40px) scale(.6) rotate(-3deg); } 100% { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes mp-alert-sweep { from { background-position: 0% 0; } to { background-position: 220% 0; } }
@keyframes mp-wobble { 0%, 100% { transform: rotate(-6deg) scale(1); } 50% { transform: rotate(6deg) scale(1.08); } }
@keyframes mp-shine { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }
@keyframes mp-slide-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes mp-warn-pulse { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.06); } }

/* ---------- Responsiv V2 ---------- */
@media (max-width: 760px), (max-height: 520px) {
  .mp-modechip { font-size: 10px; }
  .mp-teamlbl, .mp-ilbl, .mp-krow, .mp-irole, .mp-kstat { font-size: 11px; }
  .mp-teambar { height: 10px; }
  .mp-storm { font-size: 12px; padding: 2px 8px; gap: 8px; }
  .mp-kname { width: 64px; }
  .mp-chal { font-size: 12px; padding: 3px 8px 6px; }
  .mp-intro { top: 56%; padding: 10px 14px; gap: 10px; }
  .mp-intro-ico { font-size: 42px; }
  .mp-intro-name { font-size: 24px; }
  .mp-intro-desc { font-size: 13px; }
  .mp-intro-tip { display: none; }
  .mp-alert { top: 22%; padding: 10px 16px 10px 10px; gap: 10px; }
  .mp-alert-ico { width: 48px; height: 48px; font-size: 28px; }
  .mp-alert-main { font-size: 18px; }
  .mp-alert-sub { font-size: 12px; }
  .mp-stormwarn { padding: 8px 12px; gap: 8px; }
  .mp-storm-arrow { font-size: 28px; }
  .mp-storm-main { font-size: 17px; }
  .mp-storm-sub { font-size: 12px; }
  .mp-toasts { bottom: 64px; }
  .mp-toast { font-size: 13px; padding: 5px 12px; }
  .mp-join { right: 8px; bottom: 8px; max-width: 250px; padding: 8px; }
  .mp-join-qr { width: 84px; height: 84px; }
  .mp-join-title { font-size: 17px; }
  .mp-lobby-code { font-size: 34px; letter-spacing: 5px; }
  .mp-spec { max-width: 170px; }
  .mp-spec-list .mp-spec-row:nth-child(n+5) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mp-intro-ico, .mp-alert-ico, .mp-alert.mp-alert-on, .mp-stormwarn, .mp-stormvig.mp-on, .mp-rush,
  .mp-kstat.mp-kmine, .mp-inf-wait, .mp-teambar i.mp-tlead, .mp-lobby-start.mp-pulse { animation: none; }
}

/* =====================================================================
   V3: Schwarm-Fußball, Raster-Revier, Parcours, Stream-Layout (9:16, Editor), Begleit-Modus, Plattform-Alerts
   ===================================================================== */
.mp-modewrap { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* ---------- Fußball: Anzeigetafel ---------- */
.mp-score {
  display: flex; align-items: center; gap: 10px; padding: 3px 8px; border-radius: 14px;
  background: linear-gradient(180deg, rgba(8, 30, 18, .86), rgba(6, 18, 12, .86));
  border: 1px solid rgba(61, 220, 132, .55); box-shadow: 0 0 16px rgba(61, 220, 132, .25), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.mp-sc-team {
  --mp-tc: #fff; min-width: 70px; text-align: center; font-size: 13px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--mp-tc); text-shadow: 0 0 10px var(--mp-tc), 0 1px 2px #000;
}
.mp-sc-team.mp-tmine { text-decoration: underline; text-underline-offset: 3px; }
.mp-sc-goals { display: flex; align-items: baseline; gap: 4px; font-size: 30px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.mp-sc-goals b { min-width: 22px; text-align: center; text-shadow: 0 0 14px currentColor, 0 2px 0 rgba(0, 0, 0, .55); }
.mp-sc-goals i { font-style: normal; opacity: .7; }
.mp-sc-sub { font-size: 12px; opacity: .9; padding: 1px 10px; border-radius: 999px; background: rgba(8, 10, 30, .55); text-shadow: 0 1px 2px #000; }
.mp-score.mp-sc-hit { animation: mp-sc-flash .45s ease-in-out 3; }
.mp-score.mp-sc-hit0 { border-color: #3d8bff; box-shadow: 0 0 26px rgba(61, 139, 255, .8); }
.mp-score.mp-sc-hit1 { border-color: #ff4d6d; box-shadow: 0 0 26px rgba(255, 77, 109, .8); }
.mp-msg-goal { --mp-gc: #3ddc84; }
.mp-msg-goal .mp-msg-main {
  font-size: 120px; letter-spacing: 6px; font-style: italic; color: var(--mp-gc);
  text-shadow: 0 0 26px var(--mp-gc), 0 0 70px var(--mp-gc), 0 6px 0 rgba(0, 0, 0, .55);
  animation: mp-goal-shake .5s ease-out 2;
}
.mp-msg-goal-us .mp-msg-main { color: #fff; }
.mp-msg-goal .mp-msg-sub { font-size: 20px; font-weight: 600; }
.mp-feed-goal { border-color: rgba(61, 220, 132, .6); box-shadow: 0 0 10px rgba(61, 220, 132, .3); }

/* Ball-Richtungspfeil am Bildrand */
.mp-ballarrow { position: absolute; width: 0; height: 0; z-index: 1; }
.mp-ball-dir {
  position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; line-height: 44px; text-align: center;
  font-size: 30px; color: #3ddc84; text-shadow: 0 0 12px #3ddc84, 0 0 2px #000; transform-origin: 50% 50%;
}
.mp-ball-ico {
  position: absolute; left: -15px; top: -15px; width: 30px; height: 30px; line-height: 30px; text-align: center; font-size: 22px;
  border-radius: 50%; background: rgba(8, 30, 18, .8); box-shadow: 0 0 12px rgba(61, 220, 132, .7); animation: mp-breathe 1s ease-in-out infinite;
}

/* ---------- Raster-Revier: Prozent-Balken ---------- */
.mp-paint {
  width: min(100%, 320px); padding: 5px 9px; border-radius: 12px;
  background: rgba(36, 8, 34, .68); border: 1px solid rgba(255, 106, 213, .45);
}
.mp-phead { font-size: 12px; text-align: center; margin-bottom: 3px; opacity: .92; }
.mp-phead b { color: #ff9be4; }
.mp-prow { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 1px 0; }
.mp-prow.mp-you { font-weight: 700; }
.mp-pname { width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-pbar { flex: 1; height: 9px; border-radius: 5px; overflow: hidden; background: rgba(255, 255, 255, .1); }
.mp-pbar i { display: block; height: 100%; border-radius: 5px; transition: width .25s linear; box-shadow: 0 0 8px rgba(255, 255, 255, .35); }
.mp-prow.mp-you .mp-pbar { box-shadow: 0 0 0 1px #7dfcff, 0 0 10px rgba(0, 229, 255, .45); }
.mp-pval { width: 52px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.mp-msg-paint .mp-msg-main { color: #ff9be4; text-shadow: 0 0 24px #ff6ad5, 0 0 60px #b026ff, 0 4px 0 rgba(0, 0, 0, .5); }
.mp-feed-paint { border-color: rgba(255, 106, 213, .55); }

/* ---------- Parcours: Fortschritt, Checkpoints, Platzierung ---------- */
.mp-race {
  width: min(100%, 360px); padding: 6px 10px 5px; border-radius: 12px;
  background: rgba(34, 26, 4, .7); border: 1px solid rgba(255, 197, 49, .45);
}
.mp-rtrack { position: relative; height: 12px; margin: 4px 14px 6px 4px; border-radius: 6px; background: rgba(255, 255, 255, .1); }
.mp-rfill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: linear-gradient(90deg, #ff9100, #ffe066); box-shadow: 0 0 10px #ffb300; transition: width .2s linear; }
.mp-rcp { position: absolute; top: -3px; width: 3px; height: 18px; margin-left: -1px; border-radius: 2px; background: rgba(255, 255, 255, .35); }
.mp-rcp.mp-on { background: #8dff5a; box-shadow: 0 0 8px #5dff2a; }
.mp-rdot { position: absolute; top: 1px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); transition: left .2s linear; }
.mp-rdot.mp-you { top: -2px; width: 16px; height: 16px; margin-left: -8px; box-shadow: 0 0 0 2px #fff, 0 0 12px #fff; z-index: 2; }
.mp-rdot.mp-dead { opacity: .4; }
.mp-rdot.mp-fin { box-shadow: 0 0 0 2px #ffe066; }
.mp-rflag { position: absolute; right: -16px; top: -6px; font-size: 16px; }
.mp-rlbl { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; text-shadow: 0 1px 3px #000; }
.mp-rlbl b { color: #ffe066; font-variant-numeric: tabular-nums; }
.mp-rseg { margin-top: 2px; text-align: center; font-size: 12px; font-weight: 600; color: #ffb27a; }
.mp-feed-finish { border-color: rgba(255, 197, 49, .6); box-shadow: 0 0 10px rgba(255, 197, 49, .25); }
.mp-feed-haz { border-color: rgba(255, 122, 69, .55); }

/* ---------- Mitmach-Kasten V3 ---------- */
.mp-join-cta {
  margin: -2px 0 8px; font-size: 18px; font-weight: 700; color: #fff; text-shadow: 0 0 12px #fe2c55, 0 0 2px #000;
  animation: mp-breathe 1.4s ease-in-out infinite;
}
.mp-join.mp-join-stream {
  border-color: #fe2c55; box-shadow: 0 0 26px rgba(254, 44, 85, .5), 0 0 0 4px rgba(37, 244, 238, .25);
  background: linear-gradient(150deg, rgba(90, 10, 40, .92), rgba(10, 30, 44, .92));
}

/* ---------- Plattform-Alerts ---------- */
.mp-alert-plat { font-style: normal; }
.mp-alert-coins { font-style: normal; font-size: .8em; color: #ffe066; }
.mp-alert.mp-alert-tiktok {
  background: linear-gradient(110deg, rgba(20, 20, 30, .96), rgba(254, 44, 85, .9) 50%, rgba(37, 244, 238, .85)); background-size: 220% 100%;
  border-color: #25f4ee; box-shadow: 0 0 40px rgba(254, 44, 85, .7), 0 0 0 6px rgba(37, 244, 238, .2), 0 18px 40px rgba(0, 0, 0, .5);
}
.mp-alert.mp-alert-youtube {
  background: linear-gradient(110deg, rgba(60, 6, 6, .96), rgba(255, 42, 42, .9) 55%, rgba(60, 6, 6, .96)); background-size: 220% 100%;
  border-color: #ff9a9a; box-shadow: 0 0 40px rgba(255, 42, 42, .7), 0 18px 40px rgba(0, 0, 0, .5);
}
.mp-alert.mp-alert-kick {
  background: linear-gradient(110deg, rgba(6, 30, 6, .96), rgba(40, 150, 12, .92) 55%, rgba(6, 30, 6, .96)); background-size: 220% 100%;
  border-color: #b8ff9a; box-shadow: 0 0 40px rgba(83, 252, 24, .6), 0 18px 40px rgba(0, 0, 0, .5);
}
.mp-alert.mp-alert-donation {
  background: linear-gradient(110deg, rgba(60, 40, 4, .96), rgba(200, 140, 10, .92) 55%, rgba(60, 40, 4, .96)); background-size: 220% 100%;
  border-color: #ffe9a8; box-shadow: 0 0 40px rgba(255, 197, 49, .7), 0 18px 40px rgba(0, 0, 0, .5);
}

/* ---------- Stream-Layout: Hochformat-Bühne 9:16 ---------- */
.mp-hud.mp-vertical { box-shadow: 0 0 0 300vmax #000; }
.mp-vertical .mp-tc { width: min(92%, 440px); }
.mp-vertical .mp-center { width: 96%; }
.mp-vertical .mp-msg-goal .mp-msg-main { font-size: 74px; }
.mp-vertical .mp-msg-win .mp-msg-main, .mp-vertical .mp-msg-big .mp-msg-main { font-size: 46px; }
/* Bühne ist schmaler als das Fenster: Breiten relativ zur Bühne statt vw */
.mp-vertical .mp-intro { max-width: 94%; }
.mp-vertical .mp-death, .mp-vertical .mp-stormwarn { max-width: 92%; }
.mp-vertical .mp-toasts, .mp-vertical .mp-chatbox { max-width: 94%; }
.mp-vertical .mp-toast { white-space: normal; text-align: center; }
.mp-vertical .mp-alert { max-width: 94%; }

/* Layout-Ebene: verschobene Widgets (Position in %, Skalierung), Original-Positionierung neutralisiert */
.mp-layer { position: absolute; inset: 0; pointer-events: none; }
.mp-lw { position: absolute; transform-origin: 0 0; pointer-events: none; }
.mp-hud .mp-layer .mp-lw > * { position: relative; left: auto; right: auto; top: auto; bottom: auto; margin: 0; max-width: var(--mp-lw-max, none); }
.mp-hud .mp-layer .mp-lw > .mp-powers, .mp-hud .mp-layer .mp-lw > .mp-alert, .mp-hud .mp-layer .mp-lw > .mp-join, .mp-hud .mp-layer .mp-lw > .mp-emotes { transform: none; }
.mp-lw > .mp-alert.mp-alert-on { animation: mp-lw-in .6s cubic-bezier(.2, 1.6, .4, 1), mp-alert-sweep 2.4s linear infinite; }
.mp-hud .mp-layer .mp-lw > .mp-alert.mp-out { transform: translateY(-16px) scale(.95); }
.mp-lw > .mp-feed, .mp-lw > .mp-modewrap { width: max-content; max-width: 440px; align-items: flex-start; }
.mp-lw-tag { display: none; }
.mp-lw-mark { display: none !important; }
/* Platzhalter: Minimap (Renderer zeichnet an setMinimapRect), Murmel-Rangliste (füllt der Murmel-Client) */
.mp-w-minimap, .mp-w-marble { display: none; }
.mp-laid .mp-w-minimap { display: block; width: 150px; height: 150px; visibility: hidden; }
.mp-laid .mp-w-marble:not(:empty) { display: block; }

/* Editor */
.mp-editing .mp-lw {
  pointer-events: auto; cursor: grab; touch-action: none; min-width: 64px; min-height: 30px;
  outline: 2px dashed rgba(125, 252, 255, .75); outline-offset: 3px; border-radius: 8px;
  background: rgba(0, 229, 255, .06);
}
.mp-editing .mp-lw * { pointer-events: none !important; }
.mp-editing .mp-lw.mp-lw-drag { cursor: grabbing; outline-color: #ffe066; background: rgba(255, 224, 102, .1); z-index: 3; }
.mp-editing .mp-lw-tag {
  display: block; position: absolute; left: -2px; top: -22px; white-space: nowrap; padding: 1px 7px; border-radius: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: .5px; color: #00161a; background: #7dfcff; box-shadow: 0 0 8px rgba(0, 229, 255, .6);
}
.mp-editing .mp-w-minimap { display: block; width: 150px; height: 150px; visibility: visible; border-radius: 10px; background: rgba(125, 252, 255, .08); }
.mp-editing .mp-w-marble { display: block; min-width: 200px; min-height: 120px; }
.mp-editing .mp-lw > .mp-hidden { display: block !important; visibility: hidden; min-width: 64px; min-height: 30px; }
.mp-editing .mp-lw > .mp-alert.mp-hidden, .mp-editing .mp-lw > .mp-join.mp-hidden { width: 260px; height: 70px; }
.mp-editing .mp-death, .mp-editing .mp-intro, .mp-editing .mp-center, .mp-editing .mp-ballarrow { display: none !important; }
.mp-editbar {
  position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); z-index: 4; pointer-events: auto;
  width: max-content; max-width: 94%; padding: 12px 16px; border-radius: 18px; text-align: center;
  background: linear-gradient(160deg, rgba(32, 36, 90, .95), rgba(14, 16, 46, .95)); border: 1px solid rgba(125, 252, 255, .55);
  box-shadow: 0 0 30px rgba(0, 229, 255, .3), 0 14px 40px rgba(0, 0, 0, .5);
}
.mp-editbar.mp-eb-top { bottom: auto; top: 13%; }
.mp-eb-title { cursor: pointer; font-size: 20px; font-weight: 700; color: #7dfcff; text-shadow: 0 0 12px rgba(0, 229, 255, .7); }
.mp-eb-info { font-size: 12px; opacity: .75; margin: 2px 0 8px; }
.mp-eb-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.mp-eb-btn { padding: 7px 12px; border-radius: 12px; font-size: 14px; font-weight: 600; }
.mp-eb-hint { margin-top: 8px; font-size: 12px; opacity: .65; }
/* Sicherheitszonen (TikTok / YouTube Shorts) */
.mp-safe { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.mp-safe-z {
  position: absolute; box-sizing: border-box; border: 2px dashed rgba(255, 77, 109, .85);
  background: repeating-linear-gradient(45deg, rgba(255, 77, 109, .18) 0 10px, rgba(255, 77, 109, .05) 10px 20px);
}
.mp-safe-z span {
  position: absolute; left: 6px; top: 4px; font-size: 11px; font-weight: 700; color: #fff; padding: 1px 6px; border-radius: 6px;
  background: rgba(200, 20, 60, .85);
}

/* ---------- Begleit-Modus (Handy über join.html): großer Joystick, Mini-HUD ---------- */
.mp-companion .mp-joy { width: 170px; height: 170px; margin: -85px 0 0 -85px; border-width: 3px; }
.mp-companion .mp-joy-knob { width: 72px; height: 72px; margin: -36px 0 0 -36px; }
.mp-companion .mp-joy.mp-joy-idle { opacity: .55; }
.mp-companion .mp-feed-item:nth-child(n+2), .mp-companion .mp-board .mp-row:nth-child(n+4):not(.mp-you),
.mp-companion .mp-goal, .mp-companion .mp-modechip, .mp-companion .mp-intro-tip { display: none; }
/* Begleit-Modus (Zuschauer-Handy): Stream-Code + „Handy-Link“ braucht dort niemand – verdeckte sonst den Kill-Feed */
.mp-companion .mp-room-code { display: none; }
.mp-companion .mp-powers { left: auto; right: 10px; bottom: auto; top: 46%; transform: none; flex-direction: column; gap: 6px; }
.mp-companion .mp-emotes { bottom: auto; top: 58%; right: 8px; }
.mp-companion .mp-count { font-size: 40px; }
.mp-companion .mp-toasts { bottom: 32%; }

/* ---------- Animationen V3 ---------- */
@keyframes mp-sc-flash { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); filter: brightness(1.5); } }
@keyframes mp-goal-shake { 0% { transform: scale(1.4) rotate(-4deg); } 30% { transform: scale(.95) rotate(3deg); } 60% { transform: scale(1.05) rotate(-2deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes mp-lw-in { 0% { opacity: 0; transform: translateY(-30px) scale(.7); } 100% { opacity: 1; transform: none; } }

/* ---------- Responsiv V3 ---------- */
@media (max-width: 760px), (max-height: 520px) {
  .mp-sc-team { min-width: 48px; font-size: 10px; letter-spacing: 1px; }
  .mp-sc-goals { font-size: 22px; }
  .mp-sc-sub, .mp-phead, .mp-rseg { font-size: 10px; }
  .mp-prow, .mp-rlbl { font-size: 11px; }
  .mp-pname { width: 64px; }
  .mp-pval { width: 42px; }
  .mp-msg-goal .mp-msg-main { font-size: 72px; }
  .mp-msg-goal .mp-msg-sub { font-size: 15px; }
  .mp-join-cta { font-size: 14px; }
  .mp-editbar { padding: 8px 10px; }
  .mp-eb-title { font-size: 16px; }
  .mp-eb-btn { padding: 6px 9px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .mp-score.mp-sc-hit, .mp-msg-goal .mp-msg-main, .mp-ball-ico, .mp-join-cta { animation: none; }
}

/* vcli3: Mitmach-Kasten (Stream) und Emote-Leiste lagen beide unten rechts übereinander → Emotes darüber stapeln
   (nur im Standard-HUD; im eigenen Layout bestimmt der Streamer die Plätze selbst) */
.mp-hud:not(.mp-laid):has(> .mp-join:not(.mp-hidden)) > .mp-emotes { bottom: 236px; }
@media (max-width: 760px), (max-height: 520px) {
  .mp-hud:not(.mp-laid):has(> .mp-join:not(.mp-hidden)) > .mp-emotes { bottom: 170px; }
}
