:root {
    --casino-gold: #d7b45b;
    --casino-gold-bright: #ffe6a0;
    --casino-gold-dark: #71511b;
    --casino-ink: #080a0b;
}

#taiXiuCasinoModal {
    align-items: center;
    justify-content: center;
    padding: clamp(12px, 2vw, 28px);
    overflow: auto;
    background: rgba(0, 0, 0, 0.72);
    -webkit-backdrop-filter: blur(9px) brightness(0.52);
    backdrop-filter: blur(9px) brightness(0.52);
}

#taiXiuCasinoModal.flex ~ #floatingPhoneBtn { display: none; }

#casinoLobbyShell {
    width: min(78vw, 1280px);
    height: min(72dvh, 780px);
    min-height: 520px;
    max-height: min(72dvh, 780px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(227, 194, 110, 0.82);
    border-radius: 19px;
    background-color: #090b0b;
    background-image: radial-gradient(rgba(244, 211, 132, 0.045) 0.7px, transparent 0.7px);
    background-size: 15px 15px;
    box-shadow: 0 28px 90px rgba(0,0,0,.88), 0 0 34px rgba(215,180,91,.18), inset 0 1px rgba(255,244,204,.16);
}

#casinoTopBar {
    min-height: 70px;
    padding: 10px clamp(14px, 2.4vw, 36px);
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid rgba(215, 180, 91, 0.45);
    background: linear-gradient(180deg, rgba(28, 24, 16, 0.98), rgba(11, 12, 12, 0.98));
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.48), inset 0 1px rgba(255, 239, 191, 0.12);
    z-index: 3;
}

.casino-player { display: flex; align-items: center; gap: 11px; min-width: 0; }
.casino-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--casino-gold-bright);
    border-radius: 50%;
    color: #ffe4a0;
    background: radial-gradient(circle at 30% 25%, #7d5c27, #20170d 72%);
    box-shadow: 0 0 14px rgba(241, 199, 95, 0.28), inset 0 1px rgba(255,255,255,0.28);
}
.casino-avatar i { font-size: 17px; }
.casino-eyebrow { color: #bda56a; font-size: 8px; font-weight: 900; letter-spacing: 1.4px; }
.casino-player-name { overflow: hidden; color: #fff3d4; font-size: 12px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.casino-wallet {
    min-width: 180px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid rgba(245, 208, 97, 0.65);
    border-radius: 12px;
    color: #ffe48c;
    background: linear-gradient(115deg, rgba(82, 59, 20, 0.58), rgba(22, 18, 12, 0.96));
    box-shadow: 0 0 18px rgba(215, 180, 91, 0.14), inset 0 1px rgba(255, 255, 255, 0.12);
    font: 900 14px/1 monospace;
}
.casino-wallet > i { color: #ffd35e; font-size: 14px; }
.casino-currency { color: rgba(255, 232, 175, 0.68); font: 700 8px/1 'Montserrat', sans-serif; }
.casino-top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.casino-settings-wrap { position: relative; }
.casino-icon-button {
    min-height: 36px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(215, 180, 91, 0.38);
    border-radius: 9px;
    color: #e8d8ae;
    background: linear-gradient(180deg, #29251c, #151411);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255, 255, 255, 0.09);
    font-size: 10px;
    font-weight: 800;
}
.casino-icon-button:hover { border-color: var(--casino-gold-bright); color: #fff0c1; box-shadow: 0 0 14px rgba(215, 180, 91, 0.22); }
.casino-deposit { color: #18200d; border-color: #e3c36f; background: linear-gradient(135deg, #ffe58d, #bb8a2e); }
.casino-close { width: 36px; padding: 0; color: #ffb6a6; border-color: rgba(203, 87, 67, 0.54); background: linear-gradient(180deg, #48201b, #21100e); font-size: 14px; }
.casino-settings { position: absolute; top: calc(100% + 10px); right: 0; z-index: 20; width: 220px; padding: 12px; border: 1px solid var(--casino-gold); border-radius: 12px; color: #f7e9c2; background: #171611; box-shadow: 0 14px 35px rgba(0,0,0,.7), 0 0 15px rgba(215,180,91,.18); }
.casino-settings label { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 10px; font-weight: 700; }
.casino-settings input { accent-color: #d9b85f; }

.casino-mode-switch { display: flex; justify-content: center; gap: 12px; padding: 11px 16px; }
.casino-mode-button {
    position: relative;
    min-width: min(250px, 42vw);
    min-height: 48px;
    padding: 7px 17px 7px 52px;
    display: grid;
    align-content: center;
    text-align: left;
    border: 1px solid rgba(183, 147, 67, 0.5);
    border-radius: 12px;
    color: #c9c0ad;
    background: linear-gradient(120deg, rgba(35, 32, 25, 0.96), rgba(15, 16, 15, 0.98));
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.3), inset 0 1px rgba(255,255,255,.07);
    transition: color 180ms ease, border-color 180ms ease, box-shadow 220ms ease, transform 180ms ease;
}
.casino-mode-button > i { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: #c9a950; font-size: 19px; }
.casino-mode-button > span { color: #f3ead4; font-size: 12px; font-weight: 1000; letter-spacing: 1.1px; }
.casino-mode-button > small { margin-top: 2px; color: #8e8879; font-size: 8px; }
.casino-mode-button:hover, .casino-mode-button.active { border-color: var(--casino-gold-bright); box-shadow: 0 0 20px rgba(215,180,91,.2), 0 8px 24px rgba(0,0,0,.4), inset 0 1px rgba(255,245,206,.22); }
.casino-mode-button.active { background: linear-gradient(115deg, rgba(98, 70, 25, .75), rgba(28, 24, 16, .98)); }
.casino-mode-button.active > i { color: #ffdf79; filter: drop-shadow(0 0 8px rgba(255, 207, 72, .68)); }
.casino-mode-button:active { transform: translateY(1px) scale(.99); }

#casinoLobbyGrid { min-height: 0; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 294px; gap: 14px; padding: 0 18px 16px; }
#casinoGameStage { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: auto; scrollbar-color: #816a37 #11110f; scrollbar-width: thin; }
.casino-mode { min-height: 100%; animation: casinoModeEnter 240ms ease-out both; }
.casino-mode.hidden { display: none; }
#casinoModeTaiXiu { height: 100%; flex: 1; }
#casinoModeTaiXiu .gold-plate-border { height: 100%; }
#casinoModeTaiXiu .wood-inner-panel { height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
#casinoModeXocDia { height: 100%; flex: 1; display: flex; flex-direction: column; }
#casinoModeXocDia.hidden { display: none; }
@keyframes casinoModeEnter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.casino-live-label { margin-right: auto; padding: 4px 8px; border: 1px solid rgba(239, 68, 68, .38); border-radius: 999px; color: #ffb1a3; background: rgba(77, 21, 17, .54); font-size: 8px; font-weight: 900; letter-spacing: 1px; }
.casino-live-label i { margin-right: 4px; color: #ff5947; font-size: 6px; animation: casinoLivePulse 1.2s ease-in-out infinite; }
@keyframes casinoLivePulse { 50% { opacity: .35; } }
.casino-room-label { display: flex; align-items: center; gap: 6px; color: #d9c690; font-size: 9px; font-weight: 800; }

#casinoModeTaiXiu .gold-plate-border { width: 100%; padding: 5px; border-radius: 22px; box-shadow: 0 18px 48px rgba(0,0,0,.72), 0 0 22px rgba(215,180,91,.14), inset 0 1px 5px rgba(255,245,208,.35); }
#casinoModeTaiXiu .wood-inner-panel { min-height: 100%; padding: clamp(12px, 1.8vw, 24px); border-radius: 18px; }
#casinoModeTaiXiu #countdownTimer { font-size: clamp(42px, 6vw, 76px); line-height: .96; color: #ffe17c; text-shadow: 0 0 14px rgba(255,207,75,.62), 0 3px 14px #000; }
#casinoModeTaiXiu #bowlStatus { color: #f8e6ab; font-size: 9px; }
#casinoModeTaiXiu #taiBox, #casinoModeTaiXiu #xiuBox { min-height: 232px; padding-bottom: 53px; border-radius: 18px; box-shadow: inset 0 1px rgba(255,255,255,.08), 0 14px 30px rgba(0,0,0,.42); }
#casinoModeTaiXiu #taiBox { border-color: #b84d3e; background: radial-gradient(ellipse at 50% 0, rgba(180, 44, 37, .42), transparent 66%), linear-gradient(180deg, #341613, #130b0a); }
#casinoModeTaiXiu #xiuBox { border-color: #426db1; background: radial-gradient(ellipse at 50% 0, rgba(63, 91, 168, .4), transparent 66%), linear-gradient(180deg, #15203c, #0b0c18); }
#casinoModeTaiXiu #taiBox:hover { box-shadow: 0 0 22px rgba(210,55,43,.27), 0 16px 34px rgba(0,0,0,.48); }
#casinoModeTaiXiu #xiuBox:hover { box-shadow: 0 0 22px rgba(70,121,226,.27), 0 16px 34px rgba(0,0,0,.48); }
.casino-door-bet { position: absolute; left: 50%; bottom: 11px; z-index: 2; min-width: 132px; padding: 8px 15px; transform: translateX(-50%); border: 1px solid #fff0ad; border-radius: 9px; color: #1b1508; background: linear-gradient(180deg, #ffe68e, #bb872a); box-shadow: 0 0 16px rgba(245,208,97,.32), inset 0 1px rgba(255,255,255,.55); font-size: 9px; font-weight: 1000; letter-spacing: .7px; }
.casino-door-bet:hover { box-shadow: 0 0 22px rgba(255,219,111,.65); transform: translateX(-50%) translateY(-1px); }
.casino-all-in { width: 62px; height: 38px; border: 1px solid #c4a4ff; border-radius: 999px; color: white; background: linear-gradient(135deg, #753bd3, #37166e); box-shadow: 0 0 14px rgba(139,92,246,.3); font-size: 8px; font-weight: 1000; }
.casino-cancel { padding: 8px 13px; border: 1px solid #b76363; border-radius: 9px; color: #ffe5e5; background: linear-gradient(135deg, #6e2424, #301111); font-size: 9px; font-weight: 900; }
#casinoModeTaiXiu .chip-item { width: 39px; height: 39px; }
#casinoModeTaiXiu #roadHistoryDots > div { width: 22px; height: 22px; }

.casino-chat-panel { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #90753c; border-radius: 15px; background: linear-gradient(180deg, rgba(25,23,18,.98), rgba(10,12,12,.98)); box-shadow: 0 15px 36px rgba(0,0,0,.55), 0 0 20px rgba(215,180,91,.1), inset 0 1px rgba(255,245,207,.12); }
.casino-chat-heading { min-height: 43px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(215,180,91,.32); color: #f1d88e; background: linear-gradient(100deg, #332817, #17150f); font-size: 10px; font-weight: 1000; letter-spacing: .7px; }
.casino-chat-heading > div { display: flex; align-items: center; gap: 7px; }
.casino-chat-heading > div i { color: #e8bc52; }
.casino-chat-heading > span { display: flex; align-items: center; gap: 5px; color: #95bd79; font-size: 7px; }
.casino-chat-live-dot { width: 6px; height: 6px; border-radius: 50%; background: #72dc71; box-shadow: 0 0 8px #72dc71; }
.casino-chat-subtitle { min-height: 30px; padding: 0 12px; display: flex; align-items: center; gap: 6px; color: #8a877e; border-bottom: 1px solid rgba(255,255,255,.055); font-size: 8px; }
.casino-chat-subtitle i { color: #c6a54e; }
.casino-chat-subtitle b { color: #e0d3ae; font-family: monospace; }
.casino-chat-messages { min-height: 0; flex: 1; padding: 10px; display: flex; flex-direction: column; gap: 7px; overflow-y: auto; scrollbar-color: #796337 #111; scrollbar-width: thin; }
.casino-chat-message { padding: 7px 8px; border: 1px solid rgba(255,255,255,.055); border-radius: 8px 8px 8px 2px; color: #d5d2c8; background: rgba(255,255,255,.035); font-size: 9px; line-height: 1.45; animation: chatMessageIn 170ms ease-out both; overflow-wrap: anywhere; }
.casino-chat-message strong { margin-right: 4px; color: #e9c66b; font-size: 8px; }
.casino-chat-message.player-message { align-self: flex-end; border-color: rgba(98,157,126,.25); border-radius: 8px 8px 2px 8px; background: rgba(27,65,47,.34); }
.casino-chat-message.player-message strong { color: #8fd4a4; }
@keyframes chatMessageIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.casino-chat-form { min-height: 48px; padding: 7px; display: flex; gap: 6px; border-top: 1px solid rgba(215,180,91,.22); background: #0c0d0c; }
.casino-chat-form input { min-width: 0; flex: 1; padding: 0 10px; border: 1px solid rgba(215,180,91,.22); border-radius: 8px; outline: none; color: #f6f1e4; background: #171714; font-size: 9px; }
.casino-chat-form input:focus { border-color: rgba(245,208,97,.72); box-shadow: 0 0 10px rgba(215,180,91,.14); }
.casino-chat-form button { width: 34px; flex: 0 0 34px; border: 1px solid #d5b75f; border-radius: 8px; color: #191309; background: linear-gradient(135deg,#ffe38b,#ad7d28); }

.xocdia-heading { min-height: 48px; padding: 2px 6px 10px; display: flex; align-items: center; justify-content: space-between; color: #f5df9e; }
.xocdia-heading h1 { margin: 3px 0 0; color: #ffe7a0; font-size: 20px; font-weight: 1000; text-shadow: 0 0 14px rgba(243,197,81,.32); }
.xocdia-round { padding: 6px 10px; border: 1px solid rgba(215,180,91,.45); border-radius: 8px; color: #bcae8a; background: rgba(40,34,23,.7); font-size: 8px; }
.xocdia-round b { margin-left: 5px; color: #f6d873; font-family: monospace; font-size: 12px; }
.xocdia-layout { min-height: min(60vh, 560px); flex: 1; display: grid; grid-template-columns: minmax(150px, 190px) minmax(250px, 1fr) minmax(145px, 180px); gap: 12px; padding: 12px; border: 1px solid #9c7e42; border-radius: 20px; background: linear-gradient(145deg, rgba(44,37,24,.98), rgba(14,15,14,.98) 50%, rgba(24,22,18,.98)); box-shadow: 0 16px 42px rgba(0,0,0,.62), 0 0 20px rgba(215,180,91,.12), inset 0 1px rgba(255,240,190,.18); }
.xocdia-bet-column, .xocdia-control-column { display: flex; flex-direction: column; gap: 10px; }
.xocdia-history-panel { padding: 11px; border: 1px solid rgba(209,177,98,.32); border-radius: 13px; background: rgba(8,10,10,.78); box-shadow: inset 0 1px rgba(255,255,255,.05); }
.xocdia-panel-title { color: #e4cf92; font-size: 9px; font-weight: 1000; letter-spacing: .5px; }
.xocdia-panel-title i { margin-right: 5px; color: #d5ae4d; }
.xocdia-history-dots { min-height: 62px; margin-top: 11px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 7px; }
.xocdia-history-dot { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.48); border-radius: 50%; box-shadow: 0 2px 7px rgba(0,0,0,.48), inset 0 1px rgba(255,255,255,.55); font: 900 8px monospace; }
.xocdia-history-dot.odd { color: #fff0d6; border-color: #ff7964; background: radial-gradient(circle at 30% 25%, #ff8673, #9b251d 72%); }
.xocdia-history-dot.even { color: #514020; border-color: #fff4d0; background: radial-gradient(circle at 30% 25%, #fffef1, #d6c9a8 80%); }
.xocdia-history-dot.newest { animation: historyDotPop 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28) both; box-shadow: 0 0 12px rgba(245, 208, 97, 0.9), 0 3px 8px rgba(0, 0, 0, 0.6), inset 0 1px rgba(255, 255, 255, 0.6); border-width: 2px; }
@keyframes historyDotPop {
    0% { transform: scale(0.2); opacity: 0; }
    60% { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 1; }
}
.xocdia-history-legend { margin-top: 7px; display: flex; gap: 10px; color: #8d887b; font-size: 7px; }
.xocdia-history-legend span { display: flex; align-items: center; gap: 4px; }
.xocdia-history-legend i { width: 7px; height: 7px; display: inline-block; border-radius: 50%; }
.xocdia-history-legend .red { background: #d74130; }.xocdia-history-legend .white { background: #e8dfc7; }
.xocdia-my-bet { padding: 9px 10px; display: flex; justify-content: space-between; border: 1px solid rgba(215,180,91,.22); border-radius: 9px; color: #938b77; background: rgba(0,0,0,.28); font-size: 7px; font-weight: 900; }
.xocdia-my-bet b { color: #f4d77f; font: 900 10px monospace; }
.xocdia-bet-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.xocdia-choice { min-height: 69px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1px solid rgba(255,255,255,.35); border-radius: 12px; box-shadow: 0 6px 16px rgba(0,0,0,.36), inset 0 1px rgba(255,255,255,.17); transition: transform 160ms ease, box-shadow 180ms ease; }
.xocdia-choice span { color: white; font-size: 11px; font-weight: 1000; letter-spacing: .6px; }
.xocdia-choice small { color: rgba(255,255,255,.72); font: 700 8px monospace; }
.xocdia-choice.even { border-color: #59b2d8; background: linear-gradient(145deg,#13657a,#102a42); }
.xocdia-choice.odd { border-color: #ec8063; background: linear-gradient(145deg,#a33b2c,#3c1715); }
.xocdia-choice:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 0 16px rgba(229,192,103,.32), 0 8px 18px rgba(0,0,0,.42); }
.xocdia-choice:disabled { filter: grayscale(.65); opacity: .56; cursor: not-allowed; }
.xocdia-stage { min-width: 0; min-height: 405px; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; overflow: hidden; border: 1px solid rgba(201,167,84,.28); border-radius: 15px; background: radial-gradient(ellipse at 50% 68%, rgba(75,84,54,.36), transparent 48%), linear-gradient(180deg, rgba(13,18,17,.4), rgba(3,8,7,.82)); }
.xocdia-aura { position: absolute; top: 28px; left: 50%; width: 190px; height: 190px; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle, rgba(217,180,83,.12), transparent 69%); filter: blur(2px); }
.xocdia-npc { position: absolute; z-index: 1; top: max(24px, calc(50% - 245px)); left: 50%; width: 150px; height: 218px; transform: translateX(-50%); transform-origin: 50% 100%; animation: npcBreath 3.2s ease-in-out infinite; filter: drop-shadow(0 13px 15px rgba(0,0,0,.55)); }
@keyframes npcBreath { 0%,100% { margin-top: 0; } 50% { margin-top: 4px; } }
.npc-hair { position: absolute; top: 0; left: 37px; width: 78px; height: 103px; border-radius: 42px 42px 26px 26px; background: linear-gradient(90deg,#160d0d,#382019 38%,#140d0e 82%); box-shadow: inset 7px 0 8px rgba(255,203,127,.1); }
.npc-face { position: absolute; z-index: 2; top: 14px; left: 49px; width: 55px; height: 66px; border: 1px solid rgba(240,197,150,.46); border-radius: 48% 48% 44% 44%; background: radial-gradient(ellipse at 45% 28%,#f2cfac,#bd876c 78%); box-shadow: inset -7px -1px 10px rgba(80,34,32,.2); }
.npc-face::before, .npc-face::after { content: ''; position: absolute; top: 35px; width: 12px; height: 23px; border-radius: 50%; background: #c18b72; }
.npc-face::before { left: -9px; }.npc-face::after { right: -9px; }
.npc-eye { position: absolute; top: 28px; width: 5px; height: 3px; border-radius: 50%; background: #241514; }
.npc-eye.left { left: 13px; }.npc-eye.right { right: 13px; }
.npc-nose { position: absolute; top: 31px; left: 25px; width: 5px; height: 10px; border-right: 1px solid rgba(114,61,49,.55); border-bottom: 1px solid rgba(114,61,49,.55); transform: rotate(25deg); }
.npc-smile { position: absolute; left: 21px; bottom: 12px; width: 13px; height: 5px; border-bottom: 1.5px solid #793d43; border-radius: 50%; }
.npc-neck { position: absolute; z-index: 1; top: 72px; left: 66px; width: 23px; height: 31px; background: linear-gradient(90deg,#a66f5c,#e1b28d,#9c675a); }
.npc-body { position: absolute; top: 91px; left: 15px; width: 120px; height: 126px; overflow: hidden; border: 1px solid rgba(235,196,124,.35); border-radius: 51px 51px 12px 12px; background: linear-gradient(110deg,#5b1720,#b4473c 44%,#49131e 78%); box-shadow: inset 0 11px 18px rgba(255,201,156,.16); }
.npc-body::before, .npc-body::after { content: ''; position: absolute; top: 25px; width: 47px; height: 92px; border-radius: 30px; background: linear-gradient(90deg,#e1b38c,#b87c69); }
.npc-body::before { left: -29px; transform: rotate(12deg); }.npc-body::after { right: -29px; transform: rotate(-12deg); }
.npc-collar { position: absolute; z-index: 1; top: -1px; left: 46px; width: 28px; height: 34px; border-right: 2px solid #d8b27b; border-bottom: 2px solid #d8b27b; transform: rotate(45deg); }
.xocdia-npc.shaking { animation: npcShake .14s linear infinite; }
@keyframes npcShake { 0%,100% { translate: 0 0; rotate: 0; } 25% { translate: -2px 0; rotate: -1deg; } 75% { translate: 2px 0; rotate: 1deg; } }
.xocdia-bowl-area { position: absolute; z-index: 3; left: 50%; bottom: max(68px, calc(50% - 200px)); width: min(270px, 92%); height: 116px; transform: translateX(-50%); }
.xocdia-table-shadow { position: absolute; left: 7%; right: 7%; bottom: 1px; height: 22px; border-radius: 50%; background: radial-gradient(ellipse,rgba(0,0,0,.88),transparent 72%); filter: blur(3px); }
.xocdia-bowl { position: absolute; z-index: 4; left: 50%; bottom: 14px; width: 190px; height: 88px; transform: translateX(-50%); transform-origin: 50% 72%; transition: transform 900ms cubic-bezier(.16, 1, .3, 1), opacity 750ms ease; filter: drop-shadow(0 14px 15px rgba(0,0,0,.75)); }
.xocdia-bowl-rim { position: absolute; top: 5px; left: 0; width: 100%; height: 30px; border: 6px solid #ffe6a0; border-radius: 50%; background: radial-gradient(ellipse at 50% 45%,#080909 0 55%,#805719 58%,#d1a947 76%,#593b13 100%); box-shadow: 0 0 15px rgba(243,198,83,.4), inset 0 3px 6px #000; }
.xocdia-bowl-base { position: absolute; left: 8px; right: 8px; top: 18px; height: 64px; border: 2px solid #d7b04f; border-top: 0; border-radius: 8px 8px 48% 48%; background: linear-gradient(180deg,#bb8426 0%,#6d4515 20%,#2d1c0c 78%,#b07b25 100%); box-shadow: inset 0 -7px 12px rgba(0,0,0,.54), inset 0 5px 8px rgba(255,230,145,.24); clip-path: polygon(0 0,100% 0,84% 100%,16% 100%); }
.xocdia-bowl-highlight { position: absolute; left: 45px; top: 28px; width: 100px; height: 36px; border-bottom: 2px solid rgba(255,225,139,.55); border-radius: 0 0 50% 50%; }
.xocdia-bowl.shaking { animation: bowlRattleVigor .1s cubic-bezier(0.36, 0.07, 0.19, 0.97) infinite; }
@keyframes bowlRattleVigor {
    0% { transform: translate(-50%, 0) rotate(0deg); }
    18% { transform: translate(calc(-50% - 9px), 6px) rotate(-7deg); }
    36% { transform: translate(calc(-50% + 8px), -8px) rotate(8deg); }
    54% { transform: translate(calc(-50% - 7px), -4px) rotate(-5deg); }
    72% { transform: translate(calc(-50% + 9px), 5px) rotate(7deg); }
    88% { transform: translate(calc(-50% - 4px), 3px) rotate(-3deg); }
    100% { transform: translate(-50%, 0) rotate(0deg); }
}
.xocdia-bowl.lifted { transform: translate(-50%, -185px) rotate(-14deg) scale(.78); opacity: 0; filter: drop-shadow(0 25px 20px rgba(0,0,0,.4)); }
.xocdia-coins { position: absolute; z-index: 2; left: 50%; bottom: 35px; width: 148px; height: 65px; transform: translateX(-50%); display: grid; grid-template-columns: repeat(4,1fr); align-items: center; justify-items: center; perspective: 500px; opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
.xocdia-coins.visible { opacity: 1; pointer-events: auto; }
.xocdia-coins.shaking { opacity: .25; animation: coinJitter .09s linear infinite; display: grid; }
@keyframes coinJitter {
    0% { transform: translateX(-50%) scale(.6) translateY(0); filter: blur(2px); }
    50% { transform: translateX(calc(-50% + 4px)) scale(.65) translateY(-5px); filter: blur(3px); }
    100% { transform: translateX(calc(-50% - 4px)) scale(.58) translateY(4px); filter: blur(2px); }
}
.xocdia-coins.hidden { visibility: hidden; }
.xocdia-coin { width: 28px; height: 28px; border-radius: 50%; position: relative; transform-style: preserve-3d; box-shadow: 0 8px 16px rgba(0,0,0,.8), 0 2px 4px rgba(0,0,0,.6), inset 0 2px 3px rgba(255,255,255,.6), inset 0 -2px 3px rgba(0,0,0,.5); }
.xocdia-coin::after { content: ''; position: absolute; left: 10%; bottom: -8px; width: 80%; height: 8px; border-radius: 50%; background: radial-gradient(ellipse, rgba(0,0,0,.85) 0%, rgba(0,0,0,.4) 50%, transparent 75%); filter: blur(1.5px); opacity: .8; pointer-events: none; }
.xocdia-coin.red { background: radial-gradient(circle at 35% 27%,#ff6b5a 0%,#cc1810 65%,#660d09 100%); border: 2px solid #ffbcbc; }
.xocdia-coin.white { background: radial-gradient(circle at 35% 27%,#ffffff 0%,#f0ebd8 65%,#9e9375 100%); border: 2px solid #ffffff; }

.xocdia-coins.visible .xocdia-coin:nth-child(1) { animation: coinSpringUp1 .75s cubic-bezier(.18,.89,.32,1.25) both; }
.xocdia-coins.visible .xocdia-coin:nth-child(2) { animation: coinSpringUp2 .80s cubic-bezier(.18,.89,.32,1.25) .06s both; }
.xocdia-coins.visible .xocdia-coin:nth-child(3) { animation: coinSpringUp3 .85s cubic-bezier(.18,.89,.32,1.25) .12s both; }
.xocdia-coins.visible .xocdia-coin:nth-child(4) { animation: coinSpringUp4 .90s cubic-bezier(.18,.89,.32,1.25) .18s both; }

@keyframes coinSpringUp1 {
    0% { transform: scale(0) translateY(24px) rotateY(0deg) rotateX(40deg); opacity: 0; }
    35% { transform: scale(1.28) translateY(-32px) rotateY(360deg) rotateX(15deg); opacity: 1; }
    65% { transform: scale(0.92) translateY(3px) rotateY(540deg) rotateX(-5deg); }
    82% { transform: scale(1.06) translateY(-8px) rotateY(660deg) rotateX(2deg); }
    100% { transform: scale(1) translateY(0) rotateY(720deg) rotateX(0deg); opacity: 1; }
}
@keyframes coinSpringUp2 {
    0% { transform: scale(0) translateY(24px) rotateY(0deg) rotateX(-40deg); opacity: 0; }
    35% { transform: scale(1.32) translateY(-36px) rotateY(-360deg) rotateX(-15deg); opacity: 1; }
    65% { transform: scale(0.90) translateY(3px) rotateY(-540deg) rotateX(5deg); }
    82% { transform: scale(1.08) translateY(-9px) rotateY(-660deg) rotateX(-2deg); }
    100% { transform: scale(1) translateY(0) rotateY(-720deg) rotateX(0deg); opacity: 1; }
}
@keyframes coinSpringUp3 {
    0% { transform: scale(0) translateY(24px) rotateY(0deg) rotateX(35deg); opacity: 0; }
    35% { transform: scale(1.26) translateY(-30px) rotateY(360deg) rotateX(12deg); opacity: 1; }
    65% { transform: scale(0.94) translateY(2px) rotateY(540deg) rotateX(-4deg); }
    82% { transform: scale(1.05) translateY(-7px) rotateY(660deg) rotateX(2deg); }
    100% { transform: scale(1) translateY(0) rotateY(720deg) rotateX(0deg); opacity: 1; }
}
@keyframes coinSpringUp4 {
    0% { transform: scale(0) translateY(24px) rotateY(0deg) rotateX(-35deg); opacity: 0; }
    35% { transform: scale(1.30) translateY(-34px) rotateY(-360deg) rotateX(-14deg); opacity: 1; }
    65% { transform: scale(0.91) translateY(3px) rotateY(-540deg) rotateX(4deg); }
    82% { transform: scale(1.07) translateY(-8px) rotateY(-660deg) rotateX(-2deg); }
    100% { transform: scale(1) translateY(0) rotateY(-720deg) rotateX(0deg); opacity: 1; }
}

.xocdia-coins.visible .xocdia-coin::after { animation: coinShadowBounce .85s ease-out both; }
@keyframes coinShadowBounce {
    0% { opacity: .1; transform: scale(.2); filter: blur(5px); }
    35% { opacity: .2; transform: scale(.4); filter: blur(6px); }
    65% { opacity: .95; transform: scale(1.2); filter: blur(1.5px); }
    82% { opacity: .5; transform: scale(.7); filter: blur(3px); }
    100% { opacity: .8; transform: scale(1); filter: blur(1.5px); }
}
.xocdia-status { position: absolute; z-index: 5; left: 50%; bottom: 27px; width: max-content; max-width: 90%; padding: 6px 13px; transform: translateX(-50%); border: 1px solid rgba(215,180,91,.45); border-radius: 999px; color: #f5df9d; background: rgba(12,13,12,.88); box-shadow: 0 0 13px rgba(215,180,91,.12); font-size: 8px; font-weight: 1000; letter-spacing: .75px; }
.xocdia-result { position: absolute; z-index: 6; top: 10px; left: 50%; width: max-content; padding: 7px 11px; transform: translateX(-50%); border: 1px solid #f5d477; border-radius: 9px; color: #ffeaaa; background: rgba(42,31,14,.94); box-shadow: 0 0 17px rgba(245,208,97,.25); font-size: 10px; font-weight: 1000; }
.xocdia-result.hidden { display: none; }
.xocdia-stage.shaking .xocdia-coins { visibility: hidden; opacity: 0; }
.xocdia-countdown-card { min-height: 113px; padding: 11px 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #9c7e42; border-radius: 13px; background: radial-gradient(ellipse at 50% 20%,rgba(123,91,31,.27),transparent 80%),#10110f; box-shadow: 0 0 16px rgba(215,180,91,.1), inset 0 1px rgba(255,255,255,.1); }
.xocdia-countdown-card span { color: #baa368; font-size: 7px; font-weight: 1000; letter-spacing: .7px; }
.xocdia-countdown-card b { margin: 4px 0 1px; color: #ffe182; font: 1000 43px/.96 monospace; text-shadow: 0 0 17px rgba(255,214,99,.38); }
.xocdia-countdown-card small { color: #827960; font-size: 7px; }
.xocdia-chip-label { color: #c0b38f; font-size: 7px; font-weight: 1000; letter-spacing: .7px; }
.xocdia-chips { display: grid; grid-template-columns: repeat(4,1fr); gap: 5px; }
.xocdia-chips button { min-width: 0; height: 28px; border: 1px solid rgba(220,192,124,.42); border-radius: 8px; color: #f0dfb1; background: linear-gradient(145deg,#4a412e,#211e17); box-shadow: 0 3px 7px rgba(0,0,0,.35), inset 0 1px rgba(255,255,255,.13); font: 900 8px monospace; }
.xocdia-chips button:hover { border-color: #f8d879; box-shadow: 0 0 11px rgba(245,208,97,.24); }
.xocdia-selected-chip { display: flex; align-items: center; justify-content: space-between; color: #93876b; font-size: 7px; font-weight: 900; }
.xocdia-selected-chip b { color: #f2d578; font: 900 9px monospace; }
.xocdia-all-in, .xocdia-cancel { min-height: 34px; border-radius: 9px; font-size: 9px; font-weight: 1000; }
.xocdia-all-in { border: 1px solid #c2a1ff; color: white; background: linear-gradient(120deg,#793bc8,#3c196a); box-shadow: 0 0 13px rgba(151,89,235,.22); }
.xocdia-cancel { border: 1px solid #a34a47; color: #fce4e1; background: linear-gradient(120deg,#722c29,#321513); }
.xocdia-payout-note { margin-top: auto; padding-top: 6px; color: #e0c779; text-align: center; font-size: 8px; font-weight: 900; line-height: 1.6; }
.xocdia-payout-note span { color: #807968; font-size: 7px; font-weight: 600; }
.xocdia-layout.betting .xocdia-choice { animation: betReady 1.8s ease-in-out infinite alternate; }
@keyframes betReady { to { box-shadow: 0 0 13px rgba(226,190,103,.18), 0 6px 16px rgba(0,0,0,.36); } }

@media (max-width: 1020px) {
    #casinoLobbyGrid { grid-template-columns: minmax(0,1fr) 260px; gap: 9px; padding: 0 10px 10px; }
    .xocdia-layout { grid-template-columns: minmax(125px,155px) minmax(210px,1fr) minmax(125px,150px); gap: 8px; padding: 8px; }
    .xocdia-stage { min-height: 380px; }
    #casinoModeTaiXiu .wood-inner-panel { padding: 12px; }
}

@media (max-width: 760px) {
    #taiXiuCasinoModal { align-items: flex-start; overflow-y: auto; padding: 10px; }
    #casinoLobbyShell { width: 100%; min-height: calc(100dvh - 20px); height: auto; max-height: none; overflow: visible; border-radius: 16px; }
    #casinoTopBar { min-height: 58px; padding: 7px 10px; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
    .casino-avatar { width: 35px; height: 35px; flex-basis: 35px; }
    .casino-player { gap: 7px; }
    .casino-eyebrow { font-size: 7px; }
    .casino-player-name { max-width: 125px; font-size: 10px; }
    .casino-wallet { grid-column: 1; grid-row: 2; justify-self: start; min-width: 0; padding: 6px 9px; font-size: 11px; }
    .casino-top-actions { grid-column: 2; grid-row: 1 / span 2; gap: 5px; }
    .casino-icon-button { min-height: 33px; padding: 0 8px; font-size: 8px; }
    .casino-icon-button span { display: none; }
    .casino-close { width: 33px; }
    .casino-mode-switch { gap: 7px; padding: 8px 9px; }
    .casino-mode-button { min-width: 0; flex: 1; min-height: 43px; padding-left: 40px; }
    .casino-mode-button > i { left: 13px; font-size: 16px; }
    .casino-mode-button > span { font-size: 10px; }
    .casino-mode-button > small { font-size: 7px; }
    #casinoLobbyGrid { flex: 0 0 auto; display: flex; flex-direction: column; padding: 0 8px 9px; }
    #casinoGameStage { flex: 0 0 auto; height: auto; overflow: visible; }
    #casinoModeTaiXiu { height: auto; min-height: 0; }
    #casinoModeTaiXiu .gold-plate-border, #casinoModeTaiXiu .wood-inner-panel { height: auto; }
    #casinoModeTaiXiu .wood-inner-panel { justify-content: initial; }
    #casinoModeXocDia { height: auto; min-height: 0; flex: 0 0 auto; }
    .xocdia-layout { flex: 0 0 auto; min-height: 0; }
    .casino-chat-panel { flex: 0 0 250px; min-height: 230px; max-height: 270px; }
    .casino-chat-messages { min-height: 125px; }
    #casinoModeTaiXiu .wood-inner-panel { padding: 10px; }
    #casinoModeTaiXiu .gold-plate-border { border-radius: 18px; }
    #casinoModeTaiXiu #taiBox, #casinoModeTaiXiu #xiuBox { min-height: 210px; padding-left: 10px; padding-right: 10px; }
    #casinoModeTaiXiu .mt-6 { margin-top: 12px; }
    #casinoModeTaiXiu .chip-item { width: 35px; height: 35px; }
    .xocdia-layout { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
    .xocdia-stage { grid-column: 1 / -1; grid-row: 1; min-height: 355px; }
    .xocdia-bet-column { grid-column: 1; grid-row: 2; }
    .xocdia-control-column { grid-column: 2; grid-row: 2; }
}

@media (max-width: 390px) {
    .casino-player-name { max-width: 88px; }
    .casino-wallet { font-size: 10px; }
    .casino-icon-button { width: 30px; padding: 0; }
    .casino-icon-button i { font-size: 11px; }
    #casinoModeTaiXiu .chip-item { width: 32px; height: 32px; font-size: 9px; }
    .casino-door-bet { min-width: 110px; padding: 7px 9px; }
    .xocdia-layout { gap: 6px; padding: 6px; }
    .xocdia-choice { min-height: 60px; }
    .xocdia-history-panel { padding: 8px; }
}

@media (prefers-reduced-motion: reduce) {
    .xocdia-npc, .xocdia-npc.shaking, .xocdia-bowl.shaking, .xocdia-layout.betting .xocdia-choice, .casino-chat-message { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}