* { box-sizing: border-box; }
:root {
  --bg1: #1c1c2b; --bg2: #0d0d12; --field: #101014; --line: #2c2c38;
  --text: #f2f2f5; --muted: #8b8b99; --yellow: #e3e352; --yellow2: #d6d640;
  --red: #d33a3a; --green: #3fbf6f;
}
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(ellipse at 50% 20%, var(--bg1), var(--bg2) 75%) fixed;
  min-height: 100vh;
}
button { font: inherit; cursor: pointer; border: 0; }
button:disabled { opacity: .45; cursor: default; }
.hidden { display: none !important; }
.center { text-align: center; }
.muted { color: var(--muted); }
.tiny { font-size: 13px; }
.grow { flex: 1; min-width: 0; }
.screen { min-height: 100vh; }

/* Startseite */
#home, #lobby { display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.home-box { width: 100%; max-width: 550px; display: flex; flex-direction: column; gap: 18px; }
.logo {
  margin: 0; text-align: center; font-size: 64px; font-weight: 900; letter-spacing: -1px; line-height: 1;
  background: linear-gradient(#fff, #c9c9d6); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.logo-sub { text-align: center; color: var(--muted); letter-spacing: 4px; font-weight: 700; font-size: 13px; margin-top: -10px; }
.row { display: flex; gap: 10px; align-items: stretch; }
.field {
  background: var(--field); border: 1px solid var(--line); border-radius: 10px; color: var(--text);
  padding: 15px 16px; font-size: 18px; outline: none;
}
.field:focus { border-color: #55556a; }
.code-field { text-align: center; font-size: 26px; font-weight: 800; letter-spacing: 10px; text-transform: uppercase; padding: 20px; }
.code-field::placeholder { color: #666; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.lang button { background: transparent; color: var(--muted); font-weight: 700; padding: 0 18px; }
.lang button.active { background: #f2f2f5; color: #111; }
.btn-primary {
  background: linear-gradient(var(--yellow), var(--yellow2)); color: #111; font-weight: 800;
  border-radius: 12px; padding: 14px 28px; font-size: 18px; box-shadow: 0 6px 24px rgba(227,227,82,.18);
}
.btn-primary.big { padding: 18px; font-size: 20px; }
.row .btn-primary { align-self: flex-end; }
.btn-secondary { background: #2a2a36; color: var(--text); border-radius: 10px; padding: 12px 18px; font-weight: 700; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.btn-ghost.small { padding: 6px 10px; font-size: 14px; }
.divider { display: flex; align-items: center; gap: 14px; color: var(--muted); letter-spacing: 2px; font-size: 14px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 18px 10px; font-weight: 700; }
.tile:hover, .btn-ghost:hover { border-color: #4a4a5a; }

/* Lobby */
.room-code { text-align: center; font-size: 56px; font-weight: 900; letter-spacing: 12px; margin-top: -10px; }
h3 { margin: 6px 0 -6px; }
.player-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.player-list li { background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.player-list .kick { margin-left: auto; background: transparent; color: var(--muted); font-size: 18px; }
.badge { font-size: 12px; background: #2a2a36; color: var(--yellow); padding: 2px 8px; border-radius: 20px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }
.dot.off { background: #555; }
.rules-form { display: flex; flex-direction: column; gap: 10px; }
.rules-form .sec { color: var(--yellow); font-weight: 800; letter-spacing: 1px; font-size: 14px; margin-top: 8px; }
.rules-form .opt { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #c4c4cf; }
.rules-form .opt.off { opacity: .45; }
.rules-form input[type=number] {
  width: 96px; background: var(--field); border: 1px solid var(--line); border-radius: 10px; color: var(--text);
  padding: 10px 12px; font-size: 17px; font-weight: 800; text-align: right; font-family: inherit;
}
.rules-form input:disabled, .rules-form .switch:disabled { opacity: .7; cursor: default; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg button { background: transparent; color: var(--muted); font-weight: 800; padding: 10px 18px; }
.seg button.active { background: #f2f2f5; color: #111; }
.switch { width: 52px; height: 30px; border-radius: 30px; background: #33333f; position: relative; flex: none; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch.on { background: var(--yellow2); }
.switch.on::after { left: 25px; }
.rules-modal { max-width: 600px; }
.modal-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; position: sticky; bottom: -24px; background: #17171f; padding: 12px 0 0; }
.size-ctl { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.size-ctl input { width: 90px; accent-color: var(--yellow); }
.timer { color: var(--muted); font-weight: 400; }
#btnMau.on { background: var(--yellow); color: #111; }
.opp .wins { color: var(--yellow); font-size: 13px; }
.settings { display: grid; gap: 10px; background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.settings label { display: flex; gap: 10px; align-items: center; }
.settings input { width: 18px; height: 18px; accent-color: var(--yellow); }

/* Spieltisch */
#game { display: flex; flex-direction: column; max-width: 1000px; margin: 0 auto; padding: 10px 12px 24px; gap: 12px; }
.topbar { display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.topbar b { color: var(--text); letter-spacing: 3px; }
.topbar-btns { display: flex; gap: 6px; }
.opponents { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.opp { background: var(--field); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; min-width: 110px; text-align: center; }
.opp.turn { border-color: var(--yellow); box-shadow: 0 0 0 2px rgba(227,227,82,.25); }
.opp.me { background: #1a1a24; }
.opp .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.opp .cnt { color: var(--muted); font-size: 14px; }
.opp .mau { color: var(--yellow); font-weight: 800; }
.table { display: flex; justify-content: center; gap: 40px; padding: 18px 0; }
.pile { display: flex; flex-direction: column; align-items: center; gap: 8px; position: relative; }
.pile-label { color: var(--muted); font-size: 13px; }
.status { text-align: center; font-size: 18px; min-height: 26px; }
.status.myturn { color: var(--yellow); font-weight: 700; }
.actions { display: flex; justify-content: center; gap: 10px; }
.actions .btn-primary { padding: 10px 22px; font-size: 16px; }

.card {
  --cb: 20px;
  font-size: calc(var(--cb) * var(--cs, 1));
  width: 4.9em; height: 7.2em; border-radius: .45em; background: #fbfbf7; color: #111; position: relative;
  box-shadow: 0 3px 10px rgba(0,0,0,.45); flex: none; user-select: none; padding: 0;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-family: inherit;
}
.card.red { color: var(--red); }
.card .c-tl, .card .c-br { position: absolute; font-size: 1em; line-height: 1; text-align: center; z-index: 1; }
.card .c-tl { top: .38em; left: .38em; }
.card .c-br { bottom: .38em; right: .38em; transform: rotate(180deg); }
.card .c-mid { font-size: 2.5em; }
.card.img { background-color: #fbf3e4; background-size: cover; background-position: center; }
.card.big, #deck { --cb: 24px; }
.card.back {
  color: #f6e7b8; text-shadow: 0 1px 3px #000;
  background:
    radial-gradient(circle at 50% 50%, rgba(217,180,90,.9) 0 .9em, transparent .95em),
    repeating-linear-gradient(45deg, transparent 0 .5em, rgba(217,180,90,.35) .5em .56em),
    repeating-linear-gradient(-45deg, transparent 0 .5em, rgba(217,180,90,.35) .5em .56em),
    linear-gradient(160deg, #6b1d3a, #3d1030);
  border: .3em solid #f6ecd8; box-shadow: inset 0 0 0 .14em #c9a24a, 0 3px 10px rgba(0,0,0,.45);
}
#deck:not(:disabled):hover { transform: translateY(-3px); }
.wish { position: absolute; bottom: -14px; background: #111; border: 2px solid var(--yellow); border-radius: 20px; padding: 2px 12px; font-weight: 800; white-space: nowrap; }
.wish.red { color: var(--red); }

.hand { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 10px 0; }
.hand .card { cursor: default; transition: transform .12s; }
.hand .card.playable { cursor: pointer; outline: 3px solid var(--yellow); outline-offset: 1px; }
.hand .card.playable:hover { transform: translateY(-8px); }
.hand .card.dim { filter: brightness(.6); }

.log { background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; color: var(--muted); }
.log summary { cursor: pointer; }
.log ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }

.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 10; }
.modal { background: #17171f; border: 1px solid var(--line); border-radius: 16px; padding: 24px; max-width: 520px; width: 100%; display: flex; flex-direction: column; gap: 14px; max-height: 90vh; overflow: auto; }
.modal h2 { margin: 0; }
.modal ul { padding-left: 20px; line-height: 1.5; }
.suits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.suit { background: #fbfbf7; border-radius: 12px; font-size: 44px; padding: 10px 0; display: flex; flex-direction: column; align-items: center; }
.suit small { font-size: 13px; color: #333; font-weight: 700; }
.suit.red { color: var(--red); } .suit.black { color: #111; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #2a2a36; border: 1px solid #44445a; padding: 12px 18px; border-radius: 10px; z-index: 20; max-width: 90vw; }

@media (max-width: 560px) {
  .logo { font-size: 52px; }
  .tiles { grid-template-columns: 1fr 1fr 1fr; }
  .tile { padding: 14px 6px; font-size: 14px; }
  .card { --cb: 13px; }
  .card.big, #deck { --cb: 17px; }
  .topbar { flex-wrap: wrap; gap: 6px; }
  .size-ctl span { display: none; }
  .topbar-btns .btn-ghost.small { padding: 5px 8px; font-size: 13px; }
  .hand { gap: 5px; }
  .table { gap: 24px; }
  .room-code { font-size: 44px; }
}

/* Emotes */
.emote-fab { position: fixed; right: 16px; bottom: 16px; width: 56px; height: 56px; border-radius: 50%; font-size: 28px;
  background: #2a2a36; border: 1px solid #44445a; box-shadow: 0 6px 20px rgba(0,0,0,.5); z-index: 15; }
.emote-fab:hover { transform: scale(1.06); }
.emote-panel { position: fixed; right: 16px; bottom: 82px; width: min(340px, calc(100vw - 32px)); background: #17171f;
  border: 1px solid var(--line); border-radius: 14px; padding: 12px; z-index: 15; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
.small-label { font-size: 13px; margin-bottom: 6px; }
.emote-targets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.emote-targets button { background: #2a2a36; color: var(--text); border-radius: 20px; padding: 5px 12px; font-size: 14px; }
.emote-targets button.active { background: var(--yellow); color: #111; font-weight: 700; }
.emote-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.emote-grid button { background: transparent; font-size: 24px; padding: 4px 0; border-radius: 8px; white-space: nowrap; }
.emote-grid button:hover { background: #2a2a36; }
.emote-grid button.wide { grid-column: span 2; }
.emote-layer { position: fixed; inset: 0; pointer-events: none; z-index: 30; }
.emote-pop { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); text-align: center;
  animation: emotePop 2.6s ease-out forwards; }
.emote-pop .big { font-size: 110px; line-height: 1; filter: drop-shadow(0 6px 18px rgba(0,0,0,.6)); white-space: nowrap; }
.emote-pop .cap { margin-top: 8px; background: rgba(0,0,0,.75); border: 1px solid #44445a; border-radius: 20px;
  padding: 4px 14px; font-size: 16px; font-weight: 700; display: inline-block; white-space: nowrap; }
.emote-pop.small .big { font-size: 56px; }
.emote-pop.forme .cap { background: var(--yellow); color: #111; border-color: var(--yellow); }
@keyframes emotePop {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.3); }
  12% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  20% { transform: translate(-50%, -50%) scale(1) rotate(-6deg); }
  28% { transform: translate(-50%, -50%) scale(1) rotate(6deg); }
  36% { transform: translate(-50%, -50%) scale(1) rotate(0); }
  80% { opacity: 1; transform: translate(-50%, -60%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -90%) scale(.9); }
}
.opp { position: relative; }
.opp .bubble { position: absolute; top: -18px; right: -10px; font-size: 26px; animation: bubble 2.6s ease-out forwards; white-space: nowrap; }
@keyframes bubble { 0% { opacity: 0; transform: scale(.3); } 15% { opacity: 1; transform: scale(1.2); } 25% { transform: scale(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
@media (max-width: 560px) { .emote-pop .big { font-size: 80px; } .emote-fab { width: 50px; height: 50px; font-size: 24px; } }

/* ---------- Konto, Profil, Shop ---------- */
.coin { display: inline-block; width: 1em; height: 1em; border-radius: 50%; vertical-align: -0.12em;
  background: radial-gradient(circle at 35% 30%, #fff3b0, #f1c232 45%, #b8860b 100%); box-shadow: inset 0 0 0 .08em rgba(0,0,0,.2); }
.tile .coin { margin-right: 4px; }
.tile small { display: block; color: var(--muted); font-weight: 600; margin-top: 4px; }
.auth-tabs { align-self: stretch; }
.auth-tabs button { flex: 1; }
.icon-btn { background: transparent; color: var(--text); border: 1px solid var(--line); border-radius: 10px; width: 42px; height: 38px; font-size: 18px; }
.profile { gap: 16px; }
.profile h2 { font-size: 28px; }
.coins-big { font-size: 26px; display: flex; align-items: center; gap: 10px; }
.coins-big .muted { font-size: 22px; }
.stats { display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; color: #b9b9c6; }
.stats b { color: var(--text); text-align: right; }
.reward { font-size: 20px; font-weight: 800; color: var(--yellow); margin: 0; }
.reward.none { font-size: 14px; color: var(--muted); font-weight: 400; }

.shop { position: fixed; inset: 0; background: #0f0f14; z-index: 12; overflow: auto; }
.shop-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #17171f; position: sticky; top: 0; z-index: 2; }
.shop-head b { font-size: 18px; }
.shop-coins { margin-left: auto; font-size: 18px; display: flex; gap: 6px; align-items: center; }
.shop-tabs { display: inline-flex; gap: 4px; margin: 14px 16px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: #17171f; flex-wrap: wrap; }
.shop-tabs button { background: transparent; color: var(--muted); font-weight: 700; padding: 10px 14px; border-radius: 9px; }
.shop-tabs button.active { background: #2a2a36; color: var(--text); }
.shop-grid { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; padding: 8px 16px 40px; }
.item { width: 160px; background: #17171f; border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.item.equipped { border: 2px solid var(--yellow); }
.item.r-uncommon { border-left: 3px solid #4fd1c5; } .item.r-rare { border-left: 3px solid #63b3ed; }
.item.r-epic { border-left: 3px solid #b794f4; } .item.r-legendary { border-left: 3px solid #f6ad55; }
.item.equipped.r-uncommon, .item.equipped.r-rare, .item.equipped.r-epic, .item.equipped.r-legendary { border-left-width: 3px; }
.item .pv { height: 170px; border-radius: 10px; display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: default; }
.item .pv:not(.tbl) { background: #0d0d12; }
.item .pv.tbl { background-attachment: scroll !important; }
.item .pv .card { --cb: 18px; --cs: 1; }
.item .pv.tbl { border: 1px solid #33333f; }
.item .pv .nm { font-size: 22px; font-weight: 800; }
.item .pv.fxpv { font-size: 54px; cursor: pointer; }
.item .nmx { font-weight: 800; }
.item .rar { font-size: 13px; color: var(--muted); margin-top: -4px; }
.item .rar.r-uncommon { color: #4fd1c5; } .item .rar.r-rare { color: #63b3ed; } .item .rar.r-epic { color: #b794f4; } .item .rar.r-legendary { color: #f6ad55; }
.item button.buy { background: #6f6a2a; color: #f2f2f5; border-radius: 10px; padding: 10px; font-weight: 800; }
.item button.buy:not(:disabled):hover { background: #8a842f; }
.item button.equip { background: #2a2a36; color: var(--text); border-radius: 10px; padding: 10px; font-weight: 800; }
.item button.on { background: transparent; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-weight: 800; }

/* Kartenrücken */
.card.back.back-nachtblau { background:
    radial-gradient(circle at 50% 50%, rgba(200,210,230,.9) 0 .9em, transparent .95em),
    repeating-linear-gradient(45deg, transparent 0 .5em, rgba(200,210,230,.25) .5em .56em),
    repeating-linear-gradient(-45deg, transparent 0 .5em, rgba(200,210,230,.25) .5em .56em),
    linear-gradient(160deg, #1d2d63, #0b1230); box-shadow: inset 0 0 0 .14em #9fb0d8, 0 3px 10px rgba(0,0,0,.45); color: #0b1230; text-shadow: none; }
.card.back.back-smaragd { background:
    radial-gradient(circle at 50% 50%, rgba(217,180,90,.9) 0 .9em, transparent .95em),
    repeating-linear-gradient(45deg, transparent 0 .5em, rgba(217,180,90,.3) .5em .56em),
    repeating-linear-gradient(-45deg, transparent 0 .5em, rgba(217,180,90,.3) .5em .56em),
    linear-gradient(160deg, #136b45, #06301f); }
.card.back.back-neon { background: radial-gradient(circle at 50% 40%, rgba(64,224,255,.35), transparent 60%), linear-gradient(160deg, #141a3d, #070914);
  border-color: #0b0f24; box-shadow: inset 0 0 0 .12em #3ee6ff, 0 0 .8em rgba(62,230,255,.55); color: #7ff3ff; text-shadow: 0 0 .4em #3ee6ff; }
.card.back.back-gold { background: linear-gradient(115deg, transparent 40%, rgba(255,240,180,.55) 48%, transparent 56%), linear-gradient(160deg, #6a4f12, #2e2206);
  background-size: 250% 100%, 100% 100%; animation: shine 3.5s linear infinite; box-shadow: inset 0 0 0 .14em #e7c35a, 0 3px 10px rgba(0,0,0,.45); color: #ffe7a0; }
.card.back.back-holo { background: linear-gradient(130deg, #2b6cb0, #6b46c1, #2c7a7b, #b83280, #2b6cb0); background-size: 300% 300%;
  animation: holo 6s ease infinite; box-shadow: inset 0 0 0 .14em rgba(255,255,255,.6), 0 3px 10px rgba(0,0,0,.45); color: #fff; }
@keyframes shine { from { background-position: 150% 0, 0 0; } to { background-position: -150% 0, 0 0; } }
@keyframes holo { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.mini-back { --cb: 5px; --cs: 1; display: inline-flex; vertical-align: middle; margin-right: 6px; border-width: .4em !important; }

/* Tische (Hintergrund) */
.tbl-filz { background: radial-gradient(ellipse at 50% 30%, #1f6b45, #0b3020 75%) fixed; }
.tbl-holz { background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.55)), repeating-linear-gradient(90deg, #6b4423 0 14px, #5d3a1d 14px 22px, #714826 22px 34px) fixed; }
.tbl-samt { background: radial-gradient(ellipse at 50% 30%, #7a1428, #2a0610 75%) fixed; }
.tbl-marmor { background: repeating-linear-gradient(115deg, transparent 0 60px, rgba(255,255,255,.05) 60px 63px, transparent 63px 140px),
  repeating-linear-gradient(35deg, transparent 0 90px, rgba(255,255,255,.04) 90px 92px), linear-gradient(135deg, #24242c, #3b3b46) fixed; }
.tbl-galaxie { background: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 60%, #fff, transparent),
  radial-gradient(1.5px 1.5px at 40% 80%, #fff, transparent), radial-gradient(1px 1px at 85% 20%, #fff, transparent),
  radial-gradient(ellipse at 30% 30%, rgba(128,90,213,.45), transparent 55%), radial-gradient(ellipse at 75% 70%, rgba(49,130,206,.4), transparent 55%), #07071a fixed;
  background-size: 180px 180px, 230px 230px, 260px 260px, 300px 300px, 100% 100%, 100% 100%, auto; }

/* Namensfarben */
.nc-rot { color: #ff6b6b !important; } .nc-blau { color: #6bc7ff !important; } .nc-gruen { color: #6fe08a !important; }
.nc-lila { color: #c58bff !important; } .nc-gold { color: #f5c84b !important; text-shadow: 0 0 8px rgba(245,200,75,.45); }
.nc-regenbogen { background: linear-gradient(90deg, #ff6b6b, #f6ad55, #f5e050, #6fe08a, #6bc7ff, #c58bff, #ff6b6b); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: rainbow 3s linear infinite; }
@keyframes rainbow { to { background-position: 200% 0; } }
.reg-badge { font-size: 11px; margin-left: 4px; }

/* Gewinneffekte */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 40; overflow: hidden; }
.fx { position: absolute; top: -40px; animation: fxFall linear forwards; }
.fx.rect { width: 9px; height: 14px; border-radius: 2px; }
.fx.burst { top: auto; animation: fxBurst ease-out forwards; }
@keyframes fxFall { to { transform: translateY(110vh) rotate(720deg); opacity: .9; } }
@keyframes fxBurst { 0% { transform: translate(0,0) scale(.4); opacity: 1; } 80% { opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1); opacity: 0; } }

/* Emote-Knopf auf dem Tisch links neben dem Stapel */
.emote-slot { justify-content: center; }
.emote-fab.in-table { position: static; width: calc(64px * var(--cs, 1)); height: calc(64px * var(--cs, 1)); font-size: calc(32px * var(--cs, 1));
  background: rgba(20,20,28,.85); }
@media (max-width: 560px) { .emote-fab.in-table { width: calc(48px * var(--cs, 1)); height: calc(48px * var(--cs, 1)); font-size: calc(24px * var(--cs, 1)); } }

/* Ebenen: Dialoge liegen immer über dem Emote-Knopf */
.emote-fab { z-index: 15; }
.emote-fab.in-table { z-index: auto; }
.emote-panel { z-index: 16; }
.shop { z-index: 45; }
.overlay { z-index: 50; }
.emote-layer { z-index: 52; }
.fx-layer { z-index: 55; }
.toast { z-index: 60; }

.sound-toggle { font-size: 16px !important; line-height: 1; }
.lobby-sound { position: fixed; top: 12px; right: 12px; z-index: 5; }

.sound-panel { right: auto; bottom: auto; z-index: 20; width: min(320px, calc(100vw - 16px)); }

/* Emotes an freien Stellen */
.emote-pop { left: 50%; top: 40%; }
.emote-pop.measuring { visibility: hidden; animation: none; }
.emote-pop.tiny .big { font-size: 34px; }
.emote-pop.tiny .cap { font-size: 12px; padding: 2px 8px; margin-top: 4px; }

.music-vol { display: flex; align-items: center; gap: 10px; }
.music-vol input { flex: 1; accent-color: var(--yellow); }
.music-vol .small-label { margin: 0; }
.opp .catch-mau { margin-top: .3em; padding: .25em .6em; border: 0; border-radius: 6px; background: #e5484d; color: #fff; font-weight: 800; font-size: .85em; cursor: pointer; animation: catchPulse 1s ease-in-out infinite; }
.opp .catch-mau:disabled { opacity: .5; animation: none; }
@keyframes catchPulse { 50% { transform: scale(1.08); } }
.opp .catch-mau .cl { display: inline-block; min-width: 1.4em; margin-left: .3em; padding: 0 .3em; border-radius: 4px; background: rgba(0,0,0,.25); }
.display-row { margin: 10px 0 14px; text-align: left; }
.display-row > div { display: flex; gap: 8px; margin-top: 4px; }
.display-row input { flex: 1; min-width: 0; }
.display-row button { flex: none; }

/* ---- Profilbilder */
svg.av { display: block; border-radius: 50%; overflow: hidden; flex: none; }
.avatar-btn { flex: none; width: 52px; height: 52px; padding: 0; border: 2px solid var(--line); border-radius: 50%; background: none; cursor: pointer; overflow: hidden; transition: transform .15s; }
.avatar-btn:hover { transform: scale(1.06); border-color: var(--yellow); }
.avatar-btn svg.av { width: 100%; height: 100%; }
.tile-av { display: inline-block !important; width: 1.6em; height: 1.6em; vertical-align: middle; margin-right: .2em; }
.opp-av { width: 84px; height: 84px; margin: 0 auto 6px; }
@media (max-width: 600px) { .opp-av { width: 60px; height: 60px; } }
.li-av { width: 30px; height: 30px; }
#lobbyPlayers li { gap: 8px; }
.cap-av { display: inline-block !important; width: 1.5em; height: 1.5em; vertical-align: middle; margin-right: .35em; }
.av-big { position: relative; align-self: center; width: 120px; height: 120px; padding: 0; border: 3px solid var(--line); border-radius: 50%; background: none; cursor: pointer; }
.av-big svg.av { width: 100%; height: 100%; }
.av-big .edit { position: absolute; right: -10px; bottom: -4px; background: var(--yellow); color: #111; font-weight: 800; font-size: 12px; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.av-pick-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.av-choice { padding: 0; border: 3px solid transparent; border-radius: 50%; background: none; cursor: pointer; aspect-ratio: 1; transition: transform .15s, border-color .15s; }
.av-choice:hover { transform: scale(1.08); border-color: var(--yellow); }
.av-choice svg.av { width: 100%; height: 100%; }
.av-editor { max-width: 640px; }
.av-top { display: flex; gap: 16px; align-items: center; justify-content: center; }
.av-preview svg.av { width: 150px; height: 150px; border: 3px solid var(--line); }
.av-side { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.av-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.av-tabs button { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--field); color: inherit; font-size: 13px; cursor: pointer; }
.av-tabs button.active { background: var(--yellow); color: #111; border-color: var(--yellow); font-weight: 700; }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.av-opt { position: relative; padding: 0; border: 3px solid transparent; border-radius: 50%; background: none; cursor: pointer; aspect-ratio: 1; }
.av-opt svg.av { width: 100%; height: 100%; }
.av-opt.active { border-color: var(--yellow); }
.av-opt.locked svg.av { filter: saturate(.55) brightness(.75); }
.av-opt .lock { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); background: #111d; color: #fff; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 999px; white-space: nowrap; display: flex; align-items: center; gap: 3px; }
.av-opt .lock .coin { width: 10px; height: 10px; }
.av-lockbar:empty { display: none; }
.av-lockbar { display: flex; flex-direction: column; gap: 6px; }
.av-lockbar .lockrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.av-lockbar .buy { display: flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 8px; border: 0; background: var(--yellow); color: #111; font-weight: 700; cursor: pointer; }
.av-lockbar .buy:disabled { opacity: .5; cursor: default; }
.item .pv.avpv { display: flex; align-items: center; justify-content: center; }
.item .pv.avpv svg.av { width: 86px; height: 86px; }
@media (max-width: 520px) { .av-pick-grid { grid-template-columns: repeat(3, 1fr); } .av-preview svg.av { width: 110px; height: 110px; } }

/* ---- mehr Kartenrücken */
.card.back.back-rubin { background: radial-gradient(circle at 50% 50%, rgba(255,210,220,.9) 0 .9em, transparent .95em),
  repeating-linear-gradient(45deg, transparent 0 .5em, rgba(255,180,200,.25) .5em .56em), repeating-linear-gradient(-45deg, transparent 0 .5em, rgba(255,180,200,.25) .5em .56em),
  linear-gradient(160deg, #9b1030, #3d0412); color: #5a0a1e; text-shadow: none; }
.card.back.back-ozean { background: repeating-radial-gradient(circle at 50% 120%, #0e6ba8 0 .5em, #0a4f7e .5em 1em), #0a4f7e; box-shadow: inset 0 0 0 .14em #9ad1f5, 0 3px 10px rgba(0,0,0,.45); color: #dff3ff; }
.card.back.back-schach { background: repeating-conic-gradient(#f2f2f2 0 25%, #1b1b1b 0 50%) 0 0 / 1.6em 1.6em; color: #e63946; text-shadow: 0 0 .3em #fff, 0 0 .3em #fff; }
.card.back.back-karbon { background: radial-gradient(#3a3a3a 15%, transparent 16%) 0 0 / .5em .5em, radial-gradient(#2a2a2a 15%, transparent 16%) .25em .25em / .5em .5em, linear-gradient(160deg, #2b2b2b, #0f0f0f);
  box-shadow: inset 0 0 0 .14em #e63946, 0 3px 10px rgba(0,0,0,.45); color: #e63946; }
.card.back.back-lava { background: radial-gradient(circle at 30% 30%, #ffbe0b, transparent 35%), radial-gradient(circle at 70% 70%, #ff5400, transparent 40%), linear-gradient(160deg, #9d0208, #370617);
  background-size: 200% 200%; animation: holo 5s ease infinite; box-shadow: inset 0 0 0 .14em #ffbe0b, 0 0 .6em rgba(255,84,0,.6); color: #fff3b0; }
.card.back.back-retro { background: repeating-linear-gradient(180deg, transparent 0 .35em, #1a0b2e .35em .5em) 0 55% / 100% 45% no-repeat, radial-gradient(circle at 50% 55%, #ffbe0b 0 1.6em, transparent 1.65em), linear-gradient(180deg, #ff006e, #8338ec 60%, #1a0b2e);
  box-shadow: inset 0 0 0 .14em #ff9ec7, 0 3px 10px rgba(0,0,0,.45); color: #fff; }
.card.back.back-matrix { background: repeating-linear-gradient(90deg, rgba(0,255,70,.0) 0 .45em, rgba(0,255,70,.35) .45em .55em), linear-gradient(#000, #021a06);
  background-size: 100% 200%, 100% 100%; animation: matrix 1.6s linear infinite; box-shadow: inset 0 0 0 .12em #00ff46, 0 0 .6em rgba(0,255,70,.5); color: #00ff46; text-shadow: 0 0 .4em #00ff46; }
@keyframes matrix { to { background-position: 0 100%, 0 0; } }
.card.back.back-sternbild { background: radial-gradient(1px 1px at 20% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 70% 35%, #fff, transparent), radial-gradient(1px 1px at 35% 70%, #fff, transparent),
  radial-gradient(1.5px 1.5px at 80% 80%, #fff, transparent), radial-gradient(1px 1px at 55% 55%, #ffd166, transparent), radial-gradient(ellipse at 50% 40%, #3a0ca3, #03001c 75%);
  box-shadow: inset 0 0 0 .14em #c9b6ff, 0 3px 10px rgba(0,0,0,.45); color: #e0d4ff; animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 50% { filter: brightness(1.3); } }
.card.back.back-aurora { background: linear-gradient(120deg, #00f5d4, #00bbf9, #9b5de5, #f15bb5, #00f5d4); background-size: 300% 300%; animation: holo 4s ease infinite;
  box-shadow: inset 0 0 0 .14em rgba(255,255,255,.7), 0 0 .8em rgba(0,245,212,.5); color: #fff; text-shadow: 0 0 .4em #000; }

/* ---- mehr Tische */
.tbl-poker { background: radial-gradient(ellipse at 50% 30%, #1d4e89, #081a33 75%) fixed; }
.tbl-strand { background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.25), transparent 50%), radial-gradient(circle at 30% 60%, rgba(0,0,0,.06) 1px, transparent 2px) 0 0 / 14px 14px, linear-gradient(180deg, #c9a66b, #8a6a3a) fixed; }
.tbl-schiefer { background: repeating-linear-gradient(170deg, transparent 0 40px, rgba(255,255,255,.03) 40px 41px), linear-gradient(135deg, #2f3e46, #1b262c) fixed; }
.tbl-abendrot { background: radial-gradient(circle at 50% 110%, #ffbe0b 0 12%, transparent 30%), linear-gradient(180deg, #2b1055, #7b2d6b 45%, #d35d3e 80%, #f5a623) fixed; }
.tbl-unterwasser { background: radial-gradient(circle at 20% 80%, rgba(255,255,255,.15) 0 4px, transparent 5px) 0 0 / 120px 160px, radial-gradient(ellipse at 50% -10%, rgba(144,224,239,.5), transparent 55%), linear-gradient(180deg, #0077b6, #023e8a 60%, #03045e) fixed;
  animation: bubbles 8s linear infinite; }
@keyframes bubbles { to { background-position: 0 -160px, 0 0, 0 0; } }
.tbl-synthwave { background: linear-gradient(transparent 0 calc(100% - 1px), rgba(255,0,200,.55) 0) 0 0 / 100% 40px, linear-gradient(90deg, transparent 0 calc(100% - 1px), rgba(255,0,200,.55) 0) 0 0 / 60px 100%,
  linear-gradient(180deg, #12002b, #2d0050 60%, #4a0072) fixed; animation: grid 3s linear infinite; }
@keyframes grid { to { background-position: 0 40px, 0 0, 0 0; } }
.tbl-polarlicht { background: radial-gradient(ellipse at 30% 20%, rgba(0,245,212,.35), transparent 50%), radial-gradient(ellipse at 70% 30%, rgba(155,93,229,.35), transparent 50%), linear-gradient(180deg, #03001c, #0b1d3a) fixed;
  background-size: 200% 200%, 200% 200%, auto; animation: aurora 12s ease-in-out infinite alternate; }
@keyframes aurora { to { background-position: 100% 50%, 0% 50%, 0 0; } }
.tbl-vulkan { background: radial-gradient(ellipse at 50% 120%, rgba(255,84,0,.8), transparent 50%), radial-gradient(circle at 20% 30%, rgba(255,190,11,.15), transparent 30%), linear-gradient(180deg, #1a0000, #370617 60%, #6a040f) fixed;
  animation: lavaGlow 4s ease-in-out infinite; }
@keyframes lavaGlow { 50% { filter: brightness(1.15); } }
.tbl-vip { background: repeating-linear-gradient(45deg, transparent 0 18px, rgba(245,200,75,.06) 18px 20px), repeating-linear-gradient(-45deg, transparent 0 18px, rgba(245,200,75,.06) 18px 20px), radial-gradient(ellipse at 50% 30%, #3b2a0a, #0c0802 75%) fixed; }

/* ---- mehr Namensfarben */
.nc-orange { color: #ff9f43 !important; } .nc-pink { color: #ff6fb5 !important; } .nc-tuerkis { color: #2ee6d6 !important; }
.nc-silber { color: #dfe6ee !important; text-shadow: 0 0 6px rgba(223,230,238,.5); }
.nc-neon { color: #39ff14 !important; text-shadow: 0 0 6px #39ff14, 0 0 14px rgba(57,255,20,.6); }
.nc-feuer, .nc-eis, .nc-ozean, .nc-galaxie, .nc-lava { -webkit-background-clip: text; background-clip: text; color: transparent !important; background-size: 200% 100%; animation: rainbow 3s linear infinite; }
.nc-feuer { background-image: linear-gradient(90deg, #ffbe0b, #ff5400, #d00000, #ff5400, #ffbe0b); }
.nc-eis { background-image: linear-gradient(90deg, #e0fbfc, #90e0ef, #48cae4, #90e0ef, #e0fbfc); }
.nc-ozean { background-image: linear-gradient(90deg, #00b4d8, #0077b6, #48cae4, #0077b6, #00b4d8); }
.nc-galaxie { background-image: linear-gradient(90deg, #9b5de5, #f15bb5, #00bbf9, #9b5de5); }
.nc-lava { background-image: linear-gradient(90deg, #370617, #d00000, #ffbe0b, #d00000, #370617); animation-duration: 1.6s; filter: drop-shadow(0 0 4px rgba(255,84,0,.6)); }
.nc-puls { color: #fff !important; animation: puls 1.4s ease-in-out infinite; }
@keyframes puls { 50% { text-shadow: 0 0 4px #fff, 0 0 14px #f5e050, 0 0 22px #ff6fb5; } }
.nc-glitch { color: #fff !important; animation: glitch 1.2s steps(2) infinite; }
@keyframes glitch { 0%, 100% { text-shadow: 2px 0 #ff006e, -2px 0 #00f5d4; } 25% { text-shadow: -2px 1px #ff006e, 2px -1px #00f5d4; } 50% { text-shadow: 1px -1px #ff006e, -1px 1px #00f5d4; } 75% { text-shadow: -1px 0 #ff006e, 1px 0 #00f5d4; } }

/* ---- mehr Gewinneffekte */
.fx.rise { top: auto; bottom: -60px; animation-name: fxRise; animation-timing-function: ease-in; }
@keyframes fxRise { to { transform: translateY(-115vh) rotate(-8deg); } }
.fx.rect.burst { top: auto; }
.fx.bolt { opacity: 0; animation: bolt .5s ease-out forwards; filter: drop-shadow(0 0 12px #ffd60a); }
@keyframes bolt { 0% { opacity: 0; transform: scale(.4); } 20% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0; transform: scale(1); } }
.fx-flash { position: absolute; inset: 0; background: #fff; animation: flash 2.4s steps(1) forwards; opacity: 0; }
@keyframes flash { 0% { opacity: .55; } 6% { opacity: 0; } 14% { opacity: .4; } 18% { opacity: 0; } 40% { opacity: .35; } 44% { opacity: 0; } 70% { opacity: .3; } 73%, 100% { opacity: 0; } }
.fx.disco-ball { top: 4%; left: 50%; font-size: 70px; transform: translateX(-50%); animation: discoSpin 4s linear forwards; }
@keyframes discoSpin { 0% { transform: translateX(-50%) translateY(-120px); } 15%, 85% { transform: translateX(-50%) translateY(0) rotate(360deg); } 100% { transform: translateX(-50%) translateY(-120px) rotate(720deg); } }
.fx.laser { top: 10%; left: 50%; width: 4px; height: 120vh; background: linear-gradient(var(--c), transparent); transform-origin: top center; box-shadow: 0 0 12px var(--c);
  opacity: 0; animation: laser 4s ease-in-out forwards; }
@keyframes laser { 0% { opacity: 0; transform: rotate(var(--r0)); } 10% { opacity: .85; } 50% { transform: rotate(var(--r1)); } 90% { opacity: .85; transform: rotate(var(--r0)); } 100% { opacity: 0; } }
.emote-grid { max-height: 46vh; overflow-y: auto; }

/* Link zurück zur gemeinsamen Startseite aller Kartenspiele */
.all-games { display: inline-block; margin-bottom: 6px; padding: 4px 12px; border-radius: 999px; font-size: 13px;
  color: inherit; opacity: .75; text-decoration: none; border: 1px solid rgba(255,255,255,.2); }
.all-games:hover { opacity: 1; background: rgba(255,255,255,.08); }