/* Juwel Arena — baut auf styles.css (Tokens, Topbar, Buttons, Footer, Dialog) auf. */

:root {
  --ok: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;
  --gold: #ffcc4d;
  --glass: rgba(18, 12, 31, 0.72);
  --glass-strong: rgba(18, 12, 31, 0.92);
}

.arena-body { overflow-x: hidden; }
.topbar__active { color: var(--text) !important; background: rgba(255, 255, 255, 0.06); }
.btn--sm { padding: 8px 16px; font-size: 0.84rem; }
.btn--lg { padding: 14px 30px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }
.btn--ghost { background: transparent; }
.btn--danger { border-color: rgba(239, 68, 68, 0.5); color: #fca5a5; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--pink); font: inherit; cursor: pointer; text-decoration: underline; }
.linkbtn:hover { color: var(--text); }
code { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.92em; color: var(--text); background: rgba(255, 255, 255, 0.06); padding: 1px 6px; border-radius: 6px; }

/* ---------- Topbar-Chips ---------- */

.botchip {
  display: inline-flex; align-items: center; gap: 7px;
  margin-left: 6px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.76rem; font-weight: 600; color: var(--muted); letter-spacing: 0.04em;
}
.botchip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
.botchip--on .botchip__dot { background: var(--ok); animation: pulse 2.2s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); } 100% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } }

.account {
  display: inline-flex; align-items: center; gap: 9px; margin-left: 6px; padding: 5px 12px 5px 6px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--glass); color: var(--text);
  font: inherit; font-size: 0.86rem; cursor: pointer; transition: border-color 0.2s, transform 0.2s;
}
.account:hover { border-color: rgba(255, 30, 142, 0.5); transform: translateY(-1px); }
.account__head { width: 28px; height: 28px; border-radius: 8px; image-rendering: pixelated; }
.account__name { font-weight: 600; }
.account__balance { font-family: "JetBrains Mono", monospace; color: var(--gold); font-size: 0.82rem; }
.account__balance.bump { animation: bump 0.6s ease; }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.18); color: #fff; } 100% { transform: scale(1); } }

/* ---------- Landing ---------- */

.arena-hero { position: relative; z-index: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 36px 24px 60px; text-align: center; }

.gem { position: relative; width: 150px; height: 170px; margin: 6px auto 0; perspective: 900px; }
.gem__coin {
  position: absolute; inset: 0 auto auto 50%; width: 120px; height: 120px; margin-left: -60px;
  transform-style: preserve-3d; animation: coinspin 7s cubic-bezier(0.45, 0, 0.2, 1) infinite;
}
.gem__face {
  position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; backface-visibility: hidden;
  box-shadow: 0 0 0 4px rgba(255, 204, 77, 0.25), 0 20px 50px rgba(255, 30, 142, 0.35), inset 0 0 30px rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at 35% 30%, #2a1740, #0d0818 70%);
}
.gem__face img { width: 100%; height: 100%; border-radius: 50%; }
.gem__face--back { transform: rotateY(180deg); background: radial-gradient(circle at 35% 30%, #ffe08a, #d79a12 70%); }
.gem__face--back span { font-size: 60px; font-weight: 800; color: #4a2d00; }
.gem__shadow { position: absolute; left: 50%; bottom: 0; width: 90px; height: 16px; margin-left: -45px; border-radius: 50%; background: rgba(255, 30, 142, 0.35); filter: blur(10px); animation: shadowpulse 7s ease-in-out infinite; }
@keyframes coinspin { 0% { transform: rotateY(0) translateY(0); } 45% { transform: rotateY(720deg) translateY(-18px); } 60% { transform: rotateY(900deg) translateY(0); } 100% { transform: rotateY(1080deg) translateY(0); } }
@keyframes shadowpulse { 0%, 100% { transform: scale(1); opacity: 0.9; } 45% { transform: scale(0.7); opacity: 0.5; } }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 56px 0 0; text-align: left; }
.step { position: relative; padding: 24px 22px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(18, 12, 31, 0.95), rgba(10, 7, 19, 0.95)); }
.step__num { position: absolute; top: -14px; left: 20px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 800; font-size: 0.9rem; box-shadow: 0 8px 20px rgba(255, 30, 142, 0.35); }
.step h3 { margin: 4px 0 8px; font-size: 1.02rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.botname { color: var(--pink); }
.step__fee { margin-top: 10px !important; padding-top: 10px; border-top: 1px solid var(--line); color: var(--gold) !important; font-size: 0.84rem !important; }

.showcase { margin-top: 56px; text-align: left; }
.showcase__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.gcard {
  position: relative; overflow: hidden; padding: 22px 20px 20px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--glass); transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.gcard:hover { transform: translateY(-4px); border-color: rgba(255, 30, 142, 0.45); box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45); }
.gcard__icon { font-size: 2rem; line-height: 1; margin-bottom: 12px; filter: drop-shadow(0 6px 14px rgba(255, 30, 142, 0.35)); }
.gcard__name { margin: 0 0 6px; font-size: 1.05rem; font-weight: 700; }
.gcard__tag { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.gcard__kind { position: absolute; top: 14px; right: 14px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.fair { display: flex; gap: 18px; margin: 48px 0 0; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); text-align: left; background: linear-gradient(120deg, rgba(255, 30, 142, 0.10), rgba(106, 43, 255, 0.08)); }
.fair p { margin: 0 0 8px; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.fair .verify__punch { color: var(--text); font-weight: 600; }
.live { margin-top: 48px; text-align: left; }

/* ---------- App ---------- */

.arena-app { padding-top: 10px; }
.announce { margin: 0 0 18px; padding: 12px 16px; border: 1px solid rgba(255, 204, 77, 0.4); border-radius: 12px; background: rgba(255, 204, 77, 0.08); color: var(--text); font-size: 0.92rem; }

.tabs { display: flex; gap: 4px; margin: 10px 0 26px; padding: 5px; border: 1px solid var(--line); border-radius: 999px; background: var(--glass); overflow-x: auto; }
.tab { flex: 1; padding: 10px 16px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer; white-space: nowrap; transition: background 0.2s, color 0.2s; }
.tab:hover { color: var(--text); }
.tab--active { background: var(--grad); color: #fff; box-shadow: 0 8px 20px rgba(255, 30, 142, 0.3); }
.tab--admin { color: var(--gold); }
.tab__badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--pink); color: #fff; font-size: 0.72rem; }

.panel__title { margin: 0 0 14px; font-size: 1.3rem; font-weight: 800; letter-spacing: 0.01em; }
.panel__sub { margin: -8px 0 18px; color: var(--muted); font-size: 0.9rem; }
.section__sub { color: var(--muted); font-size: 0.88rem; }
.section__sub strong { color: var(--text); }

.lobby { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 22px; align-items: start; }
.create { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--glass-strong); position: sticky; top: 16px; }

.gamepick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.gpick { display: flex; flex-direction: column; gap: 4px; padding: 12px 12px 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.02); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color 0.2s, background 0.2s, transform 0.2s; }
.gpick:hover { transform: translateY(-2px); border-color: rgba(255, 30, 142, 0.4); }
.gpick--active { border-color: var(--pink); background: linear-gradient(135deg, rgba(255, 30, 142, 0.18), rgba(106, 43, 255, 0.14)); }
.gpick__icon { font-size: 1.4rem; line-height: 1; }
.gpick__name { font-weight: 700; font-size: 0.9rem; }
.gpick__kind { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; }

.create__opts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.create__opts:empty { display: none; }
.opt { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer; }
.opt--active { border-color: var(--pink); color: var(--text); background: rgba(255, 30, 142, 0.12); }

.field { display: block; margin-bottom: 10px; }
.field__label { display: block; margin-bottom: 6px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.field__input { display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(7, 5, 13, 0.6); transition: border-color 0.2s, box-shadow 0.2s; }
.field__input:focus-within { border-color: rgba(255, 30, 142, 0.55); box-shadow: 0 0 0 4px rgba(255, 30, 142, 0.1); }
.field__input input { flex: 1; min-width: 0; padding: 12px 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 1.05rem; font-family: "JetBrains Mono", monospace; }
.field__unit { color: var(--muted); font-weight: 600; }
.field__hint { display: block; margin-top: 6px; font-size: 0.78rem; color: var(--muted); min-height: 1em; }
.field__hint--bad { color: #fca5a5; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip { padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.chip:hover { color: var(--text); border-color: rgba(255, 30, 142, 0.5); }
.create__summary { margin: 0 0 14px; color: var(--muted); font-size: 0.86rem; line-height: 1.5; }
.create__summary strong { color: var(--gold); }

.duels { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.duel { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; animation: pop 0.35s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }
.duel:hover { transform: translateY(-3px); border-color: rgba(255, 30, 142, 0.4); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4); }
.duel--mine { border-color: rgba(106, 43, 255, 0.5); }
.duel--running { border-color: rgba(255, 204, 77, 0.5); }
.duel__top { display: flex; align-items: center; gap: 10px; }
.duel__head { width: 36px; height: 36px; border-radius: 9px; image-rendering: pixelated; background: #120c1f; }
.duel__who { min-width: 0; flex: 1; }
.duel__name { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.duel__sub { display: block; color: var(--muted); font-size: 0.78rem; }
.duel__game { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.74rem; font-weight: 600; color: var(--muted); }
.duel__stake { font-family: "JetBrains Mono", monospace; font-size: 1.3rem; font-weight: 700; color: var(--gold); }
.duel__stake small { font-size: 0.7rem; color: var(--muted); font-family: "Inter", sans-serif; font-weight: 600; margin-left: 6px; }
.duel__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.duel__time { color: var(--muted); font-size: 0.76rem; }
.duel__status { font-size: 0.8rem; font-weight: 600; }
.duel__status--win { color: var(--ok); }
.duel__status--loss { color: #fca5a5; }
.duel__status--draw { color: var(--muted); }
.duel__status--run { color: var(--gold); }

/* ---------- Konto ---------- */

.konto { display: grid; gap: 16px; }
.wallet { position: relative; overflow: hidden; padding: 28px 26px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(120deg, rgba(255, 30, 142, 0.16), rgba(106, 43, 255, 0.14)); }
.wallet::after { content: ""; position: absolute; right: -40px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 204, 77, 0.22), transparent 70%); }
.wallet__label { display: block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.wallet__amount { display: block; margin: 4px 0 12px; font-family: "JetBrains Mono", monospace; font-size: clamp(2rem, 6vw, 3.2rem); font-weight: 700; color: var(--gold); letter-spacing: -0.02em; }
.wallet__stats { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 0.88rem; }
.wallet__stats strong { color: var(--text); }
.konto__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.box { padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--glass); }
.box__title { margin: 0 0 6px; font-size: 1.02rem; font-weight: 700; }
.box__text { margin: 0 0 12px; color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.box__note { margin: 10px 0 0; font-size: 0.82rem; color: var(--muted); min-height: 1em; }
.box__note--bad { color: #fca5a5; }
.box__note--ok { color: var(--ok); }
.cmd { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(7, 5, 13, 0.6); }
.cmd code { flex: 1; min-width: 0; background: none; padding: 0; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd--big code { font-size: 1.15rem; text-align: center; }
.copy { padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.04); color: var(--text); font: inherit; font-size: 0.78rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.copy:hover { border-color: var(--pink); }
.copy--done { border-color: var(--ok); color: var(--ok); }
.withdraw { display: flex; gap: 8px; }
.withdraw .field__input { flex: 1; }
.wlist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.wlist li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 0.84rem; }
.wlist .amt { font-family: "JetBrains Mono", monospace; color: var(--text); }
.wst { padding: 2px 9px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em; }
.wst--queued, .wst--processing { background: rgba(255, 204, 77, 0.15); color: var(--gold); }
.wst--completed { background: rgba(34, 197, 94, 0.15); color: var(--ok); }
.wst--failed, .wst--cancelled { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
.wst--unclear { background: rgba(167, 139, 250, 0.18); color: #c4b5fd; }
.wlist .linkbtn { font-size: 0.78rem; }
.ledger { width: 100%; border-collapse: collapse; font-size: 0.86rem; }
.ledger th { text-align: left; padding: 8px 10px; color: var(--muted); font-weight: 600; font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.ledger td { padding: 9px 10px; border-bottom: 1px solid rgba(36, 26, 58, 0.6); vertical-align: top; }
.ledger .num { text-align: right; font-family: "JetBrains Mono", monospace; white-space: nowrap; }
.ledger .plus { color: var(--ok); }
.ledger .minus { color: #fca5a5; }
.ledger .when { color: var(--muted); white-space: nowrap; }
.konto__foot { display: flex; justify-content: flex-end; }

/* ---------- Rangliste ---------- */

.board { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: rank; }
.board li { display: grid; grid-template-columns: 40px 40px 1fr auto auto; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); }
.board .rank { font-family: "JetBrains Mono", monospace; font-weight: 700; color: var(--muted); }
.board li:nth-child(1) .rank { color: var(--gold); }
.board li:nth-child(2) .rank { color: #d1d5db; }
.board li:nth-child(3) .rank { color: #d97706; }
.board img { width: 36px; height: 36px; border-radius: 9px; image-rendering: pixelated; }
.board .name { font-weight: 700; }
.board .games { color: var(--muted); font-size: 0.82rem; }
.board .net { font-family: "JetBrains Mono", monospace; font-weight: 700; }

/* ---------- Duell-Overlay ---------- */

.match { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(4, 2, 10, 0.82); backdrop-filter: blur(8px); overflow-y: auto; }
.match__inner { width: min(760px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(180deg, #110b1e, #07050d); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7); animation: pop 0.3s ease; }
.m-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin-bottom: 16px; }
.m-player { display: flex; align-items: center; gap: 10px; min-width: 0; }
.m-player--right { flex-direction: row-reverse; text-align: right; }
.m-player img { width: 52px; height: 52px; border-radius: 12px; image-rendering: pixelated; background: #120c1f; border: 2px solid transparent; }
.m-player--turn img { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255, 204, 77, 0.2); }
.m-player--win img { border-color: var(--ok); box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25); }
.m-player__name { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-player__sub { display: block; color: var(--muted); font-size: 0.76rem; }
.m-player__score { display: block; font-family: "JetBrains Mono", monospace; font-size: 1.4rem; font-weight: 700; color: var(--gold); line-height: 1.1; }
.m-mid { text-align: center; }
.m-mid__vs { display: block; font-weight: 800; letter-spacing: 0.2em; color: var(--muted); font-size: 0.8rem; }
.m-mid__pot { display: block; font-family: "JetBrains Mono", monospace; font-size: 1.2rem; font-weight: 700; color: var(--gold); }
.m-mid__game { display: block; color: var(--muted); font-size: 0.76rem; }
.m-timer { height: 6px; margin: 0 0 16px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.m-timer__bar { height: 100%; width: 100%; border-radius: 3px; background: var(--grad); transition: width 0.25s linear; }
.m-timer--urgent .m-timer__bar { background: var(--bad); }
.m-status { margin: 0 0 14px; text-align: center; font-weight: 600; font-size: 1rem; min-height: 1.4em; }
.m-status:empty { display: none; }
.m-status small { display: block; color: var(--muted); font-weight: 600; font-family: "JetBrains Mono", monospace; font-size: 0.82rem; margin-top: 4px; }
.m-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.m-fairline { margin: 14px 0 0; text-align: center; font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); opacity: 0.8; }
.m-result { margin: 0 0 14px; padding: 16px; border-radius: 14px; text-align: center; font-size: 1.3rem; font-weight: 800; animation: pop 0.4s ease; }
.m-result--win { background: rgba(34, 197, 94, 0.15); color: var(--ok); border: 1px solid rgba(34, 197, 94, 0.4); }
.m-result--loss { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.35); }
.m-result--draw { background: rgba(255, 255, 255, 0.05); color: var(--text); border: 1px solid var(--line); }
.m-result small { display: block; margin-top: 4px; font-size: 0.86rem; font-weight: 500; color: var(--muted); }
.m-wait { padding: 30px 10px; text-align: center; color: var(--muted); }
.m-wait .spinner { margin-bottom: 12px; }

/* Spielstand */
.m-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 0 0 16px; }
.m-score__side { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--glass); transition: border-color 0.3s, box-shadow 0.3s; }
.m-score__side img { width: 40px; height: 40px; border-radius: 10px; image-rendering: pixelated; }
.m-score__side--lead { border-color: rgba(255, 204, 77, 0.7); box-shadow: 0 0 0 3px rgba(255, 204, 77, 0.12), 0 12px 30px rgba(255, 204, 77, 0.12); }
.m-score__num { font-family: "JetBrains Mono", monospace; font-size: 2.4rem; font-weight: 700; line-height: 1; color: var(--text); }
.m-score__side--lead .m-score__num { color: var(--gold); }
.m-score__pips { display: flex; flex-direction: column; gap: 5px; }
.m-score__pips i { width: 10px; height: 10px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); }
.m-score__pips i.on { background: var(--grad); border-color: transparent; box-shadow: 0 0 10px rgba(255, 30, 142, 0.6); }
.m-score__mid { width: 44px; text-align: center; font-size: 1.5rem; }
.m-score__trophy { display: inline-block; opacity: 0.35; filter: grayscale(1); transition: transform 0.4s, opacity 0.4s, filter 0.4s; }
.m-score__trophy--left { opacity: 1; filter: none; transform: translateX(-10px) rotate(-12deg); }
.m-score__trophy--right { opacity: 1; filter: none; transform: translateX(10px) rotate(12deg); }
.plusone { position: absolute; top: -10px; right: -14px; padding: 2px 8px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 0.78rem; font-weight: 800; font-style: normal; box-shadow: 0 6px 16px rgba(255, 30, 142, 0.45); animation: pop 0.4s ease; }
.plusone--me { background: var(--ok); box-shadow: 0 6px 16px rgba(34, 197, 94, 0.45); }
.rps-reveal__mid { font-size: 2rem; font-weight: 800; color: var(--muted); text-align: center; }
.rps-hand { position: relative; }
.rps-hand--shake { animation: fist 0.5s ease-in-out infinite; opacity: 0.9; }
@keyframes fist { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-16px) rotate(6deg); } }
.rps-reveal--big { margin: 18px 0 22px; }
.rps-reveal--big .rps-hand { font-size: 4.6rem; }
.rps-hand--won { filter: drop-shadow(0 0 16px rgba(255, 204, 77, 0.8)); transform: scale(1.12); }
.rps-hand--lost { opacity: 0.4; filter: grayscale(0.6); }
.dice-side { position: relative; }
.dice-side--last .die { opacity: 0.55; }
.dice-side--won { border-color: rgba(255, 204, 77, 0.7); }
.dice-sum { position: relative; display: inline-block; }
.m-turn { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); font-weight: 800; letter-spacing: 0.1em; font-size: 0.9rem; color: var(--muted); }
.m-turn--me { color: var(--gold); border-color: rgba(255, 204, 77, 0.6); background: rgba(255, 204, 77, 0.08); animation: pulse-border 1.6s ease-in-out infinite; }
.m-turn i { width: 14px; height: 14px; border-radius: 50%; }
@keyframes pulse-border { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 204, 77, 0.3); } 50% { box-shadow: 0 0 0 6px rgba(255, 204, 77, 0); } }
@media (max-width: 560px) { .m-score { gap: 6px; } .m-score__side { gap: 8px; padding: 8px; } .m-score__num { font-size: 1.8rem; } }

/* Münze */
.coin-stage { display: grid; place-items: center; min-height: 230px; perspective: 1000px; }
.coin { position: relative; width: 150px; height: 150px; transform-style: preserve-3d; transition: transform 2.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.coin__face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; backface-visibility: hidden; font-weight: 800; font-size: 1.1rem; letter-spacing: 0.12em; text-transform: uppercase; box-shadow: 0 0 0 5px rgba(255, 204, 77, 0.25), 0 24px 60px rgba(255, 30, 142, 0.35); }
.coin__face--kopf { background: radial-gradient(circle at 35% 30%, #2a1740, #0d0818 70%); box-shadow: 0 0 0 5px rgba(255, 30, 142, 0.35), 0 24px 60px rgba(255, 30, 142, 0.4); }
.coin__face--kopf img { width: 100%; height: 100%; border-radius: 50%; }
.coin__face--zahl { background: radial-gradient(circle at 35% 30%, #ffe08a, #d79a12 70%); color: #4a2d00; font-size: 4rem; transform: rotateY(180deg); }
.coin-sides { display: flex; justify-content: center; gap: 12px; margin-top: 10px; }
.coin-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); font-size: 0.86rem; transition: border-color 0.3s, box-shadow 0.3s; }
.coin-chip img { width: 22px; height: 22px; border-radius: 6px; image-rendering: pixelated; }
.coin-chip--kopf b { color: var(--pink); }
.coin-chip--zahl b { color: var(--gold); }
.coin-chip--won { border-color: rgba(255, 204, 77, 0.7); box-shadow: 0 0 0 3px rgba(255, 204, 77, 0.12); animation: pop 0.4s ease; }
.coin-chip--won::after { content: "🏆"; margin-left: 2px; font-size: 0.9rem; }

/* Seitenwahl beim Münzwurf */
.sidepick { width: min(560px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(180deg, #120c1f, #07050d); color: var(--text); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7); }
.sidepick::backdrop { background: rgba(4, 2, 10, 0.8); backdrop-filter: blur(6px); }
.sidepick__inner { position: relative; padding: 30px 28px 28px; text-align: center; }
.sidepick__title { margin: 0; font-size: 1.4rem; font-weight: 800; letter-spacing: 0.04em; }
.sidepick__stake { margin: 4px 0 22px; font-family: "JetBrains Mono", monospace; color: var(--gold); font-weight: 700; }
.sidepick__faces { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sidepick__face { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 22px 12px 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--glass); color: var(--text); font: inherit; cursor: pointer; transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s; }
.sidepick__face:hover { transform: translateY(-6px); border-color: rgba(255, 204, 77, 0.7); box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5); }
.sidepick__coin { width: 130px; height: 130px; border-radius: 50%; display: grid; place-items: center; transition: transform 0.4s; }
.sidepick__face:hover .sidepick__coin { transform: rotateY(25deg) scale(1.05); }
.sidepick__face--kopf .sidepick__coin { background: radial-gradient(circle at 35% 30%, #2a1740, #0d0818 70%); box-shadow: 0 0 0 5px rgba(255, 30, 142, 0.35), 0 20px 50px rgba(255, 30, 142, 0.4); }
.sidepick__face--kopf .sidepick__coin img { width: 100%; height: 100%; border-radius: 50%; }
.sidepick__face--zahl .sidepick__coin { background: radial-gradient(circle at 35% 30%, #ffe08a, #d79a12 70%); box-shadow: 0 0 0 5px rgba(255, 204, 77, 0.3), 0 20px 50px rgba(255, 204, 77, 0.3); }
.sidepick__gold { font-size: 4rem; font-weight: 800; color: #4a2d00; }
.sidepick__label { font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.9rem; }
.sidepick__face--kopf .sidepick__label { color: var(--pink); }
.sidepick__face--zahl .sidepick__label { color: var(--gold); }
@media (max-width: 480px) { .sidepick__faces { grid-template-columns: 1fr; } }
.coin--spin { animation: coinloop 0.5s linear infinite; }
@keyframes coinloop { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }

/* Schere Stein Papier */
.rps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rps__btn { padding: 22px 10px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--glass); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; transition: transform 0.2s, border-color 0.2s, background 0.2s; }
.rps__btn:hover:not(:disabled) { transform: translateY(-4px); border-color: rgba(255, 30, 142, 0.5); }
.rps__btn:disabled { cursor: default; opacity: 0.6; }
.rps__btn--picked { border-color: var(--pink); background: rgba(255, 30, 142, 0.14); opacity: 1 !important; }
.rps__icon { display: block; font-size: 2.6rem; line-height: 1; margin-bottom: 10px; }
.rps-reveal { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 6px 0 16px; }
.rps-hand { text-align: center; font-size: 3.4rem; line-height: 1; animation: shake 0.6s ease; transition: transform 0.3s, opacity 0.3s; }
.rps-hand--hidden { opacity: 0.4; font-size: 2.4rem; }
.rps-hand small { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 6px; }
@keyframes shake { 0% { transform: translateY(0); } 20% { transform: translateY(-12px); } 40% { transform: translateY(0); } 60% { transform: translateY(-8px); } 80% { transform: translateY(0); } }
.rps-rounds { display: flex; justify-content: center; gap: 6px; margin: 0 0 10px; }
.rps-rounds span { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--line); }
.rps-rounds .r0 { background: var(--pink); border-color: var(--pink); }
.rps-rounds .r1 { background: var(--violet); border-color: var(--violet); }
.rps-rounds .rn { background: rgba(255, 255, 255, 0.15); }

/* Würfel */
.dice-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; }
.dice-side { padding: 16px; border: 1px solid var(--line); border-radius: 16px; text-align: center; background: var(--glass); }
.dice-side--turn { border-color: var(--gold); }
.dice-side__name { display: block; margin-bottom: 10px; font-weight: 700; font-size: 0.9rem; }
.dice-pair { display: flex; justify-content: center; gap: 12px; min-height: 64px; }
.die { width: 58px; height: 58px; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 8px; border-radius: 12px; background: linear-gradient(145deg, #fff, #d9d4e6); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.15), 0 10px 24px rgba(0, 0, 0, 0.4); animation: dieroll 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.die--empty { background: rgba(255, 255, 255, 0.05); box-shadow: none; animation: none; border: 1px dashed var(--line); }
.die span { width: 100%; height: 100%; border-radius: 50%; background: #1b1130; visibility: hidden; transform: scale(0.65); }
.die span.on { visibility: visible; }
@keyframes dieroll { 0% { transform: rotate(-200deg) scale(0.4); opacity: 0; } 70% { transform: rotate(10deg) scale(1.08); opacity: 1; } 100% { transform: none; } }
.dice-sum { display: block; margin-top: 8px; font-family: "JetBrains Mono", monospace; font-size: 1.2rem; font-weight: 700; color: var(--gold); min-height: 1.4em; }

/* Vier gewinnt */
.c4 { --cell: 54px; display: grid; grid-template-columns: repeat(7, var(--cell)); gap: 6px; justify-content: center; padding: 12px; border-radius: 18px; background: linear-gradient(180deg, #1a1030, #0f0a1c); border: 1px solid var(--line); box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.5); }
.c4__col { display: grid; grid-template-rows: repeat(6, var(--cell)); gap: 6px; border-radius: 10px; cursor: pointer; transition: background 0.15s; }
.c4__col:hover { background: rgba(255, 255, 255, 0.05); }
.c4--locked .c4__col { cursor: default; }
.c4--locked .c4__col:hover { background: transparent; }
.c4__cell { border-radius: 50%; background: rgba(0, 0, 0, 0.45); box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.6); }
.c4__cell--0 { background: radial-gradient(circle at 35% 30%, #ff7ab8, var(--pink) 70%); box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.3); }
.c4__cell--1 { background: radial-gradient(circle at 35% 30%, #a78bfa, var(--violet) 70%); box-shadow: inset 0 -3px 6px rgba(0, 0, 0, 0.3); }
.c4__cell--last { animation: drop 0.45s cubic-bezier(0.3, 1.2, 0.5, 1); }
.c4__cell--win { box-shadow: 0 0 0 3px #fff, 0 0 18px rgba(255, 255, 255, 0.6); }
@keyframes drop { from { transform: translateY(-220px); } to { transform: none; } }
.c4-legend { display: flex; justify-content: center; gap: 18px; margin-top: 12px; font-size: 0.84rem; color: var(--muted); }
.c4-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* ---------- Login ---------- */

.login { width: min(480px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(180deg, #120c1f, #07050d); color: var(--text); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7); }
.login::backdrop { background: rgba(4, 2, 10, 0.78); backdrop-filter: blur(6px); }
.login__inner { position: relative; padding: 30px 28px 24px; text-align: center; }
.login h2 { margin: 0 0 6px; font-size: 1.3rem; }
.login__lead { margin: 0 0 18px; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.login__code { margin: 0 0 12px; font-family: "JetBrains Mono", monospace; font-size: clamp(2.2rem, 9vw, 3rem); font-weight: 700; letter-spacing: 0.3em; text-indent: 0.3em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login__status { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 18px 0 8px; font-size: 0.9rem; color: var(--muted); min-height: 1.4em; }
.login__status--ok { color: var(--ok); font-weight: 600; }
.login__status--bad { color: #fca5a5; }
.login__meta { margin: 0; color: var(--muted); font-size: 0.8rem; }
.login__botwarn { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: rgba(239, 68, 68, 0.12); color: #fca5a5; font-size: 0.82rem; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, 0.15); border-top-color: var(--pink); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Admin ---------- */

.admin { display: grid; gap: 16px; }
.admin__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.kpi { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); }
.kpi__label { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.kpi__value { display: block; margin-top: 4px; font-family: "JetBrains Mono", monospace; font-size: 1.25rem; font-weight: 700; }
.admin table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.admin th { text-align: left; padding: 8px; color: var(--muted); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.admin td { padding: 8px; border-bottom: 1px solid rgba(36, 26, 58, 0.6); vertical-align: middle; }
.admin td.num, .admin th.num { text-align: right; font-family: "JetBrains Mono", monospace; white-space: nowrap; }
.admin .tools { display: flex; flex-wrap: wrap; gap: 6px; }
.admin .tools .btn { padding: 5px 10px; font-size: 0.76rem; }
.admin input[type="text"], .admin input[type="number"] { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(7, 5, 13, 0.6); color: var(--text); font: inherit; font-size: 0.86rem; }
.admin .settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.admin .settings label { display: flex; flex-direction: column; gap: 4px; font-size: 0.78rem; color: var(--muted); }
.admin .toggle { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text); }
.chatlog { max-height: 320px; overflow-y: auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(7, 5, 13, 0.7); font-family: "JetBrains Mono", monospace; font-size: 0.74rem; line-height: 1.55; }
.chatlog .t { color: var(--muted); }
.chatlog .k-error { color: #fca5a5; }
.chatlog .k-pay_in { color: var(--ok); }
.chatlog .k-pay_out { color: var(--gold); }
.chatlog .k-whisper { color: #c4b5fd; }
.chatlog .k-out { color: var(--muted); }
.chatlog .k-server { color: var(--text); }
.authbox { padding: 16px; border: 1px solid rgba(255, 204, 77, 0.5); border-radius: 12px; background: rgba(255, 204, 77, 0.08); }
.authbox code { font-size: 1.4rem; letter-spacing: 0.15em; }

/* ---------- Toasts ---------- */

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast { padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass-strong); color: var(--text); font-size: 0.9rem; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); animation: pop 0.3s ease; }
.toast--ok { border-color: rgba(34, 197, 94, 0.5); }
.toast--bad { border-color: rgba(239, 68, 68, 0.5); }
.toast--gold { border-color: rgba(255, 204, 77, 0.5); }
.toast strong { color: var(--gold); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .lobby { grid-template-columns: 1fr; }
  .create { position: static; }
  .konto__grid { grid-template-columns: 1fr; }
  .c4 { --cell: 40px; }
}
@media (max-width: 560px) {
  .topbar__links { flex-wrap: wrap; justify-content: flex-end; }
  .account__name { display: none; }
  .botchip__text { display: none; }
  .m-head { grid-template-columns: 1fr; }
  .m-player--right { flex-direction: row; text-align: left; }
  .c4 { --cell: 36px; gap: 4px; padding: 8px; }
  .c4__col { gap: 4px; }
  .rps__icon { font-size: 2rem; }
  .dice-stage { grid-template-columns: 1fr; }
  .board li { grid-template-columns: 30px 32px 1fr auto; }
  .board .games { display: none; }
  .withdraw { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .gem__coin, .coin--spin, .botchip--on .botchip__dot { animation: none; }
  .duel, .toast, .m-result, .match__inner, .die, .c4__cell--last, .rps-hand { animation: none; }
}

/* ======================= Juwel Party ======================= */

.tab--party { color: #f0abfc; }
.gcard--party { grid-column: 1 / -1; background: linear-gradient(120deg, rgba(255, 30, 142, 0.18), rgba(106, 43, 255, 0.16)); }
.create--party .panel__sub { margin-top: -8px; }
.pl__heads { display: flex; gap: 6px; }
.pl__heads img { width: 34px; height: 34px; border-radius: 9px; image-rendering: pixelated; }
.pl__slot { width: 34px; height: 34px; border-radius: 9px; border: 1px dashed var(--line); }
.chip--active { border-color: var(--pink); color: var(--text); background: rgba(255, 30, 142, 0.12); }

.party { position: fixed; inset: 0; z-index: 55; display: grid; place-items: start center; padding: 12px; background: rgba(4, 2, 10, 0.9); backdrop-filter: blur(8px); overflow-y: auto; }
.party__inner { width: min(1080px, 100%); padding: 16px 18px 18px; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(180deg, #120b20, #07050d); box-shadow: 0 40px 100px rgba(0, 0, 0, 0.7); animation: pop 0.3s ease; }

.pp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.pp-head__title { display: block; font-weight: 800; font-size: 1.3rem; letter-spacing: 0.04em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pp-head__sub { display: block; color: var(--muted); font-size: 0.82rem; }
.pp-head__pot { text-align: center; font-family: "JetBrains Mono", monospace; font-weight: 700; color: var(--gold); font-size: 1.2rem; }
.pp-head__pot small { display: block; font-family: "Inter", sans-serif; font-size: 0.68rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

.pp-hud { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.pp-hud--2 { grid-template-columns: repeat(2, 1fr); }
.pp-hud--3 { grid-template-columns: repeat(3, 1fr); }
.pp-player { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); transition: border-color 0.3s, box-shadow 0.3s; }
.pp-player img { width: 44px; height: 44px; border-radius: 11px; image-rendering: pixelated; border: 2px solid var(--c); }
.pp-player--turn { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent), 0 12px 30px rgba(0, 0, 0, 0.4); }
.pp-player--empty { opacity: 0.5; }
.pp-player__body { min-width: 0; flex: 1; }
.pp-player__name { display: block; font-weight: 700; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pp-player__stats { display: flex; gap: 10px; font-size: 0.86rem; color: var(--muted); }
.pp-player__stats b { color: var(--text); }
.pp-player__stats i { font-style: normal; }
.pp-player__rank { position: absolute; top: -8px; right: 10px; padding: 1px 8px; border-radius: 999px; background: var(--c); color: #fff; font-size: 0.7rem; font-weight: 800; }

/* Brett in 3D */
.pb { position: relative; width: 100%; overflow: hidden; perspective: 1100px; perspective-origin: 50% 35%; --scale: 0.8; --tilt: 56deg; }
.pb__plane { position: absolute; left: 50%; top: 48%; width: 1000px; height: 600px; margin: -300px 0 0 -500px; transform-origin: 50% 50%; transform: scale(var(--scale)) rotateX(var(--tilt)); transform-style: preserve-3d; border-radius: 60px;
  background: radial-gradient(60% 55% at 50% 50%, rgba(106, 43, 255, 0.22), rgba(7, 5, 13, 0) 70%), repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 36px), repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 36px), linear-gradient(180deg, #171029, #0b0716);
  box-shadow: 0 60px 90px rgba(0, 0, 0, 0.7), inset 0 0 0 2px rgba(255, 255, 255, 0.04); }
.pb__tile { position: absolute; width: 66px; height: 66px; margin: -33px 0 0 -33px; border-radius: 16px; display: grid; place-items: center; font-weight: 800; font-size: 1.05rem; color: rgba(255, 255, 255, 0.92); transform: translateZ(8px); transform-style: preserve-3d; box-shadow: 0 12px 0 rgba(0, 0, 0, 0.5), 0 22px 30px rgba(0, 0, 0, 0.55), inset 0 2px 0 rgba(255, 255, 255, 0.25); }
.pb__tile--blue { background: linear-gradient(160deg, #60a5fa, #2563eb); }
.pb__tile--red { background: linear-gradient(160deg, #f87171, #b91c1c); }
.pb__tile--bonus { background: linear-gradient(160deg, #fde68a, #d97706); color: #3b2200; }
.pb__tile--event { background: linear-gradient(160deg, #c084fc, #6d28d9); font-size: 1.5rem; }
.pb__tile--start { background: linear-gradient(160deg, #4ade80, #15803d); font-size: 1.3rem; }
.pb__tile--star { box-shadow: 0 0 0 4px rgba(255, 204, 77, 0.9), 0 0 40px rgba(255, 204, 77, 0.7), 0 12px 0 rgba(0, 0, 0, 0.5), 0 22px 30px rgba(0, 0, 0, 0.55); }
.pb__gem { position: absolute; margin: -70px 0 0 -22px; font-size: 44px; line-height: 1; transform: rotateX(calc(-1 * var(--tilt))); transform-origin: 50% 100%; filter: drop-shadow(0 0 16px rgba(255, 30, 142, 0.9)); animation: gemfloat 1.8s ease-in-out infinite; pointer-events: none; }
@keyframes gemfloat { 0%, 100% { transform: rotateX(calc(-1 * var(--tilt))) translateY(0); } 50% { transform: rotateX(calc(-1 * var(--tilt))) translateY(-14px); } }
.pb__token { position: absolute; width: 46px; height: 60px; margin: -58px 0 0 -23px; transform: rotateX(calc(-1 * var(--tilt))); transform-origin: 50% 100%; transition: left 0.22s linear, top 0.22s linear; z-index: 2; }
.pb__token img { position: absolute; left: 1px; top: 0; width: 44px; height: 44px; border-radius: 12px; border: 3px solid var(--c); image-rendering: pixelated; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(0, 0, 0, 0.4); background: #120c1f; }
.pb__token i { position: absolute; left: 7px; bottom: -4px; width: 32px; height: 10px; border-radius: 50%; background: rgba(0, 0, 0, 0.55); filter: blur(2px); }
.pb__token--hop img { animation: hop 0.22s ease-out; }
@keyframes hop { 0% { transform: translateY(0); } 50% { transform: translateY(-16px); } 100% { transform: translateY(0); } }
.pb__bubble { position: absolute; margin: -110px 0 0 -70px; width: 140px; text-align: center; padding: 6px 10px; border-radius: 999px; background: rgba(18, 12, 31, 0.95); border: 1px solid var(--line); color: var(--text); font-weight: 700; font-size: 0.9rem; transform: rotateX(calc(-1 * var(--tilt))); transform-origin: 50% 100%; animation: bubble 1.6s ease forwards; pointer-events: none; z-index: 3; }
.pb__bubble--plus { color: var(--ok); border-color: rgba(34, 197, 94, 0.5); }
.pb__bubble--minus { color: #fca5a5; border-color: rgba(239, 68, 68, 0.5); }
@keyframes bubble { 0% { opacity: 0; transform: rotateX(calc(-1 * var(--tilt))) translateY(10px); } 15% { opacity: 1; transform: rotateX(calc(-1 * var(--tilt))) translateY(0); } 80% { opacity: 1; } 100% { opacity: 0; transform: rotateX(calc(-1 * var(--tilt))) translateY(-30px); } }

/* Würfel */
.dice3d { width: 64px; height: 64px; perspective: 500px; flex: none; }
.dice3d__cube { position: relative; width: 64px; height: 64px; transform-style: preserve-3d; transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.dice3d--roll .dice3d__cube { animation: diceroll 0.35s linear infinite; }
@keyframes diceroll { from { transform: rotateX(0) rotateY(0); } to { transform: rotateX(360deg) rotateY(360deg); } }
.dice3d__face { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 9px; border-radius: 12px; background: linear-gradient(145deg, #fff, #d9d4e6); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.08); backface-visibility: hidden; }
.dice3d__face span { width: 100%; height: 100%; border-radius: 50%; background: #1b1130; visibility: hidden; transform: scale(0.62); }
.dice3d__face span.on { visibility: visible; }
.dice3d__face--1 { transform: rotateY(0) translateZ(32px); }
.dice3d__face--6 { transform: rotateY(180deg) translateZ(32px); }
.dice3d__face--3 { transform: rotateY(90deg) translateZ(32px); }
.dice3d__face--4 { transform: rotateY(-90deg) translateZ(32px); }
.dice3d__face--2 { transform: rotateX(90deg) translateZ(32px); }
.dice3d__face--5 { transform: rotateX(-90deg) translateZ(32px); }

/* Aktionen */
.pp-act { margin-top: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--glass); }
.pp-act__row { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; }
.pp-act__text { font-size: 1.05rem; color: var(--muted); }
.pp-act__text b { color: var(--text); }
.pp-act__text small, .pp-act__hint { display: block; margin-top: 4px; text-align: center; font-family: "JetBrains Mono", monospace; font-size: 0.82rem; color: var(--muted); }
.pp-star { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.pp-star__gem { font-size: 3rem; filter: drop-shadow(0 0 18px rgba(255, 30, 142, 0.9)); animation: gemfloat2 1.6s ease-in-out infinite; }
@keyframes gemfloat2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.pp-star b { display: block; font-size: 1.1rem; }
.pp-star small { color: var(--muted); }
.pp-lobby { text-align: center; padding: 24px 10px; color: var(--muted); }
.pp-lobby .spinner { margin-bottom: 10px; }
.pp-lobby__rules { font-size: 0.84rem; max-width: 560px; margin: 8px auto 0; line-height: 1.5; }
.pp-log { margin-top: 10px; font-size: 0.8rem; color: var(--muted); display: grid; gap: 2px; }
.pp-log div:first-child { color: var(--text); }

/* Minispiel */
.pp-mini { text-align: center; }
.pp-mini__kicker { display: block; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--pink); font-weight: 700; }
.pp-mini__name { margin: 2px 0 4px; font-size: 1.4rem; font-weight: 800; }
.pp-mini__hint { margin: 0 0 14px; color: var(--muted); font-size: 0.9rem; }
.pp-mini__choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pp-choice { min-width: 96px; padding: 16px 14px 12px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.03); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; transition: transform 0.2s, border-color 0.2s, background 0.2s; }
.pp-choice:hover:not(:disabled) { transform: translateY(-4px); border-color: rgba(255, 30, 142, 0.5); }
.pp-choice:disabled { cursor: default; opacity: 0.6; }
.pp-choice--picked { border-color: var(--pink); background: rgba(255, 30, 142, 0.14); opacity: 1 !important; }
.pp-choice__icon { display: block; font-size: 2rem; margin-bottom: 6px; }
.pp-mini__choices--numbers .pp-choice { min-width: 56px; padding: 12px 0; font-family: "JetBrains Mono", monospace; font-size: 1.1rem; }
.pp-mini__who { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.pp-mini__who img { width: 30px; height: 30px; border-radius: 8px; opacity: 0.35; image-rendering: pixelated; }
.pp-mini__who img.done { opacity: 1; box-shadow: 0 0 0 2px var(--ok); }
.pp-mini__results { display: grid; gap: 6px; max-width: 460px; margin: 10px auto 14px; }
.pp-res { display: grid; grid-template-columns: 32px 1fr auto auto; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; text-align: left; }
.pp-res img { width: 30px; height: 30px; border-radius: 8px; image-rendering: pixelated; }
.pp-res--win { border-color: rgba(34, 197, 94, 0.5); }
.pp-res__choice { color: var(--muted); font-size: 0.86rem; }
.pp-res__gain { font-family: "JetBrains Mono", monospace; color: var(--gold); }

/* Ergebnis */
.pp-podium { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.pp-podium__p { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, 0.03); }
.pp-podium__p--1 { border-color: rgba(255, 204, 77, 0.7); background: rgba(255, 204, 77, 0.08); }
.pp-podium__rank { font-size: 1.6rem; }
.pp-podium__p img { width: 56px; height: 56px; border-radius: 14px; image-rendering: pixelated; }
.pp-podium__name { font-weight: 700; }
.pp-podium__stats { color: var(--muted); font-size: 0.84rem; }
.pp-podium__pay { font-family: "JetBrains Mono", monospace; color: var(--gold); }

@media (max-width: 700px) {
  .pp-hud, .pp-hud--3 { grid-template-columns: repeat(2, 1fr); }
  .pp-player img { width: 36px; height: 36px; }
  .party__inner { padding: 12px; }
  .pb { --tilt: 42deg; perspective: 900px; }
  .pb__plane { top: 44%; }
}

/* 3D-Minispiele */
.p3d { position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 440px; margin: 10px auto 0; border-radius: 18px; overflow: hidden; background: radial-gradient(70% 60% at 50% 40%, #1a1030, #07050d); border: 1px solid var(--line); box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.6), 0 20px 50px rgba(0, 0, 0, 0.5); touch-action: none; user-select: none; }
.p3d canvas { display: block; width: 100% !important; height: 100% !important; }
.p3d__hud { position: absolute; left: 12px; top: 10px; right: 12px; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.p3d__score { font-family: "JetBrains Mono", monospace; font-size: 1.6rem; font-weight: 700; color: var(--gold); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8); }
.p3d__score small { display: block; font-family: "Inter", sans-serif; font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.p3d__time { font-family: "JetBrains Mono", monospace; font-size: 1.1rem; font-weight: 700; color: var(--text); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8); }
.p3d__state { position: absolute; left: 0; right: 0; top: 42%; text-align: center; font-size: 1.4rem; font-weight: 800; color: #fff; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.9); pointer-events: none; animation: pop 0.3s ease; }
.p3d__count { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(4, 2, 10, 0.55); backdrop-filter: blur(3px); pointer-events: none; }
.p3d__count b { font-size: clamp(3rem, 12vw, 6rem); font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; animation: pop 0.4s ease; }
.p3d__count span { display: block; margin-top: 6px; color: var(--muted); font-size: 0.9rem; text-align: center; }
.p3d__done { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(4, 2, 10, 0.6); backdrop-filter: blur(3px); }
.p3d__done b { font-size: 1.6rem; font-weight: 800; }
.p3d__done small { display: block; margin-top: 4px; color: var(--muted); }
.p3d__ctl { display: flex; justify-content: center; gap: 10px; margin-top: 10px; }
.p3d__btn { min-width: 110px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--glass); color: var(--text); font: inherit; font-weight: 800; font-size: 1rem; cursor: pointer; touch-action: manipulation; user-select: none; }
.p3d__btn:active { background: rgba(255, 30, 142, 0.18); border-color: var(--pink); }
.pp-mini__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; text-align: left; }
.pp-mini__head .pp-mini__name { margin: 0; }
.pp-mini__head .pp-mini__hint { margin: 0; }
.pp-res__score { font-family: "JetBrains Mono", monospace; color: var(--text); }
@media (max-width: 560px) { .p3d { aspect-ratio: 4 / 3; } .p3d__btn { min-width: 90px; padding: 12px 10px; } }
