.choice-circle {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: red; /* will override via inline style for win.Color */
    box-shadow: inset -2px -2px 6px rgba(255,255,255,0.6), inset 2px 2px 6px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

    .choice-circle::after {
        /* Gloss effect */
        content: "";
        position: absolute;
        top: 5%;
        left: 5%;
        width: 90%;
        height: 45%;
        border-radius: 50%;
        background: rgba(255,255,255,0.4);
        filter: blur(2px);
    }

.inner-circle {
    position: relative;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

    .inner-circle.white {
        background: white;
        color: black;
    }

    .inner-circle.black {
        background: black;
        color: white;
    }

.mb-number-input {
    margin-right: 20px;
}

/* Container for the balls */
.ball-container {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    overflow-x: auto;
}

/* Base ball style */
.ball {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    border: 3px solid transparent;
    box-shadow: inset -4px -4px 10px rgba(0, 0, 0, 0.4), inset 4px 4px 8px rgba(255, 255, 255, 0.3);
    transition: transform 0.2s, border-color 0.2s;
}

    /* Gloss effect using pseudo-element */
    .ball::before {
        content: '';
        position: absolute;
        top: 5%;
        left: 10%;
        width: 80%;
        height: 40%;
        background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.8), rgba(255,255,255,0) 60%);
        border-radius: 50%;
        pointer-events: none;
    }

    /* Hover effect */
    .ball:hover {
        transform: scale(1.1);
    }

    /* Selected ball highlight */
    .ball.selected {
        border-width: 4px;
        border-color: #00bfff; /* cyan outline */
    }

    /* === Color definitions === */
    .ball.red {
        background: radial-gradient(circle at 30% 30%, #ff6666, #b30000);
    }

    .ball.scarlet {
        background: radial-gradient(circle at 30% 30%, #ff2400, #660000); /* Rich darker scarlet */
    }


    .ball.blue {
        background: radial-gradient(circle at 30% 30%, #66b3ff, #004080);
    }

    .ball.teal {
        background: radial-gradient(circle at 30% 30%, #228B22, #004d00); /* Dark green gradient */
    }

    .ball.green {
        background: radial-gradient(circle at 30% 30%, #66ff66, #006600);
    }

    .ball.gold {
        background: radial-gradient(circle at 30% 30%, #ffd700, #b38600);
    }

    .ball.yellow {
        background: radial-gradient(circle at 30% 30%, #ffff66, #b3b300);
    }

    .ball.violet {
        background: radial-gradient(circle at 30% 30%, #ee82ee, #800080);
    }

    .ball.pink {
        background: radial-gradient(circle at 30% 30%, #ffb6c1, #cc3366);
    }

    .ball.silver {
        background: radial-gradient(circle at 30% 30%, #f0f0f0, #a0a0a0);
    }

    .ball.white {
        background: radial-gradient(circle at 30% 30%, #ffffff, #cccccc);
    }

    .ball.orange {
        background: radial-gradient(circle at 30% 30%, #ffb84d, #cc6600);
    }

    .ball.brown {
        background: radial-gradient(circle at 30% 30%, #996633, #4d2600);
    }

    .ball.navy {
        background: radial-gradient(circle at 30% 30%, #4d79ff, #000033);
    }

    .ball.purple {
        background: radial-gradient(circle at 30% 30%, #b366ff, #330066);
    }

    .ball.black {
        background: radial-gradient(circle at 30% 30%, #333333, #000000);
    }

.center-cropped {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center center;
    border-radius: 8px;
}

/* === MoneyBall Vertical Column Chart === */
.mb-chart {
    width: 100%;
    padding: 8px 8px 0 56px; /* left space for Y axis */
    position: relative;
    box-sizing: border-box;
}

/* Y axis with ticks and grid lines */
.mb-yaxis {
    position: absolute;
    inset: 0 auto 28px 0; /* leave room for x labels at bottom */
    width: 56px;
    display: flex;
    flex-direction: column-reverse; /* 0% at bottom, 100% at top */
    align-items: flex-end;
    pointer-events: none;
}

    .mb-yaxis .tick {
        position: relative;
        width: 100%;
        height: 20%;
        display: flex;
        align-items: flex-end;
        justify-content: flex-end;
        font-size: 12px;
        color: #8a8a8a;
    }

        .mb-yaxis .tick::before {
            /* grid line across the plot area */
            content: "";
            position: absolute;
            left: 56px; /* start after y-axis label area */
            right: 0;
            height: 1px;
            background: rgba(0,0,0,0.08);
            transform: translateY(1px);
        }

/* Plot area that contains the columns */
.mb-plot {
    position: relative;
    height: 300px;
    border-left: 2px solid rgba(0,0,0,0.15);
    border-bottom: 2px solid rgba(0,0,0,0.15);
    margin-bottom: 28px; /* room for x-axis labels */
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    column-gap: 14px;
    align-items: end; /* bars align to baseline */
    padding: 8px 8px 0 0;
}

/* Individual column (bar) */
.mb-col {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 2px 6px rgba(0,0,0,0.15);
    transition: transform .15s ease;
}

    .mb-col:hover {
        transform: translateY(-2px);
    }

    /* “Glossy” subtle vertical highlight */
    .mb-col::after {
        content: "";
        position: absolute;
        top: 8%;
        left: 50%;
        width: 46%;
        height: 70%;
        transform: translateX(-50%);
        border-radius: 18px;
        background: linear-gradient(to bottom, rgba(255,255,255,0.35), rgba(255,255,255,0));
        pointer-events: none;
    }

    /* % label inside the bar */
    .mb-col .pct {
        font-weight: 800;
        font-size: 11px;
        line-height: 1;
        text-shadow: 0 1px 2px rgba(0,0,0,.35);
        user-select: none;
    }

    /* Light-on-dark & dark-on-light helpers for legibility */
    .mb-col .light {
        color: #ffffff;
    }

    .mb-col .dark {
        color: #101010;
        text-shadow: none;
    }

    /* Ensure tiny values are still visible */
    .mb-col[data-p="0"] {
        height: 0 !important;
    }

    .mb-col[data-p]:not([data-p="0"]) {
        min-height: 10px;
    }

/* X-axis labels */
.mb-xaxis {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    column-gap: 16px;
    margin-left: 56px; /* line up under plot */
}

    .mb-xaxis .xlab {
        font-size: 12px;
        text-align: center;
        text-transform: capitalize;
        color: #4a4a4a;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

:root {
    --mb-bar-width: 64px; /* column width on mobile */
    --mb-bar-gap: 14px; /* gap between columns */
}

/* default desktop stays as-is; we only change behavior under 768px */
@media (max-width: 768px) {
    /* a scroll wrapper that lets the chart overflow horizontally */
    .mb-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-left: -12px; /* optional edge-to-edge feel */
        padding: 0 12px 12px; /* bottom padding for scrollbar room */
    }
        /* make the inner chart size itself to its content (columns) */
        .mb-scroll .mb-chart {
            width: max-content; /* expands beyond viewport if needed */
            padding-right: 16px;
        }
        /* fixed column widths so total chart width = cols * width + gaps */
        .mb-scroll .mb-plot,
        .mb-scroll .mb-xaxis {
            grid-auto-columns: var(--mb-bar-width);
            column-gap: var(--mb-bar-gap);
        }
        /* compute a sensible minimum width so y-axis + columns fit */
        .mb-scroll .mb-chart {
            /* 56px (y-axis) + bars + gaps + a little right padding */
            min-width: calc( 56px + (var(--bar-count) * var(--mb-bar-width)) + (max(var(--bar-count) - 1, 0) * var(--mb-bar-gap)) + 16px );
        }
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .mb-plot {
        height: 240px;
        column-gap: 10px;
    }

    .mb-xaxis {
        column-gap: 10px;
    }

    .mb-col .pct {
        font-size: 12px;
    }
}



@media (max-width: 768px) {
    .mb-number-input {
        margin-right: 0;
    }
}