/**
 * Game Results Display Styles
 * Shows last 10 results with circular images/numbers
 */

/* Result Items Container */
.bonuses-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    flex-wrap: nowrap;
    overflow: hidden;
}

/* Individual Result Item (with image) */
.result-item {
    position: relative;
    width: 26px;
    height: 26px;
    min-width: 26px;
    border-radius: 50%;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.result-item:hover {
    transform: scale(1.1);
    z-index: 10;
}

/* Multiplier badge on result */
.result-item .multiplier {
    position: absolute;
    top: -3px;
    right: -3px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 0.5rem;
    font-weight: 800;
    padding: 1px 3px;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    border: 1px solid white;
    line-height: 1;
}

/* Sugar Bomb badge - Candyland special */
.result-item .multiplier.sugar-bomb {
    background: linear-gradient(135deg, #FF4500, #DC143C);
    font-size: 0.7rem;
    padding: 2px 4px;
    animation: bombPulse 1.5s ease-in-out infinite;
}

@keyframes bombPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 4px rgba(255, 69, 0, 0.4);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 3px 8px rgba(255, 69, 0, 0.6);
    }
}

/* Text-based results (fallback) */
.bonus-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.bonus-item:hover {
    transform: scale(1.1);
}

/* Larger results for game-stats page */
.last-results-box .result-item,
.last-results-box .bonus-item {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 0.75rem;
}

.last-results-box .result-item .multiplier {
    font-size: 0.55rem;
    padding: 2px 4px;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .result-item,
    .bonus-item {
        width: 24px;
        height: 24px;
        min-width: 24px;
        font-size: 0.55rem;
    }
    
    .result-item .multiplier {
        font-size: 0.4rem;
        padding: 1px 2px;
        top: -2px;
        right: -2px;
    }
    
    .bonuses-list {
        gap: 3px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }
    
    .bonuses-list::-webkit-scrollbar {
        display: none; /* Chrome, Safari */
    }
    
    /* Hide title on mobile for game-stats page */
    .last-results-box h3 {
        display: none;
    }
    
    /* Make results smaller in game-stats on mobile */
    .last-results-box .result-item,
    .last-results-box .bonus-item {
        width: 30px;
        height: 30px;
        min-width: 30px;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
    .result-item,
    .bonus-item {
        width: 30px;
        height: 30px;
        min-width: 30px;
    }
}

/* Animation for new results */
@keyframes resultPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.result-item.new,
.bonus-item.new {
    animation: resultPop 0.4s ease-out;
}

/* Loading state */
.bonuses-list.loading {
    opacity: 0.5;
}

.bonuses-list.loading::after {
    content: "⏳";
    position: absolute;
    font-size: 1.2rem;
}
