/* Hybrid Schritt 1: HUD im Mobile-Legends-Stil (referenz/michael-ml-hud.jpg). Wird nach app.css und gear.css geladen
   und ersetzt dort die alte Anordnung (Porträt links oben, Minimap rechts, Skill-Namen unter den Knöpfen). */

/* HUD über den Namensschildern und Schadenszahlen: Hinweise, Banner und Knöpfe werden nie von Schildern überdeckt */
#hud { z-index: 6; }
.me-frame[hidden] { display: none !important; }

/* ---------- links oben: Minimap, daneben Lupe und Ping, darunter Ziel und schmale Gruppe ---------- */
.hud-tl { top: calc(8px + var(--st)); left: calc(10px + var(--sl)); width: 250px; }
.tl-row { display: flex; align-items: flex-start; gap: 7px; }
.hud-tl .minimap { width: 100px; height: 100px; flex: 0 0 auto; box-shadow: 0 0 0 2px rgba(255, 236, 200, .5), 0 0 0 4.5px rgba(20, 28, 44, .55), 0 4px 14px rgba(0, 0, 0, .4); }
.tl-btns { display: flex; flex-direction: column; gap: 7px; padding-top: 2px; }
.mini-btn { position: relative; width: 36px; height: 36px; border: 0; border-radius: 50%; padding: 0; display: grid; place-items: center; cursor: pointer; pointer-events: auto !important; color: #fff3d6;
  background: rgba(12, 18, 30, .58); box-shadow: inset 0 0 0 1.5px rgba(255, 236, 200, .32), 0 2px 8px rgba(0, 0, 0, .3); }
.mini-btn svg { width: 19px; height: 19px; display: block; }
.mini-btn:active { transform: scale(.92); }
.mini-btn .badge { position: absolute; right: -3px; top: -3px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: #ff6b5a; color: #fff; font: 800 10px/16px Fredoka, sans-serif; text-align: center; }
.zoom-lvl { position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); display: flex; gap: 2px; }
.zoom-lvl i { width: 4px; height: 4px; border-radius: 50%; background: rgba(255, 243, 214, .3); }
.zoom-lvl i.on { background: #ffd166; }
#btnZoom svg { margin-top: -4px; }
.zoom-hint { position: absolute; top: calc(14px + var(--st)); left: calc(160px + var(--sl)); display: flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 12px;
  background: rgba(12, 18, 30, .82); box-shadow: inset 0 0 0 1px rgba(255, 209, 102, .55); font-size: 12px; font-weight: 600; color: #ffe8b8; opacity: 0; transform: translateX(-6px); transition: opacity .35s, transform .35s; }
.zoom-hint.on { opacity: 1; transform: none; }
.zoom-hint svg { width: 18px; height: 18px; color: #ffd166; }
/* Ziel: umbrechen (höchstens zwei Zeilen) statt abschneiden */
.hud-tl .goal { margin-top: 7px; max-width: 236px; white-space: normal; overflow: visible; text-overflow: clip; text-align: left; padding: 4px 9px; border-radius: 10px; font-size: 11.5px; line-height: 1.25; background: rgba(12, 18, 30, .55); }
.hud-tl .party-frames { margin-top: 6px; gap: 4px; }
.hud-tl .pf { padding: 1px 8px 2px 2px; font-size: 11px; gap: 5px; background: rgba(12, 18, 30, .45); width: max-content; }
.hud-tl .pf .dot { width: 13px; height: 13px; }
.hud-tl .pf .php { left: 22px; right: 8px; bottom: 1px; height: 2px; }
.hud-tl .pf { max-width: 118px; padding: 1px 7px 2px 1px; gap: 4px; }
.pf-lvl { flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%; background: #141822; box-shadow: 0 0 0 1.5px #e9d7a8; font: 700 9.5px/16px Fredoka, sans-serif; text-align: center; color: #fff3d6; }
.pf-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- rechts oben: Gold und schmale Spalte ---------- */
.hud-tr { top: calc(8px + var(--st)); right: calc(8px + var(--sr)); display: flex; flex-direction: column; align-items: flex-end; gap: 7px; }
.hud-tr .gold { margin: 0; padding: 3px 9px 3px 6px; border-radius: 10px; background: rgba(12, 18, 30, .55); font-size: 12px; }
.side-col { display: flex; flex-direction: column; gap: 7px; transition: opacity .2s, transform .2s; }
.side-col .menu-btn { position: relative; top: auto; right: auto; display: flex; flex-direction: column; gap: 3.5px; align-items: center; justify-content: center; }
.side-col .menu-btn i { width: 16px; height: 2.2px; margin: 0; }
.side-tog { width: 26px; height: 22px; border-radius: 9px; }
.side-tog svg { width: 15px; height: 15px; transition: transform .2s; }
body.side-closed .side-col { opacity: 0; transform: translateX(30px); pointer-events: none; }
body.side-closed .side-col .mini-btn { pointer-events: none !important; }
body.side-closed .side-tog svg { transform: rotate(180deg); }
body.aiming .side-col, body.aiming .side-tog { opacity: 0; pointer-events: none; }

/* ---------- Joystick links unten, immer sichtbar (Ruhering mit Richtungspfeilen) ---------- */
.joy { opacity: .62; left: calc(104px + var(--sl)); top: calc(100% - 96px - var(--sb)); width: 124px; height: 124px; margin: -62px 0 0 -62px;
  background: radial-gradient(circle, rgba(20, 30, 46, .18) 40%, rgba(20, 30, 46, .34)); box-shadow: inset 0 0 0 2px rgba(255, 243, 214, .3), 0 0 0 1px rgba(0, 0, 0, .15); transition: opacity .15s; }
.joy::before { content: ''; position: absolute; inset: 7px; border-radius: 50%; background:
  conic-gradient(from -8deg, rgba(255, 243, 214, .55) 0 16deg, transparent 16deg 90deg, rgba(255, 243, 214, .55) 90deg 106deg, transparent 106deg 180deg, rgba(255, 243, 214, .55) 180deg 196deg, transparent 196deg 270deg, rgba(255, 243, 214, .55) 270deg 286deg, transparent 286deg);
  -webkit-mask: radial-gradient(circle, transparent 47px, #000 48px 51px, transparent 52px); mask: radial-gradient(circle, transparent 47px, #000 48px 51px, transparent 52px); }
.joy.on { opacity: 1; }
.joy-knob { width: 50px; height: 50px; margin: -25px 0 0 -25px; background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, .95), rgba(255, 217, 160, .85)); }
.joy-hint { left: calc(40px + var(--sl)); bottom: calc(10px + var(--sb)); font-size: 11.5px; }
.joy-zone.used .joy-hint, body.hint-joy-done .joy-hint { opacity: 0; }

/* ---------- rechts unten: Grundangriff groß in der Ecke, drei Fähigkeiten im Bogen, Ulti abgesetzt, nur Symbole ---------- */
.sk .sk-name { display: none !important; }
.sk .sk-ico { border-radius: 50%; overflow: hidden; }
.sk .ico { display: block; width: 100%; height: 100%; border-radius: 50%; background-repeat: no-repeat; }
.sk .sk-num { font-size: 15px; }
.sk.cooling .sk-ico { opacity: .5; filter: saturate(.4); }
/* Korrektur S2 (Michaels Sichtung): Knöpfe rund 38 % kleiner, eng in der Ecke wie bei ML
   (Grundangriff 54 px = rund 14 % der Bildhöhe, Fähigkeiten 36 px = rund 9 %). Trefferfläche per ::after größer als das Bild. */
.sk-basic { width: 54px; height: 54px; right: 44px; bottom: 42px; box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 80%, #fff 20%), 0 4px 12px rgba(0, 0, 0, .5); }
.sk-s1 { width: 36px; height: 36px; right: 103px; bottom: 46px; }
.sk-s2 { width: 36px; height: 36px; right: 86px; bottom: 85px; }
.sk-s3 { width: 36px; height: 36px; right: 48px; bottom: 102px; }
.sk-ult { width: 42px; height: 42px; right: 128px; bottom: 112px; }
.sk-s1, .sk-s2, .sk-s3, .sk-ult { box-shadow: 0 0 0 1.8px color-mix(in srgb, var(--c) 75%, #fff 25%), 0 3px 9px rgba(0, 0, 0, .45); }
.sk-ult.ready { box-shadow: 0 0 0 2px #ffe07a, 0 0 14px 3px rgba(255, 200, 80, .7), 0 3px 9px rgba(0, 0, 0, .5); animation: ultglow2 1.1s ease-in-out infinite; }
@keyframes ultglow2 { 50% { box-shadow: 0 0 0 2px #fff2b0, 0 0 20px 6px rgba(255, 210, 90, .9), 0 3px 9px rgba(0, 0, 0, .5); } }
.sk-ult .sk-charge { inset: -4px; width: calc(100% + 8px); height: calc(100% + 8px); }
.sk-ult .sk-charge circle { stroke-width: 5; }
.sk-basic::after, .sk-s1::after, .sk-s2::after, .sk-s3::after, .sk-ult::after { content: ''; position: absolute; inset: -7px; border-radius: 50%; }
.sk-ult:not(.ready) .sk-ico { opacity: .45; filter: saturate(.3); }
.sk-basic .ico, .sk-s1 .ico, .sk-s2 .ico, .sk-s3 .ico, .sk-ult .ico { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .4); }
.pad-layer { width: 180px; height: 160px; }
/* Abbrechen beim Zielen: kleine Zone oben rechts statt mitten im Bild (Finger dorthin ziehen) */
.sk-cancel { position: fixed; right: calc(30px + var(--sr)); top: calc(64px + var(--st)); bottom: auto; width: 54px; height: 54px; transform: translate(50%, -50%) scale(.6); }
.sk-cancel span { display: none; }
.sk-cancel.on { transform: translate(50%, -50%) scale(1); }
.sk-cancel.hot { transform: translate(50%, -50%) scale(1.15); }

/* ---------- unten Mitte: Trank und Gürtel, darüber eigene Zustände ---------- */
.sk-pot { position: fixed; right: auto; bottom: calc(10px + var(--sb)); left: calc(50% + 6px); width: 38px; height: 38px; transform: translate(-50%, 0); }
.sk-pot.down { transform: translate(-50%, 0) scale(.93); }
.sk-pot .ico { border-radius: 50%; }
.sk-belt { position: fixed; left: calc(50% + 40px); bottom: calc(16px + var(--sb)); display: flex; gap: 6px; right: auto; top: auto; }
.me-status { position: fixed; left: calc(50% + 6px); bottom: calc(66px + var(--sb)); transform: translateX(-50%); display: flex; gap: 4px; pointer-events: none; }
.me-status .st { width: 24px; height: 24px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .5); }
.me-status .ico { display: block; width: 100%; height: 100%; }
/* Kontextknopf (Reden, Betreten, Aufhelfen): links vom Bogen, mit Kurzlabel */
.hud-br { right: calc(170px + var(--sr)); bottom: calc(14px + var(--sb)); }
.ctx-btn { width: 50px; height: 50px; }
.ctx-ico svg { width: 24px; height: 24px; }
.ctx-lbl { font-size: 10.5px; max-width: 66px; }

/* ---------- Leben und Level über dem Kopf ---------- */
.plate { position: absolute; left: 0; top: 0; display: flex; flex-direction: column; align-items: center; pointer-events: none; will-change: transform; }
.pl-name { display: flex; align-items: center; gap: 3px; font: 600 10.5px/1.1 Fredoka, sans-serif; color: #fff; text-shadow: 0 1px 2px #000, 0 0 4px rgba(0, 0, 0, .8); white-space: nowrap; margin: 0 0 2px 14px; }
.pl-name i { width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); }
.pl-row { display: flex; align-items: center; }
.pl-lvl { position: relative; z-index: 1; width: 18px; height: 18px; margin-right: -5px; border-radius: 50%; background: #141822; box-shadow: 0 0 0 1.5px #e9d7a8, 0 1px 3px rgba(0, 0, 0, .6); font: 700 10px/18px Fredoka, sans-serif; text-align: center; color: #fff3d6; }
.pl-bar { position: relative; width: 58px; height: 7px; border-radius: 2px; overflow: hidden; background: rgba(8, 10, 16, .85); box-shadow: 0 0 0 1px rgba(0, 0, 0, .7); }
.pl-bar i { position: absolute; inset: 0; transform-origin: 0 50%; transition: transform .15s linear; }
.pl-hp { background: linear-gradient(180deg, #8fc8ff, #2f7fe0); }
.plate.me .pl-hp { background: linear-gradient(180deg, #a6ff8f, #36b44a); }
.plate.low .pl-hp { background: linear-gradient(180deg, #ff9a7a, #d8402a); }
.pl-sh { background: linear-gradient(180deg, rgba(235, 248, 255, .95), rgba(170, 215, 255, .85)); transform: scaleX(0); }
.pl-bar u { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), rgba(0, 0, 0, .55) calc(25% - 1px) 25%); }
.plate.me .pl-bar { width: 66px; height: 8px; }
.pl-xp { width: 66px; height: 2.5px; margin: 1px 0 0 13px; border-radius: 2px; overflow: hidden; background: rgba(0, 0, 0, .6); }
.pl-xp i { display: block; height: 100%; background: #c39bff; transform-origin: 0 50%; }
.plate.down .pl-bar { box-shadow: 0 0 0 1.5px #ff5a4a; }
.plate.away { opacity: .5; }
/* Namensschilder von Dorfbewohnern und Elites etwas kleiner, damit die Weitsicht nicht zugestellt wird */
.nametag { font-size: 11px; padding: 1px 6px; }
body.in-mg .tl-btns, body.in-mg .me-status, body.in-mg .zoom-hint { display: none !important; }
.skb { width: 34px; height: 34px; }
.skb i { inset: 0; border-radius: 50%; background: none; box-shadow: none; overflow: hidden; }
.skb i .ico { display: block; width: 100%; height: 100%; border-radius: 50%; }
.skb i:empty { inset: 7px 9px 6px; background: var(--pc); box-shadow: 0 0 8px var(--pc); }
#toast { left: 0; right: 0; margin: 0 auto; width: max-content; max-width: 44vw; bottom: calc(96px + var(--sb)); transform: translateY(20px); }
#toast.on { transform: none; }
.plate.me { z-index: 2; }
/* Bosskampf: Mitspieler nur als Balken (Name ausgeblendet), damit der Boss sichtbar bleibt */
.plate.compact .pl-name { display: none; }
.plate.compact .pl-bar { width: 44px; height: 5px; }
.plate.compact .pl-lvl { width: 14px; height: 14px; font-size: 8.5px; line-height: 14px; }
