.horizontal-roulette-section {
    width: 100%;
    max-width: 66rem;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs, 0.25rem);
}

.roulette-strip-container {
    width: 100%;
    height: clamp(3rem, 8vh, 4rem);
    background: var(--gradient-primary, linear-gradient(135deg, #DEB887 0%, #D2B48C 50%, #F5DEB3 100%));
    border: var(--border-width-sm, 2px) solid var(--color-primary-brown, #8B4513);
    border-radius: var(--border-radius-sm, 6px);
    box-shadow: var(--shadow-sm, 1px 1px 2px rgba(0,0,0,0.1));
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.roulette-strip {
    height: 80%;
    display: flex;
    align-items: center;
    position: relative;
    width: 5000px;
    margin: var(--space-sm, 0.5rem);
    margin-left: 0;
    transition: margin-left 3s cubic-bezier(.08,.6,0,1);
    backface-visibility: hidden;
}

.strip-segment {
    flex: 0 0 auto;
    width: 90px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family-primary, 'Courier New', monospace), sans-serif;
    font-weight: bold;
    font-size: clamp(0.5rem, 1.2vw, 0.7rem);
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    border-right: var(--border-width-sm, 2px) solid var(--color-primary-brown, #8B4513);
    min-width: 0;
    padding: 2px;
}

.strip-segment .cat-image {
    width: 60px;
    height: 60px;
    margin-bottom: 2px;
    object-fit: contain;
    filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.5));
}

.strip-segment .percentage-text {
    font-size: clamp(0.45rem, 1vw, 0.6rem);
    line-height: 1;
    text-align: center;
}

.strip-segment:last-child {
    border-right: none;
}

.strip-segment.winning-item {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), inset 0 0 20px rgba(255, 215, 0, 0.3);
    border: 3px solid #FFD700;
    transform: scale(1.05);
    z-index: 10;
    position: relative;
    animation: winningPulse 1s ease-in-out infinite alternate;
}

@keyframes winningPulse {
    0% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), inset 0 0 20px rgba(255, 215, 0, 0.3);
    }
    100% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 1), inset 0 0 30px rgba(255, 215, 0, 0.5);
    }
}

@media (prefers-reduced-motion: reduce) {
    .roulette-strip {
        transition-duration: 1s;
    }

    .simple-button {
        transition: none;
    }
}

@media (prefers-contrast: more) {
    .strip-segment {
        border-width: 2px;
        border-color: currentColor;
    }

    .simple-button {
        border-width: 3px;
    }
}

.strip-green {
    background: var(--gradient-green, linear-gradient(135deg, #32CD32 0%, #228B22 100%));
}

.strip-red {
    background: var(--gradient-red, linear-gradient(135deg, #DC143C 0%, #B22222 100%));
}

.strip-yellow {
    background: var(--gradient-gold, linear-gradient(135deg, #FFD700 0%, #DAA520 100%));
    color: var(--color-primary-brown, #8B4513);
    text-shadow: 2px 2px 4px rgba(255,255,255,0.8);
}

.roulette-pointer {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0.375rem;
    height: 70%;
    background: var(--color-primary-brown, #8B4513);
    box-shadow: var(--shadow-md, 0 2px 4px rgba(0,0,0,0.5));
    z-index: 10;
    pointer-events: none;
    border-radius: 2px;
}

.roulette-pointer::before {
    content: '';
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 0.75rem solid transparent;
    border-right: 0.75rem solid transparent;
    border-bottom: 0.9375rem solid var(--color-primary-brown, #8B4513);
}

.roulette-pointer::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 0.75rem solid transparent;
    border-right: 0.75rem solid transparent;
    border-top: 0.9375rem solid var(--color-primary-brown, #8B4513);
}

.roulette-controls-section {
    width: 100%;
    padding: var(--space-xs, 0.25rem);
    background: var(--gradient-primary, linear-gradient(135deg, #DEB887 0%, #D2B48C 50%, #F5DEB3 100%));
    border: var(--border-width-sm, 2px) solid var(--color-primary-brown, #8B4513);
    border-radius: var(--border-radius-sm, 6px);
    box-shadow: var(--shadow-sm, 1px 1px 2px rgba(0,0,0,0.1));
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm, 0.5rem);
}

@media (min-width: 48rem) {
    .roulette-controls-section {
        padding: var(--space-sm, 0.5rem);
        justify-content: center;
    }
}

.balance-display {
    background: rgba(255, 255, 255, 0.9);
    padding: var(--space-xs, 0.25rem) var(--space-sm, 0.5rem);
    border: var(--border-width-sm, 2px) solid var(--color-primary-brown, #8B4513);
    border-radius: var(--border-radius-sm, 6px);
    font-family: var(--font-family-primary, 'Courier New', monospace), sans-serif;
    font-weight: bold;
    color: var(--color-green, #32CD32);
    font-size: var(--font-size-sm, 0.875rem);
    box-shadow: var(--shadow-sm, 1px 1px 2px rgba(0,0,0,0.1));
    white-space: nowrap;
    flex: 1; /* Take up remaining space */
    max-width: none; /* Allow it to expand */
    text-align: center;
    min-height: 2rem;
}



.simple-button {
    padding: var(--space-xs, 0.25rem) var(--space-sm, 0.5rem);
    border: var(--border-width-sm, 2px) solid var(--color-primary-brown, #8B4513);
    border-radius: var(--border-radius-sm, 6px);
    background: var(--gradient-gold, linear-gradient(135deg, #FFD700 0%, #FFA500 100%));
    color: var(--color-primary-brown, #8B4513);
    font-family: var(--font-family-primary, 'Courier New', monospace), sans-serif;
    font-size: var(--font-size-sm, 0.875rem);
    font-weight: bold;
    text-shadow: 1px 1px 0px rgba(255,255,255,0.8);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm, 1px 1px 2px rgba(0,0,0,0.1));
    flex: 1;
    min-height: 2rem;
    white-space: nowrap;
    text-align: center;
}

@media (max-width: 48rem) {
    .simple-button {
        min-width: 0;
    }
}

.simple-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl, 4px 4px 8px rgba(0,0,0,0.4));
    background: linear-gradient(135deg, #FFED4E 0%, #FFB347 100%);
}

.simple-button:disabled {
    background: linear-gradient(135deg, #CCC 0%, #AAA 100%);
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
}

.bet-buttons-container {
    display: flex;
    flex-wrap: nowrap; /* Prevent wrapping to keep all buttons on one line */
    gap: var(--space-xs, 0.25rem);
    justify-content: flex-end; /* Align buttons to the right */
    align-items: center;
    flex: 0 0 auto; /* Don't grow, just fit the buttons */
}

.bet-button {
    min-width: 4.5rem;
    flex: 0 0 auto; /* Don't grow or shrink, use natural size */
    width: 4.5rem; /* Slightly smaller width for better fit */
}

@media (max-width: 48rem) {
    .bet-buttons-container {
        gap: 0.25rem;
    }

    .bet-button {
        flex: 0 0 auto;
        min-width: 4rem;
        width: 4rem; /* Fixed width for mobile */
    }
}

@media (min-width: 48rem) {
    .bet-button {
        min-width: 5rem;
        width: 5rem; /* Slightly smaller for larger screens too */
    }
}

.simple-message {
    width: 100%;
    text-align: center;
    padding: var(--space-md, 0.75rem) var(--space-lg, 1rem);
    border-radius: var(--border-radius-sm, 6px);
    font-family: var(--font-family-primary, 'Courier New', monospace), sans-serif;
    font-weight: bold;
    font-size: var(--font-size-base, 1rem);
    display: none;
    margin-top: var(--space-sm, 0.5rem);
    border: var(--border-width-md, 3px) solid transparent;
}

.simple-message.success {
    background: var(--color-green, #32CD32);
    color: white;
    border-color: #228B22;
    display: block;
}

.simple-message.error {
    background: var(--color-red, #DC143C);
    color: white;
    border-color: #B22222;
    display: block;
}

.simple-message.info {
    background: #4682B4;
    color: white;
    border-color: #2F4F4F;
    display: block;
}

.result-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
    cursor: pointer;
}

.result-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.result-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    max-width: 90vw;
    max-height: 90vh;
    min-width: 300px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.8);
    animation: resultPopIn 0.5s ease-out forwards;
    position: relative;
    z-index: 1000000;
    overflow: hidden;
    margin: auto;
}

@keyframes resultPopIn {
    0% {
        transform: scale(0.5) rotate(-5deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.05) rotate(2deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.result-cat {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1000001;
}

.result-cat-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    animation: catBounce 0.6s ease-out 0.2s both;
}

@keyframes catBounce {
    0% {
        transform: translateY(-50px) scale(0);
        opacity: 0;
    }
    50% {
        transform: translateY(-10px) scale(1.1);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.result-amount {
    font-size: clamp(2rem, 8vw, 4rem);
    font-weight: bold;
    font-family: var(--font-family-primary, 'Courier New', monospace), monospace;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: amountSlideIn 0.8s ease-out 0.4s both;
    position: relative;
    z-index: 1000001;
}

@keyframes amountSlideIn {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.result-message {
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: bold;
    font-family: var(--font-family-primary, 'Courier New', monospace), monospace;
    margin-bottom: 2rem;
    animation: messageSlideIn 0.8s ease-out 0.6s both;
    position: relative;
    z-index: 1000001;
}

@keyframes messageSlideIn {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.result-dismiss {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    animation: dismissFadeIn 1s ease-out 1s both;
}

@keyframes dismissFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.result-overlay.win .result-content {
    background: linear-gradient(135deg, #32CD32 0%, #228B22 100%);
    color: white;
    border: 4px solid #FFD700;
}

.result-overlay.win .result-amount {
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.result-overlay.win .result-cat-img {
    animation: catBounce 0.6s ease-out 0.2s both, winGlow 2s ease-in-out 0.8s infinite alternate;
}

@keyframes winGlow {
    0% {
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 20px rgba(255, 215, 0, 0.5));
    }
    100% {
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)) drop-shadow(0 0 30px rgba(255, 215, 0, 0.8));
    }
}

.result-overlay.loss .result-content {
    background: linear-gradient(135deg, #DC143C 0%, #B22222 100%);
    color: white;
    border: 4px solid #8B0000;
}

.result-overlay.loss .result-amount {
    color: #FFB6C1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.result-overlay.loss .result-cat-img {
    animation: catBounce 0.6s ease-out 0.2s both, sadShake 1s ease-in-out 0.8s infinite;
}

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

.result-overlay.jackpot .result-content {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #8B4513;
    border: 4px solid #FF6347;
    position: relative;
}

.result-overlay.jackpot .result-amount {
    color: #8B0000;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.5);
    animation: amountSlideIn 0.8s ease-out 0.4s both, jackpotPulse 1s ease-in-out 1.2s infinite alternate;
}

@keyframes jackpotPulse {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

.result-overlay.jackpot .result-cat-img {
    animation: catBounce 0.6s ease-out 0.2s both, jackpotSpin 2s ease-in-out 0.8s infinite;
}

@keyframes jackpotSpin {
    0% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(5deg) scale(1.05);
    }
    50% {
        transform: rotate(0deg) scale(1.1);
    }
    75% {
        transform: rotate(-5deg) scale(1.05);
    }
    100% {
        transform: rotate(0deg) scale(1);
    }
}

/* Responsive adjustments */
@media (max-width: 48rem) {
    .result-content {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .result-cat-img {
        width: 80px;
        height: 80px;
    }
}

/* No rolling animation needed - using simple transition like example */

/* Responsive Design - Mobile First Approach */

/* Extra small devices */
@media (max-width: 30rem) {
    .horizontal-roulette-section {
        gap: var(--space-md, 0.75rem);
    }
    
    .roulette-strip-container {
        height: clamp(4rem, 10vh, 5rem);
    }
    
    .roulette-controls-section {
        padding: var(--space-md, 0.75rem);
        grid-template-columns: 1fr;
        gap: var(--space-md, 0.75rem);
    }
    
    .balance-display {
        font-size: var(--font-size-base, 1rem);
        min-width: 6rem;
    }
    
    
    .simple-button {
        padding: var(--space-sm, 0.5rem) var(--space-lg, 1rem);
        font-size: var(--font-size-base, 1rem);
        min-width: 4rem;
        width: 100%;
        max-width: 10rem;
    }
}

@media (min-width: 30rem) and (max-width: 48rem) {
    .roulette-controls-section {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg, 1rem);
    }
    
    .balance-display {
        grid-column: 1 / -1;
        justify-self: center;
    }
}

@media (min-width: 64rem) {
    .roulette-strip-container {
        height: clamp(6rem, 8vh, 8rem);
    }
    
    .simple-button {
        min-width: 6rem;
    }
}

@media (hover: none) {
    .simple-button {
        min-height: 3rem;
    }
    
}