/* BroPro Ludo — premium table design */
:root {
    --lx-bg: #080b16;
    --lx-bg2: #10162b;
    --lx-panel: rgba(255, 255, 255, 0.055);
    --lx-panel-2: rgba(255, 255, 255, 0.09);
    --lx-line: rgba(255, 255, 255, 0.1);
    --lx-line-2: rgba(255, 255, 255, 0.18);
    --lx-text: #f5f3ee;
    --lx-muted: #a3a9bf;
    --lx-gold: #e7c26a;
    --lx-gold-2: #b8862b;
    --lx-red: #e03131;
    --lx-red-d: #9b1c1c;
    --lx-green: #2f9e44;
    --lx-green-d: #1b5e2b;
    --lx-yellow: #f5b301;
    --lx-yellow-d: #a86f00;
    --lx-blue: #1c6fe0;
    --lx-blue-d: #123f8f;
    --lx-radius: 18px;
    --lx-frame: 2.6%;
    --lx-safe-top: env(safe-area-inset-top, 0px);
    --lx-safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body.lx {
    min-height: 100dvh;
    font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--lx-text);
    background: var(--lx-bg);
    overscroll-behavior: none;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    overflow-x: hidden;
}
/* Ambient table lighting: warm key light, cool fill, drifting dust. */
body.lx::before {
    content: ''; position: fixed; inset: 0; z-index: -2; pointer-events: none;
    background:
        radial-gradient(900px 520px at 50% -8%, rgba(231, 194, 106, 0.16), transparent 62%),
        radial-gradient(700px 600px at 92% 105%, rgba(99, 102, 241, 0.16), transparent 60%),
        radial-gradient(600px 500px at 0% 70%, rgba(20, 184, 166, 0.08), transparent 60%),
        linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.025) 46%, transparent 54%),
        linear-gradient(180deg, var(--lx-bg2), var(--lx-bg) 70%);
}
body.lx::after {
    content: ''; position: fixed; inset: -50% 0 0; z-index: -1; pointer-events: none; opacity: .55;
    background-image:
        radial-gradient(1.4px 1.4px at 12% 18%, rgba(255, 236, 179, .7), transparent),
        radial-gradient(1.2px 1.2px at 78% 32%, rgba(255, 255, 255, .5), transparent),
        radial-gradient(1.6px 1.6px at 36% 66%, rgba(231, 194, 106, .55), transparent),
        radial-gradient(1px 1px at 64% 82%, rgba(255, 255, 255, .45), transparent),
        radial-gradient(1.3px 1.3px at 88% 58%, rgba(231, 194, 106, .5), transparent),
        radial-gradient(1px 1px at 22% 92%, rgba(255, 255, 255, .4), transparent);
    background-size: 100% 50%;
    animation: lx-dust 40s linear infinite;
}
@keyframes lx-dust { to { transform: translateY(50%); } }
button { font: inherit; color: inherit; }
.lx-hidden { display: none !important; }

/* ---------- Top bar ---------- */
.lx-top {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 10px;
    padding: calc(10px + var(--lx-safe-top)) 14px 10px;
    background: linear-gradient(180deg, rgba(8, 11, 22, .85), rgba(8, 11, 22, .55));
    backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--lx-line);
}
.lx-iconbtn {
    width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--lx-line);
    background: var(--lx-panel); display: grid; place-items: center; cursor: pointer;
    font-size: 17px; text-decoration: none; color: var(--lx-text); flex: none;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.lx-iconbtn:hover { border-color: var(--lx-line-2); background: var(--lx-panel-2); }
.lx-iconbtn:active { transform: scale(.94); }
.lx-title { font-weight: 800; font-size: 1.12rem; letter-spacing: .2px; display: flex; align-items: center; gap: 8px; }
.lx-title small { font-weight: 600; color: var(--lx-gold); font-size: .72rem; letter-spacing: 1.2px; text-transform: uppercase; opacity: .85; }
.lx-top-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.lx-lang { padding: 0 12px; width: auto; font-weight: 700; font-size: .85rem; }

/* ---------- Screens ---------- */
.lx-screen { max-width: 560px; margin: 0 auto; padding: 18px 16px calc(28px + var(--lx-safe-bottom)); animation: lx-fade .35s ease; }
@keyframes lx-fade { from { opacity: 0; transform: translateY(6px); } }
.lx-hero { text-align: center; padding: 8px 0 20px; }
.lx-logo {
    width: 104px; height: 104px; margin: 0 auto 14px; border-radius: 26px; position: relative;
    display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; overflow: hidden;
    box-shadow: 0 22px 50px rgba(0, 0, 0, .55), 0 0 0 3px #e7c26a, 0 0 0 5px rgba(184, 134, 43, .5), inset 0 2px 0 rgba(255, 255, 255, .3);
    transform: rotate(-6deg); animation: lx-float 5s ease-in-out infinite;
}
.lx-logo i:nth-child(1) { background: linear-gradient(135deg, #ff6b6b, #9b1c1c); }
.lx-logo i:nth-child(2) { background: linear-gradient(225deg, #5fd68a, #1b5e2b); }
.lx-logo i:nth-child(3) { background: linear-gradient(45deg, #6aa8ff, #123f8f); }
.lx-logo i:nth-child(4) { background: linear-gradient(315deg, #ffe066, #a86f00); }
.lx-logo b {
    position: absolute; inset: 29%; border-radius: 12px; background: radial-gradient(circle at 30% 25%, #fffef9, #e9dec5);
    display: grid; place-items: center; font-size: 28px; box-shadow: 0 8px 16px rgba(0, 0, 0, .35), inset 0 -2px 4px rgba(120, 90, 40, .3);
}
@keyframes lx-float { 50% { transform: rotate(-2deg) translateY(-6px); } }
.lx-hero h1 {
    margin: 6px 0 6px; font-size: 2.2rem; font-weight: 800; letter-spacing: -.5px;
    background: linear-gradient(180deg, #fff, #e9dcc0); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lx-hero p { margin: 0; color: var(--lx-muted); }

.lx-modes { display: grid; gap: 12px; }
.lx-mode {
    display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 20px;
    border: 1px solid var(--lx-line); cursor: pointer; text-align: left; position: relative; overflow: hidden;
    background: linear-gradient(160deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .025));
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .06);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.lx-mode:hover { border-color: var(--lx-line-2); transform: translateY(-2px); box-shadow: 0 16px 40px rgba(0, 0, 0, .35); }
.lx-mode:active { transform: scale(.985); }
.lx-mode .ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; flex: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 18px rgba(0, 0, 0, .3); }
.lx-mode .tx b { display: block; font-size: 1.08rem; }
.lx-mode .tx span { color: var(--lx-muted); font-size: .88rem; }
.lx-mode .go { margin-left: auto; color: var(--lx-gold); font-size: 1.4rem; }
.lx-mode.online .ic { background: linear-gradient(135deg, #7c6cf6, #a855f7); }
.lx-mode.bot .ic { background: linear-gradient(135deg, #f59e0b, #e8590c); }
.lx-mode.local .ic { background: linear-gradient(135deg, #12b886, #1c7ed6); }
.lx-mode.online::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .07) 50%, transparent 70%);
    transform: translateX(-100%); animation: lx-shine 3.6s ease-in-out infinite;
}
@keyframes lx-shine { 60%, 100% { transform: translateX(100%); } }

.lx-card {
    border: 1px solid var(--lx-line); border-radius: 20px; padding: 16px; margin-top: 14px;
    background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
    box-shadow: 0 10px 30px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.lx-card h3 { margin: 0 0 10px; font-size: .78rem; text-transform: uppercase; letter-spacing: 1.4px; color: var(--lx-muted); font-weight: 700; }
.lx-row { display: flex; gap: 8px; flex-wrap: wrap; }
.lx-chip {
    flex: 1; min-width: 70px; padding: 11px 10px; border-radius: 12px; border: 1px solid var(--lx-line);
    background: rgba(0, 0, 0, .18); cursor: pointer; font-weight: 700; transition: all .15s ease;
}
.lx-chip:hover { border-color: var(--lx-line-2); }
.lx-chip[aria-pressed="true"] {
    background: linear-gradient(180deg, #f3d98b, #d4a640); color: #2a1a00; border-color: #f3d98b;
    box-shadow: 0 6px 16px rgba(212, 166, 64, .3), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.lx-btn {
    width: 100%; margin-top: 14px; padding: 15px; border: 0; border-radius: 14px; cursor: pointer;
    font-weight: 800; font-size: 1.04rem; color: #2a1a00; letter-spacing: .2px;
    background: linear-gradient(180deg, #f7e2a1, #e2b347 55%, #c9952e);
    box-shadow: 0 5px 0 #8a5e0c, 0 14px 28px rgba(226, 179, 71, .22), inset 0 1px 0 rgba(255, 255, 255, .7);
    transition: transform .1s ease, box-shadow .1s ease, filter .15s ease;
}
.lx-btn:hover { filter: brightness(1.05); }
.lx-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #8a5e0c, inset 0 1px 0 rgba(255, 255, 255, .7); }
.lx-btn:disabled { opacity: .45; cursor: not-allowed; }
.lx-btn.ghost { background: rgba(255, 255, 255, .04); color: var(--lx-text); border: 1px solid var(--lx-line); box-shadow: none; }
.lx-btn.wa { background: linear-gradient(180deg, #40d080, #1f9d55); color: #fff; box-shadow: 0 5px 0 #13693a, 0 12px 24px rgba(31, 157, 85, .25), inset 0 1px 0 rgba(255, 255, 255, .35); }
.lx-input {
    width: 100%; padding: 14px; border-radius: 12px; border: 1px solid var(--lx-line); background: rgba(0, 0, 0, .3);
    color: var(--lx-text); font-size: 1.35rem; font-weight: 800; letter-spacing: 8px; text-align: center; text-transform: uppercase;
    font-family: inherit; outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.lx-input:focus { border-color: var(--lx-gold); box-shadow: 0 0 0 3px rgba(231, 194, 106, .2); }
.lx-note { color: var(--lx-muted); font-size: .85rem; margin: 10px 0 0; line-height: 1.45; }
.lx-error { color: #ffa8a8; font-size: .9rem; margin: 10px 0 0; min-height: 1em; }

.lx-seat-setup { display: grid; gap: 8px; }
.lx-seat-row { display: flex; align-items: center; gap: 10px; }
.lx-seat-row .dot { width: 22px; height: 22px; border-radius: 50%; flex: none; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25), inset 0 2px 2px rgba(255, 255, 255, .4); }
.lx-seat-row .lx-row { flex: 1; }
.lx-seat-row .lx-chip { padding: 8px 6px; font-size: .85rem; }

/* Lobby */
.lx-code {
    font-size: 2.5rem; font-weight: 800; letter-spacing: 10px; text-align: center; padding: 6px 0 2px;
    background: linear-gradient(180deg, #fff3c4, #e2b347); -webkit-background-clip: text; background-clip: text; color: transparent;
    filter: drop-shadow(0 4px 12px rgba(226, 179, 71, .25));
}
.lx-lobby-seats { display: grid; gap: 10px; margin-top: 12px; }
.lx-lobby-seat { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, .2); border: 1px dashed var(--lx-line); }
.lx-lobby-seat.filled { border-style: solid; background: rgba(255, 255, 255, .04); }
.lx-lobby-seat .av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; overflow: hidden; flex: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .2); }
.lx-lobby-seat .av img { width: 100%; height: 100%; object-fit: cover; }
.lx-lobby-seat .nm { font-weight: 700; }
.lx-lobby-seat .tg { margin-left: auto; font-size: .75rem; color: var(--lx-muted); }
.lx-wait { display: inline-flex; gap: 4px; }
.lx-wait i { width: 6px; height: 6px; border-radius: 50%; background: var(--lx-muted); animation: lx-bounce 1.2s infinite; }
.lx-wait i:nth-child(2) { animation-delay: .15s; }
.lx-wait i:nth-child(3) { animation-delay: .3s; }
@keyframes lx-bounce { 40% { transform: translateY(-5px); opacity: 1; } 0%, 80%, 100% { opacity: .4; } }

/* ---------- Game ---------- */
.lx-game { max-width: 620px; margin: 0 auto; padding: 10px 10px calc(14px + var(--lx-safe-bottom)); }
.lx-hud { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lx-hud.top { margin-bottom: 12px; }
.lx-hud.bottom { margin-top: 12px; }
.lx-player {
    --c: #888; --cd: #555;
    position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-height: 68px;
    border-radius: 18px; border: 1px solid var(--lx-line);
    background: linear-gradient(160deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .02));
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .06);
    transition: border-color .3s ease, box-shadow .3s ease, opacity .3s ease, transform .3s ease;
}
.lx-player::before { content: ''; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--c); opacity: .9; }
.lx-player.right::before { left: auto; right: -1px; }
.lx-player.right { flex-direction: row-reverse; text-align: right; }
.lx-player.empty { visibility: hidden; }
.lx-player.done, .lx-player.out { opacity: .55; }
.lx-player.active {
    border-color: color-mix(in srgb, var(--c) 70%, white 10%);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 50%, transparent), 0 0 28px color-mix(in srgb, var(--c) 45%, transparent), 0 10px 26px rgba(0, 0, 0, .3);
    transform: translateY(-1px);
}
.lx-av {
    position: relative; width: 46px; height: 46px; border-radius: 50%; flex: none;
    background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c) 60%, white), var(--c) 55%, var(--cd));
    display: grid; place-items: center; font-weight: 800; text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .14), 0 6px 14px rgba(0, 0, 0, .35);
}
.lx-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.lx-av svg.ring { position: absolute; inset: -6px; width: 58px; height: 58px; transform: rotate(-90deg); pointer-events: none; overflow: visible; }
.lx-av svg.ring circle { fill: none; stroke: var(--lx-gold); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 3px rgba(231, 194, 106, .7)); transition: stroke .3s ease; }
.lx-av .badge { position: absolute; bottom: -4px; right: -4px; font-size: 12px; background: #111827; border-radius: 50%; width: 20px; height: 20px; display: grid; place-items: center; border: 1px solid var(--lx-line); }
.lx-pinfo { min-width: 0; flex: 1; }
.lx-pinfo b { display: block; font-size: .93rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lx-pinfo span { display: block; font-size: .74rem; color: var(--lx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lx-dice-slot { width: 58px; height: 58px; flex: none; display: grid; place-items: center; }

/* ---------- 3D dice ---------- */
.lx-dice-wrap { position: relative; }
.lx-dice { --s: 44px; --h: 22px; position: relative; width: var(--s); height: var(--s); border: 0; padding: 0; background: none; cursor: pointer; display: block; }
.lx-dice:disabled { cursor: default; }
.lx-die-stage { position: absolute; inset: 0; perspective: 420px; perspective-origin: 50% 50%; }
.lx-die-shadow {
    position: absolute; left: 50%; bottom: -7px; width: 92%; height: 12px; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0)); transform: translateX(-50%);
}
.lx-die-lift, .lx-die-tilt, .lx-die { position: absolute; inset: 0; transform-style: preserve-3d; }
.lx-die-tilt { transform: none; }
.lx-die .f {
    position: absolute; inset: 0; border-radius: 21%; padding: 14%;
    display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr);
    background: radial-gradient(circle at 28% 22%, #fffffb 0%, #f8f1e2 45%, #e6d9bd 100%);
    box-shadow: inset 0 0 0 1px rgba(140, 105, 50, .16), inset 0 -3px 6px rgba(120, 88, 38, .28), inset 0 2px 3px rgba(255, 255, 255, .9);
    backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.lx-die .f i { width: 74%; aspect-ratio: 1; border-radius: 50%; place-self: center; opacity: 0; }
.lx-die .f i.on {
    opacity: 1;
    background: radial-gradient(circle at 42% 38%, #4a4a4a 0%, #121212 62%);
    box-shadow: inset 0 1.5px 2px rgba(0, 0, 0, .75), 0 .5px 0 rgba(255, 255, 255, .85);
}
.lx-die .f1 i.on, .lx-die .f4 i.on { background: radial-gradient(circle at 42% 38%, #ff7b7b 0%, #c2121c 55%, #7d0a10 100%); }
.lx-die .f1 i.on { width: 120%; }
.lx-die .core { position: absolute; inset: 3%; background: #e3d6b9; border-radius: 6%; }
.lx-die .core.x { transform: rotateY(90deg); }
.lx-die .core.y { transform: rotateX(90deg); }
.lx-dice-wrap.ready .lx-die-stage { animation: none; }
.lx-dice-wrap.ready::before {
    content: ''; position: absolute; inset: -8px; border-radius: 16px; pointer-events: none;
    border: 2px solid rgba(231, 194, 106, .75); box-shadow: 0 0 18px rgba(231, 194, 106, .45);
    animation: lx-dice-ring 1.4s ease-in-out infinite;
}
@keyframes lx-dice-ring { 50% { opacity: .35; transform: scale(1.06); } }

/* ---------- Board ---------- */
.lx-board-wrap { position: relative; width: 100%; aspect-ratio: 1; max-width: 600px; margin: 0 auto; }
.lx-board {
    position: absolute; inset: 0; border-radius: 22px; padding: var(--lx-frame);
    background:
        radial-gradient(circle at 3.2% 3.2%, #fff6d6 0 .55%, #8a5e0c .75%, transparent .95%),
        radial-gradient(circle at 96.8% 3.2%, #fff6d6 0 .55%, #8a5e0c .75%, transparent .95%),
        radial-gradient(circle at 3.2% 96.8%, #fff6d6 0 .55%, #8a5e0c .75%, transparent .95%),
        radial-gradient(circle at 96.8% 96.8%, #fff6d6 0 .55%, #8a5e0c .75%, transparent .95%),
        linear-gradient(145deg, #f8e3a3 0%, #d9a84a 22%, #9a6b12 48%, #e6bd62 70%, #8a5e0c 100%);
    box-shadow: 0 30px 70px rgba(0, 0, 0, .65), 0 0 0 1px rgba(0, 0, 0, .5), inset 0 1px 1px rgba(255, 255, 255, .6), inset 0 -2px 4px rgba(0, 0, 0, .35);
    transition: transform .6s cubic-bezier(.2, .8, .2, 1);
}
.lx-board svg { width: 100%; height: 100%; display: block; border-radius: 12px; box-shadow: 0 0 0 1px rgba(80, 55, 10, .6), 0 2px 8px rgba(0, 0, 0, .35); }
.lx-tokens { position: absolute; inset: var(--lx-frame); pointer-events: none; --unrot: 0deg; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }

/* Pawns: the base sits on the cell centre and stays upright when the board turns. */
.lx-token {
    position: absolute; width: 6.67%; height: 9.33%; left: 0; top: 0; margin: -7.84% 0 0 -3.33%;
    transition: left var(--step, 140ms) cubic-bezier(.3, .7, .4, 1), top var(--step, 140ms) cubic-bezier(.3, .7, .4, 1), transform .2s ease;
    pointer-events: none; z-index: 2; will-change: left, top;
}
.lx-token .up { position: absolute; inset: 0; transform: rotate(var(--unrot)); transform-origin: 50% 84%; }
.lx-token .hopper { position: absolute; inset: 0; transform-origin: 50% 84%; }
.lx-token svg.pawn { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }
.lx-token .hopper.hop { animation: lx-hop var(--step, 140ms) cubic-bezier(.3, .7, .4, 1); }
@keyframes lx-hop { 45% { transform: translateY(-34%) scale(1.06); } 85% { transform: translateY(0) scale(1.04, .94); } }
.lx-token.movable { pointer-events: auto; cursor: pointer; z-index: 6; }
.lx-token.movable::before {
    content: ''; position: absolute; left: 50%; top: 84%; width: 118%; aspect-ratio: 1; border-radius: 50%;
    transform: translate(-50%, -50%); border: 2.5px solid #fff4c7;
    box-shadow: 0 0 0 2px var(--c), 0 0 16px 2px var(--glow, #fff);
    animation: lx-glow 1s ease-in-out infinite;
}
@keyframes lx-glow { 50% { transform: translate(-50%, -50%) scale(1.15); opacity: .5; } }
.lx-token.movable .hopper { animation: lx-bob 1s ease-in-out infinite; }
@keyframes lx-bob { 50% { transform: translateY(-12%); } }
.lx-token.captured svg.pawn { animation: lx-capt .55s ease-in; }
@keyframes lx-capt { 40% { transform: translateY(-40%) rotate(-25deg) scale(1.15); filter: brightness(1.8); } 100% { transform: none; } }

.lx-fx { position: absolute; pointer-events: none; z-index: 9; transform: translate(-50%, -50%); }
.lx-burst { width: 20%; aspect-ratio: 1; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 24px currentColor; animation: lx-burst .65s ease-out forwards; }
@keyframes lx-burst { from { transform: translate(-50%, -50%) scale(.2); opacity: 1; } to { transform: translate(-50%, -50%) scale(1.7); opacity: 0; } }
.lx-float { font-weight: 800; font-size: 1.05rem; color: #fff8dc; text-shadow: 0 2px 8px rgba(0, 0, 0, .7); animation: lx-floatup 1.2s ease-out forwards; white-space: nowrap; }
@keyframes lx-floatup { from { margin-top: 0; opacity: 1; } to { margin-top: -9%; opacity: 0; } }

.lx-banner {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.6); z-index: 12; opacity: 0;
    background: linear-gradient(180deg, rgba(30, 24, 12, .95), rgba(14, 12, 8, .95)); border: 1px solid rgba(231, 194, 106, .5);
    color: #fff3c4; padding: 12px 20px; border-radius: 14px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
    font-weight: 800; font-size: 1.05rem; pointer-events: none; transition: all .25s cubic-bezier(.2, .9, .3, 1.3); text-align: center;
}
.lx-banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.lx-status { text-align: center; color: var(--lx-muted); font-size: .9rem; min-height: 1.4em; margin-top: 12px; letter-spacing: .2px; }
.lx-reacts { display: flex; gap: 6px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 6px; -webkit-overflow-scrolling: touch; mask-image: linear-gradient(90deg, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); }
.lx-reacts::-webkit-scrollbar { display: none; }
.lx-react { flex: none; border: 1px solid var(--lx-line); background: var(--lx-panel); border-radius: 999px; padding: 7px 12px; cursor: pointer; font-size: .85rem; font-weight: 600; transition: transform .1s ease, background .15s ease; }
.lx-react:hover { background: var(--lx-panel-2); }
.lx-react:active { transform: scale(.92); }
.lx-bubble {
    position: absolute; z-index: 20; top: -8px; left: 50%; transform: translate(-50%, -100%);
    background: #fffaf0; color: #1f1a10; font-weight: 700; padding: 6px 11px; border-radius: 12px; white-space: nowrap; font-size: .85rem;
    animation: lx-pop 2.4s ease forwards; box-shadow: 0 8px 20px rgba(0, 0, 0, .4);
}
@keyframes lx-pop { 0% { opacity: 0; transform: translate(-50%, -80%) scale(.6); } 10%, 85% { opacity: 1; transform: translate(-50%, -100%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -120%); } }
.lx-netbar { position: fixed; left: 50%; bottom: calc(16px + var(--lx-safe-bottom)); transform: translateX(-50%); z-index: 40; background: #7f1d1d; color: #fff; padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: .85rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }

/* Results */
.lx-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(4, 6, 14, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lx-modal-card {
    width: 100%; max-width: 420px; border-radius: 24px; padding: 24px; text-align: center; animation: lx-in .4s cubic-bezier(.2, .9, .3, 1.2);
    background: linear-gradient(180deg, #1b1f33, #0d1020); border: 1px solid rgba(231, 194, 106, .35);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .08);
}
@keyframes lx-in { from { transform: scale(.85); opacity: 0; } }
.lx-modal-card h2 { margin: 4px 0 8px; font-size: 1.7rem; background: linear-gradient(180deg, #fff, #f0d48a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lx-trophy { font-size: 60px; animation: lx-float 2.5s ease-in-out infinite; filter: drop-shadow(0 10px 20px rgba(231, 194, 106, .35)); }
.lx-rank { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); margin-top: 8px; text-align: left; border: 1px solid var(--lx-line); }
.lx-rank .pos { width: 30px; font-weight: 800; font-size: 1.1rem; }
.lx-rank .dot { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25); }
.lx-confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.lx-confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; animation: lx-fall linear forwards; }
@keyframes lx-fall { to { transform: translateY(110vh) rotate(720deg); } }

.lx-toast {
    position: fixed; left: 50%; top: calc(72px + var(--lx-safe-top)); transform: translateX(-50%); z-index: 70;
    background: rgba(17, 20, 35, .96); border: 1px solid var(--lx-line-2); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: .9rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .45); animation: lx-in .25s ease; max-width: calc(100vw - 32px); text-align: center;
}

@media (max-width: 420px) {
    .lx-player { padding: 6px 8px; gap: 8px; min-height: 62px; }
    .lx-av { width: 40px; height: 40px; }
    .lx-av svg.ring { width: 52px; height: 52px; }
    .lx-dice-slot { width: 52px; height: 52px; }
    .lx-dice { --s: 40px; --h: 20px; }
    .lx-pinfo b { font-size: .84rem; }
    .lx-board { border-radius: 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
