:root {
    --rasta-red: #CC0000;
    --rasta-gold: #FFD700;
    --rasta-green: #009B3A;
    --bg-dark: #1a1a2e;
    --bg-darker: #0d0d1a;
    --text-light: #e0e0e0;
    --ball-size: 64px;
}

html, body {
    font-family: 'Righteous', cursive;
    margin: 0;
    padding: 0;
    background: var(--bg-darker);
    color: var(--text-light);
    overflow-x: hidden;
}

/* ---- Game Selector ---- */
.game-selector {
    display: flex;
    gap: 0;
    border-radius: 50px;
    overflow: hidden;
    border: 2px solid var(--rasta-gold);
    margin: 1.5rem 0;
}

.game-selector button {
    padding: 0.75rem 2rem;
    border: none;
    background: transparent;
    color: var(--rasta-gold);
    font-family: 'Righteous', cursive;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-selector button:hover {
    background: rgba(255, 215, 0, 0.1);
}

.game-selector button.active {
    background: var(--rasta-gold);
    color: var(--bg-dark);
}

.game-selector button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---- Generate Button ---- */
.btn-rasta {
    background: linear-gradient(135deg, var(--rasta-green), #006b28);
    color: var(--rasta-gold);
    border: 2px solid var(--rasta-gold);
    padding: 1rem 2.5rem;
    font-size: 1.4rem;
    font-family: 'Righteous', cursive;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 4px 15px rgba(0, 155, 58, 0.3);
}

.btn-rasta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 155, 58, 0.5);
    background: linear-gradient(135deg, #00b347, var(--rasta-green));
}

.btn-rasta:active {
    transform: translateY(0);
}

.btn-rasta:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ---- Ball Styles ---- */
.ball {
    width: var(--ball-size);
    height: var(--ball-size);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    font-family: 'Righteous', cursive;
    color: #1a1a2e;
    position: relative;
    background: radial-gradient(circle at 35% 35%, white 0%, #e0e0e0 50%, #aaa 100%);
    box-shadow: 2px 4px 10px rgba(0,0,0,0.5), inset -2px -2px 6px rgba(0,0,0,0.2);
}

.ball.mega-ball {
    background: radial-gradient(circle at 35% 35%, #FFE44D 0%, var(--rasta-gold) 50%, #CC9900 100%);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 2px 4px 10px rgba(0,0,0,0.5);
    color: var(--bg-dark);
}

.ball.powerball {
    background: radial-gradient(circle at 35% 35%, #FF4444 0%, var(--rasta-red) 50%, #990000 100%);
    box-shadow: 0 0 20px rgba(204, 0, 0, 0.6), 2px 4px 10px rgba(0,0,0,0.5);
    color: white;
}

/* ---- Ball Chute ---- */
.ball-chute {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    padding: 1.5rem;
    position: relative;
}

.ball-slot {
    width: var(--ball-size);
    height: var(--ball-size);
    border-radius: 50%;
    border: 2px dashed rgba(255, 215, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ball-slot.filled {
    border-color: transparent;
}

/* ---- Ball Toss (JS Web Animations API handles the motion) ---- */
.ball.tossed {
    opacity: 0;
}

/* ---- Special Ball Pulse Glow ---- */
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.4), 2px 4px 10px rgba(0,0,0,0.5); }
    50% { box-shadow: 0 0 40px rgba(255, 215, 0, 0.8), 2px 4px 10px rgba(0,0,0,0.5); }
}

@keyframes pulseGlowRed {
    0%, 100% { box-shadow: 0 0 20px rgba(204, 0, 0, 0.4), 2px 4px 10px rgba(0,0,0,0.5); }
    50% { box-shadow: 0 0 40px rgba(204, 0, 0, 0.8), 2px 4px 10px rgba(0,0,0,0.5); }
}

.ball.mega-ball.settled {
    animation: pulseGlow 2s ease-in-out infinite;
}

.ball.powerball.settled {
    animation: pulseGlowRed 2s ease-in-out infinite;
}

/* ---- Ball Separator ---- */
.ball-separator {
    width: 2px;
    height: 50px;
    background: linear-gradient(180deg, transparent, var(--rasta-gold), transparent);
    margin: 0 0.5rem;
}

/* ---- Error Boundary ---- */
.blazor-error-boundary {
    background: var(--rasta-red);
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    :root {
        --ball-size: 44px;
    }

    .ball {
        font-size: 1rem;
    }

    .btn-rasta {
        font-size: 1.1rem;
        padding: 0.8rem 1.8rem;
    }

    .ball-chute {
        gap: 0.4rem;
        padding: 1rem 0.5rem;
    }

    .ball-separator {
        margin: 0 0.2rem;
    }

    .game-selector button {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}
