:root {
  --blue: #35a2ff;
  --red: #ff4d5e;
  --gold: #ffc42e;
  --accent: #ffc42e;
  --accent-dark: #7a4b00;
  --bg-a: #3b2a7a;
  --bg-b: #7a2a5e;
  --bg-c: #120c2c;
  --bg-d: #08060f;
  --panel: rgba(18, 14, 40, 0.92);
  --stroke: rgba(255, 255, 255, 0.14);

  /* Höhe eines Sichtfensters. --vh setzt main.js aus der echten Fensterhöhe,
     damit die Adressleiste auf dem Handy nichts mehr verdeckt. */
  --vh: 1vh;
  --app-h: calc(var(--vh) * 100);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

@supports (height: 100dvh) {
  :root { --app-h: 100dvh; }
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  width: 100%; height: var(--app-h);
  overflow: hidden;
  overscroll-behavior: none;
  background: #0a0818;
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  color: #fff;
  user-select: none;
}

/* Die App füllt genau ein Sichtfenster — nichts rutscht hinter die Adressleiste. */
#app { position: fixed; top: 0; left: 0; width: 100%; height: var(--app-h); overflow: hidden; }
canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.hidden { display: none !important; }

/* ============ MENU ============ */
#menu {
  position: absolute; inset: 0;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 50% -10%, var(--bg-a) 0%, transparent 60%),
    radial-gradient(900px 600px at 90% 100%, var(--bg-b) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-c), var(--bg-d));
}

/* App-Shell: fester Kopf, scrollende Mitte, feste Leiste unten. */
#menu.shell { display: flex; flex-direction: column; }
.shell-body {
  position: relative; z-index: 1;
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-left: var(--safe-left); padding-right: var(--safe-right);
}
.view { position: relative; }
#menu .stars {
  position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    radial-gradient(2px 2px at 20% 30%, #fff, transparent),
    radial-gradient(2px 2px at 70% 20%, #fff, transparent),
    radial-gradient(1px 1px at 40% 70%, #fff, transparent),
    radial-gradient(2px 2px at 85% 65%, #fff, transparent),
    radial-gradient(1px 1px at 12% 85%, #fff, transparent),
    radial-gradient(1px 1px at 60% 90%, #fff, transparent),
    radial-gradient(2px 2px at 33% 12%, #fff, transparent);
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .25 } to { opacity: .7 } }

.menu-inner {
  position: relative;
  max-width: 1080px; margin: 0 auto;
  padding: 24px 20px 34px;
  text-align: center;
}

.logo {
  font-size: clamp(38px, 8vw, 82px);
  line-height: .95;
  letter-spacing: 2px;
  font-weight: 900;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 6px 0 #2b1a5e, 0 10px 26px rgba(0,0,0,.7);
  transform: rotate(-2deg);
}
.logo span { color: var(--gold); text-shadow: 0 6px 0 #7a4b00, 0 10px 26px rgba(0,0,0,.7); }
.tagline { margin: 12px 0 26px; opacity: .8; font-size: 16px; }

.section-title {
  margin: 26px 0 12px;
  font-weight: 900; letter-spacing: 3px; font-size: 13px;
  color: #b6a8ff;
}

.modes { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.mode-card {
  width: 260px; padding: 16px;
  border-radius: 18px; cursor: pointer;
  background: rgba(255,255,255,.05);
  border: 2px solid var(--stroke);
  color: #fff; text-align: left;
  transition: transform .12s, border-color .12s, background .12s;
}
.mode-card:hover { transform: translateY(-3px); background: rgba(255,255,255,.09); }
.mode-card.selected { border-color: var(--gold); background: rgba(255,196,46,.14); }
.mc-ico { font-size: 30px; }
.mc-name { font-weight: 900; letter-spacing: 1px; margin: 4px 0 5px; }
.mc-desc { font-size: 12.5px; opacity: .75; line-height: 1.4; }

.brawlers { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.bcard {
  width: 138px; padding: 12px 10px;
  border-radius: 16px; cursor: pointer;
  background: rgba(255,255,255,.05);
  border: 2px solid var(--stroke);
  color: #fff;
  transition: transform .12s, border-color .12s, background .12s;
}
.bcard:hover { transform: translateY(-4px) scale(1.03); }
.bcard.selected { border-color: #fff; background: rgba(255,255,255,.14); box-shadow: 0 0 22px rgba(255,255,255,.18); }
.bcard canvas { width: 74px; height: 74px; display: block; margin: 0 auto 6px; cursor: pointer; }
.bcard .bname { font-weight: 900; letter-spacing: .6px; font-size: 15px; }
.bcard .brole { font-size: 11px; opacity: .7; margin-top: 2px; }
.bcard .btag {
  margin-top: 7px; font-size: 11px; font-weight: 900; letter-spacing: .4px;
  border-radius: 8px; padding: 3px 6px;
  background: rgba(255,196,46,.16); color: var(--gold);
}
.bcard.locked canvas { opacity: .35; filter: grayscale(.7); }
.bcard.locked .bname, .bcard.locked .brole { opacity: .55; }
.bcard.locked .btag { background: rgba(255,255,255,.1); color: #cfd6ff; }

.name-wrap {
  margin: 4px auto 0;
  max-width: 360px;
}
.name-wrap input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 2px solid var(--stroke);
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  outline: none;
}
.name-wrap input::placeholder { color: rgba(255,255,255,.55); }
.name-wrap input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255,196,46,.2);
}
.name-tip {
  margin-top: 7px;
  font-size: 12px;
  opacity: .75;
}
.name-tip b { color: var(--gold); }

#brawler-detail {
  margin: 20px auto 0; max-width: 620px; min-height: 92px;
  background: rgba(0,0,0,.3); border: 1px solid var(--stroke);
  border-radius: 16px; padding: 14px 18px; text-align: left;
}
#brawler-detail h3 { font-size: 20px; letter-spacing: 1px; }
#brawler-detail .desc { font-size: 13.5px; opacity: .82; margin: 6px 0 10px; line-height: 1.45; }
#brawler-detail .stats { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; }
#brawler-detail .stat { flex: 1 1 120px; }
#brawler-detail .stat span { display: block; opacity: .6; margin-bottom: 3px; }
.bar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #ffd24a, #ff7a3d); }
.super-line { margin-top: 10px; font-size: 13px; }
.super-line b { color: var(--gold); }

/* Sammlung: Freischalten, Aufwerten, Buffs, Skins */
.bd-block {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--stroke);
}
.bd-block .bd-head { font-weight: 900; letter-spacing: .6px; font-size: 14px; }
.bd-block .sub { font-size: 12px; opacity: .75; margin-top: 4px; line-height: 1.45; }
.bd-block .chips { margin-top: 8px; }
.bd-block .chip { cursor: pointer; line-height: 1.4; }
.bd-block .claim-btn { display: block; }

/* Tresor */
.vault-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px; margin-top: 9px;
}
.vault-opt {
  display: flex; flex-direction: column; gap: 3px; text-align: left; cursor: pointer;
  padding: 9px 11px; border-radius: 11px; color: #fff;
  background: rgba(255,255,255,.07); border: 1px solid var(--stroke);
}
.vault-opt:hover:not([disabled]) { background: rgba(255,255,255,.14); border-color: var(--gold); }
.vault-opt[disabled] { opacity: .4; cursor: default; }
.vault-opt b { font-size: 13px; letter-spacing: .4px; }
.vault-opt span { font-size: 11.5px; opacity: .72; line-height: 1.35; }
#vault-list { max-height: 58vh; overflow-y: auto; text-align: left; }
#vault-msg { min-height: 18px; margin-top: 8px; }

.play-btn {
  margin-top: 26px; padding: 16px 54px;
  font-size: 22px; font-weight: 900; letter-spacing: 2px;
  color: #33230a; cursor: pointer;
  background: linear-gradient(180deg, #ffdf6b, #ffab1f);
  border: none; border-radius: 16px;
  box-shadow: 0 6px 0 #b96f00, 0 12px 24px rgba(0,0,0,.45);
  transition: transform .1s, box-shadow .1s;
}
.play-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #b96f00, 0 16px 28px rgba(0,0,0,.5); }
.play-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #b96f00; }
.play-btn.locked {
  color: #efe9ff;
  background: linear-gradient(180deg, #55507a, #3a3558);
  box-shadow: 0 6px 0 #241f3c, 0 12px 24px rgba(0,0,0,.45);
}
.play-btn.locked:hover { box-shadow: 0 8px 0 #241f3c, 0 16px 28px rgba(0,0,0,.5); }
.ghost-btn {
  display: block; margin: 14px auto 0; padding: 10px 26px;
  background: transparent; color: #cfc6ff; cursor: pointer;
  border: 2px solid var(--stroke); border-radius: 12px;
  font-weight: 800; letter-spacing: 1px;
}
.ghost-btn:hover { background: rgba(255,255,255,.08); }
.credits { margin-top: 24px; font-size: 11.5px; opacity: .45; }

/* ============ OVERLAYS ============ */
.overlay {
  position: absolute; inset: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center;
  padding: calc(10px + var(--safe-top)) calc(10px + var(--safe-right)) calc(10px + var(--safe-bottom)) calc(10px + var(--safe-left));
  background: rgba(6,4,16,.72); backdrop-filter: blur(5px);
}
.panel {
  background: var(--panel); border: 2px solid var(--stroke);
  border-radius: 22px; padding: 26px 32px; text-align: center;
  min-width: min(320px, 100%); max-width: 100%; max-height: 100%;
  box-shadow: 0 24px 60px rgba(0,0,0,.6);
}

/* Blatt-Layout: Kopf und Fuss bleiben stehen, nur die Mitte scrollt.
   So bleibt z. B. der Raum-Code immer im Bild. */
.panel.sheet {
  display: flex; flex-direction: column; padding: 0;
  width: min(640px, 100%); max-height: 100%; overflow: hidden;
}
.panel.sheet .sheet-head {
  flex: 0 0 auto; padding: 16px 24px 12px;
  border-bottom: 1px solid var(--stroke); background: rgba(0,0,0,.28);
}
.panel.sheet .sheet-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain; padding: 16px 24px; text-align: left;
}
.panel.sheet .sheet-foot {
  flex: 0 0 auto; padding: 12px 24px 16px;
  border-top: 1px solid var(--stroke); background: rgba(0,0,0,.28);
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.panel.sheet .sheet-foot .play-btn,
.panel.sheet .sheet-foot .ghost-btn { margin: 0; }
.panel.sheet h2 { font-size: clamp(20px, 5vw, 30px); text-align: center; }
.panel h2 { font-size: 40px; letter-spacing: 3px; font-weight: 900; }
#result-sub { margin-top: 8px; opacity: .8; }
#result-stats { margin-top: 16px; font-size: 14px; line-height: 1.9; opacity: .9; }
#result-stats .row { display: flex; justify-content: space-between; gap: 30px; }
#result-stats .row span:last-child { font-weight: 900; color: var(--gold); }

/* ============ HUD ============ */
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 10; }

#hud-top {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 18px;
}
.score-box {
  display: flex; align-items: center; gap: 8px;
  background: rgba(10,8,24,.72); border: 2px solid var(--blue);
  border-radius: 14px; padding: 6px 16px;
  font-size: 26px; font-weight: 900; min-width: 88px; justify-content: center;
}
.score-box.red { border-color: var(--red); }
.gem-ico {
  width: 16px; height: 16px; display: inline-block;
  background: linear-gradient(135deg, #7dfcd0, #16b98a);
  transform: rotate(45deg); border-radius: 3px;
  box-shadow: 0 0 10px rgba(45,255,190,.7);
}
#hud-center { text-align: center; min-width: 150px; }
#mode-label { font-size: 12px; letter-spacing: 3px; opacity: .7; font-weight: 900; }
#mode-timer { font-size: 24px; font-weight: 900; }
#countdown { font-size: 22px; font-weight: 900; color: var(--gold); }

#killfeed {
  position: absolute; top: 84px; right: 14px;
  display: flex; flex-direction: column; gap: 6px; align-items: flex-end;
}
.kf {
  background: rgba(10,8,24,.7); border-left: 4px solid var(--gold);
  padding: 5px 12px; border-radius: 8px; font-size: 13px; font-weight: 700;
  animation: kfin .25s ease-out;
}
@keyframes kfin { from { opacity: 0; transform: translateX(24px) } to { opacity: 1; transform: none } }

#respawn { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.respawn-title { font-size: 30px; font-weight: 900; letter-spacing: 4px; color: var(--red); text-shadow: 0 4px 14px rgba(0,0,0,.8); }
.respawn-num { font-size: 76px; font-weight: 900; }

#ammo-bar {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 7px;
}
#ammo-bar i {
  width: 44px; height: 11px; border-radius: 6px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.2);
  overflow: hidden; position: relative;
}
#ammo-bar i b { position: absolute; inset: 0; width: 0%; background: linear-gradient(90deg, #ffe27a, #ffb01f); border-radius: 5px; }

#hint {
  position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
  font-size: 11px; opacity: .38; white-space: nowrap;
}

#hud-bottom { position: absolute; inset: 0; pointer-events: none; }
#stick-zone { position: absolute; left: 0; bottom: 0; width: 45%; height: 55%; pointer-events: auto; }
#stick-base {
  position: absolute; width: 130px; height: 130px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.22); background: rgba(255,255,255,.07);
  display: none; transform: translate(-50%, -50%);
}
#stick-knob {
  position: absolute; left: 50%; top: 50%; width: 58px; height: 58px;
  margin: -29px 0 0 -29px; border-radius: 50%;
  background: rgba(255,255,255,.55); box-shadow: 0 0 18px rgba(255,255,255,.35);
}
#buttons { position: absolute; right: 26px; bottom: 34px; display: flex; align-items: flex-end; gap: 16px; }
.rbtn {
  position: relative; pointer-events: auto;
  width: 92px; height: 92px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; letter-spacing: 1px; font-size: 14px;
  background: rgba(255,255,255,.12); border: 3px solid rgba(255,255,255,.3);
  backdrop-filter: blur(3px);
}
#btn-attack { width: 112px; height: 112px; background: rgba(255,90,60,.25); border-color: rgba(255,140,90,.6); }
#btn-super { opacity: .45; }
#btn-super.ready { opacity: 1; background: rgba(255,214,60,.3); border-color: var(--gold); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 26px rgba(255,200,50,.75) } }
#btn-super .ring { position: absolute; inset: 0; }
#btn-super svg { width: 100%; height: 100%; transform: rotate(-90deg); }
#btn-super svg circle { fill: none; stroke-width: 7; }
#btn-super svg .bg { stroke: rgba(255,255,255,.12); }
#btn-super svg .fg { stroke: var(--gold); stroke-dasharray: 276.5; stroke-dashoffset: 276.5; transition: stroke-dashoffset .1s linear; }

/* touch-only controls hidden on desktop */
body:not(.touch) #stick-zone, body:not(.touch) #buttons { display: none; }
body.touch #hint { display: none; }

/* ============ TOPBAR / PROFIL ============ */
#topbar {
  position: relative; z-index: 3; flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: calc(10px + var(--safe-top)) calc(14px + var(--safe-right)) 10px calc(14px + var(--safe-left));
  background: linear-gradient(180deg, rgba(8,6,18,.92), rgba(8,6,18,.58));
  border-bottom: 1px solid var(--stroke);
  backdrop-filter: blur(6px);
}
.profile {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.06); border: 2px solid var(--stroke);
  border-radius: 14px; padding: 7px 14px 7px 8px; color: #fff; cursor: pointer;
  text-align: left;
}
.profile:hover { background: rgba(255,255,255,.12); }
.pc-av {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(180deg, #ffdf6b, #ffab1f); color: #4a3000; font-size: 19px;
}
.pc-text { display: flex; flex-direction: column; line-height: 1.15; }
.pc-name { font-weight: 900; font-size: 14px; }
.pc-tag { font-size: 11px; opacity: .6; letter-spacing: 1px; }

.wallet { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 auto; justify-content: center; }
.cur {
  display: flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,.34); border: 1px solid var(--stroke);
  border-radius: 11px; padding: 6px 11px; font-weight: 800; font-size: 13.5px;
}
.cur i { font-style: normal; font-size: 15px; }

.tb-actions { display: flex; gap: 8px; }
.icon-btn {
  position: relative;
  width: 44px; height: 44px; border-radius: 13px; font-size: 20px; cursor: pointer;
  background: rgba(255,255,255,.07); border: 2px solid var(--stroke); color: #fff;
}
.icon-btn:hover { background: rgba(255,255,255,.15); }
.icon-btn .dot {
  position: absolute; top: 5px; right: 5px; width: 10px; height: 10px; border-radius: 50%;
  background: #ff4d5e; box-shadow: 0 0 8px #ff4d5e;
}

/* ============ SHOWDOWN-VARIANTEN ============ */
.variants { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.variant {
  min-width: 168px; padding: 11px 16px; cursor: pointer; color: #fff; text-align: left;
  background: rgba(255,255,255,.05); border: 2px solid var(--stroke); border-radius: 14px;
  display: flex; flex-direction: column; gap: 3px;
  transition: transform .12s, border-color .12s, background .12s;
}
.variant:hover { transform: translateY(-2px); background: rgba(255,255,255,.09); }
.variant.selected { border-color: var(--gold); background: rgba(255,196,46,.14); }
.variant b { font-size: 16px; letter-spacing: 1.5px; }
.variant span { font-size: 11.5px; opacity: .72; }

/* ============ PANELS / OVERLAYS ============ */
.panel.wide { width: min(620px, 100%); max-height: 100%; overflow-y: auto; text-align: left; }
.panel.wide.sheet { overflow: hidden; }
.panel.wide h2 { text-align: center; font-size: 30px; margin-bottom: 6px; }

.opt { margin-top: 16px; }
.opt-label { font-size: 12px; letter-spacing: 2px; font-weight: 900; color: #b6a8ff; margin-bottom: 7px; }
.opt-hint { font-size: 12px; opacity: .7; margin-top: 6px; }
.seg { display: flex; gap: 7px; flex-wrap: wrap; }
.seg button {
  flex: 1 1 auto; min-width: 78px; padding: 9px 10px; cursor: pointer;
  background: rgba(255,255,255,.06); border: 2px solid var(--stroke); border-radius: 11px;
  color: #fff; font-weight: 800; font-size: 13px;
}
.seg button:hover { background: rgba(255,255,255,.12); }
.seg button.selected { border-color: var(--gold); background: rgba(255,196,46,.18); }
.opt input[type=range] { width: 100%; accent-color: var(--gold); }
.opt.toggles { display: flex; flex-wrap: wrap; gap: 10px 20px; }
.opt.toggles label { font-size: 13.5px; display: flex; align-items: center; gap: 7px; cursor: pointer; }
.opt.toggles input { accent-color: var(--gold); width: 17px; height: 17px; }

/* ============ BELOHNUNGEN ============ */
.reward-block {
  margin-top: 14px; padding: 13px 15px; border-radius: 14px;
  background: rgba(0,0,0,.3); border: 1px solid var(--stroke);
}
.reward-block h3 { font-size: 15px; letter-spacing: 1px; margin-bottom: 6px; }
.reward-block .sub { font-size: 12.5px; opacity: .75; line-height: 1.5; }
.progress { height: 12px; border-radius: 8px; background: rgba(255,255,255,.12); overflow: hidden; margin: 9px 0 6px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #ffd24a, #ff7a3d); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.chip { background: rgba(255,255,255,.09); border-radius: 9px; padding: 5px 10px; font-size: 12.5px; font-weight: 800; }
.chip.plus { background: rgba(93,255,182,.16); color: #b6ffe0; }
.chip.minus { background: rgba(255,107,120,.16); color: #ffc0c6; }
.claim-btn {
  margin-top: 10px; padding: 10px 22px; border: none; border-radius: 12px; cursor: pointer;
  font-weight: 900; letter-spacing: 1px; color: #33230a;
  background: linear-gradient(180deg, #ffdf6b, #ffab1f);
}
.claim-btn[disabled] { opacity: .45; cursor: default; }

#result-rewards { margin-top: 14px; }
#result-rewards .chips { justify-content: center; }
#result-rewards .drop { margin-top: 8px; font-size: 13px; color: var(--gold); font-weight: 800; }

/* ============ RANGLISTE ============ */
.lb-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-size: 13.5px; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border-radius: 10px; background: rgba(255,255,255,.06); }
.lb-row.me { background: rgba(255,196,46,.18); border: 1px solid rgba(255,196,46,.5); }
.lb-rank { width: 28px; font-weight: 900; opacity: .8; }
.lb-name { flex: 1 1 auto; font-weight: 800; }
.lb-tag { opacity: .5; font-size: 11.5px; letter-spacing: 1px; }
.lb-tro { font-weight: 900; color: var(--gold); }

/* ============ TEAM-SUCHE ============ */
.mm-mode { text-align: center; opacity: .8; margin-top: 4px; font-weight: 800; letter-spacing: 1px; }
.mm-slots { display: flex; gap: 12px; justify-content: center; margin: 18px 0 8px; flex-wrap: wrap; }
.mm-slot {
  width: 118px; padding: 12px 8px; border-radius: 14px; text-align: center;
  background: rgba(255,255,255,.05); border: 2px dashed var(--stroke);
}
.mm-slot.filled { border-style: solid; border-color: #5dffb6; background: rgba(93,255,182,.12); }
.mm-slot canvas { width: 62px; height: 62px; display: block; margin: 0 auto 5px; }
.mm-slot .nm { font-weight: 900; font-size: 13px; }
.mm-slot .rl { font-size: 11px; opacity: .7; }
.mm-status { text-align: center; font-size: 13px; opacity: .75; margin-top: 4px; }
.mm-slot.mine { border-color: var(--gold); background: rgba(255,196,46,.14); }
.mm-slot.away { opacity: .45; }
.mm-teams { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.mm-team { text-align: center; }
.mm-team > b { display: block; font-size: 12px; letter-spacing: 2px; opacity: .8; margin-bottom: 6px; }
.mm-code {
  text-align: center; margin-top: 10px; font-weight: 900; letter-spacing: 6px;
  font-size: 26px; color: var(--gold);
}
.mm-code small { display: block; letter-spacing: 1px; font-size: 11px; opacity: .7; color: #fff; font-weight: 700; }
#mm-start { margin-top: 12px; }

/* ============ ONLINE-SPIELART ============ */
.wide-seg { margin-top: 4px; }
.room-box {
  margin-top: 12px; padding: 12px 14px; border-radius: 14px;
  background: rgba(0,0,0,.28); border: 1px solid var(--stroke);
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center;
}
.room-join { display: flex; gap: 8px; }
.room-join input {
  width: 120px; padding: 9px 12px; border-radius: 11px; text-align: center;
  background: rgba(255,255,255,.08); border: 2px solid var(--stroke); color: #fff;
  font-weight: 900; letter-spacing: 4px; text-transform: uppercase; font-size: 15px;
}

/* ============ LAYOUT-VARIANTEN ============ */
body.left-handed #stick-zone { left: auto; right: 0; }
body.left-handed #buttons { right: auto; left: 26px; flex-direction: row-reverse; }
body.no-hints #hint { display: none; }

/* ============ RECHTLICHE LINKS ============ */
.legal-links {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  opacity: .55;
}
.legal-links a {
  color: #b6a8ff;
  text-decoration: underline;
}
.legal-links a:hover {
  color: #d8cfff;
}

/* ============ KONTO, QUESTS, CLUB & FREUNDE ============ */
.panel.wide input[type=text],
.panel.wide input[type=email],
.panel.wide input[type=password] {
  width: 100%; margin-top: 8px; padding: 11px 13px; font: inherit; font-size: 14px;
  color: #fff; background: rgba(0,0,0,.32); border: 2px solid var(--stroke); border-radius: 11px;
}
.panel.wide input::placeholder { color: rgba(255,255,255,.45); }
.panel.wide input:focus { outline: none; border-color: var(--gold); }
.panel.wide .play-btn,
.panel.wide .ghost-btn { margin-top: 12px; }
.play-btn.small,
.ghost-btn.small {
  margin-top: 0; padding: 7px 13px; font-size: 12px; letter-spacing: 1px;
  box-shadow: none; border-radius: 10px;
}
.play-btn.small:hover { transform: none; box-shadow: none; }
.acc-tab, .soc-tab { margin-top: 12px; }
#account-msg.bad, #quest-msg.bad, #social-msg.bad { color: #ffc0c6; opacity: 1; }
#acc-google-btn { margin-top: 10px; display: flex; justify-content: center; }

.quest-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.quest-row {
  padding: 11px 13px; border-radius: 12px;
  background: rgba(0,0,0,.28); border: 1px solid var(--stroke);
}
.quest-row.done { border-color: rgba(93,255,182,.55); background: rgba(93,255,182,.10); }
.quest-row.claimed { opacity: .55; }
.quest-head { display: flex; align-items: baseline; gap: 10px; }
.quest-text { flex: 1 1 auto; font-weight: 800; font-size: 13.5px; }
.quest-prog { font-size: 12px; opacity: .75; white-space: nowrap; }
.quest-bar { height: 9px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; margin: 8px 0 4px; }
.quest-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd24a, #ff7a3d); }
.quest-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.quest-foot .chips { margin-top: 4px; }
.quest-state { font-size: 12px; font-weight: 800; color: #b6ffe0; }

.club-head { margin: 10px 0 12px; }
.club-head b { font-size: 16px; }

/* ============ APP-LEISTE UNTEN ============ */
.bottomnav {
  position: relative; z-index: 3; flex: 0 0 auto;
  display: flex; gap: 4px; justify-content: space-around;
  padding: 6px calc(8px + var(--safe-right)) calc(6px + var(--safe-bottom)) calc(8px + var(--safe-left));
  background: linear-gradient(0deg, rgba(8,6,18,.96), rgba(8,6,18,.72));
  border-top: 1px solid var(--stroke);
  backdrop-filter: blur(6px);
}
.nav-btn {
  flex: 1 1 0; min-width: 0; padding: 7px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: transparent; border: none; border-radius: 12px;
  color: rgba(255,255,255,.62); cursor: pointer; font: inherit;
}
.nav-btn i { font-style: normal; font-size: 19px; line-height: 1; }
.nav-btn span { font-size: 10.5px; font-weight: 800; letter-spacing: .5px; }
.nav-btn:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-btn.selected { color: var(--accent); background: rgba(255,255,255,.09); }

/* ============ PARTY ============ */
.party-bar {
  position: relative; z-index: 3; flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 8px calc(14px + var(--safe-right)) 8px calc(14px + var(--safe-left));
  background: rgba(255,196,46,.10); border-bottom: 1px solid rgba(255,196,46,.35);
}
.party-members { display: flex; gap: 7px; flex: 1 1 auto; overflow-x: auto; }
.party-chip {
  display: flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 5px 10px; border-radius: 11px; font-size: 12.5px; font-weight: 800;
  background: rgba(0,0,0,.34); border: 1px solid var(--stroke);
}
.party-chip.leader { border-color: var(--accent); }
.party-chip.me { background: rgba(255,196,46,.18); }
.party-chip.away { opacity: .5; }
.party-actions { display: flex; align-items: center; gap: 8px; }
.party-code { font-weight: 900; letter-spacing: 3px; color: var(--accent); font-size: 14px; }
.party-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.party-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(0,0,0,.28); border: 1px solid var(--stroke);
}
.party-row.leader { border-color: rgba(255,196,46,.55); }
.party-row .pr-name { flex: 1 1 auto; font-weight: 800; }
.party-row .pr-tag { opacity: .5; font-size: 11.5px; letter-spacing: 1px; }
.party-invites { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }

/* Party-Chat — Nachrichten treffen über den Live-Kanal sofort ein. */
.party-chat {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 170px; overflow-y: auto; margin-bottom: 8px;
  padding: 8px 10px; border-radius: 12px;
  background: rgba(0,0,0,.28); border: 1px solid var(--stroke);
  font-size: 12.5px; line-height: 1.45;
}
.party-chat .chat-row { word-break: break-word; }
.party-chat .chat-from { font-weight: 800; color: var(--accent); margin-right: 6px; }
.party-chat .chat-empty { opacity: .55; }

/* ============ SYSTEMNACHRICHT ============ */
.notice-bar {
  position: relative; z-index: 4; flex: 0 0 auto;
  display: flex; align-items: center; gap: 10px;
  padding: 9px calc(14px + var(--safe-right)) 9px calc(14px + var(--safe-left));
  font-size: 12.5px; font-weight: 700; line-height: 1.4;
  background: rgba(80,160,255,.16); border-bottom: 1px solid rgba(80,160,255,.45);
}
.notice-bar.warn { background: rgba(255,196,46,.16); border-bottom-color: rgba(255,196,46,.5); }
.notice-bar.maintenance { background: rgba(255,90,90,.18); border-bottom-color: rgba(255,90,90,.55); }
.notice-bar span { flex: 1 1 auto; }
.notice-close {
  flex: 0 0 auto; cursor: pointer; color: inherit; font-size: 14px; line-height: 1;
  padding: 4px 7px; border-radius: 8px;
  background: rgba(0,0,0,.25); border: 1px solid var(--stroke);
}
.notice-close:hover { background: rgba(0,0,0,.45); }

/* ============ BRAWLER-KARUSSELL ============ */
.carousel { position: relative; display: flex; align-items: stretch; }
.car-track {
  display: flex; flex: 1 1 auto; min-width: 0;
  overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.car-track::-webkit-scrollbar { display: none; }
.car-page {
  flex: 0 0 100%; scroll-snap-align: center;
  padding: 20px 18px 26px; text-align: center;
}
.car-page .bp-art { display: block; margin: 0 auto; width: 168px; height: 168px; }
.car-page h3 { font-size: clamp(24px, 6vw, 38px); letter-spacing: 2px; font-weight: 900; }
.car-page .bp-role { font-size: 13px; opacity: .7; margin-top: 2px; }
.car-page .bp-lore {
  margin: 14px auto 0; max-width: 560px; text-align: left;
  font-size: 13.5px; line-height: 1.65; opacity: .88;
  padding: 13px 15px; border-radius: 14px;
  background: rgba(0,0,0,.3); border: 1px solid var(--stroke);
}
.car-page .bp-lore b { display: block; margin-bottom: 6px; letter-spacing: 2px; font-size: 12px; color: #b6a8ff; }
.car-page .bp-detail { max-width: 560px; margin: 0 auto; text-align: left; }
.car-page.locked .bp-art { filter: grayscale(1) brightness(.6); }
.car-nav {
  flex: 0 0 auto; width: 42px; border: none; cursor: pointer;
  background: transparent; color: rgba(255,255,255,.6); font-size: 34px; font-weight: 900;
}
.car-nav:hover { color: #fff; }
.car-dots { display: flex; gap: 7px; justify-content: center; padding: 0 0 18px; }
.car-dots i {
  width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.25);
  cursor: pointer; transition: background .15s, transform .15s;
}
.car-dots i.on { background: var(--accent); transform: scale(1.25); }
.play-brawler { display: flex; justify-content: center; }
.pb-card {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 10px 16px 10px 10px; border-radius: 16px; color: #fff;
  background: rgba(255,255,255,.06); border: 2px solid var(--stroke);
}
.pb-card:hover { background: rgba(255,255,255,.11); }
.pb-card canvas { width: 62px; height: 62px; }
.pb-card .pb-text { text-align: left; }
.pb-card .pb-name { font-weight: 900; letter-spacing: 1px; }
.pb-card .pb-sub { font-size: 12px; opacity: .7; }

/* ============ GESCHENKE (Star Drops) ============ */
.drop-list { display: flex; flex-wrap: wrap; gap: 10px; }
.drop-card {
  width: 104px; padding: 12px 8px; border-radius: 14px; cursor: pointer; color: #fff;
  background: rgba(0,0,0,.3); border: 2px solid var(--stroke); text-align: center;
}
.drop-card:hover { transform: translateY(-2px); }
.drop-card .dc-ico { font-size: 30px; line-height: 1; }
.drop-card .dc-rar { font-size: 11.5px; font-weight: 900; letter-spacing: 1px; margin-top: 6px; }
.drop-card.r-selten { border-color: #9aa3ad; }
.drop-card.r-superselten { border-color: #6fc3ff; }
.drop-card.r-episch { border-color: #a97bff; }
.drop-card.r-mystisch { border-color: #ff4d5e; }
.drop-card.r-legend { border-color: #ffe98a; }
.drop-card.r-mega { border-color: #39d96b; }
.drop-stage { text-align: center; padding: 10px 0 18px; }
.drop-orb {
  width: 168px; height: 168px; margin: 0 auto; border-radius: 50%;
  display: grid; place-items: center; font-size: 74px; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.35), rgba(0,0,0,.35));
  border: 4px solid var(--accent);
  box-shadow: 0 0 34px rgba(255,196,46,.45);
  transition: transform .12s ease-out, box-shadow .2s;
}
.drop-orb.tap { animation: droptap .26s ease-out; }
.drop-orb.t1 { box-shadow: 0 0 44px rgba(255,196,46,.6); }
.drop-orb.t2 { box-shadow: 0 0 60px rgba(255,196,46,.75); }
.drop-orb.t3 { box-shadow: 0 0 78px rgba(255,255,255,.9); }
.drop-orb.burst { animation: dropburst .5s ease-out forwards; }
@keyframes droptap {
  0% { transform: scale(1) }
  40% { transform: scale(1.14) rotate(-5deg) }
  100% { transform: scale(1) }
}
@keyframes dropburst {
  0% { transform: scale(1); opacity: 1 }
  55% { transform: scale(1.6); opacity: .9 }
  100% { transform: scale(2.6); opacity: 0 }
}
.drop-taps { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.drop-taps i { width: 13px; height: 13px; border-radius: 50%; background: rgba(255,255,255,.2); }
.drop-taps i.on { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.drop-reveal { margin-top: 16px; animation: dropreveal .45s ease-out; }
.drop-reveal .dr-rar { font-size: 26px; font-weight: 900; letter-spacing: 3px; color: var(--accent); }
.drop-reveal .chips { justify-content: center; }
@keyframes dropreveal {
  from { opacity: 0; transform: translateY(18px) scale(.8) }
  to { opacity: 1; transform: none }
}

/* ============ STATISTIK & PRESTIGE ============ */
.stats-box { text-align: left; max-width: 720px; margin: 14px auto 0; }
.stat-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.stat-card {
  flex: 1 1 128px; padding: 12px 14px; border-radius: 14px;
  background: rgba(0,0,0,.3); border: 1px solid var(--stroke);
}
.stat-card b { display: block; font-size: 21px; }
.stat-card span { font-size: 11.5px; opacity: .7; letter-spacing: 1px; }
.rank-card {
  margin-top: 14px; padding: 14px 16px; border-radius: 16px;
  background: rgba(0,0,0,.32); border: 2px solid var(--stroke);
}
.rank-card .rc-head { display: flex; align-items: center; gap: 10px; }
.rank-card .rc-ico { font-size: 30px; }
.rank-card .rc-name { font-size: 19px; font-weight: 900; letter-spacing: 2px; }
.rank-card .rc-sub { font-size: 12px; opacity: .72; margin-top: 4px; }
.prestige-row {
  display: flex; align-items: center; gap: 11px; flex-wrap: wrap;
  padding: 11px 13px; border-radius: 13px; margin-top: 8px;
  background: rgba(0,0,0,.28); border: 1px solid var(--stroke);
}
.prestige-row .pg-ico { font-size: 23px; }
.prestige-row .pg-main { flex: 1 1 160px; min-width: 0; }
.prestige-row .pg-name { font-weight: 900; letter-spacing: 1px; }
.prestige-row .pg-sub { font-size: 11.5px; opacity: .72; }
.prestige-row .progress { margin: 7px 0 0; }
.mode-row {
  padding: 11px 13px; border-radius: 13px; margin-top: 8px;
  background: rgba(0,0,0,.28); border: 1px solid var(--stroke);
}
.mode-row .mr-head { display: flex; align-items: baseline; gap: 9px; }
.mode-row .mr-name { flex: 1 1 auto; font-weight: 900; letter-spacing: 1px; }
.mode-row .mr-sub { font-size: 12px; opacity: .75; margin-top: 4px; line-height: 1.55; }
.recent-row {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 9px 12px; border-radius: 11px; margin-top: 6px; font-size: 13px;
  background: rgba(255,255,255,.05); border-left: 4px solid rgba(255,255,255,.2);
}
.recent-row.win { border-left-color: #5dffb6; }
.recent-row.loss { border-left-color: var(--red); }
.recent-row .rr-main { flex: 1 1 auto; font-weight: 800; }
.recent-row .rr-sub { font-size: 11.5px; opacity: .7; }

/* ============ ÖFFENTLICHE RÄUME ============ */
.rooms-list { display: flex; flex-direction: column; gap: 8px; }
.room-row {
  display: flex; align-items: center; gap: 11px; flex-wrap: wrap;
  padding: 11px 13px; border-radius: 13px;
  background: rgba(0,0,0,.28); border: 1px solid var(--stroke);
}
.room-row .rr-name { flex: 1 1 150px; font-weight: 800; }
.room-row .rr-meta { font-size: 11.5px; opacity: .72; }
.opt-links { display: flex; gap: 10px; flex-wrap: wrap; }
.opt-links .ghost-btn { margin: 0; }

/* ============ FUSSBALL-SETTING ============ */
body.theme-football .gem-ico {
  background: radial-gradient(circle at 34% 30%, #ffffff, #d5d5d5);
  transform: none; border-radius: 50%;
  box-shadow: 0 0 8px rgba(255,255,255,.55), inset 0 0 0 2px rgba(0,0,0,.35);
}
body.theme-football .logo span { text-shadow: 0 6px 0 #0d5a24, 0 10px 26px rgba(0,0,0,.7); }
body.theme-football .play-btn { background: linear-gradient(180deg, #6bf39a, #2fbd57); color: #04240f; }
body.theme-football .play-btn { box-shadow: 0 8px 0 #0d5a24, 0 16px 30px rgba(0,0,0,.45); }
body.theme-football .claim-btn { background: linear-gradient(180deg, #6bf39a, #2fbd57); color: #04240f; }

/* ============ SCHMALE BILDSCHIRME ============ */
@media (max-width: 620px) {
  #topbar { gap: 8px; }
  .wallet { order: 3; flex-basis: 100%; justify-content: flex-start; }
  .pc-name { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .icon-btn { width: 38px; height: 38px; font-size: 17px; border-radius: 11px; }
  .menu-inner { padding: 18px 14px 26px; }
  .mode-card { width: 100%; }
  .panel.sheet .sheet-head,
  .panel.sheet .sheet-body,
  .panel.sheet .sheet-foot { padding-left: 16px; padding-right: 16px; }
  .car-nav { display: none; }
  .car-page { padding: 16px 14px 22px; }
}
