:root {
    --bg-main: #101112;
    --bg-panel: #1b1c1d;
    --bg-panel-header: #141516;
    --bg-control: #252528;
    --border-color: #2c2d2e;
    
    --primary: #cb011a; /* Aviator Red */
    --primary-hover: #e21a22;
    
    --success: #2c9d05; /* Spribe Green */
    --success-hover: #33b307;
    
    --warning: #d56d0d; /* Spribe Cashout Orange */
    --warning-hover: #e87b15;
    
    --text-main: #ffffff;
    --text-muted: #808080;
    --text-dark: #505050;
    
    --font-text: 'Inter', sans-serif;
    --font-numbers: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-text);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* Header */
.game-header {
    height: 46px;
    background-color: var(--bg-panel-header);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    flex-shrink: 0;
    z-index: 100;
}

.logo-img {
    height: 90px;
    width: auto;
    display: block;
    object-fit: contain;
}

.partner-logo-img {
    height: 78px;
    width: auto;
    display: block;
    object-fit: contain;
}

.menu-line {
    width: 18px;
    height: 2px;
    background-color: var(--text-main);
    display: block;
    margin: 3px 0;
}

.btn-menu {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.balance-display {
    display: flex;
    align-items: center;
    font-family: var(--font-numbers);
    gap: 4px;
}

#balance {
    color: var(--success);
    font-weight: 800;
    font-size: 16px;
}

.balance-currency {
    color: var(--text-main);
    font-size: 12px;
    font-weight: 600;
}

/* Main Workspace */
.main-workspace {
    flex: 1;
    display: flex;
    min-height: 0;
}

/* Sidebar styling */
.sidebar {
    width: 320px;
    background-color: var(--bg-panel-header);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-tabs {
    display: flex;
    padding: 8px;
    gap: 4px;
    background-color: #101010;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 12px;
    padding: 6px 0;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.sidebar-tab.active {
    color: var(--text-main);
    background: var(--bg-control);
}

.tab-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.stats-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: #141414;
    border-bottom: 1px solid var(--border-color);
    height: 48px;
}

.stat-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-coins-icon {
    font-size: 16px;
}

.stat-stacked {
    display: flex;
    flex-direction: column;
}

.stat-bets-num {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.1;
}

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

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

.stat-win-num {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

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

.bets-list-header {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr 1.3fr;
    padding: 6px 16px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    background-color: #101010;
}

.scrollable {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
}

.scrollable::-webkit-scrollbar {
    display: none;
}

.bets-list {
    padding: 2px 0;
    background-color: #141414;
    height: 100%;
}

.bet-row {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1fr 1.3fr;
    padding: 8px 16px;
    font-size: 11px;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.01);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #e5e5e5;
}

.user-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #202020;
    border: 1px solid #303030;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: var(--text-muted);
}

.bet-cell {
    font-family: var(--font-numbers);
    font-weight: 600;
    color: #bfbfbf;
}

.mult-cell {
    font-family: var(--font-numbers);
    font-weight: 700;
}

.mult-cell.cashed-out {
    color: var(--success);
}

.mult-cell.waiting-out {
    color: var(--text-dark);
}

.payout-cell {
    font-family: var(--font-numbers);
    font-weight: 800;
    text-align: right;
    color: var(--text-dark);
}

.payout-cell.win {
    color: var(--success);
}

/* Sidebar Footer */
.sidebar-footer {
    height: 38px;
    background-color: #0f1011;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    font-size: 10px;
    flex-shrink: 0;
}

.sidebar-footer .provably-fair {
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sidebar-footer .provably-fair:hover {
    color: var(--text-main);
}

.powered-by {
    color: var(--text-dark);
}

.spribe-logo {
    color: var(--text-muted);
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* Content Area */
.content-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 8px;
    gap: 8px;
    min-width: 0;
}

/* History Bar */
.history-bar {
    height: 32px;
    background-color: #101010;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    gap: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.history-list {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
    align-items: center;
    padding-right: 32px;
}

.history-list::-webkit-scrollbar {
    display: none;
}

.history-item {
    font-size: 11.5px;
    font-family: var(--font-numbers);
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.history-item.low {
    color: #3fb0f3; /* Spribe blue */
}

.history-item.mid {
    color: #9156fa; /* Spribe purple */
}

.history-item.high {
    color: #c2389a; /* Spribe pink */
}

.history-dropdown-btn {
    position: absolute;
    right: 8px;
    background: #1c1c1e;
    border: 1px solid #303030;
    color: var(--text-muted);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    cursor: pointer;
    outline: none;
    z-index: 15;
}

.history-dropdown-btn:hover {
    color: var(--text-main);
    background: #252528;
}

/* Flight Canvas Zone */
.game-area {
    flex: 1;
    position: relative;
    background-color: #000000;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    min-height: 200px;
}

.fun-mode-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background-color: #d08300;
    color: #000;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    pointer-events: none;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.multiplier-container {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    z-index: 10;
}

.flew-away-text {
    font-family: var(--font-numbers);
    font-size: 13px;
    font-weight: 800;
    color: var(--primary-hover);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 2px;
    text-shadow: 0 0 15px rgba(226, 26, 34, 0.45);
}

.multiplier-display {
    font-size: 68px;
    font-family: var(--font-numbers);
    font-weight: 900;
    color: var(--text-main);
    text-shadow: 0 4px 12px rgba(0,0,0,0.8);
    line-height: 1;
}

.waiting-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    z-index: 20;
    pointer-events: none;
    text-align: center;
}

/* UFC Partners Banner */
.partners-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.partners-logos {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ufc-logo {
    color: #e21a22;
    font-size: 26px;
    font-weight: 950;
    font-style: italic;
    letter-spacing: -1.5px;
    line-height: 1;
}

.partners-divider {
    color: #3e3e42;
    font-size: 22px;
    font-weight: 300;
}

.aviator-partner-logo {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #e21a22;
}

.partner-plane-icon {
    font-size: 16px;
    transform: rotate(45deg);
    display: inline-block;
}

.partner-aviator-text {
    font-family: var(--font-numbers);
    font-size: 18px;
    font-weight: 850;
    font-style: italic;
    letter-spacing: -0.5px;
}

.partners-label {
    font-size: 8.5px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: 2px;
    margin-top: 1px;
}

/* Red Progress Loading Bar */
.loading-bar-container {
    width: 210px;
    height: 3.5px;
    background-color: #232328;
    border-radius: 4px;
    overflow: hidden;
    margin: 4px 0;
}

.loading-line {
    width: 0%;
    height: 100%;
    background-color: #e21a22;
    border-radius: 4px;
    transition: width 0.1s linear;
}

/* SPRIBE Badge Card */
.spribe-badge {
    background-color: rgba(20, 20, 20, 0.4);
    border: 1.5px solid rgba(44, 157, 5, 0.25);
    border-radius: 12px;
    padding: 6px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 120px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.spribe-badge-title {
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.spribe-icon-s {
    color: #ffffff;
    font-weight: 900;
    font-family: 'Outfit', sans-serif;
    opacity: 0.85;
}

.spribe-badge-cert {
    font-size: 9px;
    color: #2c9d05;
    background-color: rgba(44, 157, 5, 0.1);
    border: 1px solid rgba(44, 157, 5, 0.2);
    border-radius: 10px;
    padding: 1px 6px;
    margin-top: 4px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 3px;
}

.cert-check {
    font-weight: 900;
}

.spribe-badge-year {
    font-size: 8px;
    color: var(--text-muted);
    margin-top: 3px;
    font-weight: 500;
}

/* Translucent active player count overlay in canvas */
.canvas-active-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background-color: rgba(20, 20, 20, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 3px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    z-index: 15;
}

.badge-coins {
    font-size: 12px;
}

#activeCount {
    font-family: var(--font-numbers);
    font-size: 11px;
    color: #e5e5e5;
    font-weight: 700;
}

/* Betting Workspace */
.betting-workspace {
    display: flex;
    gap: 8px;
    height: 140px;
    flex-shrink: 0;
}

.bet-panel {
    flex: 1;
    background-color: var(--bg-panel);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    padding: 8px 12px;
    position: relative;
}

.panel-header {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
    position: relative;
}

.bet-modes {
    display: flex;
    background-color: #101010;
    padding: 2px;
    border-radius: 12px;
}

.mode-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 18px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.mode-tab.active {
    color: var(--text-main);
    background: var(--bg-control);
}

.btn-panel-special {
    position: absolute;
    right: 8px;
    top: 8px;
    background: #202225;
    border: none;
    color: #888888;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-panel-special:hover {
    background: #2c2f33;
    color: #ffffff;
}

.panel-body {
    flex: 1;
    display: flex;
    gap: 10px;
    align-items: center;
}

.controls-row {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bet-control-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.input-adjuster {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #141518;
    border-radius: 20px;
    height: 30px;
    padding: 0 4px;
}

.input-adjuster input {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-numbers);
    font-size: 14px;
    font-weight: 800;
    text-align: center;
    width: 100%;
    outline: none;
}

.input-adjuster input::-webkit-inner-spin-button,
.input-adjuster input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.btn-adjust {
    background: #25262a;
    border: none;
    color: #888888;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: bold;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-adjust:hover {
    color: #ffffff;
    background: #32343a;
}

.btn-adjust.minus::after {
    content: "-";
    font-size: 14px;
    line-height: 1;
}

.btn-adjust.plus::before, .btn-adjust.plus::after {
    display: none;
}
.btn-adjust.plus::after {
    content: "+";
    display: block;
    font-size: 13px;
    line-height: 1;
}

.quick-selectors-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 4px;
}

.quick-selectors-grid button {
    background: #141518;
    border: none;
    color: #999999;
    font-family: var(--font-numbers);
    font-size: 11px;
    font-weight: 700;
    height: 22px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.quick-selectors-grid button:hover {
    color: var(--text-main);
    background: #222428;
}

/* Green Spribe Bet Button */
.btn-bet {
    flex: 1.2;
    height: 100%;
    min-height: 60px;
    max-height: 72px;
    background: linear-gradient(180deg, #32cd32 0%, #28a745 100%);
    border: 1px solid #45e813;
    border-radius: 14px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    transition: all 0.15s ease;
}

.btn-bet:hover {
    background: linear-gradient(180deg, #3ce43c 0%, #2dbd4f 100%);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.45);
}

.btn-bet .btn-title {
    font-family: var(--font-text);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
}

.btn-bet .btn-sub {
    font-family: var(--font-numbers);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 2px;
}

/* Cancel State (Waiting betting countdown - Red) */
.btn-bet.waiting {
    background: linear-gradient(180deg, #e21a22 0%, #b81218 100%);
    border: 1px solid #ff4d54;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(226, 26, 34, 0.3);
}

.btn-bet.waiting:hover {
    background: linear-gradient(180deg, #ff2a33 0%, #cb151b 100%);
}

.btn-bet.waiting .btn-title {
    color: #fff;
}

/* Cashout State (Orange) */
.btn-bet.cashout {
    background: var(--warning);
}

.btn-bet.cashout:hover {
    background: var(--warning-hover);
}

.btn-bet.cashout .btn-title {
    font-size: 13px;
    font-weight: 400;
    color: #fff;
}

.btn-bet.cashout .btn-sub {
    font-size: 16px;
    font-weight: 850;
    color: #fff;
}

/* Disabled */
.btn-bet:disabled {
    background: #252528 !important;
    color: #555555 !important;
    cursor: not-allowed;
}

.btn-bet:disabled .btn-title, .btn-bet:disabled .btn-sub {
    color: #555555 !important;
}

/* How to Play Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    padding: 24px;
    position: relative;
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-content h2 {
    font-family: var(--font-numbers);
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 16px;
    text-align: center;
}

.rules-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rule-card {
    display: flex;
    gap: 12px;
    background: var(--bg-panel-header);
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 8px;
    align-items: center;
}

.rule-number {
    width: 24px;
    height: 24px;
    background: rgba(203, 1, 26, 0.15);
    border: 1px solid rgba(203, 1, 26, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-hover);
    font-family: var(--font-numbers);
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}

.rule-card p {
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-muted);
}

.rule-card p strong {
    color: var(--text-main);
}

/* Responsive Layout */
@media (max-width: 800px) {
    body {
        overflow-y: auto;
        height: auto;
    }
    
    .app-container {
        height: auto;
    }
    
    .main-workspace {
        flex-direction: column;
        height: auto;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        min-height: 440px;
        order: 2;
        border-right: none;
        border-top: 1px solid var(--border-color);
    }
    
    .bets-list {
        height: 320px !important;
        flex: none !important;
    }
    
    .content-area {
        order: 1;
        flex: none;
        height: auto;
        padding: 6px;
        gap: 6px;
    }
    
    .game-area {
        height: 260px;
        flex: none;
    }
    
    .betting-workspace {
        flex-direction: column;
        height: auto;
        gap: 6px;
    }
    
    .bet-panel {
        height: 136px;
        flex: none;
        padding: 6px 10px;
    }
    
    .panel-body {
        gap: 10px;
    }
    
    .input-adjuster {
        height: 34px;
    }
    
    .btn-adjust {
        width: 24px;
        height: 24px;
    }
    
    .quick-selectors-grid button {
        height: 22px;
        font-size: 11px;
    }
    
    .multiplier-display {
        font-size: 54px;
    }
}

/* Cashout Popup */
.cashout-popup {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(44, 157, 5, 0.95);
    border: 2px solid rgba(100, 220, 50, 0.5);
    border-radius: 16px;
    padding: 20px 40px;
    text-align: center;
    z-index: 25;
    animation: cashoutPop 0.3s ease-out;
    box-shadow: 0 4px 30px rgba(44, 157, 5, 0.5);
    pointer-events: none;
}

.cashout-popup-label {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.cashout-popup-mult {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: #fff;
}

.cashout-popup-amount {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #d4ffc0;
    margin-top: 2px;
}

@keyframes cashoutPop {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    70% { transform: translate(-50%, -50%) scale(1.05); }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* Hidden Utility Class */
.hidden {
    display: none !important;
}

/* Asset Loader */
.asset-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0e1011;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}
.asset-loader.hidden {
    opacity: 0;
    pointer-events: none;
}
.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}
.loader-logo {
    width: 200px;
    height: auto;
}
.loader-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(226, 26, 34, 0.3);
    border-top: 4px solid #e21a22;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.loader-text {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 600;
}

/* Chat Sidebar */
.chat-sidebar {
    width: 300px;
    background-color: #1b1e22;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-color);
    position: absolute;
    right: 0;
    top: 46px; /* Below header */
    height: calc(100% - 46px);
    z-index: 100;
    transition: transform 0.3s ease;
}
.chat-sidebar.hidden {
    transform: translateX(100%);
    display: flex !important; /* override hidden class just for transform animation */
}
.chat-header {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    font-weight: bold;
    color: #fff;
}
.close-chat {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}
.close-chat:hover {
    color: #fff;
}
.chat-messages {
    flex-grow: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
}
.chat-msg {
    display: flex;
    flex-direction: column;
    background-color: rgba(255,255,255,0.03);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
}
.chat-msg .user {
    color: #3fb0f3; /* Spribe blue */
    font-weight: bold;
    margin-bottom: 4px;
}
.chat-msg .text {
    color: #ddd;
}
.chat-input-area {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}
.chat-input-area input {
    flex-grow: 1;
    background-color: #2b2e32;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 8px;
    border-radius: 4px;
}
.chat-input-area button {
    background-color: var(--primary);
    color: #000;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    font-weight: bold;
    opacity: 0.5;
}

.btn-chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(27, 30, 34, 0.8);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 8px 12px;
    border-radius: 20px;
    cursor: pointer;
    z-index: 999;
    backdrop-filter: blur(5px);
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.btn-chat-toggle:hover {
    background-color: var(--primary-hover);
    color: #000;
}

/* Mobile View Tweaks */
@media (max-width: 600px) {
    .game-header {
        padding: 0 8px;
        height: 50px;
    }
    
    .logo-img {
        height: 22px;
        max-width: 80px;
    }
    
    .header-left {
        gap: 5px;
    }
    
    .btn-back-lobby {
        margin-right: 5px !important;
    }
    
    .header-right {
        gap: 6px !important;
    }
    
    .balance-display {
        gap: 2px;
    }
    
    #balance {
        font-size: 13px !important;
    }
    
    .balance-currency {
        font-size: 9px !important;
    }
    
    .btn-deposit, .btn-withdraw {
        padding: 4px 8px !important;
        font-size: 0.75rem !important;
        border-radius: 12px !important;
    }
    

    
    .sidebar {
        width: 100%;
        order: 2;
        height: auto;
        min-height: 300px;
        border-right: none;
        border-top: 1px solid var(--border-color);
    }
    
    .content-area {
        order: 1;
        height: auto;
        flex: none;
    }
    
    .game-area {
        height: 250px;
    }
    
    .betting-workspace {
        flex-direction: column;
        height: auto;
        padding: 8px;
    }
    
    .bet-panel {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .btn-panel-special {
        display: none;
    }
    
    .chat-sidebar {
        width: 100%;
        height: 100vh;
        z-index: 1000;
        top: 0;
        right: 0;
    }
}