/* Bingo Number Circles */
.bingo-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #8a929a, #5a6268);
    color: #ffffff;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 
        inset -2px -2px 8px rgba(0, 0, 0, 0.3),
        inset 2px 2px 6px rgba(255, 255, 255, 0.2),
        0 4px 8px rgba(0, 0, 0, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
}

.bingo-number::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 35%;
    height: 25%;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.5), transparent);
    border-radius: 50%;
    filter: blur(2px);
}

.bingo-number.called {
    background: radial-gradient(circle at 30% 30%, #4cdb71, #218838);
    color: #ffffff;
    box-shadow: 
        inset -2px -2px 8px rgba(0, 0, 0, 0.3),
        inset 2px 2px 6px rgba(255, 255, 255, 0.3),
        0 6px 12px rgba(40, 167, 69, 0.4),
        0 2px 4px rgba(40, 167, 69, 0.3);
}

/* Large Draw Ball - Goldish Yellow */
.bingo-draw-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffd700, #d4a017);
    color: #333333;
    font-size: 156px;
    font-weight: bold;
    text-align: center;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.3),
        -1px -1px 2px rgba(255, 255, 255, 0.3);
    box-shadow: 
        inset -8px -8px 20px rgba(0, 0, 0, 0.3),
        inset 8px 8px 16px rgba(255, 255, 255, 0.4),
        0 20px 40px rgba(212, 160, 23, 0.4),
        0 8px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    animation: drawPulse 2s ease-in-out infinite;
}

.bingo-draw-ball::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 40%;
    height: 30%;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.6), transparent);
    border-radius: 50%;
    filter: blur(4px);
}

@keyframes drawPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Responsive sizing for smaller screens */
@media (max-width: 576px) {
    .bingo-number {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .bingo-draw-ball {
        width: 200px;
        height: 200px;
        font-size: 104px;
    }
}

/* Bingo Numbers Container Background */
.container-p-y {
    position: relative;
}

.container-p-y::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/app-assets/img/bull-light-trans.png');
    background-position: center center;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

[data-bs-theme="dark"] .container-p-y::before {
    background-image: url('/app-assets/img/bull-dark-trans.png');
}

/* Ball Draw Animation Overlay */
.ball-draw-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.ball-draw-overlay.active {
    display: flex;
}

/* Background balls container */
.bg-balls-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

/* Background animated balls */
.bg-ball {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    transition:
        transform 0.9s ease,
        top 0.9s ease,
        left 0.9s ease,
        background 0.6s ease,
        box-shadow 0.6s ease,
        color 0.6s ease,
        opacity 0.6s ease;
    will-change: transform, top, left;
}

.bg-balls-container.focused .bg-ball {
    opacity: 0.15;
}

.bg-balls-container.focused .bg-ball.drawn-focus {
    opacity: 1;
}

.bg-ball.drawn-focus {
    z-index: 3;
    opacity: 1;
    animation: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(2.4);
    background: radial-gradient(circle at 30% 30%, #ffe27a, #d4a017);
    color: #2b2b2b;
    text-shadow:
        3px 3px 8px rgba(0, 0, 0, 0.5),
        -2px -2px 4px rgba(255, 255, 255, 0.25);
    box-shadow:
        inset -12px -12px 24px rgba(0, 0, 0, 0.35),
        inset 12px 12px 24px rgba(255, 255, 255, 0.35),
        0 30px 60px rgba(212, 160, 23, 0.6),
        0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Random ball animations */
@keyframes fall {
    from {
        transform: translateY(0) rotate(0deg);
    }
    to {
        transform: translateY(120vh) rotate(360deg);
    }
}

@keyframes bounce {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-30vh) rotate(90deg);
    }
    50% {
        transform: translateY(0) rotate(180deg);
    }
    75% {
        transform: translateY(-30vh) rotate(270deg);
    }
    100% {
        transform: translateY(0) rotate(360deg);
    }
}

@keyframes spin-float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(20vw, 10vh) rotate(90deg);
    }
    50% {
        transform: translate(0, 20vh) rotate(180deg);
    }
    75% {
        transform: translate(-20vw, 10vh) rotate(270deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

@keyframes diagonal-fall {
    from {
        transform: translate(0, 0) rotate(0deg);
    }
    to {
        transform: translate(50vw, 120vh) rotate(720deg);
    }
}

@keyframes diagonal-rise {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(-30vw, -20vh) rotate(360deg);
    }
    100% {
        transform: translate(-60vw, 0) rotate(720deg);
    }
}

/* Main draw ball in overlay */
.main-draw-ball {
    position: relative;
    z-index: 2;
    width: 90vh;
    height: 90vh;
    max-width: 90vw;
    max-height: 90vw;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffd700, #d4a017);
    color: #333333;
    font-size: 40vh;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 
        3px 3px 6px rgba(0, 0, 0, 0.5),
        -2px -2px 4px rgba(255, 255, 255, 0.3);
    box-shadow: 
        inset -20px -20px 40px rgba(0, 0, 0, 0.4),
        inset 20px 20px 40px rgba(255, 255, 255, 0.4),
        0 40px 80px rgba(212, 160, 23, 0.6),
        0 20px 40px rgba(0, 0, 0, 0.5);
    animation: pulseGrow 0.5s ease-out;
}

.main-draw-ball.hidden {
    display: none;
}

.main-draw-ball.reveal {
    animation: pulseGrow 0.6s ease-out;
}

.main-draw-ball::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 40%;
    height: 30%;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.7), transparent);
    border-radius: 50%;
    filter: blur(8px);
}

.main-draw-ball.scrolling {
    animation: gentleShimmer 0.3s ease-in-out infinite;
}

@keyframes pulseGrow {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    60% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes gentleShimmer {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.1);
    }
}

/* Responsive sizing */
@media (max-width: 768px) {
    .main-draw-ball {
        font-size: 30vh;
    }
}

@media (max-width: 576px) {
    .main-draw-ball {
        font-size: 25vh;
    }
}
