/* Game Carousels Section - Modernized */

.game-carousel-section {
    background: var(--gradient-bg-subtle);
    padding: var(--spacing-3xl) 0;
    margin-bottom: 0;
}

.game-carousel-container {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 20px;
}

/* LARGE DESKTOP VIEW (1281px - 1379px) */
@media (max-width: 1379px) and (min-width: 1281px) {
    .game-carousel-container {
        padding: 0 20px;
    }
}

/* EXTRA LARGE SCREENS (≥1380px) */
@media (min-width: 1380px) {
    .game-carousel-container {
        padding: 0;
    }
}

.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-xl);
}

.carousel-heading {
    font-size: var(--font-size-3xl);
    line-height: var(--line-height-tight);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-dark);
    margin: 0;
    background: var(--gradient-text-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.see-all-link {
    font-size: var(--font-size-base);
    line-height: 1.5;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    transition: var(--transition-all-fast);
    position: relative;
    padding-bottom: 2px;
}

.see-all-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-border);
    transition: width var(--transition-medium) var(--ease-smooth);
}

.see-all-link:hover::after {
    width: 100%;
}

.see-all-link:hover {
    color: var(--color-primary-hover);
}

.game-carousel-wrapper {
    position: relative;
    width: 100%;
}

.game-carousel-track {
    display: flex;
    gap: var(--spacing-lg);
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: var(--spacing-xs-2) var(--spacing-xxs) var(--spacing-xl) var(--spacing-xxs);
    /* Prevent scroll chaining - allow page scroll to work normally */
    overscroll-behavior-x: contain;
    overscroll-behavior-y: none;
    /* Prevent horizontal overscroll from blocking vertical scroll */
}

.game-carousel-track::-webkit-scrollbar {
    display: none;
}

/* Game Card - Premium 3D Design */
.game-card {
    display: block;
    min-width: 230px;
    width: 230px;
    flex-shrink: 0;
    background: var(--color-white);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-medium) var(--ease-smooth);
    cursor: pointer;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transform-style: preserve-3d;
    perspective: 1000px;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-card);
    opacity: 0;
    transition: opacity var(--transition-medium) var(--ease-smooth);
    z-index: 1;
    pointer-events: none;
}

.game-card:hover {
    transform: translateY(-8px) rotateX(2deg);
    box-shadow: var(--shadow-xl), var(--shadow-primary-lg);
}

.game-card:hover::before {
    opacity: 1;
}

.game-card-image {
    position: relative;
    width: 230px;
    height: 160px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

.game-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity var(--transition-medium) var(--ease-smooth);
}

.game-card:hover .game-card-image::after {
    opacity: 1;
}

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow) var(--ease-smooth);
}

.game-card:hover .game-card-image img {
    transform: scale(1.1);
}

/* Badge with pulse animation */
.game-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xxxs) var(--spacing-xs-2);
    border-radius: 12px;
    font-size: var(--font-size-xxs);
    font-weight: 700;
    color: #FFFFFF;
    text-transform: uppercase;
    margin-left: var(--spacing-micro);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.badge-hot {
    background: linear-gradient(135deg, #ff4444 0%, #ff6666 100%);
    box-shadow: 0 2px 8px rgba(255, 68, 68, 0.4);
}

.badge-new {
    background: linear-gradient(135deg, #ff0066 0%, #ff3388 100%);
    box-shadow: 0 2px 8px rgba(255, 0, 102, 0.4);
}

.game-info-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: var(--glass-bg-light);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-sm);
    color: var(--color-white);
    cursor: pointer;
    z-index: 3;
    transition: all var(--transition-fast) var(--ease-smooth);
}

.game-info-icon:hover {
    background: var(--glass-bg);
    transform: scale(1.1);
}

.game-card-content {
    padding: var(--spacing-md);
    line-height: 1.5;
    position: relative;
    z-index: 2;
}

.game-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: var(--spacing-xs-2);
    min-height: 18px;
}

.game-title {
    font-size: var(--font-size-md);
    line-height: 1.3;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-dark);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    transition: var(--transition-fast);
}

.game-card:hover .game-title {
    color: var(--color-primary);
}

.game-provider {
    font-size: var(--font-size-xs);
    line-height: 1.4;
    color: var(--color-text-light);
    margin: 0 0 var(--spacing-xs-2) 0;
}

.game-rtp {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: var(--spacing-xxs) var(--spacing-xs-2);
    background: linear-gradient(135deg, #0066CC 0%, #0052a3 100%);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-size-xxxs);
    font-weight: 600;
    color: #FFFFFF;
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.3);
    position: relative;
    overflow: hidden;
}

.game-rtp::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.game-card:hover .game-rtp::before {
    left: 100%;
}

.game-rtp-label {
    font-weight: 700;
}

/* Arrow Buttons - Glassmorphism Style */
.game-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-bg-light);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-medium) var(--ease-smooth);
    color: var(--color-primary);
    z-index: 10;
    box-shadow: var(--shadow-md);
}

.game-carousel-prev {
    left: 0;
}

.game-carousel-next {
    right: 0;
}

.game-carousel-arrow:hover {
    background: var(--color-white);
    border-color: var(--color-primary);
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-primary);
}

.game-carousel-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.game-carousel-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.game-carousel-arrow:disabled:hover {
    transform: translateY(-50%) scale(1);
    box-shadow: var(--shadow-md);
}

.game-carousel-arrow svg {
    width: 24px;
    height: 24px;
}

/* TABLET VIEW (769px - 1280px) */
@media (max-width: 1280px) and (min-width: 769px) {
    .game-carousel-container {
        padding: 0 20px;
    }

    .carousel-heading {
        font-size: var(--font-size-2xl);
    }

    .game-card {
        min-width: 200px;
        width: 200px;
    }

    .game-card-image {
        width: 200px;
        height: 135px;
    }
}

/* MOBILE VIEW (≤768px) */
@media (max-width: 768px) {
    .game-carousel-section {
        padding: var(--spacing-2xl) 0;
        margin-bottom: 0;
    }

    .game-carousel-container {
        padding: 0 var(--spacing-md);
    }

    .carousel-header {
        margin-bottom: var(--spacing-lg);
    }

    .carousel-heading {
        font-size: var(--font-size-xl);
    }

    .see-all-link {
        font-size: var(--font-size-sm);
    }

    .game-card {
        min-width: 2.3rem;
        width: 2.3rem;
    }

    .game-card-image {
        width: 2.3rem;
        height: 1.6rem;
    }

    .game-card-content {
        padding: var(--spacing-sm);
    }

    .game-title {
        font-size: var(--font-size-sm);
    }

    .game-carousel-arrow {
        display: none;
    }

    .game-carousel-track {
        gap: var(--spacing-custom);
        padding: var(--spacing-xs-2) 0 var(--spacing-lg) 0;
    }

    /* Simplified hover effects on mobile */
    .game-card:active {
        transform: scale(0.98);
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {

    .game-card,
    .game-card-image img,
    .game-badge {
        animation: none;
        transition: none;
    }

    .game-card:hover {
        transform: translateY(-4px);
    }
}