body {
    font-family: Arial, sans-serif;
    background-color: #2b2b2b;
    color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    flex-direction: column;
    width: 100%;
    padding-top: 50px;
}

#control-panel,
#bet-progress-bars {
    width: 70%;
    background-color: #4a4a4a;
    padding: 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.control-group {
    margin-bottom: 10px;
}

.control-group label {
    margin-right: 10px;
}

.control-group input,
.control-group select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ccc;
    width: 100px;
}

#update-button {
    padding: 10px;
    background-color: #ff9800;
    color: #2b2b2b;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#update-button:hover {
    background-color: #e68900;
}

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

.bet-title {
    font-size: 14px;
    margin-top: 0;
    margin-bottom: 0;
    text-align: left;
    display: flex;
    align-items: center;
}

.bet-team {
    font-weight: bold;
}

.bet-odds {
    font-weight: normal;
    margin-left: 5px;
}

.wager {
    font-size: 14px;
    text-align: right;
    color: #ff9800;
}

.progress-bar {
    position: relative;
    height: 20px;
    background-color: #1c1c1c;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: visible;
    width: 100%;
    z-index: 1;
}

.shaded-area {
    position: absolute;
    top: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 20px 20px;
    border-radius: 0;
    transition: all 0.3s ease;
    z-index: 2;
}

.green {
    background-color: rgba(0, 128, 0, 0.6);
}

.red {
    background-color: rgba(255, 0, 0, 0.6);
}

.full-left {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.full-right {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.vertical-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: white;
    z-index: 3;
}

.number-container {
    position: absolute;
    top: -20px;
    font-size: 14px;
    color: white;
    transform: translateX(-50%);
    z-index: 4;
    background-color: transparent;
}

.number-container-live {
    position: absolute;
    top: -20px;
    font-size: 14px;
    color: yellow;
    font-weight: bold;
    transform: translateX(-50%);
    z-index: 5;
    background-color: transparent;
}

#bet-progress-bars {
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: visible;
    position: relative;
}

.bet-tracker {
    position: relative;
}

.bet-description {
    margin-top: 5px;
    margin-bottom: 15px;
    white-space: nowrap;
    text-align: center;
    font-style: italic;
    font-size: 14px;
    color: white;
    z-index: 10;
    position: relative;
}

html {
    overflow-y: scroll;
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}

header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 20px;
    background-color: #383838;
    width: 100%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
    padding-top: 0;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

header img.site-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 10px;
}

header h1 {
    margin: 0;
    font-size: 24px;
    color: #ff9800;
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 5px;
}

.nav-links button {
    background-color: #03a9f4;
    border: none;
    color: white;
    padding: 3px 10px;
    text-align: center;
    text-decoration: none;
    font-size: 12px;
    margin: 2px;
    cursor: pointer;
    border-radius: 4px;
    width: 100px;
}

.nav-links a {
    color: white;
    text-decoration: none;
}

.nav-links a:hover {
    text-decoration: underline;
}

.game-info {
    margin: 10px 0;
    font-size: 18px;
}

.button-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.back-button, .bet-button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    background-color: #ff9800;
    border: none;
    color: #2b2b2b;
    border-radius: 4px;
    width: 48%;
}

.back-button:hover, .bet-button:hover {
    background-color: #e68900;
}

.section {
    width: 100%;
    max-width: 800px;
    margin: 20px 0;
    padding: 20px;
    background-color: #383838;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.section h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #ff9800;
}

.section h3 {
    color: #ff9800;
}

.section table {
    width: 100%;
    border-collapse: collapse;
}

.section th, .section td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
    color: #e0e0e0;
}

.section th {
    background-color: #4a4a4a;
    font-weight: bold;
}

@media (max-width: 768px) {
    body {
        padding: 0 10px;
        align-items: stretch;
    }

    header {
        padding: 10px;
        width: 100%;
        box-sizing: border-box;
    }

    .logo-container {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    header img.site-logo {
        max-width: 120px;
        margin-right: 10px;
    }

    header h1 {
        font-size: 20px;
    }

    .nav-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    .nav-links button {
        width: auto;
        margin: 5px 2px;
        padding: 3px 10px;
    }

    .game-info {
        font-size: 16px;
    }

    .button-container {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
    }

    .back-button, .bet-button {
        font-size: 14px;
        padding: 8px 16px;
        width: 48%;
    }

    .section {
        width: 100%;
        margin: 10px 0;
        padding: 15px;
    }
}

/* Progress bar styles */

.progress-bar::before,
.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
}

.progress-bar::before {
    left: var(--bar-handicap-position, 50%);
    width: 2px;
    background-color: black;
}

.progress-bar::after {
    left: var(--bar-current-position, 50%);
    width: 2px;
    background-color: white;
}

.shaded-area {
    position: absolute;
    top: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
}

.green {
    background-color: rgba(0, 128, 0, 0.6);
}

.red {
    background-color: rgba(255, 0, 0, 0.6);
}

.blue {
    background-color: rgba(0, 0, 255, 0.6);
}

.vertical-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: white;
}

/* Tooltips and Legends */
.progress-bar .tooltip {
    display: none;
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 5px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

.progress-bar:hover .tooltip {
    display: block;
}

.legend {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    font-size: 14px;
}

.legend-item {
    margin: 0 10px;
    display: flex;
    align-items: center;
}

.legend-item .color-box {
    width: 15px;
    height: 15px;
    margin-right: 5px;
    border-radius: 2px;
}

.legend-item.green .color-box {
    background-color: rgba(0, 128, 0, 0.6);
}

.legend-item.red .color-box {
    background-color: rgba(255, 0, 0, 0.6);
}

.legend-item.gold {
    color: gold;
    font-weight: bold;
}

.legend-item.gold .color-box {
    background-color: gold;
}

/* Team and Over/Under labels */
.team-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 14px;
    margin-top: 5px;
}

.team1-label,
.team2-label,
.under-label,
.over-label {
    color: #e0e0e0;
}

.team1-label {
    text-align: left;
}

.team2-label {
    text-align: right;
}

.under-label {
    text-align: left;
}

.over-label {
    text-align: right;
}

/* Bet card styles */
.bet-card {
    background-color: #4a4a4a;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    width: 100%;
}

.bet-card:not(:last-child) {
    margin-bottom: 20px;
}

.bet-info p {
    margin: 5px 0;
    font-size: 14px;
}

.bets-and-trackers {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bet-tracker {
    width: 100%;
    margin-top: 10px;
}

.bet-tracker .progress-bar .number-line {
    background-color: #1c1c1c;
}

.number-container {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    z-index: 1000;
    pointer-events: none;
}

.number-container.gold {
    color: gold;
    font-weight: bold;
}

#zero-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 14px;
    color: white;
    z-index: 1000;
    pointer-events: none;
}

/* Popup Styles */
.bet-popup {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.bet-popup-content {
    background-color: #383838;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.bet-popup-content h2 {
    color: #ff9800;
    text-align: center;
}

.bet-type-options {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
}

.bet-type-button {
    padding: 10px 20px;
    border: none;
    background-color: #ff9800;
    color: #2b2b2b;
    cursor: pointer;
    border-radius: 4px;
}

.bet-type-button.selected {
    background-color: #e68900;
}

.bet-input-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.bet-input-row label {
    flex: 1;
    margin-right: 10px;
}

.bet-input-row input,
.bet-input-row select,
.bet-input-row button {
    flex: 2;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.bet-input-row button {
    background-color: #ff9800;
    color: #2b2b2b;
    cursor: pointer;
}

.bet-input-row button:hover {
    background-color: #e68900;
}

.bet-input-row button.side-button {
    flex: 1;
    margin-right: 10px;
    background-color: #4a4a4a;
    color: #fff;
    border: 2px solid #ff9800;
    transition: background-color 0.3s, color 0.3s;
}

.bet-input-row button.side-button.selected {
    background-color: #ff9800;
    color: #2b2b2b;
}

#bet-form button[type="submit"] {
    width: 100%;
    padding: 10px;
    background-color: #ff9800;
    border: none;
    color: #2b2b2b;
    cursor: pointer;
    border-radius: 4px;
    font-size: 16px;
}

#bet-form button[type="submit"]:hover {
    background-color: #e68900;
}

.bet-type-button,
.side-button {
    padding: 10px 20px;
    margin: 5px;
    border: 2px solid #ff9800;
    background-color: #2b2b2b;
    color: #ff9800;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.bet-type-button:hover,
.side-button:hover {
    background-color: #ff9800;
    color: #2b2b2b;
}

.bet-type-button.selected,
.side-button.selected {
    background-color: #ff9800;
    color: #2b2b2b;
    border-color: #ff9800;
}

.error-message {
    color: red;
    font-size: 0.9em;
    margin-top: -10px;
    margin-bottom: 10px;
}

/* Top Bets Section */
.top-bets {
    margin-top: 20px;
    width: 100%;
    max-width: 800px;
    background-color: #383838;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.top-bets h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #ff9800;
}

.top-bets table {
    width: 100%;
    border-collapse: collapse;
    background-color: #2b2b2b;
    color: #e0e0e0;
}

.top-bets th, .top-bets td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
}

.top-bets th {
    background-color: #4a4a4a;
    font-weight: bold;
}

/* Special styling for messages based on bets */
.message-bet-winner {
    border-left: 4px solid green;
}

.message-bet-loser {
    border-left: 4px solid red;
}

/* bet progress ribbon */
.ribbon {
    position: fixed;
    right: 15px;
    top: 25%;
    transform: translate(50%, -50%) rotate(90deg);
    background-color: #ff9800;
    z-index: 1000;
    border-radius: 4px;
    padding: 10px;
}

.ribbon a {
    display: block;
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    white-space: nowrap;
}

.ribbon a:hover {
    background-color: #e68900;
}

/* Popup Background */
.popup {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Popup Content */
.popup-content {
    background-color: #383838;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    position: relative;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    color: white;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close-button:hover,
.close-button:focus {
    color: #ccc;
    text-decoration: none;
}

.team-labels {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 14px;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.6);
}

.team1-label {
    text-align: left;
}

.team2-label {
    text-align: right;
}
.bet-legend {
    background-color: #3a3a3a;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    text-align: center;
    max-width: 90%;
    margin: 0 auto 10px auto;
}

.legend-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
}

.legend-square {
    width: 15px;
    height: 15px;
    margin-right: 5px;
    border-radius: 3px;
}

.green-square {
    background-color: rgba(0, 128, 0, 0.8);
}

.red-square {
    background-color: rgba(255, 0, 0, 0.8);
}

.yellow-square {
    background-color: yellow;
}

.legend-label {
    color: #e0e0e0;
    font-size: 14px;
}

.odds-buttons {
    display: flex;
    align-items: center;
}

.odds-button {
    background-color: black;
    color: orange;
    border: 2px solid orange;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}

.odds-button.selected {
    background-color: orange;
    color: black;
}
