/* ── BC.Place — bc.game-style mobile layout ── */

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

:root {
    --bg:        #17181b;
    --surface:   #1f2024;
    --panel:     #28292e;
    --border:    #313238;
    --green:     #24ee89;
    --text:      #f5f6f7;
    --muted:     #8a8d93;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

.app-shell {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: 72px; /* bottom nav space */
}

/* ── TOP BAR ── */
.topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    position: sticky;
    top: 0;
    background: var(--bg);
    z-index: 50;
}
.brand-icon {
    display: inline-flex;
    width: 34px; height: 34px;
    align-items: center; justify-content: center;
    background: var(--green);
    color: #000;
    font-weight: 800; font-size: 20px;
    border-radius: 8px;
    text-decoration: none;
}
.brand { text-decoration: none; }

.wallet-pill {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border-radius: 10px;
    padding: 6px 6px 6px 12px;
    max-width: 220px;
}
.coin {
    width: 20px; height: 20px;
    background: var(--green);
    color: #000;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
}
.wallet-amount { font-weight: 700; font-size: 14px; }
.chev { color: var(--muted); font-size: 11px; }
.add-btn {
    margin-left: auto;
    width: 28px; height: 28px;
    background: var(--green);
    border: none; border-radius: 8px;
    color: #000; font-size: 18px; font-weight: 700;
    cursor: pointer;
}

.topbar-icons { display: flex; gap: 8px; }
.icon-btn {
    width: 38px; height: 38px;
    background: var(--surface);
    border: none; border-radius: 10px;
    font-size: 16px; cursor: pointer;
    position: relative;
}
.icon-btn.has-dot::after {
    content: '';
    position: absolute; top: 6px; right: 6px;
    width: 7px; height: 7px;
    background: var(--green);
    border-radius: 50%;
}
.icon-btn.tg { background: #2aabee; }

/* ── CONTENT ── */
.content { padding: 8px 12px; }

/* ── BANNER SLIDER ── */
.banner-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    scrollbar-width: none;
    border-radius: 16px;
}
.banner-slider::-webkit-scrollbar { display: none; }

.banner {
    min-width: 100%;
    scroll-snap-align: start;
    border-radius: 16px;
    padding: 22px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 180px;
}
.banner-tag {
    background: rgba(255,255,255,.92);
    color: #000;
    font-size: 11px; font-weight: 800;
    padding: 4px 10px;
    border-radius: 6px;
    letter-spacing: .5px;
}
.banner-title {
    font-size: 26px; font-weight: 800;
    margin: 10px 0 6px;
    letter-spacing: .5px;
}
.banner-desc { font-size: 13px; color: rgba(255,255,255,.85); max-width: 220px; }
.banner-cta {
    margin-top: 14px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.5);
    color: #fff;
    padding: 9px 22px;
    border-radius: 8px;
    font-size: 12px; font-weight: 700;
    letter-spacing: 1px;
    cursor: pointer;
}
.banner-art { font-size: 64px; }

.dots { display: flex; justify-content: center; gap: 6px; margin: 10px 0 14px; }
.dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--border);
    transition: all .3s;
}
.dot.active { width: 18px; border-radius: 3px; background: var(--muted); }

/* ── HUB CARD ── */
.hub-card {
    background: #3b3bd6;
    border-radius: 16px;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}
.hub-text h3 { font-size: 19px; font-weight: 800; font-style: italic; }
.hub-text p  { font-size: 13px; font-weight: 700; margin: 6px 0 12px; }
.hub-cta {
    background: var(--green);
    border: none;
    color: #000;
    font-size: 14px; font-weight: 800;
    padding: 10px 22px;
    border-radius: 8px;
    cursor: pointer;
}
.hub-art { font-size: 48px; }

/* ── TABS ── */
.section-tabs {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
}
.tab {
    background: none; border: none;
    color: var(--muted);
    font-size: 15px; font-weight: 700;
    padding-bottom: 6px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}
.tab.active {
    color: var(--text);
    border-bottom-color: var(--green);
}
.tab-all {
    margin-left: auto;
    background: var(--panel);
    border: none;
    color: var(--text);
    font-size: 12px; font-weight: 700;
    padding: 7px 14px;
    border-radius: 8px;
    cursor: pointer;
}

/* ── GAME CARDS ── */
.game-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 6px;
    margin-bottom: 20px;
}
.game-row::-webkit-scrollbar { display: none; }

.game-card {
    min-width: 140px;
    height: 180px;
    border-radius: 14px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform .15s;
}
.game-card:active { transform: scale(.97); }

.card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.clock { font-size: 13px; opacity: .8; }
.badge {
    background: rgba(0,0,0,.35);
    color: #ffd700;
    font-size: 13px; font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
}
.game-icon { flex: 1; display: flex; align-items: center; justify-content: center; font-size: 44px; }
.game-name { font-size: 15px; font-weight: 800; letter-spacing: .5px; }
.game-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 3px; }
.provider { font-size: 9px; color: rgba(255,255,255,.6); font-weight: 600; letter-spacing: .5px; }
.players  { font-size: 10px; color: rgba(255,255,255,.75); background: rgba(0,0,0,.3); padding: 2px 6px; border-radius: 5px; }

/* ── RECENT BIG WINS ── */
.section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.section-head h3 { font-size: 17px; font-weight: 800; }
.live-dot {
    width: 8px; height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

.wins-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}
.wins-row::-webkit-scrollbar { display: none; }
.win-card {
    min-width: 84px;
    background: var(--surface);
    border-radius: 12px;
    padding: 10px 8px;
    text-align: center;
}
.win-icon   { font-size: 30px; margin-bottom: 6px; }
.win-user   { font-size: 11px; color: var(--muted); font-weight: 600; }
.win-amount { font-size: 12px; color: var(--green); font-weight: 800; margin-top: 2px; }

/* ── BOTTOM NAV ── */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 100%; max-width: 480px;
    background: var(--surface);
    display: flex;
    border-top: 1px solid var(--border);
    padding: 8px 0 12px;
    z-index: 100;
}
.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    color: var(--muted);
}
.nav-item.active { color: var(--text); }
.nav-icon  { font-size: 19px; }
.nav-label { font-size: 11px; font-weight: 600; }

/* ── LOTTERY CARDS (v2) ── */
.lottery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}
.lottery-card {
    border-radius: 14px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lottery-head { display: flex; align-items: center; gap: 8px; }
.lottery-flag { font-size: 22px; }
.lottery-name { font-size: 13px; font-weight: 800; }
.lottery-type { font-size: 11px; color: rgba(255,255,255,.65); font-weight: 600; }
.lottery-prize {
    border: 1px dashed rgba(255,255,255,.35);
    border-radius: 8px;
    text-align: center;
    padding: 8px;
    font-size: 17px; font-weight: 800;
}
.lottery-bet {
    background: var(--green);
    border: none;
    color: #000;
    font-size: 13px; font-weight: 800;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
}
.lottery-timer-label { font-size: 11px; color: rgba(255,255,255,.65); font-weight: 600; }
.lottery-timer { display: flex; align-items: center; gap: 4px; font-size: 12px; color: rgba(255,255,255,.7); }
.t-box {
    background: rgba(0,0,0,.35);
    border-radius: 6px;
    padding: 5px 8px;
    font-weight: 700;
    font-size: 12px;
    color: #fff;
}

/* v2: section spacing */
.game-row { margin-bottom: 24px; }
.section-tabs { margin-top: 4px; }

/* ── v3: GAME CARD ART ── */
.game-card {
    position: relative;
    overflow: hidden;
    min-width: 150px;
    height: 200px;
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 4px 14px rgba(0,0,0,.4);
}

/* glow layer behind icon */
.card-glow {
    position: absolute;
    top: 18%; left: 50%;
    transform: translateX(-50%);
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(255,255,255,.28) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}

/* full-card real image (if user adds img/games/{slug}.png) */
.game-img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.game-card.has-img .card-bottom {
    background: linear-gradient(to top, rgba(0,0,0,.85), rgba(0,0,0,0));
    padding: 24px 10px 10px;
    margin: 0 -10px -10px;
}

.card-top { position: relative; z-index: 2; min-height: 22px; }

/* big art icon */
.game-icon {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-main {
    font-size: 64px;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,.55)) drop-shadow(0 0 18px rgba(255,255,255,.25));
    animation: float 3.5s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50%      { transform: translateY(-7px) rotate(3deg); }
}

/* sparkles */
.sparkle {
    position: absolute;
    color: rgba(255,255,255,.85);
    text-shadow: 0 0 8px #fff;
    animation: twinkle 2.2s ease-in-out infinite;
    pointer-events: none;
}
.sparkle.s1 { top: 12%; left: 16%; font-size: 13px; }
.sparkle.s2 { top: 28%; right: 14%; font-size: 10px; animation-delay: .7s; }
.sparkle.s3 { bottom: 18%; left: 22%; font-size: 11px; animation-delay: 1.4s; }
@keyframes twinkle {
    0%, 100% { opacity: .25; transform: scale(.8); }
    50%      { opacity: 1;   transform: scale(1.15); }
}

/* small coin decoration */
.coin-deco {
    position: absolute;
    bottom: 8%; right: 12%;
    font-size: 20px;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,.5));
    animation: float 4s ease-in-out infinite reverse;
}

/* badge polish */
.badge {
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(4px);
    color: #ffd700;
    font-size: 13px; font-weight: 800;
    padding: 3px 9px;
    border-radius: 7px;
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
    margin-left: auto;
}
.card-top { display: flex; }

/* name polish */
.game-name {
    font-size: 15px; font-weight: 800;
    letter-spacing: .5px;
    text-shadow: 0 2px 6px rgba(0,0,0,.6);
    position: relative; z-index: 2;
}
.card-bottom { position: relative; z-index: 2; }

/* ── v4: AUTH BUTTONS & AVATAR ── */
.auth-btns {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.btn-signin {
    padding: 9px 18px;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--text);
    font-size: 13px; font-weight: 700;
    text-decoration: none;
}
.btn-signup {
    padding: 9px 18px;
    background: var(--green);
    border-radius: 9px;
    color: #000;
    font-size: 13px; font-weight: 800;
    text-decoration: none;
}
.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--green);
    text-decoration: none;
    overflow: hidden;
}
.user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.welcome-toast {
    margin: 10px 12px 0;
    background: rgba(36,238,137,.12);
    border: 1px solid rgba(36,238,137,.4);
    color: var(--green);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.5;
}

/* ── v5: topbar fit for 5 icons on small screens ── */
@media (max-width: 420px) {
    .topbar { gap: 6px; padding: 10px 8px; }
    .wallet-pill { padding: 5px 5px 5px 9px; gap: 5px; }
    .wallet-amount { font-size: 12px; }
    .icon-btn { width: 34px; height: 34px; font-size: 14px; border-radius: 9px; }
    .topbar-icons { gap: 5px; }
    .add-btn { width: 25px; height: 25px; font-size: 16px; }
}

/* ── v6: SELECT CURRENCY BOTTOM SHEET ── */
.sheet-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.65);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
    z-index: 190;
}
.sheet-overlay.open { opacity: 1; pointer-events: auto; }

.currency-sheet {
    position: fixed;
    left: 50%; bottom: 0;
    transform: translate(-50%, 100%);
    width: 100%; max-width: 480px;
    max-height: 82vh;
    background: #1c1d21;
    border-radius: 20px 20px 0 0;
    z-index: 200;
    transition: transform .3s cubic-bezier(.22,1,.36,1);
    display: flex;
    flex-direction: column;
    padding: 10px 16px 16px;
}
.currency-sheet.open { transform: translate(-50%, 0); }

.sheet-handle {
    width: 44px; height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 4px auto 14px;
}
.sheet-title {
    text-align: center;
    font-size: 19px; font-weight: 800;
    margin-bottom: 16px;
}

.sheet-search-row { display: flex; gap: 10px; margin-bottom: 14px; }
.sheet-search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
}
.sheet-search span { color: var(--muted); font-size: 14px; }
.sheet-search input {
    flex: 1;
    background: none; border: none; outline: none;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
}
.sheet-search input::placeholder { color: var(--muted); }
.sheet-sort {
    width: 48px;
    background: var(--panel);
    border: none; border-radius: 12px;
    color: var(--text);
    font-size: 17px;
    cursor: pointer;
}

.currency-list { flex: 1; overflow-y: auto; }
.currency-group {
    font-size: 14px; font-weight: 700;
    color: var(--muted);
    margin: 14px 0 6px;
}
.currency-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 10px;
    border-radius: 12px;
    cursor: pointer;
}
.currency-item:active, .currency-item.selected { background: var(--panel); }
.cur-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 16px; font-weight: 800;
    flex-shrink: 0;
}
.cur-name { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.cur-info { color: var(--green); font-size: 13px; font-weight: 400; }
.cur-amounts { margin-left: auto; text-align: right; }
.cur-main { font-size: 15px; font-weight: 700; }
.cur-sub  { font-size: 13px; color: var(--muted); margin-top: 2px; }

.sheet-footer { border-top: 1px solid var(--border); padding-top: 13px; margin-top: 8px; }
.sheet-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 13px;
    font-size: 14px;
    color: var(--text);
}
.view-currency { color: var(--text); font-weight: 500; }
.hide-small { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.toggle {
    width: 46px; height: 26px;
    background: var(--green);
    border-radius: 13px;
    position: relative;
    cursor: pointer;
    transition: background .2s;
    display: inline-block;
}
.toggle.off { background: var(--border); }
.toggle-knob {
    position: absolute;
    top: 3px; right: 3px;
    width: 20px; height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: all .2s;
}
.toggle.off .toggle-knob { right: 23px; }

.sheet-deposit {
    width: 100%;
    background: var(--panel);
    border: none;
    border-radius: 12px;
    padding: 15px;
    color: var(--text);
    font-size: 15px; font-weight: 700;
    cursor: pointer;
}
