/* Force footer to bottom with 3rem gap */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.container {
    flex: 1;
}
.footer {
    margin-top: 0;
    position: relative;
    bottom: 0;
    width: calc(100% - 2rem);
    margin-left: 1rem;
    margin-right: 1rem;
}

/* WIN TEXT - actual amount number gets this gradient */
.history-amount.positive {
    font-weight: 600;
    font-size: 0.85rem;
    background: linear-gradient(180deg, #f2a93e, #e06e21);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* LOSE TEXT - actual amount number gets this gradient */
.history-amount.negative {
    font-weight: 600;
    font-size: 0.85rem;
    background: linear-gradient(180deg, #ff6c00, #ff5000);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* History row styles */
.history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1.2rem;
    font-size: 0.8rem;
    gap: 12px;
}
.history-row:hover { background: #222248; }
.history-badge { 
    padding: 3px 10px; 
    border-radius: 20px; 
    font-size: 0.65rem; 
    font-weight: 600;
    min-width: 55px;
    text-align: center;
    flex-shrink: 0;
}
.history-badge.bet {background: #222248;color: #7e8895;}
.history-badge.win {background: #222248;color: #7e8895;}
.history-game-id {
    color: #7e8895;
    font-size: 0.7rem;
    font-family: monospace;
    background: #222248;
    padding: 2px 8px;
    border-radius: 12px;
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.history-date {
    color: #7e8895;
    font-size: 0.7rem;
    min-width: 140px;
    text-align: right;
    flex-shrink: 0;
}
.history-amount {
    font-weight: 600;
    font-size: 0.85rem;
    min-width: 70px;
    text-align: right;
    flex-shrink: 0;
}
#historyBody::-webkit-scrollbar { width: 3px; }
#historyBody::-webkit-scrollbar-track { background: #2a2a4a; }
#historyBody::-webkit-scrollbar-thumb { background: #555; border-radius: 3px; }

/* RESPONSIVE - ONLY CHANGES LAYOUT, NOT FONTS/SIZES */
@media (max-width: 700px) {
    .history-date {
        min-width: 110px;
    }
}

@media (max-width: 600px) {
    .history-row {
        flex-wrap: wrap;
        gap: 8px 12px;
    }
    
    .history-badge {
        order: 1;
    }
    
    .history-game-id {
        order: 2;
        flex: 1;
        min-width: 120px;
        white-space: normal;
        word-break: break-all;
    }
    
    .history-amount {
        order: 3;
    }
    
    .history-date {
        order: 4;
        width: 100%;
        text-align: left;
        min-width: auto;
    }
}

/* KEEP EVERYTHING THE SAME SIZE, JUST WRAP DIFFERENTLY */
@media (max-width: 480px) {
    .history-row {
        padding: 0.7rem 1rem;
    }
    
    /* All font sizes and spacings stay identical to desktop */
    .history-badge,
    .history-game-id,
    .history-date,
    .history-amount,
    .history-amount.positive,
    .history-amount.negative {
        font-size: inherit;
    }
    
    .history-date {
        width: 100%;
        text-align: left;
    }
}