/* ASGames - Official Look & Style System */
:root {
    --bg-dark: #121626;
    --bg-card: #1c223c;
    --bg-card-subtle: #242c4c;
    --bg-card-hover: #2b355a;
    --border-color: #2e3860;
    
    --primary-gold: #f5c443;
    --gold-gradient: linear-gradient(135deg, #fae59f 0%, #c4933f 100%);
    --gold-gradient-btn: linear-gradient(180deg, #f7d268 0%, #b8832a 100%);
    
    --color-green: #10b981;
    --color-red: #ef4444;
    --color-violet: #8b5cf6;
    --color-big: #f59e0b;
    --color-small: #3b82f6;

    --gradient-green: linear-gradient(135deg, #34d399 0%, #059669 100%);
    --gradient-red: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
    --gradient-violet: linear-gradient(135deg, #a78bfa 0%, #7c3aed 100%);
    --gradient-red-violet: linear-gradient(90deg, #ef4444 50%, #8b5cf6 50%);
    --gradient-green-violet: linear-gradient(90deg, #10b981 50%, #8b5cf6 50%);

    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 15px rgba(245, 196, 67, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

body {
    background-color: #0b0e1a;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    overflow-x: hidden;
}

/* App Mobile Shell Container */
#app {
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    background-color: var(--bg-dark);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 10px rgba(245, 196, 67, 0.15);
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 75px; /* bottom bar spacing */
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Top App Header */
.app-header {
    background: linear-gradient(180deg, #1e2646 0%, #161b34 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.brand-box {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-icon {
    font-size: 24px;
    filter: drop-shadow(0 0 8px rgba(245, 196, 67, 0.6));
}

.brand-title {
    font-size: 20px;
    font-weight: 800;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.5px;
}

.brand-badge {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--color-green);
    color: var(--color-green);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ping-tag {
    font-size: 11px;
    color: var(--color-green);
    background: rgba(16, 185, 129, 0.1);
    padding: 3px 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.icon-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.icon-btn:active {
    transform: scale(0.92);
}

/* Header Balance Card */
.header-balance-card {
    background: linear-gradient(135deg, #242c50 0%, #1a203c 100%);
    border: 1px solid rgba(250, 229, 159, 0.25);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.balance-info {
    display: flex;
    flex-direction: column;
}

.balance-label-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.balance-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-refresh {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    opacity: 0.8;
    transition: transform 0.3s;
}

.btn-refresh.spin-anim {
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.balance-value {
    font-size: 20px;
    font-weight: 700;
    color: #ffd875;
    letter-spacing: 0.5px;
}

.balance-btns {
    display: flex;
    gap: 8px;
}

.btn-deposit {
    background: var(--gold-gradient-btn);
    color: #2b1704;
    font-weight: 700;
    font-size: 12px;
    padding: 7px 14px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(245, 196, 67, 0.4);
    transition: transform 0.1s;
}

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

.btn-withdraw {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    padding: 7px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-withdraw:active {
    background: rgba(255, 255, 255, 0.2);
}

/* Announcement Notice Marquee */
.notice-marquee-bar {
    display: flex;
    align-items: center;
    background: #181d33;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-color);
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.marquee-icon {
    font-size: 14px;
    color: var(--primary-gold);
}

.marquee-content {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
}

.marquee-text {
    display: inline-block;
    animation: marqueeScroll 22s linear infinite;
    padding-left: 100%;
}

@keyframes marqueeScroll {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Main Promo Banner Carousel */
.promo-carousel-container {
    padding: 12px 14px;
}

.promo-banner-card {
    background: linear-gradient(135deg, #372a72 0%, #1e1b4b 50%, #4c1d95 100%);
    border-radius: 14px;
    padding: 18px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(167, 139, 250, 0.3);
    box-shadow: 0 4px 18px rgba(76, 29, 149, 0.3);
    position: relative;
    overflow: hidden;
}

.promo-banner-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(250, 229, 159, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.promo-text h3 {
    font-size: 16px;
    font-weight: 700;
    color: #fae59f;
    margin-bottom: 4px;
}

.promo-text p {
    font-size: 12px;
    color: #e2e8f0;
}

.promo-btn-mini {
    background: var(--gold-gradient-btn);
    color: #2b1704;
    border: none;
    padding: 6px 12px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 700;
    margin-top: 8px;
    cursor: pointer;
}

.promo-graphic {
    font-size: 42px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

/* Category Filter Pills */
.category-filter-nav {
    display: flex;
    overflow-x: auto;
    padding: 6px 14px 12px;
    gap: 8px;
    scrollbar-width: none;
}

.category-filter-nav::-webkit-scrollbar {
    display: none;
}

.cat-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cat-pill.active {
    background: linear-gradient(135deg, #f5c443 0%, #c4933f 100%);
    color: #1a1505;
    border-color: #fae59f;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(245, 196, 67, 0.35);
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 0 14px 16px;
}

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 145px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
}

.game-card:active {
    transform: scale(0.97);
}

.game-card:hover {
    border-color: rgba(245, 196, 67, 0.5);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.game-badge-hot {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.game-badge-new {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
}

.game-icon-large {
    font-size: 40px;
    margin: 8px 0;
    text-align: center;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.game-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.game-sub {
    font-size: 10px;
    color: var(--text-secondary);
}

.btn-play-mini {
    background: var(--gold-gradient);
    color: #2b1704;
    font-weight: 700;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
}

/* Card Themes */
.card-wingo {
    background: linear-gradient(145deg, #1e2544 0%, #151a32 100%);
    border-left: 3px solid #10b981;
}

.card-aviator {
    background: linear-gradient(145deg, #2c1a24 0%, #1b1218 100%);
    border-left: 3px solid #ef4444;
}

.card-mines {
    background: linear-gradient(145deg, #182838 0%, #101c28 100%);
    border-left: 3px solid #06b6d4;
}

.card-k3 {
    background: linear-gradient(145deg, #2d2618 0%, #1e1910 100%);
    border-left: 3px solid #f59e0b;
}

.card-5d {
    background: linear-gradient(145deg, #241b38 0%, #191228 100%);
    border-left: 3px solid #8b5cf6;
}

.card-slots {
    background: linear-gradient(145deg, #2a1820 0%, #1a1015 100%);
    border-left: 3px solid #ec4899;
}

/* Live Winning Feed Section */
.winning-feed-section {
    padding: 12px 14px 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-title {
    font-size: 14px;
    font-weight: 700;
    color: #fae59f;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ticker-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 8px;
    overflow: hidden;
}

.ticker-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 12px;
}

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

.ticker-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #2e3860;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-right: 8px;
}

.ticker-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ticker-name {
    font-weight: 600;
    color: #e2e8f0;
}

.ticker-game {
    font-size: 10px;
    color: var(--text-muted);
}

.ticker-win {
    font-weight: 700;
    color: var(--primary-gold);
}

/* Today's Earnings Leaderboard */
.rank-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 16px;
    padding: 0 10px;
}

.podium-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    position: relative;
}

.podium-1 {
    order: 2;
    height: 140px;
    border-color: #fae59f;
    background: linear-gradient(180deg, #2b2414 0%, #1c223c 100%);
    box-shadow: 0 0 15px rgba(250, 229, 159, 0.2);
}

.podium-2 {
    order: 1;
    height: 120px;
}

.podium-3 {
    order: 3;
    height: 110px;
}

.crown-badge {
    position: absolute;
    top: -12px;
    font-size: 18px;
}

.podium-avatar {
    font-size: 26px;
    margin-top: 4px;
}

.podium-name {
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    color: #e2e8f0;
}

.podium-amount {
    font-size: 10px;
    font-weight: 700;
    color: var(--primary-gold);
    margin-top: 4px;
}

/* ======================================================== */
/* GAME VIEW: WIN GO SCREEN                                 */
/* ======================================================== */
.game-view {
    padding: 0 14px 20px;
}

.game-subnav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    margin-bottom: 10px;
}

.btn-back-home {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.game-header-title {
    font-size: 16px;
    font-weight: 700;
    color: #fae59f;
}

/* Win Go Mode Selector */
.wingo-mode-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.mode-tab {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 4px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.2s;
}

.mode-tab.active {
    background: var(--gold-gradient);
    color: #2b1704;
    border-color: #fae59f;
    font-weight: 700;
}

/* Win Go Issue & Clock Card */
.wingo-clock-card {
    background: linear-gradient(135deg, #222b4d 0%, #161c36 100%);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}

.period-box {
    display: flex;
    flex-direction: column;
}

.period-title {
    font-size: 11px;
    color: var(--text-secondary);
}

.period-number {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.timer-box-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.timer-title {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.timer-digits {
    display: flex;
    align-items: center;
    gap: 3px;
}

.timer-box {
    background: #0f1324;
    border: 1px solid #333f6e;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
    min-width: 24px;
    text-align: center;
}

.timer-sep {
    font-size: 18px;
    font-weight: 700;
    color: #f5c443;
}

.urgent-pulse .timer-box {
    background: #7f1d1d;
    border-color: #ef4444;
    color: #fee2e2;
    animation: urgentPulseAnim 0.5s infinite alternate;
}

@keyframes urgentPulseAnim {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

/* Betting Board */
.betting-board {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
}

/* Locked Overlay */
.lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 19, 36, 0.92);
    border-radius: 16px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.lock-clock-icon {
    font-size: 38px;
    margin-bottom: 8px;
    animation: urgentPulseAnim 0.6s infinite alternate;
}

.lock-title {
    font-size: 16px;
    font-weight: 700;
    color: #ef4444;
}

.lock-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 3-Color Buttons */
.color-buttons-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.btn-bet-color {
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: 12px 6px;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.1s, filter 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

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

.btn-bet-color .btn-name {
    font-size: 13px;
    font-weight: 700;
}

.btn-bet-color .btn-payout {
    font-size: 10px;
    opacity: 0.9;
    margin-top: 2px;
}

.btn-green {
    background: var(--gradient-green);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-violet {
    background: var(--gradient-violet);
    box-shadow: 0 4px 14px rgba(139, 92, 246, 0.4);
}

.btn-red {
    background: var(--gradient-red);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

/* Number Buttons Grid (0-9) */
.numbers-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.btn-number {
    border: none;
    border-radius: 50%;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s;
}

.btn-number:active {
    transform: scale(0.92);
}

.btn-number span.num-payout {
    font-size: 8px;
    font-weight: 500;
    opacity: 0.85;
}

/* Number specific color backgrounds */
.num-0 { background: var(--gradient-red-violet); }
.num-1, .num-3, .num-7, .num-9 { background: var(--gradient-green); }
.num-2, .num-4, .num-6, .num-8 { background: var(--gradient-red); }
.num-5 { background: var(--gradient-green-violet); }

/* Big / Small Row */
.size-buttons-row {
    display: flex;
    gap: 10px;
}

.btn-size {
    flex: 1;
    border: none;
    border-radius: 12px;
    padding: 10px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.1s;
}

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

.btn-size small {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.9;
}

.btn-big {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.btn-small {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

/* Win Go Tabs (Game Record, Chart Trend, My Bets) */
.wingo-history-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
}

.wingo-nav-tab {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 10px 0;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    position: relative;
}

.wingo-nav-tab.active {
    color: #fae59f;
    font-weight: 700;
}

.wingo-nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 20%;
    right: 20%;
    height: 3px;
    background: var(--gold-gradient);
    border-radius: 3px;
}

/* Tables */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.custom-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: center;
}

.custom-table th {
    background: #181e35;
    color: var(--text-secondary);
    padding: 10px 6px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.custom-table td {
    padding: 10px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

.number-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 12px;
    color: #fff;
}

.ball-green { background: var(--gradient-green); }
.ball-red { background: var(--gradient-red); }
.ball-red-violet { background: var(--gradient-red-violet); }
.ball-green-violet { background: var(--gradient-green-violet); }

.dots-wrapper {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.dot-ball {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot-green { background: var(--color-green); }
.dot-red { background: var(--color-red); }
.dot-violet { background: var(--color-violet); }

.text-big { color: var(--color-big); }
.text-small { color: var(--color-small); }

/* Trend Chart */
.trend-grid-wrapper {
    display: flex;
    overflow-x: auto;
    padding: 14px 10px;
    gap: 8px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.trend-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.trend-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.trend-size {
    font-size: 11px;
    font-weight: 700;
}

/* My Bets List */
.bets-list-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bet-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 14px;
}

.bet-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.bet-status {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
}

.badge-won {
    background: rgba(16, 185, 129, 0.2);
    color: var(--color-green);
    border: 1px solid var(--color-green);
}

.badge-lost {
    background: rgba(239, 68, 68, 0.2);
    color: var(--color-red);
    border: 1px solid var(--color-red);
}

.badge-pending {
    background: rgba(245, 196, 67, 0.2);
    color: var(--primary-gold);
    border: 1px solid var(--primary-gold);
}

.bet-card-body {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.text-win { color: var(--color-green); font-weight: 700; }
.text-loss { color: var(--color-red); font-weight: 700; }

.empty-state {
    padding: 30px 10px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ======================================================== */
/* WIN GO BET MODAL (BOTTOM DRAWER)                         */
/* ======================================================== */
.bottom-sheet-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.bottom-sheet-content {
    background: #181d33;
    border-top: 2px solid var(--border-color);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 480px;
    padding: 18px 16px 24px;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.7);
    animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.drawer-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.modal-bet-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.btn-drawer-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
}

.drawer-section-title {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.pills-selector-row {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.btn-pill {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 8px 4px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
}

.btn-pill.active {
    background: var(--gold-gradient);
    color: #2b1704;
    border-color: #fae59f;
    font-weight: 700;
}

.stepper-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.btn-step {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: #fff;
    height: 36px;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    font-size: 14px;
}

.drawer-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 10px 14px;
    background: var(--bg-card);
    border-radius: 10px;
}

.summary-total {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-gold);
}

.drawer-actions-row {
    display: flex;
    gap: 10px;
}

.btn-drawer-cancel {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 12px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}

.btn-drawer-confirm {
    flex: 2;
    background: var(--gold-gradient-btn);
    border: none;
    color: #2b1704;
    padding: 12px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(245, 196, 67, 0.4);
}

/* Draw Reveal Popup Animation */
.draw-reveal-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 250;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reveal-content {
    background: linear-gradient(135deg, #251c4a 0%, #15182e 100%);
    border: 2px solid var(--primary-gold);
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 0 30px rgba(245, 196, 67, 0.4);
    animation: zoomPop 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

@keyframes zoomPop {
    from { transform: scale(0.6); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.reveal-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.ball-result {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.reveal-meta {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.badge-ball {
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
}

.bg-green { background: var(--color-green); }
.bg-red { background: var(--color-red); }
.bg-violet { background: var(--color-violet); }
.bg-red-violet { background: var(--gradient-red-violet); }
.bg-green-violet { background: var(--gradient-green-violet); }
.bg-big { background: var(--color-big); }
.bg-small { background: var(--color-small); }

/* ======================================================== */
/* GAME VIEW: AVIATOR SCREEN                                */
/* ======================================================== */
.aviator-history-bar {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding: 8px 0;
    margin-bottom: 10px;
    scrollbar-width: none;
}

.aviator-pill {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.pill-blue { background: #1e3a8a; color: #93c5fd; }
.pill-green { background: #065f46; color: #6ee7b7; }
.pill-purple { background: #581c87; color: #d8b4fe; }

.aviator-radar-container {
    background: #0f1322;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    height: 240px;
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
}

#aviator-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.aviator-live-multiplier {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 42px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.aviator-controls-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 14px;
}

.aviator-bet-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.btn-aviator {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    transition: transform 0.1s;
}

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

.btn-aviator span {
    letter-spacing: 0.5px;
}

.btn-aviator small {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.9;
    margin-top: 2px;
}

.btn-bet {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-cashout {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.6);
}

.btn-waiting {
    background: #334155;
    color: #94a3b8;
    cursor: not-allowed;
}

.btn-disabled {
    background: #1e293b;
    color: #64748b;
    cursor: not-allowed;
}

.btn-crashed {
    background: #7f1d1d;
    color: #fca5a5;
    cursor: not-allowed;
}

/* ======================================================== */
/* GAME VIEW: MINES SCREEN                                  */
/* ======================================================== */
.mines-stats-bar {
    display: flex;
    justify-content: space-around;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 14px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 10px;
    color: var(--text-secondary);
}

.stat-val {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-gold);
}

.mines-grid-container {
    background: #0f1322;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 12px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.mine-tile {
    aspect-ratio: 1;
    background: #1e2646;
    border: 1px solid #2e3860;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    cursor: pointer;
    transition: transform 0.15s, background-color 0.2s;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

.mine-tile:hover {
    background: #253056;
}

.mine-tile:active {
    transform: scale(0.92);
}

.mine-tile.revealed {
    cursor: default;
    transform: none;
}

.mine-tile.is-gem {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
    border-color: #34d399;
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.4);
    animation: zoomPop 0.2s;
}

.mine-tile.is-bomb {
    background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 100%);
    border-color: #f87171;
    box-shadow: 0 0 15px rgba(248, 113, 113, 0.6);
    animation: shake 0.3s;
}

.mine-tile.dimmed {
    opacity: 0.4;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* ======================================================== */
/* GAME VIEW: K3 LOTTERY                                    */
/* ======================================================== */
.k3-cup-area {
    background: radial-gradient(circle, #252e50 0%, #0f1322 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}

.dice-row {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.k3-die {
    width: 48px;
    height: 48px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 0 4px rgba(0, 0, 0, 0.2);
    display: grid;
    padding: 6px;
    position: relative;
}

.shaking .k3-die {
    animation: diceShake 0.4s infinite alternate;
}

@keyframes diceShake {
    0% { transform: rotate(-15deg) scale(0.9); }
    100% { transform: rotate(15deg) scale(1.1); }
}

.mini-dice-row {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.mini-die {
    background: #fff;
    color: #111;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

/* ======================================================== */
/* ACTIVITY TAB: CHECK-IN & WHEEL                           */
/* ======================================================== */
.activity-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}

.checkin-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.checkin-day-card {
    background: #181d33;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 4px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.checkin-day-card.claimed {
    border-color: var(--color-green);
    background: rgba(16, 185, 129, 0.1);
}

.checkin-day-card.current {
    border-color: var(--primary-gold);
    background: rgba(245, 196, 67, 0.15);
}

.reward-coin {
    font-size: 20px;
    margin: 4px 0;
}

.reward-amt {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-gold);
}

.day-status {
    font-size: 9px;
    color: var(--text-muted);
}

/* Lucky Wheel */
.wheel-container {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 16px auto;
}

.wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid var(--primary-gold);
    background: conic-gradient(
        #ef4444 0deg 45deg,
        #f59e0b 45deg 90deg,
        #10b981 90deg 135deg,
        #06b6d4 135deg 180deg,
        #3b82f6 180deg 225deg,
        #8b5cf6 225deg 270deg,
        #ec4899 270deg 315deg,
        #f97316 315deg 360deg
    );
    box-shadow: 0 0 20px rgba(245, 196, 67, 0.3);
}

.wheel-pointer {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}

/* ======================================================== */
/* BOTTOM TAB BAR                                           */
/* ======================================================== */
.tabbar-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    background: #141829;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    z-index: 100;
}

.tabbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 10px;
    font-weight: 500;
    gap: 3px;
    transition: color 0.15s;
    position: relative;
}

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

.tabbar-icon {
    font-size: 20px;
}

.badge-dot {
    position: absolute;
    top: -2px;
    right: 4px;
    background: #ef4444;
    color: #fff;
    font-size: 8px;
    padding: 1px 4px;
    border-radius: 8px;
    font-weight: 700;
}

/* ======================================================== */
/* TOASTS & CELEBRATION MODAL                               */
/* ======================================================== */
#toast-container {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    width: 90%;
    max-width: 400px;
}

.custom-toast {
    background: rgba(22, 27, 48, 0.95);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.toast-success { border-color: var(--color-green); }
.toast-error { border-color: var(--color-red); }
.toast-warning { border-color: var(--color-big); }

.animate-slide-down {
    animation: toastIn 0.25s ease-out forwards;
}

.toast-fadeout {
    animation: toastOut 0.35s ease-in forwards;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-15px); }
}

/* Win Celebration Modal */
.win-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 350;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.win-modal-card {
    background: linear-gradient(135deg, #2b1f4a 0%, #161a32 100%);
    border: 2px solid var(--primary-gold);
    border-radius: 20px;
    padding: 26px 20px;
    text-align: center;
    width: 85%;
    max-width: 360px;
    box-shadow: 0 0 35px rgba(245, 196, 67, 0.5);
    animation: zoomPop 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.win-trophy-icon {
    font-size: 54px;
    margin-bottom: 8px;
    animation: trophyGlow 1.2s infinite alternate;
}

@keyframes trophyGlow {
    from { filter: drop-shadow(0 0 8px rgba(245, 196, 67, 0.4)); }
    to { filter: drop-shadow(0 0 20px rgba(245, 196, 67, 0.9)); }
}

.win-title {
    font-size: 18px;
    font-weight: 800;
    color: #fae59f;
    margin-bottom: 6px;
}

.win-amount-text {
    font-size: 32px;
    font-weight: 900;
    color: #ffd875;
    margin-bottom: 6px;
}

.win-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.btn-win-claim {
    background: var(--gold-gradient-btn);
    border: none;
    color: #2b1704;
    font-size: 14px;
    font-weight: 800;
    padding: 12px 28px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(245, 196, 67, 0.5);
}

/* Modals general */
.center-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 250;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(3px);
}

.modal-dialog {
    background: #181d33;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.input-group {
    margin-bottom: 14px;
}

.input-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    background: #0f1322;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-gold);
}

.quick-amounts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.recharge-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 8px;
    border-radius: 8px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.recharge-pill.active {
    background: var(--gold-gradient);
    color: #2b1704;
    border-color: #fae59f;
}

.btn-full {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

.btn-gold {
    background: var(--gold-gradient-btn);
    color: #2b1704;
}

/* User Account View */
.account-profile-card {
    background: linear-gradient(135deg, #232c52 0%, #161b34 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #2e3860;
    border: 2px solid var(--primary-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-uid {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.vip-badge-pill {
    background: var(--gold-gradient);
    color: #2b1704;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 4px;
    width: fit-content;
}

.stats-grid-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.stat-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 6px;
    text-align: center;
}

.stat-box-num {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-gold);
    margin-bottom: 2px;
}

.stat-box-lbl {
    font-size: 10px;
    color: var(--text-secondary);
}

.menu-list-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
}

.menu-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    font-size: 13px;
}

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