/* ===== Shared styles — Pokerhood =====
   Layout sengaja DIBEDAKAN dari Solana Poker Chain:
   - Navigasi = sidebar kiri (desktop) / bottom tab bar (mobile), BUKAN top-nav
   - Saldo = top bar kanan (pill akun), BUKAN wallet-strip tengah
   - Konten = dashboard ala exchange, BUKAN landing kosmik
   - Warna = hijau Pokerhood + hitam
*/
:root {
    --gold: #00E07A;
    --gold-deep: #00A85A;
    --gold-light: #9CFFD0;
    --gold-grad: linear-gradient(135deg, #9CFFD0 0%, #00E07A 55%, #00A85A 100%);
    --up: #0ECB81;
    --down: #F6465D;
    --bg-0: #0B0E11;
    --bg-1: #12161C;
    --panel: #171B22;
    --panel-2: #1E242C;
    --line: rgba(255, 255, 255, 0.08);
    --line-gold: rgba(0, 224, 122, 0.22);
    --text: #EAECEF;
    --muted: #848E9C;
    --sidebar-w: 244px;
    --topbar-h: 66px;
    /* Alias kompat warisan template (halaman lama pakai var Solana) -> palet PKH */
    --sol-teal: var(--up);
    --sol-purple: var(--gold);
    --sol-magenta: var(--gold-deep);
    --sol-gradient: var(--gold-grad);
    /* PKH signature shapes */
    --hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    --chamfer: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    --chamfer-sm: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(1200px 500px at 78% -10%, rgba(0, 224, 122, 0.10), transparent 60%),
        radial-gradient(900px 500px at 0% 100%, rgba(0, 224, 122, 0.05), transparent 55%),
        linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
    background-attachment: fixed;
}

/* subtle hex/dot grid overlay */
body::before {
    content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 26px 26px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
}

/* animated candlestick background */
#bg-fx { position: fixed; inset: 0; z-index: 0; display: block; opacity: 0.5; pointer-events: none; }

/* ===== SHELL LAYOUT ===== */
body.has-shell { padding-left: var(--sidebar-w); }
.page, .container { position: relative; z-index: 1; }

/* ===== SIDEBAR (desktop) ===== */
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w); z-index: 40;
    display: flex; flex-direction: column; gap: 6px; padding: 18px 14px;
    background: linear-gradient(180deg, rgba(23, 27, 34, 0.92), rgba(11, 14, 17, 0.96));
    border-right: 1px solid var(--line);
    backdrop-filter: blur(10px);
}
.sidebar .brand { display: flex; align-items: center; gap: 11px; text-decoration: none; padding: 6px 8px 16px; }
.sidebar .brand img { width: 42px; height: 42px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(0, 224, 122, 0.4)); }
.sidebar .brand .bt { line-height: 1.05; }
.sidebar .brand .bt .b1 { font-size: 0.62rem; letter-spacing: 0.28em; color: var(--gold); font-weight: 700; }
.sidebar .brand .bt .b2 { font-size: 1.02rem; font-weight: 800; color: #fff; letter-spacing: 0.02em; }

.side-sep { font-size: 0.58rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 8px; }

/* PKH signature: chamfered (cut-corner) menu frame — beda dari pill bulat SPC */
.side-nav {
    position: relative; display: flex; flex-direction: column; gap: 4px; padding: 9px; margin: 0 2px;
    background: rgba(0, 224, 122, 0.02);
    clip-path: polygon(13px 0, 100% 0, 100% calc(100% - 13px), calc(100% - 13px) 100%, 0 100%, 0 13px);
}
.side-nav::before {
    content: ''; position: absolute; inset: 0; padding: 1px; pointer-events: none;
    background: linear-gradient(160deg, rgba(0, 224, 122, 0.6), rgba(0, 224, 122, 0.12) 55%, transparent);
    clip-path: polygon(13px 0, 100% 0, 100% calc(100% - 13px), calc(100% - 13px) 100%, 0 100%, 0 13px);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
}
.side-link {
    position: relative; z-index: 0; display: flex; align-items: center; gap: 12px; padding: 11px 13px;
    color: rgba(234, 236, 239, 0.72); text-decoration: none; font-size: 0.9rem; font-weight: 600;
    transition: color 0.14s ease;
}
.side-link::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
    background: transparent; transition: background 0.15s ease, box-shadow 0.15s ease;
}
.side-link svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.side-link:hover { color: #fff; }
.side-link:hover::before { background: rgba(0, 224, 122, 0.1); }
.side-link.active { color: #0B0E11; font-weight: 800; }
.side-link.active::before { background: var(--gold-grad); box-shadow: 0 6px 16px rgba(0, 224, 122, 0.3); }
.side-link.active svg { opacity: 1; }
.side-spacer { flex: 1; }
.side-social { display: flex; gap: 10px; padding: 10px 12px 6px; }
.side-social a { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 9px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); transition: background 0.15s ease, border-color 0.15s ease; }
.side-social a:hover { background: rgba(0, 224, 122, 0.12); border-color: var(--line-gold); }
.side-social svg { width: 17px; height: 17px; }
.side-social a.x svg { fill: #ffffff; }
.side-social a.tg svg { fill: #2aabee; }
.side-foot { padding: 12px; font-size: 0.68rem; color: var(--muted); border-top: 1px solid var(--line); }
.side-foot b { color: var(--gold); }

/* ===== TOP BAR ===== */
.topbar {
    position: sticky; top: 0; z-index: 30; height: var(--topbar-h);
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 0 24px; background: rgba(11, 14, 17, 0.72);
    border-bottom: 1px solid var(--line); backdrop-filter: blur(12px);
}
.tb-status { display: flex; align-items: center; gap: 9px; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.tb-status .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up); box-shadow: 0 0 10px var(--up); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.tb-right { display: flex; align-items: center; gap: 14px; }

/* balance pills */
.wallet-strip { display: flex; align-items: center; gap: 10px; }
.bal {
    display: flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 10px;
    background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
}
.bal-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.bal-label { font-size: 0.6rem; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.bal-value { font-size: 0.92rem; font-weight: 800; font-variant-numeric: tabular-nums; color: #fff; }
.wallet-note { display: none; }

.connect-btn {
    padding: 11px 20px; border: none; cursor: pointer;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
    font-weight: 800; font-size: 0.85rem; color: #0B0E11; background: var(--gold-grad);
    box-shadow: 0 6px 18px rgba(0, 224, 122, 0.3); transition: transform 0.15s ease, filter 0.15s ease;
    max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.connect-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }

.lang-btn {
    padding: 7px 13px; border-radius: 9px; cursor: pointer; font-weight: 800; font-size: 0.8rem;
    color: var(--gold); background: rgba(0, 224, 122, 0.08); border: 1px solid var(--line-gold);
    transition: background 0.14s ease; white-space: nowrap;
}
.lang-btn:hover { background: rgba(0, 224, 122, 0.18); }

/* ===== Generic content / panels ===== */
.container { max-width: 1120px; margin: 0 auto; padding: 22px 26px 60px; }
.page-title { font-weight: 800; font-size: 1.55rem; margin: 8px 0 6px; letter-spacing: 0.01em; }
.page-title span { color: var(--gold); }
.page-sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 22px; }

.panel {
    background: linear-gradient(165deg, var(--panel), rgba(11, 14, 17, 0.92));
    border: 1px solid var(--line); border-radius: 14px; padding: 22px;
}
.section-title { font-size: 0.7rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }

.btn { padding: 11px 20px; border-radius: 10px; border: none; cursor: pointer; font-weight: 800; font-size: 0.86rem; transition: all 0.15s ease; }
.btn-gold, .btn-sol { background: var(--gold-grad); color: #0B0E11; }
.btn-gold:hover, .btn-sol:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-ghost { background: rgba(255, 255, 255, 0.05); color: #fff; border: 1px solid rgba(255, 255, 255, 0.15); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

.input {
    padding: 11px 14px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(0, 0, 0, 0.3); color: #fff; font-size: 0.9rem; font-family: inherit; outline: none;
}
.input:focus { border-color: rgba(0, 224, 122, 0.6); }

.avatar-lg {
    width: 96px; height: 96px; border-radius: 22px; display: flex; align-items: center; justify-content: center;
    font-size: 2.6rem; color: #0B0E11; background: var(--gold-grad); box-shadow: 0 0 26px rgba(0, 224, 122, 0.35);
}
.empty-state { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 0.9rem; }

/* Toast */
#toast {
    position: fixed; bottom: 24px; left: calc(50% + var(--sidebar-w) / 2); transform: translateX(-50%) translateY(20px);
    background: rgba(23, 27, 34, 0.97); border: 1px solid var(--line-gold); color: #fff;
    padding: 12px 22px; border-radius: 12px; font-size: 0.85rem; font-weight: 600;
    opacity: 0; pointer-events: none; transition: all 0.25s ease; z-index: 100; max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ===== CREATE ID MODAL (registrasi PKH) ===== */
.bsp-modal {
    position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px;
    background: rgba(5, 7, 10, 0.74); backdrop-filter: blur(6px); opacity: 0; animation: bspFade 0.2s ease forwards;
}
@keyframes bspFade { to { opacity: 1; } }
.bsp-modal-card {
    position: relative; width: 100%; max-width: 420px; padding: 32px 26px 26px; text-align: center;
    background: linear-gradient(165deg, #1b2027, #0d1116);
    clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
    animation: bspPop 0.22s cubic-bezier(0.2, 0.8, 0.3, 1.1) both;
}
@keyframes bspPop { from { transform: translateY(14px) scale(0.97); opacity: 0; } }
.bsp-modal-card::before {
    content: ''; position: absolute; inset: 0; padding: 1.5px; pointer-events: none;
    background: linear-gradient(160deg, rgba(0, 224, 122, 0.75), rgba(0, 224, 122, 0.15) 60%, transparent);
    clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
}
.bsp-modal-emblem { width: 66px; height: 66px; margin: 0 auto 14px; clip-path: var(--hex); background: var(--gold-grad); display: flex; align-items: center; justify-content: center; }
.bsp-modal-emblem img { width: 78%; height: 78%; }
.bsp-modal-card h3 { font-size: 1.32rem; font-weight: 800; }
.bsp-modal-sub { color: var(--muted); font-size: 0.86rem; margin: 8px 0 18px; line-height: 1.55; }
.bsp-modal-sub b { color: var(--gold); }
#bspIdInput { width: 100%; text-align: center; font-size: 1.08rem; font-weight: 700; letter-spacing: 0.02em; }
.bsp-id-hint { font-size: 0.78rem; color: var(--muted); margin: 11px 0 18px; min-height: 1.1em; }
.bsp-id-hint.ok { color: var(--up); }
.bsp-id-hint.bad { color: var(--down); }
.bsp-modal-card .btn-gold { width: 100%; padding: 13px; clip-path: var(--chamfer-sm); }
.bsp-modal-card .btn-gold:disabled { opacity: 0.5; cursor: not-allowed; filter: none; transform: none; }
.bsp-modal-close { position: absolute; top: 12px; right: 15px; background: none; border: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; line-height: 1; }
.bsp-modal-close:hover { color: #fff; }

/* Wallet picker (semua wallet EVM) */
.bsp-wallet-list { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.bsp-wallet-opt {
    display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; cursor: pointer; text-align: left;
    background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); color: #fff; font-weight: 700; font-size: 0.92rem;
    clip-path: var(--chamfer-sm); transition: background 0.14s ease, border-color 0.14s ease;
}
.bsp-wallet-opt:hover { background: rgba(0, 224, 122, 0.1); border-color: var(--line-gold); }
.bsp-wallet-opt img, .bsp-wallet-opt .bsp-wallet-ic { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; object-fit: contain; }
.bsp-wallet-opt .bsp-wallet-ic { background: var(--gold-grad); }

/* ===== DASHBOARD: market stats ticker ===== */
.market-stats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 4px 0 26px;
}
.stat {
    position: relative; padding: 14px 16px; clip-path: var(--chamfer);
    background: linear-gradient(165deg, var(--panel), rgba(11, 14, 17, 0.9));
}
.stat::before {
    content: ''; position: absolute; inset: 0; padding: 1px; pointer-events: none;
    background: linear-gradient(160deg, rgba(0, 224, 122, 0.4), rgba(255, 255, 255, 0.05) 55%, transparent);
    clip-path: var(--chamfer);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
}
.stat .k { font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.stat .v { font-size: 1.35rem; font-weight: 900; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .v.gold { color: var(--gold); }
.stat .v.up { color: var(--up); }
.stat .d { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }

/* ===== ROOM LIST (market-table rows) ===== */
.rooms-head {
    display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.1fr 120px; gap: 14px; align-items: center;
    padding: 8px 20px; font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 700;
}
.room-list { display: flex; flex-direction: column; gap: 10px; }
.room-row {
    display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.1fr 120px; gap: 14px; align-items: center;
    padding: 16px 20px; position: relative; clip-path: var(--chamfer);
    background: linear-gradient(165deg, var(--panel), rgba(11, 14, 17, 0.92));
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.3));
    transition: transform 0.15s ease, filter 0.15s ease;
}
.room-row::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent, var(--gold)); z-index: 1; transition: box-shadow 0.15s ease; }
.room-row:hover { transform: translateX(4px); filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.55)); }
.room-row:hover::before { box-shadow: 0 0 14px var(--accent, var(--gold)); }
.rr-name { display: flex; align-items: center; gap: 13px; }
.rr-badge {
    width: 52px; height: 52px; flex-shrink: 0; position: relative;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 1rem; color: #0B0E11;
    clip-path: var(--hex); background: var(--accent, var(--gold));
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}
.rr-badge::before { content: ''; position: absolute; inset: 2px; clip-path: var(--hex); background: #12161C; }
.rr-badge img { position: relative; z-index: 1; width: 80%; height: 80%; border-radius: 50%; object-fit: cover; display: block; }
.rr-title { font-weight: 800; font-size: 1rem; }
.rr-sub { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.rr-cell .cl { display: none; }
.rr-cell .cv { font-weight: 800; font-variant-numeric: tabular-nums; }
.rr-cell .cv small { font-size: 0.72rem; color: var(--gold); font-weight: 700; margin-left: 3px; }
.rr-cell .cd { font-size: 0.72rem; color: var(--muted); margin-top: 2px; }
.rr-live { display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; color: var(--muted); }
.rr-live .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); box-shadow: 0 0 8px var(--up); animation: pulse 1.6s infinite; }
.join-btn {
    display: block; text-align: center; text-decoration: none; padding: 11px; clip-path: var(--chamfer-sm);
    font-weight: 800; font-size: 0.84rem; color: #0B0E11; background: var(--gold-grad); cursor: pointer; transition: filter 0.15s ease;
}
.join-btn:hover { filter: brightness(1.08); }

.lobby-foot { text-align: center; padding: 30px 22px; font-size: 0.74rem; color: var(--muted); }
.lobby-foot b { color: var(--gold); }

/* ===== DOCS (Whitepaper / Pokerpaper / How to Play) ===== */
.doc-hero { text-align: center; padding: 30px 20px 8px; }
.doc-hero img { width: 110px; height: 110px; object-fit: contain; filter: drop-shadow(0 0 22px rgba(0, 224, 122, 0.45)); }
.doc-badge { display: inline-block; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); border: 1px solid var(--line-gold); padding: 4px 14px; border-radius: 99px; margin-bottom: 14px; }
.doc-title { font-weight: 900; font-size: clamp(2rem, 6vw, 3.1rem); line-height: 1.05; }
.doc-title span { color: var(--gold); }
.doc-sub { color: var(--muted); max-width: 640px; margin: 14px auto 0; font-size: 1.02rem; line-height: 1.6; }

.toc { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 860px; margin: 26px auto 0; padding: 0 20px; }
.toc a { font-size: 0.78rem; font-weight: 600; color: rgba(234, 236, 239, 0.7); text-decoration: none; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); transition: all 0.15s ease; }
.toc a:hover { color: var(--gold); border-color: var(--line-gold); }

.doc { max-width: 860px; margin: 20px auto 60px; padding: 0 24px; }
.doc section { padding: 30px 0; border-top: 1px solid var(--line); }
.doc section:first-child { border-top: none; }
.doc h2 { font-weight: 800; font-size: 1.5rem; margin-bottom: 6px; display: flex; align-items: center; gap: 12px; }
.doc h2 .num { font-size: 0.9rem; color: #0B0E11; background: var(--gold); width: 30px; height: 30px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.doc h3 { font-weight: 700; font-size: 1.08rem; margin: 20px 0 8px; color: #fff; }
.doc p { color: rgba(234, 236, 239, 0.75); line-height: 1.75; margin: 10px 0; }
.doc ul, .doc ol { color: rgba(234, 236, 239, 0.75); line-height: 1.7; margin: 10px 0 10px 22px; }
.doc li { margin: 6px 0; }
.doc b, .doc strong { color: #fff; }
.doc a.link { color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--line-gold); }

.callout { border-radius: 14px; padding: 16px 18px; margin: 16px 0; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); font-size: 0.92rem; line-height: 1.6; }
.callout.gold { border-color: var(--line-gold); background: rgba(0, 224, 122, 0.07); }
.callout.teal { border-color: rgba(14, 203, 129, 0.35); background: rgba(14, 203, 129, 0.06); }
.callout.warn { border-color: rgba(246, 70, 93, 0.4); background: rgba(246, 70, 93, 0.07); }
.callout .clt { font-weight: 800; display: block; margin-bottom: 4px; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 18px 0; }
.kpi { background: linear-gradient(165deg, var(--panel), rgba(11, 14, 17, 0.9)); border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-align: center; }
.kpi .v { font-weight: 900; font-size: 1.5rem; }
.kpi .v.grad { color: var(--gold); }
.kpi .k { font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 6px; }

.doc table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.9rem; }
.doc table th { text-align: left; color: var(--gold); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 10px; border-bottom: 1px solid var(--line-gold); }
.doc table td { padding: 10px; border-bottom: 1px solid var(--line); color: rgba(234, 236, 239, 0.8); }

.alloc-row { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.alloc-row .lbl { width: 200px; font-size: 0.86rem; }
.alloc-row .bar { flex: 1; height: 12px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.alloc-row .fill { height: 100%; border-radius: 99px; background: var(--gold-grad); }
.alloc-row .pct { width: 48px; text-align: right; font-weight: 800; font-size: 0.86rem; }

/* Poker hand-ranking cards */
.rank-item { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rank-num { font-weight: 900; color: var(--gold); width: 26px; font-size: 1.1rem; }
.mini-cards { display: flex; gap: 4px; }
.mcard { width: 34px; height: 48px; border-radius: 5px; background: #f4f5f8; color: #16181d; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: Georgia, serif; font-weight: 700; font-size: 0.82rem; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); line-height: 1; }
.mcard.red { color: #d11f3a; }
.mcard .s { font-size: 0.9rem; }
.rank-info { flex: 1; min-width: 180px; }
.rank-info .rn { font-weight: 800; }
.rank-info .rd { font-size: 0.82rem; color: var(--muted); }

/* Step flow */
.steps { counter-reset: step; margin: 16px 0; }
.step { position: relative; padding: 14px 0 14px 52px; border-left: 2px solid var(--line-gold); margin-left: 16px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; left: -17px; top: 12px; width: 32px; height: 32px; border-radius: 50%; background: var(--gold-grad); color: #0B0E11; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 0.9rem; }
.step h4 { font-weight: 700; margin-bottom: 4px; }
.step p { margin: 4px 0; }

/* Roadmap */
.road { margin: 16px 0; }
.road-item { display: flex; gap: 14px; padding: 12px 0; }
.road-dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.road-item.done .road-dot { background: var(--up); box-shadow: 0 0 10px var(--up); }
.road-item.now .road-dot { background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.road-item.next .road-dot { background: rgba(255, 255, 255, 0.25); }
.road-item .rt { font-weight: 800; }
.road-item .rp { font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; margin-left: 8px; }
.road-item.done .rp { background: rgba(14, 203, 129, 0.15); color: var(--up); }
.road-item.now .rp { background: rgba(0, 224, 122, 0.15); color: var(--gold); }
.road-item.next .rp { background: rgba(255, 255, 255, 0.08); color: var(--muted); }

.doc-foot { text-align: center; padding: 30px 20px 50px; color: var(--muted); font-size: 0.8rem; }

/* ===== SOCIAL (poker-chip framed) ===== */
.community { margin-top: 28px; text-align: center; }
.community-label { font-size: 0.68rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.socials { display: flex; gap: 22px; justify-content: center; align-items: center; }
/* PKH signature: hexagon gold badge — beda dari poker-chip bulat SPC */
.social-chip {
    --hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
    width: 66px; height: 66px; display: flex; align-items: center; justify-content: center;
    position: relative; text-decoration: none;
    clip-path: var(--hex); background: var(--gold-grad);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 18px rgba(0, 224, 122, 0.3);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}
.social-chip::before {
    content: ''; position: absolute; inset: 3px; clip-path: var(--hex); pointer-events: none;
    background: radial-gradient(circle at 38% 30%, #23272f, #0b0e11);
}
.social-chip::after {
    content: ''; position: absolute; inset: 9px; clip-path: var(--hex); pointer-events: none;
    background: linear-gradient(160deg, rgba(0, 224, 122, 0.35), transparent 55%);
    mix-blend-mode: screen;
}
.social-chip svg { width: 27px; height: 27px; position: relative; z-index: 2; }
.social-chip.x svg { fill: #ffffff; }
.social-chip.tg svg { fill: #2aabee; }
.social-chip:hover { transform: translateY(-5px); filter: brightness(1.06); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 30px rgba(0, 224, 122, 0.6); }

/* ===== MOBILE: sidebar -> bottom tab bar ===== */
@media (max-width: 860px) {
    body.has-shell { padding-left: 0; padding-bottom: 68px; }
    .sidebar {
        top: auto; right: 0; bottom: 0; width: auto; height: 62px; flex-direction: row;
        gap: 2px; padding: 0 6px; border-right: none; border-top: 1px solid var(--line);
        justify-content: space-around; align-items: center; overflow-x: auto;
    }
    .sidebar .brand, .side-sep, .side-spacer, .side-foot, .side-social { display: none; }
    .side-nav { display: contents; }
    .side-link { flex-direction: column; gap: 3px; padding: 7px 8px; font-size: 0.6rem; border-radius: 9px; min-width: 56px; text-align: center; }
    .side-link span { white-space: nowrap; }
    .side-link.active { box-shadow: none; }
    #toast { left: 50%; }
    .topbar { padding: 0 14px; }
    .tb-status { display: none; }
    .rooms-head { display: none; }
    .room-row { display: flex; flex-wrap: wrap; align-items: center; row-gap: 9px; column-gap: 14px; padding: 15px 16px 15px 20px; }
    .rr-name { order: 1; flex: 1 1 auto; min-width: 0; }
    .join-btn { order: 2; flex: 0 0 auto; padding: 10px 22px; }
    .rr-cell { order: 3; flex: 0 0 auto; display: inline-flex; align-items: baseline; gap: 5px; font-size: 0.82rem; }
    .rr-cell .cl { display: inline; color: var(--muted); }
    .rr-cell .rr-live { display: none; }
    .bal-label { display: none; }
}

/* ===== $PKH token launch bar (lobby, top) ===== */
.tkn-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 0 0 22px;
    padding: 16px 18px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(140% 200% at 0% 0%, rgba(0, 224, 122, 0.12), transparent 55%),
        var(--panel);
    border: 1px solid var(--line-gold);
    clip-path: var(--chamfer);
}
.tkn-bar::before {
    content: "";
    position: absolute;
    right: -18px;
    top: 50%;
    transform: translateY(-50%);
    width: 150px;
    height: 150px;
    opacity: 0.06;
    background: var(--gold);
    clip-path: var(--hex);
    pointer-events: none;
}
.tkn-glyph {
    width: 46px;
    height: 46px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold-grad);
    clip-path: var(--hex);
    box-shadow: 0 6px 18px rgba(0, 224, 122, 0.3);
}
.tkn-glyph svg { width: 24px; height: 24px; fill: #0B0E11; }
.tkn-main { flex: 1 1 280px; min-width: 0; }
.tkn-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 9px; }
.tkn-name { font-weight: 900; font-size: 1.08rem; color: var(--gold); letter-spacing: 0.02em; }
.tkn-live {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.68rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--up);
}
.tkn-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--up); animation: tknPulse 1.8s infinite;
}
@keyframes tknPulse {
    0% { box-shadow: 0 0 0 0 rgba(14, 203, 129, 0.55); }
    70% { box-shadow: 0 0 0 8px rgba(14, 203, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(14, 203, 129, 0); }
}
.tkn-tag {
    font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em;
    color: var(--muted); background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line); padding: 3px 8px; border-radius: 20px;
}
.tkn-ca {
    display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
    background: var(--bg-0); border: 1px dashed var(--line-gold); border-radius: 7px;
    padding: 3px 8px; cursor: pointer; font: inherit; text-align: left;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.tkn-ca:hover { border-color: var(--gold); background: #0d1117; }
.tkn-ca.copied { border-style: solid; border-color: var(--up); }
.tkn-ca-label {
    flex: none; font-size: 0.62rem; font-weight: 800; letter-spacing: 0.14em;
    color: var(--muted); background: rgba(255, 255, 255, 0.06); padding: 3px 7px; border-radius: 5px;
}
.tkn-ca-addr {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.82rem; color: #EAECEF; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tkn-copy { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tkn-buy {
    flex: none; display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 22px; font-weight: 800; font-size: 0.95rem; color: #0B0E11;
    background: var(--gold-grad); border-radius: 12px; text-decoration: none;
    box-shadow: 0 8px 22px rgba(0, 224, 122, 0.32);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.tkn-buy:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 224, 122, 0.45); }
.tkn-buy svg { width: 18px; height: 18px; fill: #0B0E11; }
@media (max-width: 640px) {
    .tkn-bar { gap: 12px; padding: 14px; }
    .tkn-glyph { width: 40px; height: 40px; }
    .tkn-main { flex-basis: 100%; }
    .tkn-buy { flex: 1 1 100%; justify-content: center; }
    .tkn-ca-addr { font-size: 0.72rem; }
}

/* token CA: let address shrink+ellipsis so copy icon stays visible */
.tkn-ca-addr { flex: 1 1 auto; min-width: 0; }
@media (max-width: 640px) { .tkn-ca { width: 100%; } }

/* ===== Mobile overflow fixes (lobby topbar + stats) ===== */
@media (max-width: 640px) {
    .container { overflow-x: hidden; }
    .topbar { padding: 0 12px; gap: 8px; }
    .tb-right { gap: 8px; min-width: 0; }
    .wallet-strip { gap: 6px; }
    .bal { padding: 6px 8px; gap: 6px; }
    .bal-value { font-size: 0.82rem; }
    .lang-btn { padding: 7px 9px; }
    .connect-btn { padding: 9px 14px; font-size: 0.82rem; white-space: nowrap; }
    .market-stats { grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* token bar: state "belum launch" (tanpa CA / tombol beli palsu) */
.tkn-note { font-size: 0.86rem; color: var(--muted); line-height: 1.5; max-width: 60ch; }
.tkn-soon {
    flex: none; align-self: center;
    padding: 11px 20px; border-radius: 12px;
    font-size: 0.85rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--gold); background: rgba(0, 224, 122, 0.08);
    border: 1px dashed var(--line-gold);
}
@media (max-width: 640px) {
    .tkn-soon { flex: 1 1 100%; text-align: center; }
}

/* penanda angka tokenomics yang belum final (jangan pura-pura sudah pasti) */
.tbd {
    font-weight: 800; letter-spacing: 0.08em; color: var(--gold);
    background: rgba(0, 224, 122, 0.08); border: 1px dashed var(--line-gold);
    border-radius: 6px; padding: 2px 8px; white-space: nowrap;
}

.foot-legal { margin-top: 10px; font-size: 0.68rem; color: var(--muted); opacity: 0.75; max-width: 62ch; margin-left: auto; margin-right: auto; line-height: 1.5; }

/* lobby hero kicker above the page title - the headline claim, front and center */
.page-kicker {
    text-align: center; text-transform: uppercase; letter-spacing: 0.06em;
    font-size: 1.9rem; font-weight: 900; line-height: 1.12;
    background: var(--gold-grad); -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: var(--gold);
    margin: 4px 0 10px; text-shadow: 0 2px 18px rgba(0, 224, 122, 0.18);
}
@media (max-width: 640px) { .page-kicker { font-size: 1.3rem; letter-spacing: 0.03em; } }

/* poker suit strip under the hero kicker */
.suit-strip { display: flex; justify-content: center; align-items: center; gap: 20px; margin: 0 0 14px; }
.suit-strip .suit { font-size: 1.5rem; line-height: 1; font-variant-emoji: text; text-rendering: optimizeLegibility; }
.suit-strip .s-dark { color: #E6E9EF; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); }
.suit-strip .s-red { color: #FF6B81; text-shadow: 0 2px 12px rgba(255, 107, 129, 0.35); }
@media (max-width: 640px) { .suit-strip { gap: 15px; } .suit-strip .suit { font-size: 1.25rem; } }
