/* ============================================
   CASINO CAROUSEL COMPONENT
   Reusable component for casino logo carousel
   ============================================ */

.real-money-carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.real-money-carousel-track {
    display: flex;
    align-items: center;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 10px 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.6) rgba(30, 41, 59, 0.3);
    -ms-overflow-style: auto;
}

.real-money-carousel-wrapper.real-money-single .real-money-carousel-track {
    justify-content: center;
}

/* Custom scrollbar styles */
.real-money-carousel-wrapper .real-money-carousel-track::-webkit-scrollbar,
.simple-scroll .real-money-carousel-track::-webkit-scrollbar,
.real-money-carousel-track::-webkit-scrollbar {
    display: block !important;
    height: 10px;
    -webkit-appearance: none;
}

.real-money-carousel-wrapper .real-money-carousel-track::-webkit-scrollbar-track,
.simple-scroll .real-money-carousel-track::-webkit-scrollbar-track,
.real-money-carousel-track::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.4);
    border-radius: 10px;
    margin: 0 20px;
}

.real-money-carousel-wrapper .real-money-carousel-track::-webkit-scrollbar-thumb,
.simple-scroll .real-money-carousel-track::-webkit-scrollbar-thumb,
.real-money-carousel-track::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.8), rgba(139, 92, 246, 0.6));
    border-radius: 10px;
    transition: background 0.3s ease;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.real-money-carousel-wrapper .real-money-carousel-track::-webkit-scrollbar-thumb:hover,
.simple-scroll .real-money-carousel-track::-webkit-scrollbar-thumb:hover,
.real-money-carousel-track::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, rgba(139, 92, 246, 1), rgba(139, 92, 246, 0.8));
}

/* LOGO CARD CONTAINER */
.casino-logo-card {
    flex: 0 0 160px;
    scroll-snap-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 90px;
}

/* MAIN LOGO LINK */
.logo-play-link {
    display: block;
    width: 100%;
    text-decoration: none;
    position: relative;
    z-index: 5;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-glow-container {
    background: rgba(30, 41, 59, 0.5);
    padding: 10px;
    border-radius: 20px;
    border: 2px solid rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 70px;
    width: 100%;
}

/* Logo Image */
.casino-logo-img {
    width: 100%;
    height: auto;
    max-height: 70px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5)) grayscale(0.2);
    transition: all 0.4s ease;
}

/* Fallback Text */
.casino-name-fallback {
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 1.2em;
    text-align: center;
}

/* HOVER EFFECTS - GLOW */
.logo-play-link:hover {
    transform: scale(1.15);
}

.logo-play-link:hover .casino-logo-img {
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.6)) grayscale(0) brightness(1.2);
}

.logo-play-link:hover .logo-glow-container {
    border-color: rgba(139, 92, 246, 0.9);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.logo-play-link:hover .logo-glow-container::before {
    content: '';
    position: absolute;
    inset: -10px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
    z-index: -1;
    border-radius: 50%;
    animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.5;
    }
}

/* BONUS REVEAL SYSTEM */
.bonus-reveal-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

.bonus-trigger-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #d97706);
    border: 2px solid #1e293b;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4), 0 0 20px rgba(251, 191, 36, 0.2);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    outline: none;
    position: relative;
    z-index: 12;
    padding: 0;
    animation: bonusButtonPulse 2s ease-in-out infinite;
}

.bonus-trigger-btn::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.3), rgba(217, 119, 6, 0.3));
    opacity: 0;
    animation: bonusButtonGlow 2s ease-in-out infinite;
    z-index: -1;
}

.bonus-trigger-btn:hover {
    transform: scale(1.15) rotate(15deg);
    box-shadow: 0 6px 20px rgba(251, 191, 36, 0.6), 0 0 30px rgba(251, 191, 36, 0.4);
    animation-play-state: paused;
}

.bonus-trigger-btn:hover::before {
    opacity: 1;
}

.bonus-icon {
    width: 18px;
    height: 18px;
    color: #ffffff;
    stroke: currentColor;
    flex-shrink: 0;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.5));
}

.lightning-main {
    animation: lightningFlash 1.5s ease-in-out infinite;
    transform-origin: center;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.8));
}

.sparkle {
    animation: sparklePulse 1.5s ease-in-out infinite;
}

.sparkle-1 {
    animation-delay: 0s;
}

.sparkle-2 {
    animation-delay: 0.3s;
}

.sparkle-3 {
    animation-delay: 0.6s;
}

.sparkle-4 {
    animation-delay: 0.9s;
}

@keyframes bonusButtonPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4), 0 0 20px rgba(251, 191, 36, 0.2);
    }
    50% {
        transform: scale(1.08);
        box-shadow: 0 6px 16px rgba(251, 191, 36, 0.6), 0 0 25px rgba(251, 191, 36, 0.3);
    }
}

@keyframes bonusButtonGlow {
    0%, 100% {
        opacity: 0;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

@keyframes lightningFlash {
    0%, 100% {
        opacity: 1;
        filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.8)) brightness(1);
    }
    50% {
        opacity: 0.9;
        filter: drop-shadow(0 0 6px rgba(255, 255, 255, 1)) brightness(1.3);
    }
}

@keyframes sparklePulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.bonus-hidden-content {
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%) translateX(10px) scale(0);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--accent-purple);
    backdrop-filter: blur(8px);
    padding: 8px 12px;
    border-radius: 8px;
    min-width: 140px;
    max-width: 200px;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: left center;
    z-index: 11;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
}

.bonus-text {
    color: var(--accent-cyan);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: normal;
}

/* Show Bonus on Hover of Wrapper */
.bonus-reveal-wrapper:hover .bonus-hidden-content,
.bonus-trigger-btn:focus+.bonus-hidden-content {
    transform: translateY(-50%) translateX(5px) scale(1);
    opacity: 1;
    pointer-events: auto;
}

/* Adjust Bonus Position for Last Items to prevent overflow */
.casino-logo-card:nth-last-child(-n+2) .bonus-hidden-content {
    left: auto;
    right: 100%;
    transform-origin: right center;
    transform: translateY(-50%) translateX(-10px) scale(0);
}

.casino-logo-card:nth-last-child(-n+2) .bonus-reveal-wrapper:hover .bonus-hidden-content {
    transform: translateY(-50%) translateX(-5px) scale(1);
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .real-money-carousel-wrapper {
        padding: 0;
        margin: 20px 0;
        -webkit-mask-image: none;
        mask-image: none;
    }

    .carousel-btn {
        display: none !important;
    }

    .real-money-carousel-track {
        gap: 12px;
        padding: 10px 20px 45px 20px;
    }
}
