/* ============================================================
   Z50GAME — compact mobile-first theme (virtual demo coins)
   Reference: Lucky Lottery 10-number layout, compact header
   ============================================================ */

:root {
    --bg-deep: #06143b;
    --bg-mid: #081d52;
    --bg-top: #0d2a6e;
    --card: #0b1c52;
    --card-border: rgba(255, 255, 255, 0.12);
    --accent-blue: #167cff;
    --gold: #ffd23e;
    --text-soft: #9fb0e8;
    --nav-h: 58px;
}

* { box-sizing: border-box; }

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
}

body {
    overflow-x: hidden;
    background: var(--bg-deep);
}

body.n1c-body {
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    color: #fff;
    background: radial-gradient(circle at 20% -10%, var(--bg-top) 0%, var(--bg-mid) 45%, var(--bg-deep) 100%);
    background-attachment: fixed;
    /* room for the floating bottom nav so it never covers the game */
    padding-bottom: calc(var(--nav-h) + 30px + env(safe-area-inset-bottom));
}

/* Main game container */
.game-container {
    width: 100%;
    max-width: 480px;
    margin-inline: auto;
    padding: 6px;
    padding-bottom: 76px;
    display: flex;
    flex-direction: column;
}

a { color: var(--gold); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Header (brand | wallet | actions) ---------- */
.app-header {
    position: sticky;
    top: 6px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 8px;
    margin: 0 0 2px;
    background: linear-gradient(180deg, #0d2262, #081747);
    border: 1.5px solid rgba(47, 143, 255, 0.55);
    border-radius: 16px;
    box-shadow: 0 0 12px rgba(47, 143, 255, 0.28), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.brand {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: #fff;
    min-width: 0;
}

/* Logo mark — gradient gaming tile with a gold crown */
.brand-crown {
    width: clamp(24px, 6.4vw, 30px);
    height: clamp(24px, 6.4vw, 30px);
    border-radius: 30%;
    display: grid;
    place-items: center;
    font-size: clamp(13px, 3.6vw, 17px);
    color: #ffd23e;
    background: linear-gradient(135deg, #7b2ff7 0%, #4f46e5 55%, #2563eb 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 10px rgba(123, 47, 247, 0.6),
                inset 0 1px 3px rgba(255, 255, 255, 0.35),
                0 3px 8px rgba(0, 0, 0, 0.45);
    flex: 0 0 auto;
}

.brand-name {
    font-family: 'Baloo 2', cursive;
    font-weight: 900;
    font-size: clamp(16px, 4.8vw, 22px);
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    letter-spacing: 0.5px;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
}

.brand-accent {
    background: linear-gradient(120deg, #ffe27a 0%, #ffd23e 40%, #ff9f1a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Wallet pill — sits toward the right of the header, next to the action icons */
.wallet-box {
    margin-left: auto;
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(6, 16, 46, 0.85);
    border: 1.6px solid var(--accent-blue);
    border-radius: 20px;
    padding: 3px 4px 3px 10px;
    min-height: 34px;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 0 10px rgba(22, 124, 255, 0.25);
}

.wallet-ico { color: var(--gold); font-size: 15px; line-height: 1; flex: 0 0 auto; }

.wallet-amount {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 15.5px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    color: var(--gold);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.wallet-plus {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.55);
    background: linear-gradient(135deg, #2fd873, #159a4c);
    color: #fff;
    font-size: 17px;
    font-weight: 800;
    line-height: 1;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    box-shadow: 0 3px 8px rgba(21, 154, 76, 0.5);
    text-decoration: none;
}

.wallet-plus:active { transform: scale(0.92); }

.icon-btn {
    position: relative;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 16px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.badge-dot {
    position: absolute;
    top: 6px;
    right: 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ff4b5c;
    box-shadow: 0 0 0 2px #071740;
}

.badge-count {
    position: absolute;
    top: -4px;
    right: -5px;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    border-radius: 999px;
    background: #ff4b5c;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: grid;
    place-items: center;
    box-shadow: 0 0 0 2px #081747;
}

/* ---------- Main layout ---------- */
.app-main {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 6px;
}

/* Compact demo pill */
.demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 210, 62, 0.14);
    color: var(--gold);
    border: 1px solid rgba(255, 210, 62, 0.45);
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

/* ---------- Game selection tabs ---------- */
.game-tabs-wrap { padding: 2px 2px 0; }

.game-tabs {
    display: flex;
    align-items: stretch;
    gap: 8px;
    min-width: 0;
}

.game-tab {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    font-size: 12.5px;
    line-height: 1;
    color: #fff;
    border-radius: 14px;
    padding: 10px 6px 9px;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.game-tab i { font-size: 16px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35)); }
.game-tab:active { transform: scale(0.97); }

.tab-lucky {
    background: linear-gradient(135deg, #ffe25e 0%, #ffb020 55%, #ff7b00 100%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #4a2b00;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
    box-shadow:
        0 0 12px rgba(255, 159, 26, 0.45),
        0 4px 14px rgba(255, 123, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.tab-lucky.active { transform: translateY(-1px); filter: saturate(1.08); }

.tab-bubble {
    background: linear-gradient(135deg, #a855f7 0%, #6366f1 55%, #3b82f6 100%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow:
        0 0 12px rgba(168, 85, 247, 0.45),
        0 4px 14px rgba(59, 130, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    opacity: 0.96;
}

.tab-soon-tag {
    position: absolute;
    top: -6px;
    right: 7px;
    font-family: 'Poppins', sans-serif;
    font-size: 7.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1;
    color: #4a2b00;
    background: linear-gradient(135deg, #ffe25e, #ffb020);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    padding: 2.5px 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.tab-note {
    margin: 6px 2px 0;
    font-size: 11px;
    color: #ffd93e;
    background: rgba(255, 210, 62, 0.08);
    border: 1px solid rgba(255, 210, 62, 0.3);
    border-radius: 10px;
    padding: 6px 10px;
    animation: winnerPop 0.3s ease;
}

.tab-note i { margin-right: 3px; }

/* ---------- Ten number boxes: 5 × 2 ---------- */
.number-section {
    background: rgba(11, 28, 82, 0.72);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 8px;
}

/* ---------- Live round header (server-timed rounds) ---------- */
.cp-round-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(9, 24, 72, 0.85);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 10px 12px;
}

.cp-round-info { display: flex; align-items: center; gap: 8px; min-width: 0; }

.cp-round-id {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 13px;
    color: #cfe0ff;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.cp-badge {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 2px 8px;
    flex: 0 0 auto;
}
.cp-badge.open    { background: rgba(52, 224, 125, 0.16); color: #4ade80; border: 1px solid rgba(74, 222, 128, 0.45); }
.cp-badge.closed  { background: rgba(245, 158, 11, 0.14); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.45); }
.cp-badge.settled { background: rgba(56, 189, 248, 0.14); color: #7dd3fc; border: 1px solid rgba(125, 211, 252, 0.45); }

.cp-timer-wrap { text-align: right; flex: 0 0 auto; }
.cp-timer {
    font-variant-numeric: tabular-nums;
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 22px;
    line-height: 1;
    color: #fff;
}
.cp-timer.urgent { color: #ff5d6c; animation: cpBlink 1s steps(2) infinite; }
.cp-timer-label { font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: #9fb0e8; }

.cp-progress {
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
    margin-top: 8px;
}
.cp-progress-fill {
    height: 100%;
    width: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--gold), #ff8a00);
    transition: width 0.4s linear;
}

/* ---------- Small round colorful number balls ---------- */
.cp-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(8px, 2.6vw, 12px);
    padding: 12px 4px 10px;
}

.cp-ball {
    position: relative;
    aspect-ratio: 1 / 1;
    min-width: 0;
    border: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: clamp(18px, 6vw, 24px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    /* Kept as a variable so selection glows can be added on top of the 3D shading. */
    --ball-shade: inset 0 -5px 10px rgba(0, 0, 0, 0.28),
                  inset 0 4px 8px rgba(255, 255, 255, 0.35),
                  0 5px 12px rgba(0, 0, 0, 0.4);
    box-shadow: var(--ball-shade);
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s ease-in-out,
                box-shadow 0.2s ease-in-out,
                outline-color 0.2s ease-in-out;
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.cp-ball:active { transform: scale(0.92); }

/* Number currently picked for the next bet — thin white ring + outer glow. */
.cp-ball.selected {
    outline-color: #ffffff;
    box-shadow: 0 0 12px 3px rgba(255, 255, 255, 0.85),
                inset 0 0 4px rgba(255, 255, 255, 0.5),
                var(--ball-shade);
    transform: scale(1.05);
}

/* Numbers already backed this round keep a gold glow while you pick another one. */
.cp-ball.backed {
    outline-color: var(--gold);
    box-shadow: 0 0 10px 2px rgba(255, 210, 62, 0.75), var(--ball-shade);
}

.cp-ball.winner {
    outline-color: var(--gold);
    animation: winnerPop 0.6s ease 3;
}

.cp-ball.cp-disabled {
    filter: grayscale(0.9) brightness(0.55);
    cursor: not-allowed;
}

/* Small per-number bet label pinned under each backed circle */
.bet-tag {
    position: absolute;
    left: 50%;
    bottom: -7px;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ffd23e, #ffb020);
    color: #08165a;
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 10px;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
    pointer-events: none;
    white-space: nowrap;
    z-index: 2;
}

.cp-b0 { background: radial-gradient(circle at 32% 28%, #ff8fa0, #d61f34); }
.cp-b1 { background: radial-gradient(circle at 32% 28%, #ffa268, #e8590c); }
.cp-b2 { background: radial-gradient(circle at 32% 28%, #ffd166, #e8890c); }
.cp-b3 { background: radial-gradient(circle at 32% 28%, #ffe066, #d9a406); }
.cp-b4 { background: radial-gradient(circle at 32% 28%, #b2f26e, #5c9c0f); }
.cp-b5 { background: radial-gradient(circle at 32% 28%, #63e6a5, #0f9d58); }
.cp-b6 { background: radial-gradient(circle at 32% 28%, #5ce1e6, #0a92c9); }
.cp-b7 { background: radial-gradient(circle at 32% 28%, #74a9ff, #1c5fd6); }
.cp-b8 { background: radial-gradient(circle at 32% 28%, #b48bff, #6d28d9); }
.cp-b9 { background: radial-gradient(circle at 32% 28%, #ff8ad4, #d63384); }

@media (min-width: 768px) {
    .cp-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
}

/* ---------- My bet in the current round ---------- */
.cp-mybet {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    background: rgba(22, 124, 255, 0.1);
    border: 1px dashed rgba(90, 169, 255, 0.55);
    border-radius: 12px;
    padding: 8px 12px;
    font-size: 12.5px;
    color: #dbe6ff;
}
.cp-mybet .cpb-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    flex: 0 0 auto;
}

.cp-mybet-more {
    min-width: 22px;
    height: 26px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    padding: 0 5px;
    background: rgba(255, 255, 255, 0.14);
    color: #dbe6ff;
    font-weight: 700;
    font-size: 11px;
    flex: 0 0 auto;
}

/* ---------- Fairness disclosure ---------- */
.fair-note {
    margin: 8px 2px 0;
    font-size: 10.5px;
    color: #8fa3d9;
    display: flex;
    align-items: flex-start;
    gap: 5px;
}
.fair-note i { flex: 0 0 auto; margin-top: 1px; }

@keyframes cpBlink { 50% { opacity: 0.35; } }

/* ---------- Bet controls ---------- */
.game-card {
    background: rgba(9, 24, 72, 0.85);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 10px;
}

/* Clear feedback for the picked number and amount */
.bet-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.bet-stepper-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.bet-coin { font-size: 20px; flex: 0 0 auto; color: var(--gold); display: grid; place-items: center; }

.bet-stepper {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--card-border);
    border-radius: 999px;
    padding: 4px 6px;
}

.step-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.45);
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    line-height: 1;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.step-btn.minus { background: linear-gradient(135deg, #ff5b6a, #d61f34); }
.step-btn.plus  { background: linear-gradient(135deg, #2fd873, #159a4c); }

.step-btn:active { transform: scale(0.9); }

.bet-amount {
    min-width: 48px;
    text-align: center;
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 18px;
    color: var(--gold);
}

.play-btn-green {
    flex: 0 0 auto;
    border: none;
    border-radius: 12px;
    padding: 10px 20px;
    min-height: 46px;
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 17px;
    color: #fff;
    background: linear-gradient(135deg, #34e07d, #159a4c);
    box-shadow: 0 5px 14px rgba(21, 154, 76, 0.5);
    transition: transform 0.12s ease;
}

.play-btn-green:active { transform: scale(0.96); }

.play-btn-green:disabled { opacity: 0.6; }

.bet-chip {
    flex: 1 1 0;
    min-width: 0;
    min-height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-weight: 700;
    font-size: 13.5px;
    transition: all 0.15s ease;
}

.bet-chip.selected {
    border-color: var(--gold);
    background: rgba(123, 47, 247, 0.55);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 210, 62, 0.4);
}

.bet-chips {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-top: 8px;
}

@media (min-width: 480px) {
    .bet-chips { grid-template-columns: repeat(7, minmax(0, 1fr)); }
}

.result-banner {
    display: none;
    margin-top: 8px;
    padding: 9px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
}

.result-banner.win {
    display: block;
    background: rgba(34, 197, 94, 0.16);
    border: 1px solid #2fd873;
    color: #7ef0a8;
}

.result-banner.lose {
    display: block;
    background: rgba(255, 75, 92, 0.14);
    border: 1px solid #ff4b5c;
    color: #ffaab5;
}

.result-banner.info {
    display: block;
    background: rgba(47, 143, 255, 0.14);
    border: 1px solid #2f8fff;
    color: #b9d7ff;
}

.guest-note {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    padding: 8px 10px;
}

.guest-note.big { text-align: center; font-size: 13px; }

.guest-note a { font-weight: 600; }

/* ---------- Recent results ---------- */
.section-card {
    background: rgba(11, 28, 82, 0.72);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 10px;
}

.section-title {
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    font-size: 14px;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-title i { color: var(--gold); }

.results-tag {
    margin-left: auto;
    font-family: 'Poppins', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 2px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.results-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    min-height: 32px;
}

.result-circle {
    width: 27px;
    height: 27px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 12.5px;
    border: 2px solid rgba(255, 255, 255, 0.45);
    animation: winnerPop 0.5s ease;
}

.rc-0 { background: #5b2fd6; }
.rc-1 { background: #d61f34; }
.rc-2 { background: #1c5fd6; }
.rc-3 { background: #159a4c; }
.rc-4 { background: #f4720b; }
.rc-5 { background: #7c2fe0; }
.rc-6 { background: #e0218a; }
.rc-7 { background: #0a92c9; }
.rc-8 { background: #f0a500; color: #5b3a00; }
.rc-9 { background: #0d9488; }

/* ---------- Wallet summary ---------- */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.stat-card {
    border-radius: 12px;
    padding: 8px 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.stat-card span { font-size: 10px; opacity: 0.85; }

.stat-card b {
    font-family: 'Baloo 2', cursive;
    font-size: 15px;
    line-height: 1.15;
}

.sc-blue   { background: linear-gradient(150deg, #2f8fff, #1c5fd6); }
.sc-green  { background: linear-gradient(150deg, #34e07d, #159a4c); }
.sc-purple { background: linear-gradient(150deg, #b06bff, #7c2fe0); }

.activity-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.activity-item:last-child { border-bottom: none; }

.activity-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
    flex: 0 0 auto;
}

.activity-icon i { font-size: 15px; }

.ai-win    { background: rgba(34, 197, 94, 0.22) !important; }
.ai-lose   { background: rgba(255, 75, 92, 0.18) !important; }
.ai-bonus  { background: rgba(255, 210, 62, 0.2) !important; }
.ai-wallet { background: rgba(47, 143, 255, 0.2) !important; }

.activity-body { flex: 1; min-width: 0; }

.activity-msg {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-time { font-size: 10px; color: var(--text-soft); }

.amount-pos { color: #4ade80; font-weight: 700; font-size: 12.5px; }
.amount-neg { color: #ff6b81; font-weight: 700; font-size: 12.5px; }

/* ---------- Fixed bottom navigation ---------- */
.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: calc(8px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    width: calc(100% - 20px);
    max-width: 460px;
    z-index: 1000;
    display: flex;
    background: linear-gradient(180deg, #0d2262, #081747);
    backdrop-filter: blur(8px);
    border: 1.5px solid rgba(47, 143, 255, 0.55);
    border-radius: 18px;
    padding: 6px 4px;
    box-shadow: 0 0 14px rgba(47, 143, 255, 0.3), 0 8px 20px rgba(0, 0, 0, 0.45);
}

.bottom-nav-item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    padding: 4px 0 3px;
    color: #cfe0ff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
}

.bottom-nav-item i { font-size: 19px; line-height: 1.2; }

/* Consistent colorful icons — one accent hue per destination */
.bottom-nav-item .bi-house-door-fill { color: #4da3ff; }
.bottom-nav-item .bi-cash-coin       { color: #ffd23e; }
.bottom-nav-item .bi-person-fill     { color: #b487ff; }

.bottom-nav-item.active { color: var(--gold); font-weight: 700; }

.bottom-nav-item.active i { filter: drop-shadow(0 0 6px rgba(255, 210, 62, 0.65)); }

.bottom-nav-item.active::after {
    content: '';
    width: 26px;
    height: 3px;
    border-radius: 2px;
    background: var(--gold);
    box-shadow: 0 0 8px rgba(255, 210, 62, 0.9);
    margin-top: 2px;
}

/* ---------- Footer ---------- */
.app-footer {
    text-align: center;
    padding: 2px 14px 10px;
    font-size: 10.5px;
    color: #8ea0dd;
}

.app-footer-meta { opacity: 0.7; margin-bottom: 0; }

/* ---------- Modal ---------- */
.n1c-modal {
    background: #0b1c52;
    color: #fff;
    border: 1px solid var(--card-border);
    border-radius: 20px;
}

.modal-crown { font-size: 34px; margin-bottom: 2px; color: var(--gold); line-height: 1; }

.modal-title-n1c {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    color: var(--gold);
}

.n1c-btn-gold {
    background: linear-gradient(90deg, #ffd23e, #ff9d3e);
    color: #3a2500;
    font-weight: 700;
    border-radius: 999px;
    padding: 8px;
}

.n1c-btn-ghost {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    font-weight: 600;
    border-radius: 999px;
    padding: 8px;
}

.add-coins-msg {
    font-size: 12px;
    color: #7ef0a8;
    min-height: 16px;
    margin: 8px 0 0;
}

/* ---------- Auth pages ---------- */
.auth-card {
    background: rgba(11, 28, 82, 0.85);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 20px 16px;
}

.auth-title {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 22px;
    text-align: center;
    margin-bottom: 4px;
}

.auth-sub {
    text-align: center;
    color: var(--text-soft);
    font-size: 12.5px;
    margin-bottom: 14px;
}

.form-label { font-size: 12.5px; color: #c3d0ff; }

.form-control, .form-control:focus {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    border-radius: 12px;
    min-height: 44px;
}

.form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(255, 210, 62, 0.2);
}

.form-control::placeholder { color: #7d8fd0; }

.alert-list { list-style: none; padding: 0; margin: 0 0 10px; }

.alert-list li {
    background: rgba(255, 75, 92, 0.16);
    border: 1px solid rgba(255, 75, 92, 0.5);
    color: #ffb3bc;
    border-radius: 10px;
    font-size: 12.5px;
    padding: 7px 11px;
    margin-bottom: 6px;
}

/* Legacy play button (auth submit) */
.play-btn {
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 11px;
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 16.5px;
    color: #fff;
    background: linear-gradient(90deg, #ff2e63, #ff7a3d);
    box-shadow: 0 6px 16px rgba(255, 46, 99, 0.45);
}

/* ---------- Coin burst ---------- */
.coin-burst {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1200;
}

.coin-burst span {
    position: absolute;
    top: 58%;
    font-size: 22px;
    animation: coinFly 1.2s ease-out forwards;
}

/* ---------- Empty hint ---------- */
.empty-hint {
    text-align: center;
    color: var(--text-soft);
    font-size: 12px;
    padding: 8px 0;
    width: 100%;
}

/* ---------- Page head (inner pages) ---------- */
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 2px 0;
}

.page-title {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: clamp(16px, 5vw, 21px);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.pt-ico {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: linear-gradient(135deg, #ffd23e, #ff9d3e);
    color: #3a2500;
    display: grid;
    place-items: center;
    font-size: 14px;
}

.pt-ico.blue { background: linear-gradient(135deg, #2f8fff, #1c5fd6); color: #fff; }

.gear-btn {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid rgba(47, 143, 255, 0.55);
    background: rgba(13, 34, 98, 0.85);
    color: #cfe0ff;
    font-size: 15px;
    display: grid;
    place-items: center;
    text-decoration: none;
}

.gear-btn:active { background: rgba(47, 143, 255, 0.25); }

/* ---------- Earnings summary cards ---------- */
.earn-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.earn-card {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 14px;
    padding: 9px 10px;
    min-width: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.ec-ico {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: grid;
    place-items: center;
    font-size: 16px;
}

.ec-body { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }

.ec-body span { font-size: 10px; opacity: 0.9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ec-body b {
    font-family: 'Baloo 2', cursive;
    font-size: clamp(13.5px, 4vw, 16px);
    white-space: nowrap;
}

.ec-hint { font-size: 8.5px; opacity: 0.85; }

.ec-gold   { background: linear-gradient(135deg, #ffd23e, #ff9d3e); color: #3a2500; }
.ec-green  { background: linear-gradient(135deg, #34e07d, #159a4c); }
.ec-blue   { background: linear-gradient(135deg, #2f8fff, #1c5fd6); }
.ec-pink   { background: linear-gradient(135deg, #ff6fbc, #e0218a); }
.ec-purple { background: linear-gradient(135deg, #b06bff, #7c2fe0); }
.ec-teal   { background: linear-gradient(135deg, #2fd8b5, #0d9488); }
.ec-cyan    { background: linear-gradient(135deg, #2f8fff, #00b4d8); }
.ec-magenta { background: linear-gradient(135deg, #b06bff, #e0218a); }
.ec-jade    { background: linear-gradient(135deg, #34e07d, #0d9488); }

/* ---------- Deposit / Withdraw shortcuts ---------- */
.dw-wrap { display: flex; flex-direction: column; gap: 6px; }

.dw-row { display: flex; gap: 8px; }

.btn-deposit,
.btn-withdraw {
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    border: none;
    border-radius: 12px;
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 15px;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.btn-deposit  { background: linear-gradient(135deg, #2f8fff, #1c5fd6); }
.btn-withdraw { background: linear-gradient(135deg, #ff6fbc, #e0218a); }

.btn-deposit:active,
.btn-withdraw:active { transform: scale(0.97); }

.demo-note {
    margin: 0;
    font-size: 10.5px;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    padding: 6px 9px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.demo-note i { color: var(--gold); flex: 0 0 auto; }

.demo-note b { color: var(--gold); }

/* ---------- Referral card ---------- */
.ref-card {
    background:
        radial-gradient(circle at 90% 0%, rgba(255, 210, 62, 0.2) 0 12%, transparent 13%),
        linear-gradient(135deg, #3b1f9e, #7c2fe0);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 10px;
}

.ref-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.ref-title {
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    font-size: 14px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ref-title i { color: var(--gold); }

.ref-code-row { display: flex; gap: 8px; align-items: stretch; }

.ref-code-box {
    flex: 1;
    min-width: 0;
    background: rgba(6, 16, 46, 0.55);
    border: 1.5px dashed rgba(255, 210, 62, 0.65);
    border-radius: 10px;
    padding: 8px 10px;
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: 2.5px;
    color: var(--gold);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-btn {
    flex: 0 0 auto;
    border: none;
    border-radius: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #ffd23e, #ff9d3e);
    color: #3a2500;
    font-weight: 700;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.copy-btn:active { transform: scale(0.95); }

.ref-copy-msg { min-height: 14px; margin: 4px 0 0; font-size: 11px; color: #7ef0a8; }

.ref-stats { display: flex; gap: 8px; margin-top: 6px; }

.ref-stats > div {
    flex: 1;
    background: rgba(6, 16, 46, 0.4);
    border-radius: 10px;
    padding: 7px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.ref-stats b { font-family: 'Baloo 2', cursive; font-size: 15px; color: var(--gold); }

.ref-stats span { font-size: 9.5px; opacity: 0.85; }

.ref-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    max-height: 132px;
    overflow-y: auto;
}

.ref-list li {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    padding: 5px 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ref-list li:last-child { border-bottom: none; }

.ref-list li i { color: rgba(255, 255, 255, 0.6); }

.ref-list li span { margin-left: auto; font-size: 10px; opacity: 0.75; }

/* ---------- Activity list extras ---------- */
.activity-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 2px;
}

.a-tag {
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #cfe0ff;
}

.tag-demo { background: rgba(255, 210, 62, 0.18); color: var(--gold); border: 1px solid rgba(255, 210, 62, 0.4); }
.tag-win    { background: rgba(34, 197, 94, 0.25); color: #7ef0a8; }
.tag-lose   { background: rgba(255, 75, 92, 0.22); color: #ffaab5; }
.tag-bonus  { background: rgba(255, 210, 62, 0.2); color: var(--gold); }
.tag-wallet { background: rgba(47, 143, 255, 0.22); color: #b9d7ff; }

.activity-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
    flex: 0 0 auto;
}

.a-status { font-size: 9px; color: #7ef0a8; }

/* ---------- Pager ---------- */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.pager-btn {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.pager-btn:active { background: rgba(255, 255, 255, 0.16); }

.pager-info { font-size: 11px; color: var(--text-soft); }

/* ---------- Profile card ---------- */
.profile-card {
    background: linear-gradient(135deg, #123a9e 0%, #7c2fe0 100%);
    border: 1.5px solid rgba(90, 169, 255, 0.55);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 0 14px rgba(90, 169, 255, 0.25), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.avatar-wrap {
    position: relative;
    flex: 0 0 auto;
}

.cam-badge {
    position: absolute;
    right: -3px;
    bottom: -3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2f8fff, #1c5fd6);
    border: 2px solid #0a1c55;
    color: #fff;
    font-size: 11px;
    display: grid;
    place-items: center;
}

.avatar-circle {
    flex: 0 0 auto;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #ffd23e, #ff9d3e);
    border: 2.5px solid rgba(255, 255, 255, 0.7);
    display: grid;
    place-items: center;
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 26px;
    color: #3a2500;
}

.avatar-circle img { width: 100%; height: 100%; object-fit: cover; }

.profile-info { flex: 1; min-width: 0; }

.p-name {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 16px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.p-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
    font-size: 11px;
    color: #dbe4ff;
}

.p-uid {
    background: rgba(6, 16, 46, 0.45);
    border-radius: 999px;
    padding: 1px 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(34, 197, 94, 0.25);
    border: 1px solid rgba(52, 224, 125, 0.6);
    color: #7ef0a8;
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 10px;
    font-weight: 600;
}

.status-badge.bad {
    background: rgba(255, 75, 92, 0.2);
    border-color: rgba(255, 75, 92, 0.6);
    color: #ffaab5;
}

.p-actions { margin-top: 8px; }

.p-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
}

.btn-edit-profile {
    width: auto;
    border: none;
    border-radius: 999px;
    min-height: 32px;
    padding: 5px 14px;
    background: linear-gradient(135deg, #2f8fff, #1c5fd6);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 3px 8px rgba(28, 95, 214, 0.5);
}

.btn-edit-profile:active { transform: scale(0.96); }

/* ---------- Admin Panel shortcut (visible only to admin-role accounts) ---------- */
.p-admin-row {
    margin-top: 10px;
}

.btn-admin-panel {
    width: 100%;
    border: none;
    border-radius: 12px;
    min-height: 40px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #ffb31f, #ff8a00);
    color: #14224f;
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: 0 4px 10px rgba(255, 138, 0, 0.35);
}

.btn-admin-panel:active { transform: scale(0.97); }

.btn-admin-panel .ap-role {
    font-size: 10px;
    font-weight: 700;
    background: rgba(20, 34, 79, 0.18);
    border-radius: 999px;
    padding: 2px 8px;
}

/* ---------- Profile stats 2×2 ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

/* ---------- Account menu ---------- */
.menu-list {
    background: rgba(11, 28, 82, 0.72);
    border: 1.5px solid rgba(90, 169, 255, 0.45);
    border-radius: 16px;
    padding: 4px 0;
    overflow: hidden;
    box-shadow: 0 0 12px rgba(47, 143, 255, 0.18);
}

.menu-card-title {
    font-family: 'Baloo 2', cursive;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px 6px;
    margin: 0;
}

.menu-card-title i { color: var(--gold); }

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    -webkit-tap-highlight-color: transparent;
}

.menu-item:last-child { border-bottom: none; }

.menu-item:active { background: rgba(255, 255, 255, 0.07); }

.mi-ico {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.1);
    display: grid;
    place-items: center;
    font-size: 14px;
    color: var(--gold);
}

.menu-item .chev { margin-left: auto; color: #6f81c4; font-size: 13px; }

.menu-item.danger .mi-ico { color: #ff8a97; }

.menu-item.danger span.mi-label { color: #ff9aa6; }

.mi-blue   { background: rgba(47, 143, 255, 0.2) !important;  color: #5aa9ff !important; }
.mi-cyan   { background: rgba(62, 232, 245, 0.16) !important; color: #6ef0f8 !important; }
.mi-purple { background: rgba(176, 107, 255, 0.2) !important; color: #c39bff !important; }
.mi-pink   { background: rgba(255, 111, 188, 0.18) !important; color: #ff9ac9 !important; }
.mi-green  { background: rgba(52, 224, 125, 0.18) !important; color: #5fe8a0 !important; }
.mi-gold   { background: rgba(255, 210, 62, 0.18) !important; color: var(--gold) !important; }
.mi-red    { background: rgba(255, 75, 92, 0.18) !important;  color: #ff8a97 !important; }

/* ---------- Transaction forms / modals ---------- */
.modal-demo-note {
    font-size: 10.5px;
    color: var(--text-soft);
    background: rgba(255, 210, 62, 0.1);
    border: 1px dashed rgba(255, 210, 62, 0.45);
    border-radius: 10px;
    padding: 6px 9px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal-demo-note i { color: var(--gold); flex: 0 0 auto; }

.tx-quick {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 8px 0 2px;
}

.tx-quick .bet-chip { min-height: 32px; font-size: 12px; }

.tx-msg {
    min-height: 16px;
    font-size: 11.5px;
    color: #7ef0a8;
    margin: 6px 0;
}

/* ---------- Edit profile ---------- */
.avatar-edit-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.avatar-edit-row .avatar-circle { width: 56px; height: 56px; font-size: 23px; }

.avatar-edit-body { flex: 1; min-width: 0; }

.form-file { padding: 6px 10px; font-size: 12px; }

.form-file::file-selector-button {
    border: none;
    border-radius: 999px;
    padding: 5px 10px;
    margin-right: 8px;
    background: linear-gradient(135deg, #ffd23e, #ff9d3e);
    color: #3a2500;
    font-weight: 700;
    font-size: 11.5px;
}

.form-hint { display: block; font-size: 10.5px; color: var(--text-soft); margin-top: 3px; }

.alert-list li.alert-ok {
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(52, 224, 125, 0.6);
    color: #7ef0a8;
}

/* ---------- Notification settings ---------- */
.notif-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notif-row:last-of-type { border-bottom: none; }

.notif-row .nr-body { min-width: 0; }

.notif-row .nr-title { font-size: 13px; font-weight: 600; }

.notif-row .nr-sub { font-size: 10.5px; color: var(--text-soft); }

.form-check-input { accent-color: var(--gold); width: 2.4em; height: 1.3em; cursor: pointer; }

/* ---------- Help / FAQ / policy ---------- */
.help-contact {
    list-style: none;
    margin: 0;
    padding: 0;
}

.help-contact li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.help-contact li:last-child { border-bottom: none; }

.help-contact li i { color: var(--gold); flex: 0 0 auto; }

.faq {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 9px 11px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.04);
}

.faq summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.faq summary::after { content: '+'; font-weight: 800; color: var(--gold); }

.faq[open] summary::after { content: '−'; }

.faq p { margin: 7px 0 0; font-size: 12px; color: #dbe4ff; line-height: 1.5; }

.policy h2 {
    font-family: 'Baloo 2', cursive;
    font-size: 13.5px;
    color: var(--gold);
    margin: 12px 0 4px;
}

.policy h2:first-child { margin-top: 0; }

.policy p { font-size: 12.5px; line-height: 1.55; color: #dbe4ff; margin: 0 0 6px; }

.ref-sub {
    font-family: 'Baloo 2', cursive;
    font-size: 12.5px;
    margin: 10px 0 0;
    color: #dbe4ff;
}

/* ---------- Wallet page ---------- */
.wallet-balance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.wallet-balance-main { display: flex; flex-direction: column; min-width: 0; }

.wallet-balance-main span { font-size: 11px; opacity: 0.85; }

.wallet-balance-value {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: clamp(26px, 8vw, 34px);
    line-height: 1.1;
    color: #fff;
}

/* ---------- Account info card ---------- */
.kv-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kv-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.kv-list li:last-child { border-bottom: none; }

.kv-list li i { color: var(--gold); flex: 0 0 auto; }

.kv-list .kv-label { color: var(--text-soft); }

.kv-list .kv-value { margin-left: auto; font-weight: 600; text-align: right; }

.kv-list .kv-value.code {
    font-family: 'Baloo 2', cursive;
    letter-spacing: 1.5px;
    color: var(--gold);
}

/* ---------- Narrow screens ---------- */
@media (max-width: 350px) {
    .game-container { padding: 4px; }

    .app-header { padding: 5px 6px; gap: 5px; }

    .bottom-nav { width: calc(100% - 12px); }

    .brand { gap: 4px; }

    .wallet-box { gap: 4px; padding-left: 8px; min-height: 30px; }

    .wallet-amount { font-size: 14px; }

    .wallet-plus { width: 26px; height: 26px; font-size: 15px; }

    .icon-btn { width: 30px; height: 30px; font-size: 15px; }

    .number-grid { gap: 3px; }

    .number-box { border-radius: 7px; border-width: 1.5px; }

    .bet-amount { min-width: 42px; font-size: 16px; }

    .play-btn-green { padding: 9px 14px; font-size: 15px; }

    .bet-chip { font-size: 12px; min-height: 34px; }

    .result-circle { width: 24px; height: 24px; font-size: 11px; }

    .demo-badge { font-size: 8.5px; padding: 2px 7px; }

    .game-tab { font-size: 11.5px; padding: 9px 4px 8px; border-radius: 13px; }

    .game-tabs { gap: 7px; }

    .earn-grid { gap: 6px; }

    .earn-card { padding: 8px; gap: 6px; border-radius: 12px; }

    .ec-ico { width: 28px; height: 28px; font-size: 13px; }

    .ref-code-box { font-size: 14px; letter-spacing: 1.5px; }

    .menu-item { padding: 10px 10px; font-size: 12.5px; }
}

/* ---------- Short screens ---------- */
@media (max-height: 700px) {
    .app-main { gap: 7px; padding-top: 4px; }

    .number-section,
    .game-card,
    .section-card { padding: 8px; }
}

/* ---------- Animations ---------- */
@keyframes boxPulse {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50%      { transform: scale(1.05); filter: brightness(1.35); }
}

@keyframes winnerPop {
    0%   { transform: scale(0.6); }
    60%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@keyframes coinFly {
    from { transform: translate(0, 0) scale(0.8); opacity: 1; }
    to   { transform: translate(var(--tx, 0), -220px) scale(1.4) rotate(40deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ---------- 5-minute round update: shared ball base ---------- */
.cpb {
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    border: 2px solid rgba(255, 255, 255, 0.45);
    flex: 0 0 auto;
}

/* ---------- Recent Results strip ---------- */
.results-card {
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* ---------- Bet-placed popup accents ---------- */
.bet-ok-ico {
    width: 52px;
    height: 52px;
    margin: 0 auto 8px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 26px;
    color: #fff;
    background: linear-gradient(150deg, #34e07d, #159a4c);
    box-shadow: 0 0 0 6px rgba(52, 224, 125, 0.15);
}

.bet-ok-ball {
    width: 56px;
    height: 56px;
    font-size: 26px;
    margin: 4px auto 10px;
    animation: winnerPop 0.6s ease;
}

/* ---------- Full-screen result popup ---------- */
.fs-result {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(4, 10, 34, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.fs-result[hidden] { display: none; }

.fsr-card {
    width: min(92vw, 340px);
    border-radius: 22px;
    padding: 18px 16px 16px;
    text-align: center;
    color: #fff;
    background: linear-gradient(165deg, #16247c, #08165a 65%, #0a1030);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), 0 0 0 6px rgba(255, 210, 62, 0.12);
    animation: fsrIn 0.35s cubic-bezier(0.2, 1.2, 0.4, 1);
}

@keyframes fsrIn {
    from { transform: scale(0.8) translateY(14px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}

.fsr-head {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 2.5px;
    color: #ffd23e;
}

.fsr-ball-wrap {
    margin: 12px 0 6px;
    animation: fsrPulse 1.8s ease-in-out 0.6s infinite;
}

@keyframes fsrPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}

.fsr-ball {
    width: 92px;
    height: 92px;
    font-size: 44px;
    display: inline-grid;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45), inset 0 -6px 14px rgba(0, 0, 0, 0.25);
    animation: winnerPop 0.7s ease;
}

.fsr-verdict {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: clamp(26px, 8vw, 34px);
    line-height: 1.05;
    margin-top: 2px;
}

.fsr-verdict.win  { color: #4ade80; text-shadow: 0 0 18px rgba(74, 222, 128, 0.5); }
.fsr-verdict.lose { color: #ff8a94; text-shadow: 0 0 18px rgba(255, 138, 148, 0.4); }
.fsr-verdict.info { color: #8fd3fc; text-shadow: 0 0 18px rgba(143, 211, 252, 0.35); }

.fsr-amount {
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: clamp(20px, 6vw, 26px);
    color: #ffd23e;
    margin-bottom: 10px;
}

.fsr-details {
    list-style: none;
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.fsr-details li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 3.5px 0;
    font-size: 12.5px;
}

.fsr-details li + li { border-top: 1px dashed rgba(255, 255, 255, 0.1); }
.fsr-details span { color: #9fb0e8; }
.fsr-details b { font-family: 'Baloo 2', cursive; }

.fsr-ok {
    width: 100%;
    border: 0;
    border-radius: 999px;
    padding: 11px;
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 15px;
    color: #08165a;
    background: linear-gradient(150deg, #ffd76a, #f0a500);
    box-shadow: 0 6px 16px rgba(240, 165, 0, 0.35);
    cursor: pointer;
}

.fsr-ok:active { transform: scale(0.97); }

/* ============================================================
   Add Money / Withdraw (unified wallet)
   ============================================================ */
.amt-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.amt-box {
    border: 2px solid transparent;
    border-radius: 14px;
    padding: 14px 4px 10px;
    text-align: center;
    font-family: 'Baloo 2', cursive;
    font-weight: 800;
    font-size: 17px;
    color: #fff;
    cursor: pointer;
    opacity: 0.75;
    transition: transform 0.12s ease, opacity 0.12s ease, border-color 0.12s ease;
    line-height: 1.2;
}

.amt-box small {
    display: block;
    font-size: 9.5px;
    font-weight: 600;
    opacity: 0.9;
    letter-spacing: 0.3px;
}

.amt-box.selected {
    border-color: #ffd23e;
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 0 0 3px rgba(255, 210, 62, 0.28);
}

.amt-50   { background: linear-gradient(160deg, #f87171, #dc2626); }
.amt-100  { background: linear-gradient(160deg, #a78bfa, #7c3aed); }
.amt-200  { background: linear-gradient(160deg, #60a5fa, #2563eb); }
.amt-300  { background: linear-gradient(160deg, #34d399, #059669); }
.amt-500  { background: linear-gradient(160deg, #fbbf24, #d97706); }
.amt-600  { background: linear-gradient(160deg, #f472b6, #db2777); }
.amt-1200 { background: linear-gradient(160deg, #22d3ee, #0891b2); }
.amt-2000 { background: linear-gradient(160deg, #a3e635, #65a30d); }

.coupon-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.coupon-row input {
    flex: 1;
    background: #0b1c4d;
    border: 1px solid #24407e;
    border-radius: 10px;
    color: #fff;
    padding: 10px 12px;
    font-size: 13px;
    text-transform: uppercase;
}

.coupon-row input::placeholder { text-transform: none; color: #7f92c1; }

.btn-coupon {
    background: linear-gradient(160deg, #22d3ee, #0891b2);
    border: 0;
    border-radius: 10px;
    color: #fff;
    font-weight: 700;
    padding: 10px 14px;
    font-size: 13px;
    white-space: nowrap;
}

.coupon-applied {
    display: none;
    margin-top: 10px;
    background: rgba(34, 197, 94, 0.12);
    border: 1px dashed #22c55e;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12.5px;
    color: #86efac;
}

.coupon-applied b { color: #4ade80; }

.sum-card {
    margin-top: 14px;
    background: #0a1840;
    border: 1px solid #24407e;
    border-radius: 12px;
    padding: 4px 14px;
}

.sum-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    font-size: 13px;
    color: #b9c6e8;
    border-bottom: 1px dashed #1d3568;
}

.sum-row:last-child { border-bottom: 0; }
.sum-row b { color: #fff; font-weight: 600; }

.sum-row.payable b {
    color: #ffd23e;
    font-family: 'Baloo 2', cursive;
    font-size: 19px;
}

.pay-steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 0 0 4px;
}

.pay-steps li {
    counter-increment: step;
    position: relative;
    padding: 0 0 12px 34px;
    font-size: 12.5px;
    color: #b9c6e8;
}

.pay-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffd23e;
    color: #08165a;
    font-weight: 800;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upi-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #0b1c4d;
    border: 1px dashed #3b5aa0;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 8px 0;
}

.upi-pill b {
    color: #7dd3fc;
    font-size: 14px;
    word-break: break-all;
}

.pay-qr {
    display: block;
    width: 190px;
    max-width: 60%;
    margin: 12px auto 4px;
    border-radius: 12px;
    border: 4px solid #fff;
    background: #fff;
}

/* Dynamic per-amount UPI QR (rendered client-side as SVG) */
.pay-qr-dynamic {
    width: 216px;
    max-width: 72%;
    padding: 10px;
    border-width: 3px;
}
.pay-qr-dynamic svg {
    display: block;
    width: 100%;
    height: auto;
}

.pay-amount-note {
    text-align: center;
    font-family: 'Baloo 2', cursive;
    font-size: 22px;
    color: #ffd23e;
    margin: 6px 0 2px;
}

.pay-ref-note {
    text-align: center;
    font-size: 11.5px;
    color: #8fa3cf;
    margin-bottom: 8px;
}

.wd-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.wd-tab {
    border: 2px solid #24407e;
    background: #0a1840;
    border-radius: 12px;
    padding: 12px 8px;
    text-align: center;
    color: #b9c6e8;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
}

.wd-tab i { display: block; font-size: 20px; margin-bottom: 4px; }

.wd-tab.active {
    border-color: #ffd23e;
    color: #fff;
    background: rgba(255, 210, 62, 0.08);
}

.bal-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

.bal-card {
    background: #0a1840;
    border: 1px solid #24407e;
    border-radius: 12px;
    padding: 10px 12px;
}

.bal-card span { display: block; font-size: 11px; color: #8fa3cf; margin-bottom: 2px; }
.bal-card b { font-family: 'Baloo 2', cursive; font-size: 19px; color: #fff; }
.bal-card small { display: block; font-size: 10px; color: #6f84b3; margin-top: 2px; }
.bal-card.hero { grid-column: 1 / -1; border-color: #ffd23e; background: rgba(255, 210, 62, 0.07); }
.bal-card.hero b { color: #ffd23e; font-size: 24px; }

.st-pending, .st-approved, .st-paid, .st-rejected {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    letter-spacing: 0.3px;
}

.st-pending  { background: rgba(250, 204, 21, 0.15); color: #fde047; }
.st-approved { background: rgba(59, 130, 246, 0.18); color: #93c5fd; }
.st-paid     { background: rgba(34, 197, 94, 0.15);  color: #4ade80; }
.st-rejected { background: rgba(248, 113, 113, 0.15); color: #fca5a5; }

.txn-ref {
    font-size: 10.5px;
    color: #6f84b3;
    font-family: monospace;
    letter-spacing: 0.3px;
}

.coupon-sheet-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    background: #0a1840;
    border: 1px solid #24407e;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.coupon-sheet-item .c-code {
    font-family: 'Baloo 2', cursive;
    color: #ffd23e;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.coupon-sheet-item .c-desc { font-size: 11.5px; color: #8fa3cf; }

.coupon-empty {
    text-align: center;
    color: #8fa3cf;
    font-size: 12.5px;
    padding: 14px 0;
}

/* ---------- Live Support modal ---------- */
.support-user-info {
    background: #0a1840;
    border: 1px solid #24407e;
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 12px;
}

.support-user-info .sui-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    font-size: 12.5px;
}

.support-user-info .sui-row span { color: #8fa3cf; }
.support-user-info .sui-row b { color: #fff; font-weight: 600; word-break: break-all; text-align: right; }

.support-feedback {
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 8px;
}

.support-feedback.is-ok { background: rgba(34, 197, 94, .12); color: #7ef0a8; border: 1px solid rgba(34, 197, 94, .35); }
.support-feedback.is-err { background: rgba(239, 68, 68, .12); color: #fca5a5; border: 1px solid rgba(239, 68, 68, .35); }

.support-recent { margin-top: 14px; }

.support-recent .sr-title {
    font-family: 'Baloo 2', cursive;
    color: var(--gold);
    font-size: 13.5px;
    font-weight: 700;
    margin-bottom: 8px;
}

.support-ticket-list { list-style: none; padding: 0; margin: 0; max-height: 200px; overflow-y: auto; }

.support-ticket-list .stl-item {
    background: #0a1840;
    border: 1px solid #24407e;
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 8px;
}

.support-ticket-list .stl-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.support-ticket-list .stl-head b { font-size: 12.5px; color: #fff; font-weight: 600; word-break: break-word; }
.support-ticket-list .stl-date { font-size: 11px; color: #8fa3cf; margin-top: 2px; }

.support-ticket-list .stl-reply {
    margin-top: 6px;
    padding: 6px 8px;
    background: rgba(34, 197, 94, .08);
    border: 1px solid rgba(34, 197, 94, .25);
    border-radius: 8px;
    font-size: 12px;
    color: #7ef0a8;
    word-break: break-word;
}

.support-ticket-list .stl-reply i { margin-right: 4px; }
