#spend-game {
    max-width: 800px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
    text-align: center;
    position: relative;
}

#spend-game h1, #spend-game h2 {
    color: #333;
    margin-bottom: 20px;
}

.billionaire-section {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

#total-money {
    font-size: 2em;
    font-weight: bold;
    color: #fff;
    margin: 10px 0;
    background: linear-gradient(90deg,rgba(2, 0, 36, 1) 0%, rgba(9, 9, 121, 1) 35%, rgba(0, 212, 255, 1) 100%);
    padding: 10px;
    border-radius: 5px;
    position: sticky;
    top: 0;
    z-index: 10;
}

#items-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.item {
    background: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    cursor: default;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background 0.3s;
}


.item img {
    border-radius: 5px;
}

.action-buttons {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.sell {
    background: linear-gradient(180deg, #f53b82, #f53b57);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px 0 0 5px;
    cursor: pointer;
    font-weight: 600;
}

.sell:disabled {
    background: #f1f2f6;
    cursor: not-allowed;
    color:#000;
}

.qty-input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    padding: 10px;
    margin: 0 5px;
}

.buy {
    background: linear-gradient(90deg,rgba(2, 0, 36, 1) 0%, rgba(9, 9, 121, 1) 35%, rgba(0, 212, 255, 1) 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
    font-weight: 600;
}

.item.bought {
    background: #d4edda;
    animation: shake 0.5s;
}

.item.sold {
    background: #f8d7da;
    animation: shake 0.5s;
}

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

#bill-list {
    margin-top: 30px;
}

#bill-list table {
    width: 100%;
    border-collapse: collapse;
}

#bill-list th, #bill-list td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

#bill-list th {
    background: #f0f0f0;
}

#bill-total {
    font-weight: bold;
    background: #e7f3ff;
}

/* Modal CSS */
#change-billionaire {
    margin-left: 20px;
    padding: 10px 20px;
    background: linear-gradient(90deg,rgba(2, 0, 36, 1) 0%, rgba(9, 9, 121, 1) 35%, rgba(0, 212, 255, 1) 100%);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#billionaire-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 5px;
    width: 90%;
    max-width: 900px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}

#billionaire-search {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

#suggested-billionaires, #all-billionaires {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 billionaires per row */
    gap: 15px;
    padding: 10px 0;
}

.billionaire-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.billionaire-item:hover {
    background: #e7f3ff;
}

.billionaire-item img {
    width: 150px;
    height: 150px !important;
    border-radius: 50% !important;
    object-fit: cover;
    margin-bottom: 10px;
}

.billionaire-item p {
    margin: 0;
    text-align: center;
}

.billionaire-item p:first-child {
    font-weight: bold;
}

#book-section {
    text-align: center;
}

.buy-now {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(90deg,rgba(2, 0, 36, 1) 0%, rgba(9, 9, 121, 1) 35%, rgba(0, 212, 255, 1) 100%);;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
}

.buy-now:hover {
    background: #005d8f;
}

body.modal-open {
    overflow: hidden; /* Prevent body scroll when modal is open */
}

body.modal-open #total-money {
    position: static; /* Disable sticky when modal is open */
    top: auto;
}

#game-title{
    font-weight: 600;
}


.book-bill-sec{
    display: flex;
    flex-direction: row;
}