/* Live crash, poker night, chat, duels, daily spin, shop and achievements */

/* ---------- name tags & cosmetics ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; vertical-align: bottom; }
.tag-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-title { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; padding: 2px 6px; border-radius: 4px; background: #ffffff18; color: #d6e2ea; white-space: nowrap; }
.tag-crown { font-size: 12px; }
.nc-gold { color: #ffc94a; text-shadow: 0 0 8px #ffc94a77; }
.nc-neon { color: #39ff88; text-shadow: 0 0 8px #39ff8899; }
.nc-pink { color: #ff5fc8; text-shadow: 0 0 8px #ff5fc877; }
.nc-ice { color: #8fe3ff; text-shadow: 0 0 8px #8fe3ff77; }
.nc-rainbow { background: linear-gradient(90deg, #ff5f5f, #ffc94a, #39ff88, #5fd0ff, #c78bff, #ff5f5f); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: rainbow 2.5s linear infinite; }
@keyframes rainbow { to { background-position: 200% 0; } }
.wallet-gold { background: linear-gradient(120deg, #6b4e0a, #c99a1e 50%, #6b4e0a); box-shadow: 0 0 0 2px #ffd34d, 0 0 14px #ffc94a66; }
.wallet-neon { background: #07130d; box-shadow: 0 0 0 2px #39ff88, 0 0 16px #39ff8888; }
.wallet-fire { background: linear-gradient(0deg, #8a1c00, #3a0d00); box-shadow: 0 0 0 2px #ff7a1a; animation: flame .5s ease-in-out infinite alternate; }
@keyframes flame { from { box-shadow: 0 0 0 2px #ff7a1a, 0 -3px 10px #ff4e0088; } to { box-shadow: 0 0 0 2px #ffb01a, 0 -8px 18px #ff7a1acc; } }

/* ---------- server representatives ---------- */
.tag-rep { font-size: 9px; font-weight: 900; letter-spacing: .5px; padding: 1px 5px; border-radius: 4px; background: #1475e1; color: #fff; }
.btn.invite { background: #163d5e; color: #bfe3ff; border: 1px solid #1475e1; }
.he-name .tag-rep { display: none; }
.he-name .tag:has(.tag-rep) .tag-name { color: #6fc0ff; }
.rep-walk { position: fixed; bottom: 12px; left: 0; z-index: 330; display: flex; align-items: flex-end; gap: 8px; pointer-events: none; animation: repWalk 3.2s ease-in-out both; }
.rep-body { animation: bob .28s ease-in-out infinite alternate; filter: drop-shadow(0 8px 12px rgba(0,0,0,.6)); }
.rep-body svg { display: block; }
.rep-say { background: #fff; color: #111; font-weight: 700; font-size: 13px; padding: 8px 12px; border-radius: 12px; margin-bottom: 34px; max-width: 200px; }
@keyframes repWalk { 0% { transform: translateX(-320px); } 25%, 75% { transform: translateX(24px); } 100% { transform: translateX(105vw); } }

/* ---------- nav & topbar ---------- */
.nav-item.dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-left: auto; box-shadow: 0 0 8px var(--green); }
.chat-btn { position: relative; }
.chat-badge { position: absolute; top: 0; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; }

/* ---------- chat drawer ---------- */
.chat { position: fixed; top: 0; right: 0; bottom: 0; width: 320px; max-width: 100%; background: var(--bg-2); border-left: 1px solid var(--line); z-index: 140; display: flex; flex-direction: column; transform: translateX(105%); transition: transform .2s, visibility .2s; visibility: hidden; }
.chat.open { transform: none; visibility: visible; box-shadow: -20px 0 50px rgba(0,0,0,.4); }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 800; }
.chat-list { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.msg { background: var(--panel-2); border-radius: 10px; padding: 7px 10px; overflow-wrap: anywhere; flex-shrink: 0; }
.msg.mine { background: #1d4034; }
.msg.sys { background: transparent; border: 1px dashed var(--line); color: var(--muted); font-size: 12px; text-align: center; }
.msg-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; margin-bottom: 2px; }
.msg-head small { color: var(--dim); }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }

/* ---------- achievements ---------- */
.ach-stack { position: fixed; top: 70px; left: 50%; transform: translateX(-50%); z-index: 320; display: flex; flex-direction: column; gap: 8px; pointer-events: none; width: min(360px, calc(100% - 24px)); }
.ach-pop { display: flex; gap: 12px; align-items: center; background: linear-gradient(120deg, #4a3b10, #213743); border: 2px solid var(--gold); border-radius: 14px; padding: 12px 16px; box-shadow: 0 18px 40px rgba(0,0,0,.5); animation: achIn .5s cubic-bezier(.2,1.5,.4,1); font-size: 12px; }
.ach-pop b { display: block; font-size: 16px; }
.ach-pop small { color: var(--gold); font-weight: 800; text-transform: uppercase; letter-spacing: .5px; font-size: 10px; }
.ach-pop-icon { font-size: 36px; }
@keyframes achIn { from { transform: translateY(-40px) scale(.7); opacity: 0; } }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ach { display: flex; gap: 12px; align-items: center; background: var(--panel); border-radius: 12px; padding: 14px; opacity: .55; }
.ach .ach-icon { font-size: 34px; filter: grayscale(1); }
.ach.got { opacity: 1; box-shadow: inset 0 0 0 2px #ffc94a66; background: linear-gradient(120deg, #3a3014, var(--panel)); }
.ach.got .ach-icon { filter: none; }
.ach small { color: var(--dim); display: block; margin-top: 4px; font-size: 11px; }

/* ---------- live crash riders ---------- */
.riders { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; max-height: 130px; overflow-y: auto; }
.rider { display: flex; gap: 8px; align-items: center; background: var(--panel-2); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.rider.out { background: #14432a; } .rider.out b { color: var(--green); }
.rider.lost { background: #3a1c22; }

/* ---------- poker night ---------- */
.he-wrap { padding: 42px 20px; }
.he-table { position: relative; height: 430px; max-width: 900px; margin: 0 auto; border-radius: 200px; background: radial-gradient(ellipse at center, #1f7a4a 0%, #135c36 60%, #0d4527 100%); border: 14px solid #4a2e17; box-shadow: inset 0 0 40px rgba(0,0,0,.45), 0 20px 50px rgba(0,0,0,.4); }
.he-center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 8px; width: 360px; max-width: 80%; text-align: center; }
.he-board { display: flex; gap: 6px; }
.he-slot { width: 58px; height: 82px; border-radius: 7px; border: 2px dashed #ffffff22; }
.card.mid { width: 58px; height: 82px; border-radius: 7px; } .card.mid .cr { font-size: 17px; top: 5px; left: 6px; } .card.mid .cr small { font-size: 13px; } .card.mid .cs { font-size: 24px; bottom: 3px; right: 6px; }
.he-pot { font-weight: 800; font-size: 18px; color: var(--gold); min-height: 24px; }
.he-msg { font-weight: 700; font-size: 13px; min-height: 18px; }
.he-seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; width: 140px; z-index: 2; }
.he-seat.p0 { left: 50%; top: 100%; } .he-seat.p1 { left: 9%; top: 82%; } .he-seat.p2 { left: 9%; top: 18%; }
.he-seat.p3 { left: 50%; top: 0; } .he-seat.p4 { left: 91%; top: 18%; } .he-seat.p5 { left: 91%; top: 82%; }
.he-cards { display: flex; gap: 3px; min-height: 68px; margin-bottom: 3px; }
.he-plate { position: relative; width: 100%; background: #0f212ef2; border: 2px solid var(--line); border-radius: 10px; padding: 5px 8px; text-align: center; overflow: hidden; }
.he-seat.turn .he-plate { border-color: var(--gold); box-shadow: 0 0 18px #ffc94a88; }
.he-seat.won .he-plate { border-color: var(--green); box-shadow: 0 0 22px var(--green); }
.he-seat.folded { opacity: .5; }
.he-name { display: flex; justify-content: center; align-items: center; gap: 5px; font-size: 13px; }
.he-dealer { background: #fff; color: #111; width: 16px; height: 16px; border-radius: 50%; font-size: 10px; font-weight: 800; display: grid; place-items: center; flex-shrink: 0; }
.he-stack { font-size: 12px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.he-stack em { color: var(--muted); font-style: normal; }
.he-timer { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; }
.he-timer i { display: block; height: 100%; background: var(--gold); transition: width .9s linear; }
.he-bet { margin-top: 3px; background: var(--gold); color: #2a1d00; font-weight: 800; font-size: 11px; padding: 1px 9px; border-radius: 10px; }
.he-seat.empty { opacity: .8; }
.he-controls { margin-top: 12px; }
.he-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; background: var(--panel); border-radius: 12px; padding: 12px; min-height: 64px; }
.he-bar > .input { width: 120px; }
.he-raise { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.he-range { width: 160px; accent-color: var(--green); }
.he-best { font-weight: 800; color: var(--green); }
.he-log { margin-top: 10px; color: var(--muted); font-size: 12px; display: flex; flex-direction: column; gap: 2px; }
.he-log div:first-child { color: #fff; }

/* ---------- duels & loans ---------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.two-col .panel h2 { margin: 18px 0 10px; } .two-col .panel h2:first-child { margin-top: 0; }
.form { display: flex; flex-direction: column; gap: 10px; }
.list { display: flex; flex-direction: column; gap: 6px; }
.row-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--panel-2); border-radius: 8px; padding: 9px 11px; font-size: 13px; }
.row-item.hot { box-shadow: inset 0 0 0 2px var(--green); }
.row-btns { display: flex; gap: 6px; flex-shrink: 0; }
.row-item .btn.ghost, .row-item .btn:not(.primary):not(.gold) { border: 1px solid var(--line); }
.online { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.online-p { background: var(--panel-2); border-radius: 999px; padding: 4px 10px; box-shadow: inset 0 0 0 1px #00e70155; font-size: 13px; }
.modal.duel { max-width: 440px; text-align: center; }
.duel-row { display: flex; align-items: center; justify-content: center; gap: 16px; }
.duel-side { flex: 1; background: var(--input); border-radius: 12px; padding: 14px; border: 2px solid transparent; min-width: 0; overflow: hidden; }
.duel-side.won { border-color: var(--green); box-shadow: 0 0 22px #00e70166; }
.duel-num { font-size: 48px; font-weight: 800; font-variant-numeric: tabular-nums; }
.duel-out { font-size: 20px; font-weight: 800; margin: 16px 0; }

/* ---------- daily & shop ---------- */
.daily { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.daily-msg { font-size: 22px; font-weight: 800; text-align: center; }
.daily-btn { padding: 14px 40px; font-size: 16px; }
.shop-preview { background: var(--panel); border-radius: 12px; padding: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 16px; }
.shop-h { font-size: 16px; margin: 20px 0 10px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.shop-card { background: var(--panel); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; border: 2px solid transparent; }
.shop-card.on { border-color: var(--green); }
.shop-big { height: 54px; display: grid; place-items: center; font-size: 22px; font-weight: 800; max-width: 100%; overflow: hidden; }
.shop-card .shop-big:first-child { line-height: 1.2; }
.shop-card .shop-big:not(:has(*)) { font-size: 38px; }
.shop-name { font-weight: 700; font-size: 13px; }

/* ---------- leaderboard season ---------- */
.lb-tabs { max-width: 280px; margin-bottom: 14px; }
.hall { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }

@media (max-width: 1000px) { .two-col { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .he-wrap { padding: 40px 0; }
  .he-table { height: 470px; border-radius: 90px; border-width: 8px; }
  .he-seat { width: 96px; }
  .he-seat.p1 { left: 13%; top: 77%; } .he-seat.p2 { left: 13%; top: 21%; } .he-seat.p4 { left: 87%; top: 21%; } .he-seat.p5 { left: 87%; top: 77%; }
  .he-cards { min-height: 52px; } .he-cards .card.mini { width: 36px; height: 52px; }
  .he-board { gap: 3px; } .card.mid, .he-slot { width: 38px; height: 56px; }
  .card.mid .cr { font-size: 12px; top: 3px; left: 3px; } .card.mid .cr small { font-size: 10px; } .card.mid .cs { font-size: 15px; right: 3px; }
  .he-name .tag-name { max-width: 62px; font-size: 11px; } .he-stack em { display: none; }
}
